[PATCH 2/3] drm/amd/display: Only allow s/g when USWC flag is set.

Michel Dänzer michel at daenzer.net
Tue Jul 23 16:25:30 UTC 2019


On 2019-07-23 6:04 p.m., Andrey Grodzovsky wrote:
> This verifies we don't casue HW hang in case this flag is missing.
> 
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> Tested-by: Shirish S <shirish.s at amd.com>
> ---
>  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 9ef7854..2d50eea 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4413,7 +4413,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
>  		return r;
>  	}
>  
> -	if (plane->type != DRM_PLANE_TYPE_CURSOR)
> +	if (plane->type != DRM_PLANE_TYPE_CURSOR && (rbo->flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC))
>  		domain = amdgpu_display_supported_domains(adev);
>  	else
>  		domain = AMDGPU_GEM_DOMAIN_VRAM;
> 

amdgpu_display_supported_domains() is used in other places as well, so
this should be handled inside it instead.


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


More information about the amd-gfx mailing list