All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations
@ 2022-05-11 22:27 Abhinav Kumar
  2022-05-11 22:50 ` Jessica Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Abhinav Kumar @ 2022-05-11 22:27 UTC (permalink / raw)
  To: freedreno
  Cc: quic_kalyant, Abhinav Kumar, dri-devel, swboyd, seanpaul,
	dmitry.baryshkov, quic_jesszhan, quic_aravindh, quic_khsieh,
	quic_vpolimer

DRM_MODE_ROTATE_180 was previously marked as supported even
for devices not supporting inline rotation.

This is true because the SSPPs can always flip the image.

After inline rotation support changes, this bit was removed
and kms_rotation_crc IGT test starts skipping now whereas
it was previously passing.

Restore DRM_MODE_ROTATE_180 bit to the supported rotations
list.

Fixes: dabfdd89eaa92 ("add inline rotation support for sc7280")
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 9d2f0364d2c7..5b5aef249390 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -1577,7 +1577,7 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
 			BIT(DRM_MODE_BLEND_PREMULTI) |
 			BIT(DRM_MODE_BLEND_COVERAGE));
 
-	supported_rotations = DRM_MODE_REFLECT_MASK | DRM_MODE_ROTATE_0;
+	supported_rotations = DRM_MODE_REFLECT_MASK | DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180;
 
 	if (pdpu->pipe_hw->cap->features & BIT(DPU_SSPP_INLINE_ROTATION))
 		supported_rotations |= DRM_MODE_ROTATE_MASK;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations
  2022-05-11 22:27 [PATCH] drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations Abhinav Kumar
@ 2022-05-11 22:50 ` Jessica Zhang
  2022-05-11 23:41 ` Dmitry Baryshkov
  2022-05-12  0:02 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Jessica Zhang @ 2022-05-11 22:50 UTC (permalink / raw)
  To: Abhinav Kumar, freedreno
  Cc: quic_kalyant, dri-devel, swboyd, seanpaul, dmitry.baryshkov,
	quic_aravindh, quic_khsieh, quic_vpolimer



On 5/11/2022 3:27 PM, Abhinav Kumar wrote:
> DRM_MODE_ROTATE_180 was previously marked as supported even
> for devices not supporting inline rotation.
> 
> This is true because the SSPPs can always flip the image.
> 
> After inline rotation support changes, this bit was removed
> and kms_rotation_crc IGT test starts skipping now whereas
> it was previously passing.
> 
> Restore DRM_MODE_ROTATE_180 bit to the supported rotations
> list.
> 
> Fixes: dabfdd89eaa92 ("add inline rotation support for sc7280")
> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com> # Trogdor (SC8170)

> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> index 9d2f0364d2c7..5b5aef249390 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> @@ -1577,7 +1577,7 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
>   			BIT(DRM_MODE_BLEND_PREMULTI) |
>   			BIT(DRM_MODE_BLEND_COVERAGE));
>   
> -	supported_rotations = DRM_MODE_REFLECT_MASK | DRM_MODE_ROTATE_0;
> +	supported_rotations = DRM_MODE_REFLECT_MASK | DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180;
>   
>   	if (pdpu->pipe_hw->cap->features & BIT(DPU_SSPP_INLINE_ROTATION))
>   		supported_rotations |= DRM_MODE_ROTATE_MASK;
> -- 
> 2.35.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations
  2022-05-11 22:27 [PATCH] drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations Abhinav Kumar
  2022-05-11 22:50 ` Jessica Zhang
@ 2022-05-11 23:41 ` Dmitry Baryshkov
  2022-05-12  0:02 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2022-05-11 23:41 UTC (permalink / raw)
  To: Abhinav Kumar, freedreno
  Cc: quic_kalyant, dri-devel, swboyd, seanpaul, quic_jesszhan,
	quic_aravindh, quic_khsieh, quic_vpolimer

On 12/05/2022 01:27, Abhinav Kumar wrote:
> DRM_MODE_ROTATE_180 was previously marked as supported even
> for devices not supporting inline rotation.
> 
> This is true because the SSPPs can always flip the image.
> 
> After inline rotation support changes, this bit was removed
> and kms_rotation_crc IGT test starts skipping now whereas
> it was previously passing.
> 
> Restore DRM_MODE_ROTATE_180 bit to the supported rotations
> list.
> 
> Fixes: dabfdd89eaa92 ("add inline rotation support for sc7280")
> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> index 9d2f0364d2c7..5b5aef249390 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> @@ -1577,7 +1577,7 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
>   			BIT(DRM_MODE_BLEND_PREMULTI) |
>   			BIT(DRM_MODE_BLEND_COVERAGE));
>   
> -	supported_rotations = DRM_MODE_REFLECT_MASK | DRM_MODE_ROTATE_0;
> +	supported_rotations = DRM_MODE_REFLECT_MASK | DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180;

Nit: can we rename this to handled_rotations to remove confusion with 
supported_rotations from dpu_plane_atomic_check()?

Nevertheless:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

>   
>   	if (pdpu->pipe_hw->cap->features & BIT(DPU_SSPP_INLINE_ROTATION))
>   		supported_rotations |= DRM_MODE_ROTATE_MASK;


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations
  2022-05-11 22:27 [PATCH] drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations Abhinav Kumar
  2022-05-11 22:50 ` Jessica Zhang
  2022-05-11 23:41 ` Dmitry Baryshkov
@ 2022-05-12  0:02 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2022-05-12  0:02 UTC (permalink / raw)
  To: Abhinav Kumar, freedreno
  Cc: quic_kalyant, dri-devel, quic_khsieh, seanpaul, dmitry.baryshkov,
	quic_jesszhan, quic_aravindh, quic_vpolimer

Quoting Abhinav Kumar (2022-05-11 15:27:10)
> DRM_MODE_ROTATE_180 was previously marked as supported even
> for devices not supporting inline rotation.
>
> This is true because the SSPPs can always flip the image.
>
> After inline rotation support changes, this bit was removed
> and kms_rotation_crc IGT test starts skipping now whereas
> it was previously passing.
>
> Restore DRM_MODE_ROTATE_180 bit to the supported rotations
> list.
>
> Fixes: dabfdd89eaa92 ("add inline rotation support for sc7280")
> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-12  0:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 22:27 [PATCH] drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations Abhinav Kumar
2022-05-11 22:50 ` Jessica Zhang
2022-05-11 23:41 ` Dmitry Baryshkov
2022-05-12  0:02 ` Stephen Boyd

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.