drm/amd/display: fix cursor black issue
Subsystems (3)
PATCH 1/1 drm/amd/display: fix cursor black issue
[Why]
the member sdr_white_level of struct dc_cursor_attributes was not initialized, then the random value result that dcn10_set_cursor_sdr_white_level() set error hw_scale value 0x20D9(normal value is 0x3c00), this cause the black cursor issue.
[how]
just initilize the obj of struct dc_cursor_attributes to zero to avoid the random value.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -5062,7 +5062,7 @@ static void handle_cursor_update(struct drm_plane *plane,struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc);uint64_t address = afb ? afb->address :0 ;struct dc_cursor_position position; -struct dc_cursor_attributes attributes; +struct dc_cursor_attributes attributes = {0 };int ret;if (!plane->state->fb && !old_plane_state->fb)
Signature · 6 lines
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): 1554258377-4594-1-git-send-email-tianci.yin-5C7GfCeVMHo@public.gmane.org
Kazlauskas, Nicholas
Reviewed-by Nicholas KazlauskasQuoted 21 lines · tiancyin
[Why]
the membersdr_white_levelof structdc_cursor_attributeswas not initialized, then the random value result thatdcn10_set_cursor_sdr_white_level()set errorhw_scalevalue 0x20D9(normal value is0x3c00), this cause the black cursor issue.[how]
just initilize the obj of structdc_cursor_attributesto zero to avoid the random value.Change-Id I07a53a48a33940cfb6006ed3738583f9703c7993Signed-off-by Tianci Yin <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void handle_cursor_update(struct drm_plane *plane, · line 5065
Quoted 5 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-1@@ -5062,7 +5062,7 @@ static void handle_cursor_update(struct drm_plane *plane,struct amdgpu_crtc *amdgpu_crtc =to_amdgpu_crtc (crtc);uint64_t address = afb ? afb->address :0 ;struct dc_cursor_position position; -struct dc_cursor_attributes attributes; +struct dc_cursor_attributes attributes = {0 };
It's probably best to make this a memset instead since we've had compilers complain about brace / aggregate initialization before.
With that change this patch is:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void handle_cursor_update(struct drm_plane *plane, · line 5068
Quoted 4 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0int ret;if (!plane->state->fb && !old_plane_state->fb)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx