drm/amd/display: Create plane rotation property
Subsystems (3)
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
@@ -4680,6 +4680,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));
@@ -4711,6 +4712,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
A message that is not in the archive (sent off-list or not yet received): 20190912164404.12725-1-pgriffais-38hxoXRICFZx67MzidHQgQC/[email protected]
Quoted 3 lines · Pierre-Loup A. Griffais
It's otherwise properly supported, just needs exposing to userspace.
Signed-off-by Pierre-Loup A. Griffais <[email protected]>
I know IGT has some tests for plane rotation, do you happen to know what tests pass or fail when exposing this?
I think DCN1 (Raven) should work as expected but I'd be concerned about DCE or DCN2. I think we have had some cursor bugs in the past with cursor rotation but they might only be exposed when used in conjunction with overlay planes.
I'd just like to make sure there's suitable testing at least if we're going to expose this to userspace.
Nicholas Kazlauskas
Quoted 21 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 +1
-0@@ -4680,6 +4680,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));@@ -4711,6 +4712,13 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, DRM_COLOR_YCBCR_BT709, DRM_COLOR_YCBCR_LIMITED_RANGE); }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, · line 4724
Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +7
-0+ 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 */
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): b781b06d-a52f-0291-b0df-d90b81a66c84-5C7GfCeVMHo@public.gmane.org
Quoted 12 lines · Nicholas
Quoted 3 lines · Pierre-Loup A. Griffais
It's otherwise properly supported, just needs exposing to userspace.
Signed-off-by Pierre-Loup A. Griffais <[email protected]>I know IGT has some tests for plane rotation, do you happen to know what tests pass or fail when exposing this?
I think DCN1 (Raven) should work as expected but I'd be concerned about DCE or DCN2. I think we have had some cursor bugs in the past with cursor rotation but they might only be exposed when used in conjunction with overlay planes.
Windows guys had a fix (in DC) for cursor with HW rotation on DCN a few weeks ago. That might have fixed these issues.
We should still make sure we can pass IGT tests that do rotation.
How did you test? Weston?
Harry
Quoted 34 lines
I'd just like to make sure there's suitable testing at least if we're going to expose this to userspace.
Nicholas Kazlauskas
Quoted 29 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
-0@@ -4680,6 +4680,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));@@ -4711,6 +4712,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);
Quoted 3 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, · line 4724
Quoted 2 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0/* Create (reset) the plane state */
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 907ff2ce-e273-1ea0-a17b-522745756164-5C7GfCeVMHo@public.gmane.org
Quoted 14 lines · Harry Wentland
Quoted 12 lines · Nicholas
Quoted 3 lines · Pierre-Loup A. Griffais
It's otherwise properly supported, just needs exposing to userspace.
Signed-off-by Pierre-Loup A. Griffais <[email protected]>I know IGT has some tests for plane rotation, do you happen to know what tests pass or fail when exposing this?
I think DCN1 (Raven) should work as expected but I'd be concerned about DCE or DCN2. I think we have had some cursor bugs in the past with cursor rotation but they might only be exposed when used in conjunction with overlay planes.
Quoted 6 lines
Windows guys had a fix (in DC) for cursor with HW rotation on DCN a few weeks ago. That might have fixed these issues.
We should still make sure we can pass IGT tests that do rotation.
How did you test? Weston?
I've tested it with a patched kmscube to add the rotation property in the atomic path. 90, 180 and 270 all seem happy on Raven with that setup. I've not tested any other chip at this point.
Quoted 40 lines
Harry
Quoted 37 lines
I'd just like to make sure there's suitable testing at least if we're going to expose this to userspace.
Nicholas Kazlauskas
Quoted 31 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
-0@@ -4680,6 +4680,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));@@ -4711,6 +4712,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 */
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 9cc53c0f-db53-96a1-32de-a2303c3b62d9-38hxoXRICFZx67MzidHQgQC/[email protected]
Quoted 15 lines · Pierre-Loup A. Griffais
Quoted 14 lines · Harry Wentland
Quoted 12 lines · Nicholas
Quoted 3 lines · Pierre-Loup A. Griffais
It's otherwise properly supported, just needs exposing to userspace.
Signed-off-by Pierre-Loup A. Griffais <[email protected]>I know IGT has some tests for plane rotation, do you happen to know what tests pass or fail when exposing this?
I think DCN1 (Raven) should work as expected but I'd be concerned about DCE or DCN2. I think we have had some cursor bugs in the past with cursor rotation but they might only be exposed when used in conjunction with overlay planes.
Quoted 8 lines
Quoted 6 lines
Windows guys had a fix (in DC) for cursor with HW rotation on DCN a few weeks ago. That might have fixed these issues.
We should still make sure we can pass IGT tests that do rotation.
How did you test? Weston?
I've tested it with a patched kmscube to add the rotation property in the atomic path. 90, 180 and 270 all seem happy on Raven with that setup. I've not tested any other chip at this point.
If there's more testing you'd like me to do, would anyone point me in the right direction? I'm new to all this, sorry.
Thanks,
- Pierre-Loup
Quoted 41 lines
Quoted 40 lines
Harry
Quoted 36 lines
I'd just like to make sure there's suitable testing at least if we're going to expose this to userspace.
Nicholas Kazlauskas
Quoted 30 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
-0@@ -4680,6 +4680,7 @@ static int amdgpu_dm_plane_init(structamdgpu_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));@@ -4711,6 +4712,13 @@ static int amdgpu_dm_plane_init(structamdgpu_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 */
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
A message that is not in the archive (sent off-list or not yet received): d3d4c53c-0ff3-2833-54a1-bcb7a9ac58b3-38hxoXRICFZx67MzidHQgQC/[email protected]
Quoted 24 lines · Pierre-Loup A. Griffais
Quoted 21 lines · Pierre-Loup A. Griffais
Quoted 20 lines · Harry Wentland
Quoted 4 lines · Nicholas
Quoted 3 lines · Pierre-Loup A. Griffais
It's otherwise properly supported, just needs exposing to userspace.
Signed-off-by Pierre-Loup A. Griffais <[email protected]>Quoted 9 lines
I know IGT has some tests for plane rotation, do you happen to know what
tests pass or fail when exposing this?I think DCN1 (Raven) should work as expected but I'd be concerned about DCE or DCN2. I think we have had some cursor bugs in the past with cursor rotation but they might only be exposed when used in conjunction with overlay planes.
Windows guys had a fix (in DC) for cursor with HW rotation on DCN a few weeks ago. That might have fixed these issues.
We should still make sure we can pass IGT tests that do rotation.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
How did you test? Weston?
I've tested it with a patched kmscube to add the rotation property in the atomic path. 90, 180 and 270 all seem happy on Raven with that setup. I've not tested any other chip at this point.
If there's more testing you'd like me to do, would anyone point me in the right direction? I'm new to all this, sorry.
I'd be mostly interested in getting IGT tests going for our CI so we have regular automated testing on the feature. The "kms_rotation_crc" test:
https://gitlab.freedesktop.org/drm/igt-gpu-tools/blob/master/tests/kms_rotation_crc.c
...looks like the correct test for this property but it seems like the test would need to be modified to use DRIVER_ANY instead of DRIVER_INTEL for drm_open_driver_master.
It probably needs a few "is_i915_device(...)" checks placed before "intel_gen(...") checks as well since we don't support i915 tiling modifiers nor Intel generation checks. With those modifications I'd imagine it'd probably run as expected but I haven't had the chance to try it out.
Nicholas Kazlauskas
Quoted 51 lines
Thanks,
- Pierre-LoupQuoted 42 lines
Quoted 41 lines
Harry
Quoted 37 lines
I'd just like to make sure there's suitable testing at least if we're going to expose this to userspace.
Nicholas Kazlauskas
Quoted 31 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
-0@@ -4680,6 +4680,7 @@ static int amdgpu_dm_plane_init(structamdgpu_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));@@ -4711,6 +4712,13 @@ static int amdgpu_dm_plane_init(structamdgpu_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 */Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
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