drm/amd/display: fix high part address in dm_plane_helper_prepare_fb()
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 1508925612-31537-1-git-send-email-shirish.s12-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 1/1 drm/amd/display: fix high part address in dm_plane_helper_prepare_fb()
From: Shirish S <[email protected]>
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.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8 -2
@@ -2924,6 +2924,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,struct amdgpu_framebuffer *afb;struct drm_gem_object *obj;struct amdgpu_bo *rbo; +uint64_t chroma_addr =0 ;int r;struct dm_plane_state *dm_plane_state_new, *dm_plane_state_old;unsigned int awidth;
@@ -2965,11 +2966,16 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane, plane_state->address.grph.addr.high_part =upper_32_bits (afb->address); }else { 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 =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 - =lower_32_bits (afb->address) + - (awidth * new_state->fb->height); + =lower_32_bits (chroma_addr); + plane_state->address.video_progressive.chroma_addr.high_part + =upper_32_bits (chroma_addr); } }
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB1826E068C5A21B2291FB701AF2440-/b2+HYfkarSCndJ3FSsNdQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Alex Deucher
Reviewed-byQuoted 7 lines · Shirish
From: Shirish S <[email protected]>
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_checkandatomic_commitfor both RGB & YUV planes.Signed-off-by Shirish S <[email protected]>
Quoted 38 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8
-3@@ -2924,6 +2924,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,struct amdgpu_framebuffer *afb;struct drm_gem_object *obj;struct amdgpu_bo *rbo; +uint64_t chroma_addr =0 ;int r;struct dm_plane_state *dm_plane_state_new, *dm_plane_state_old;unsigned int awidth;@@ -2965,11 +2966,16 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane, plane_state->address.grph.addr.high_part =upper_32_bits (afb->address); }else { 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 =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 - =lower_32_bits (afb->address) + - (awidth * new_state->fb->height); + =lower_32_bits (chroma_addr); + plane_state->address.video_progressive.chroma_addr.high_part + =upper_32_bits (chroma_addr); } } --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Harry Wentland
Reviewed-byQuoted 7 lines · Shirish
From: Shirish S <[email protected]>
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_checkandatomic_commitfor both RGB & YUV planes.Signed-off-by Shirish S <[email protected]>
Harry
Quoted 38 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8
-3@@ -2924,6 +2924,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,struct amdgpu_framebuffer *afb;struct drm_gem_object *obj;struct amdgpu_bo *rbo; +uint64_t chroma_addr =0 ;int r;struct dm_plane_state *dm_plane_state_new, *dm_plane_state_old;unsigned int awidth;@@ -2965,11 +2966,16 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane, plane_state->address.grph.addr.high_part =upper_32_bits (afb->address); }else { 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 =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 - =lower_32_bits (afb->address) + - (awidth * new_state->fb->height); + =lower_32_bits (chroma_addr); + plane_state->address.video_progressive.chroma_addr.high_part + =upper_32_bits (chroma_addr); } } --2.7.4
Quoted 5 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx