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

Andrey Grodzovsky andrey.grodzovsky at amd.com
Tue Jul 23 16:04:10 UTC 2019


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;
-- 
2.7.4



More information about the amd-gfx mailing list