* [PATCH 4/4] drm/amd/display: don't expose rotation prop for cursor plane
@ 2020-11-20 20:19 Simon Ser
2020-11-24 15:46 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Simon Ser @ 2020-11-20 20:19 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher, Harry Wentland, Nicholas Kazlauskas
Setting any rotation on the cursor plane is ignored by amdgpu.
Because of DCE/DCN design, it's not possible to rotate the cursor.
Instead of displaying the wrong result, stop advertising the rotation
property for the cursor plane.
Now that we check all cursor plane properties in amdgpu_dm_atomic_check,
remove the TODO.
Signed-off-by: Simon Ser <contact@emersion.fr>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 2542571a8993..3283e22241d7 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6592,7 +6592,8 @@ 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;
- if (dm->adev->asic_type >= CHIP_BONAIRE)
+ if (dm->adev->asic_type >= CHIP_BONAIRE &&
+ plane->type != DRM_PLANE_TYPE_CURSOR)
drm_plane_create_rotation_property(plane, DRM_MODE_ROTATE_0,
supported_rotations);
@@ -8887,7 +8888,6 @@ static int dm_update_plane_state(struct dc *dc,
dm_new_plane_state = to_dm_plane_state(new_plane_state);
dm_old_plane_state = to_dm_plane_state(old_plane_state);
- /*TODO Implement better atomic check for cursor plane */
if (plane->type == DRM_PLANE_TYPE_CURSOR) {
if (!enable || !new_plane_crtc ||
drm_atomic_plane_disabling(plane->state, new_plane_state))
--
2.29.2
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 4/4] drm/amd/display: don't expose rotation prop for cursor plane
2020-11-20 20:19 [PATCH 4/4] drm/amd/display: don't expose rotation prop for cursor plane Simon Ser
@ 2020-11-24 15:46 ` Alex Deucher
2020-11-24 16:01 ` Simon Ser
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2020-11-24 15:46 UTC (permalink / raw)
To: Simon Ser; +Cc: Alex Deucher, Harry Wentland, Nicholas Kazlauskas, amd-gfx list
On Fri, Nov 20, 2020 at 3:19 PM Simon Ser <contact@emersion.fr> wrote:
>
> Setting any rotation on the cursor plane is ignored by amdgpu.
> Because of DCE/DCN design, it's not possible to rotate the cursor.
> Instead of displaying the wrong result, stop advertising the rotation
> property for the cursor plane.
>
> Now that we check all cursor plane properties in amdgpu_dm_atomic_check,
> remove the TODO.
>
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Harry Wentland <hwentlan@amd.com>
> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Applied the series. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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 2542571a8993..3283e22241d7 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6592,7 +6592,8 @@ 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;
>
> - if (dm->adev->asic_type >= CHIP_BONAIRE)
> + if (dm->adev->asic_type >= CHIP_BONAIRE &&
> + plane->type != DRM_PLANE_TYPE_CURSOR)
> drm_plane_create_rotation_property(plane, DRM_MODE_ROTATE_0,
> supported_rotations);
>
> @@ -8887,7 +8888,6 @@ static int dm_update_plane_state(struct dc *dc,
> dm_new_plane_state = to_dm_plane_state(new_plane_state);
> dm_old_plane_state = to_dm_plane_state(old_plane_state);
>
> - /*TODO Implement better atomic check for cursor plane */
> if (plane->type == DRM_PLANE_TYPE_CURSOR) {
> if (!enable || !new_plane_crtc ||
> drm_atomic_plane_disabling(plane->state, new_plane_state))
> --
> 2.29.2
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/4] drm/amd/display: don't expose rotation prop for cursor plane
2020-11-24 15:46 ` Alex Deucher
@ 2020-11-24 16:01 ` Simon Ser
0 siblings, 0 replies; 3+ messages in thread
From: Simon Ser @ 2020-11-24 16:01 UTC (permalink / raw)
To: Alex Deucher
Cc: Alex Deucher, Harry Wentland, Nicholas Kazlauskas, amd-gfx list
On Tuesday, November 24, 2020 4:46 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Fri, Nov 20, 2020 at 3:19 PM Simon Ser contact@emersion.fr wrote:
>
> > Setting any rotation on the cursor plane is ignored by amdgpu.
> > Because of DCE/DCN design, it's not possible to rotate the cursor.
> > Instead of displaying the wrong result, stop advertising the rotation
> > property for the cursor plane.
> > Now that we check all cursor plane properties in amdgpu_dm_atomic_check,
> > remove the TODO.
> > Signed-off-by: Simon Ser contact@emersion.fr
> > Cc: Alex Deucher alexander.deucher@amd.com
> > Cc: Harry Wentland hwentlan@amd.com
> > Cc: Nicholas Kazlauskas nicholas.kazlauskas@amd.com
>
> Applied the series. Thanks!
Thanks a lot of the review!
Simon
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-24 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 20:19 [PATCH 4/4] drm/amd/display: don't expose rotation prop for cursor plane Simon Ser
2020-11-24 15:46 ` Alex Deucher
2020-11-24 16:01 ` Simon Ser
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.