Commit 110ff543 authored by Shirish S's avatar Shirish S Committed by Alex Deucher

drm/amd/display: update the YUV plane offsets

This patch updates the planes default offsets to
the appropriate ones, and aligns the pitch to 64 bits.

BUG=SWDEV-119421
TEST=Boots to UI on jadeite
TEST=
     plane_test --format AR24 --size 500x50 -p --format YV12 --size 500x500
     plane_test --format AR24 --size 500x50 -p --format YV12 --size 1280x720
     plane_test --format AR24 --size 500x50 -p --format YV12 --size 1366x768
Signed-off-by: default avatarShirish S <shirish.s@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e6fbd5df
...@@ -511,21 +511,21 @@ static void fill_plane_attributes_from_fb( ...@@ -511,21 +511,21 @@ static void fill_plane_attributes_from_fb(
surface->address.type = PLN_ADDR_TYPE_VIDEO_PROGRESSIVE; surface->address.type = PLN_ADDR_TYPE_VIDEO_PROGRESSIVE;
surface->address.video_progressive.luma_addr.low_part surface->address.video_progressive.luma_addr.low_part
= lower_32_bits(fb_location); = lower_32_bits(fb_location);
surface->address.video_progressive.chroma_addr.high_part surface->address.video_progressive.chroma_addr.low_part
= upper_32_bits(fb_location); = lower_32_bits(fb_location) +
(fb->width * fb->height);
surface->plane_size.video.luma_size.x = 0; surface->plane_size.video.luma_size.x = 0;
surface->plane_size.video.luma_size.y = 0; surface->plane_size.video.luma_size.y = 0;
surface->plane_size.video.luma_size.width = fb->width; surface->plane_size.video.luma_size.width = fb->width;
surface->plane_size.video.luma_size.height = fb->height; surface->plane_size.video.luma_size.height = fb->height;
/* TODO: unhardcode */ /* TODO: unhardcode */
surface->plane_size.video.luma_pitch = fb->pitches[0] / 4; surface->plane_size.video.luma_pitch = ALIGN(fb->width, 64);
surface->plane_size.video.chroma_size.x = 0; surface->plane_size.video.chroma_size.x = 0;
surface->plane_size.video.chroma_size.y = 0; surface->plane_size.video.chroma_size.y = 0;
surface->plane_size.video.chroma_size.width = fb->width; surface->plane_size.video.chroma_size.width = fb->width / 2;
surface->plane_size.video.chroma_size.height = fb->height; surface->plane_size.video.chroma_size.height = fb->height / 2;
surface->plane_size.video.chroma_pitch = surface->plane_size.video.chroma_pitch = ALIGN(fb->width, 64) / 2;
fb->pitches[0] / 4;
/* TODO: unhardcode */ /* TODO: unhardcode */
surface->color_space = COLOR_SPACE_YCBCR709; surface->color_space = COLOR_SPACE_YCBCR709;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment