On 4/2/19 10:26 PM, tiancyin wrote:
> [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.
> 
> Change-Id: I07a53a48a33940cfb6006ed3738583f9703c7993
> Signed-off-by: Tianci Yin <[email protected]>
> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 744acd8..0343ff1 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -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:

Reviewed-by: Nicholas Kazlauskas <[email protected]>

>       int ret;
>   
>       if (!plane->state->fb && !old_plane_state->fb)
> 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to