[PATCH 2/2] drm/amdgpu: fix cursor setting of dce6/dce8

Michel Dänzer michel at daenzer.net
Wed Dec 14 07:29:45 UTC 2016


On 14/12/16 03:45 PM, Flora Cui wrote:
> Change-Id: Ic900051ece1bf7aaf01b3811dde4cbe426be8b42
> Signed-off-by: Flora Cui <Flora.Cui at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 6 +-----
>  drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 --
>  2 files changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> index b3846c2..ca1bcf7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> @@ -1944,9 +1944,7 @@ static int dce_v6_0_crtc_cursor_set2(struct drm_crtc *crtc,
>  
>  	dce_v6_0_lock_cursor(crtc, true);
>  
> -	if (width != amdgpu_crtc->cursor_width ||
> -	    height != amdgpu_crtc->cursor_height ||
> -	    hot_x != amdgpu_crtc->cursor_hot_x ||
> +	if (hot_x != amdgpu_crtc->cursor_hot_x ||
>  	    hot_y != amdgpu_crtc->cursor_hot_y) {
>  		int x, y;
>  
> @@ -1955,8 +1953,6 @@ static int dce_v6_0_crtc_cursor_set2(struct drm_crtc *crtc,
>  
>  		dce_v6_0_cursor_move_locked(crtc, x, y);
>  
> -		amdgpu_crtc->cursor_width = width;
> -		amdgpu_crtc->cursor_height = height;
>  		amdgpu_crtc->cursor_hot_x = hot_x;
>  		amdgpu_crtc->cursor_hot_y = hot_y;
>  	}
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index c0abadf..fb7c0e9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -2437,8 +2437,6 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,
>  
>  		dce_v8_0_cursor_move_locked(crtc, x, y);
>  
> -		amdgpu_crtc->cursor_width = width;
> -		amdgpu_crtc->cursor_height = height;
>  		amdgpu_crtc->cursor_hot_x = hot_x;
>  		amdgpu_crtc->cursor_hot_y = hot_y;
>  	}
> 

Good catch, thanks Flora! Please add

Fixes: 7c83d7abc999 ("drm/amdgpu: Only update the CUR_SIZE register when
necessary")

to get

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list