Commit 56087b31 authored by Shirish S's avatar Shirish S Committed by Alex Deucher

drm/amd/display: fix high part address in dm_plane_helper_prepare_fb()

The high part calculation of luma and chroma address' was
missing in dm_plane_helper_prepare_fb().

This fix brings uniformity in the address' at atomic_check
and atomic_commit for both RGB & YUV planes.
Signed-off-by: default avatarShirish S <shirish.s@amd.com>
Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4d3e00da
...@@ -2896,6 +2896,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane, ...@@ -2896,6 +2896,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
struct amdgpu_framebuffer *afb; struct amdgpu_framebuffer *afb;
struct drm_gem_object *obj; struct drm_gem_object *obj;
struct amdgpu_bo *rbo; struct amdgpu_bo *rbo;
uint64_t chroma_addr = 0;
int r; int r;
struct dm_plane_state *dm_plane_state_new, *dm_plane_state_old; struct dm_plane_state *dm_plane_state_new, *dm_plane_state_old;
unsigned int awidth; unsigned int awidth;
...@@ -2937,11 +2938,16 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane, ...@@ -2937,11 +2938,16 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
plane_state->address.grph.addr.high_part = upper_32_bits(afb->address); plane_state->address.grph.addr.high_part = upper_32_bits(afb->address);
} else { } else {
awidth = ALIGN(new_state->fb->width, 64); awidth = ALIGN(new_state->fb->width, 64);
plane_state->address.type = PLN_ADDR_TYPE_VIDEO_PROGRESSIVE;
plane_state->address.video_progressive.luma_addr.low_part plane_state->address.video_progressive.luma_addr.low_part
= lower_32_bits(afb->address); = lower_32_bits(afb->address);
plane_state->address.video_progressive.luma_addr.high_part
= upper_32_bits(afb->address);
chroma_addr = afb->address + (u64)(awidth * new_state->fb->height);
plane_state->address.video_progressive.chroma_addr.low_part plane_state->address.video_progressive.chroma_addr.low_part
= lower_32_bits(afb->address) + = lower_32_bits(chroma_addr);
(awidth * new_state->fb->height); plane_state->address.video_progressive.chroma_addr.high_part
= upper_32_bits(chroma_addr);
} }
} }
......
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