Re: [PATCH v6 10/43] drm/drm_atomic_state_helper: Properly load default value for rotation
From: Oarora Etimis
Date: Tue Nov 24 2026 - 09:13:56 EST
On Fri, Nov 20, 2026 at 06:58:52PM +0100, Louis Chauvet wrote:
> Currently, the default rotation is always DRM_MODE_ROTATE_0 for all planes.
> Some planes may have a rotation property, and the property may specify a
> different default value and supported values.
>
> This is not an issue for "fixed" configurations, but with the introduction
> of VKMS configuration, some plane may only support 90° and 180°
> rotations, so the reset state of the plane was wrong (forced to 0°).
>
> Fixes: ab2dd990f4ab ("drm: Add __drm_atomic_helper_crtc_state_reset() & co.")
> Signed-off-by: Louis Chauvet <louis.chauvet@xxxxxxxxxxx>
> ---
> drivers/gpu/drm/drm_atomic_state_helper.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c
> index 267f44330629..13e848abb33c 100644
> --- a/drivers/gpu/drm/drm_atomic_state_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_state_helper.c
> @@ -32,6 +32,7 @@
> #include <drm/drm_crtc.h>
> #include <drm/drm_device.h>
> #include <drm/drm_framebuffer.h>
> +#include <drm/drm_mode_object.h>
> #include <drm/drm_plane.h>
> #include <drm/drm_print.h>
> #include <drm/drm_vblank.h>
> @@ -231,6 +232,11 @@ void __drm_atomic_helper_plane_state_init(struct drm_plane_state *plane_state,
>
> plane_state->plane = plane;
> plane_state->rotation = DRM_MODE_ROTATE_0;
> + if (plane->rotation_property &&
> + !drm_object_property_get_default_value(&plane->base,
> + plane->rotation_property,
> + &val))
> + plane_state->rotation = val;
>
> plane_state->alpha = DRM_BLEND_ALPHA_OPAQUE;
>
>
> --
> 2.56.0
>
Reviewed-by: Oarora Etimis <oaroraetimis@xxxxxxxxx>