Skip to contentSkip to conversation

drm/amd/display: Create plane rotation property

PATCH In review Pierre-Loup A. Griffais 2 participants 2 messages Jul 21, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Create plane rotation property

It's otherwise properly supported, just needs exposing to userspace.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8 -0
index a52f0b13a2c8..b7bef398057e 100644
@@ -4713,6 +4713,7 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
 	uint32_t formats[32];
 	int num_formats;
 	int res = -EPERM;
+	unsigned int supported_rotations;
 
 	num_formats = get_plane_formats(plane, plane_cap, formats,
 					ARRAY_SIZE(formats));
@@ -4744,6 +4745,13 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
 			DRM_COLOR_YCBCR_BT709, DRM_COLOR_YCBCR_LIMITED_RANGE);
 	}
 
+	supported_rotations =
+		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);
+
 	drm_plane_helper_add(plane, &dm_plane_helper_funcs);
 
 	/* Create (reset) the plane state */
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw
Quoted 4 lines · Pierre-Loup A. Griffais

It's otherwise properly supported, just needs exposing to userspace.

Already applied:
https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-5.9&id=ecc874a6e7cb398b363b4e078fca4c097cb286ab

Thanks,

Alex

Quoted 33 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8 -1
index a52f0b13a2c8..b7bef398057e 100644
@@ -4713,6 +4713,7 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
        uint32_t formats[32];
        int num_formats;
        int res = -EPERM;
+       unsigned int supported_rotations;
 
        num_formats = get_plane_formats(plane, plane_cap, formats,
                                        ARRAY_SIZE(formats));
@@ -4744,6 +4745,13 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
                        DRM_COLOR_YCBCR_BT709, DRM_COLOR_YCBCR_LIMITED_RANGE);
        }
 
+       supported_rotations =
+               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);
+
        drm_plane_helper_add(plane, &dm_plane_helper_funcs);
 
        /* Create (reset) the plane state */
--

2.17.1

Quoted 4 lines

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

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