drm/amd/display: create plane rotation property for Bonaire and later
authorMauro Rossi <issor.oruam@gmail.com>
Thu, 16 Jul 2020 18:54:28 +0000 (20:54 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Jul 2020 20:46:51 +0000 (16:46 -0400)
[Why]
DCE6 chipsets do not support HW rotation

[How]
rotation property is created for Bonaire and later

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 149da89..5109ee0 100644 (file)
@@ -6009,8 +6009,9 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
                DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 |
                DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270;
 
-       drm_plane_create_rotation_property(plane, DRM_MODE_ROTATE_0,
-                                          supported_rotations);
+       if (dm->adev->asic_type >= CHIP_BONAIRE)
+               drm_plane_create_rotation_property(plane, DRM_MODE_ROTATE_0,
+                                                  supported_rotations);
 
        drm_plane_helper_add(plane, &dm_plane_helper_funcs);