[Freedreno] [PATCH 04/23] drm/msm/mdp5: Fix zpos initial value mismatch

Dmitry Baryshkov dmitry.baryshkov at linaro.org
Mon Feb 7 19:27:24 UTC 2022


On Mon, 7 Feb 2022 at 19:56, Maxime Ripard <maxime at cerno.tech> wrote:
>
> While the mdp5_plane_install_properties() function calls
> drm_plane_create_zpos_property() with an initial value of 1,
> mdp5_plane_reset() will force it to another value depending on the plane
> type.
>
> Fix the discrepancy by setting the initial zpos value to the same value
> in the drm_plane_create_zpos_property() call.

Could you please squash two msm/mdp5 patches into a single patch,
making it clear that the code is moved.

Also please add:
Fixes: 7d36db0be3b9 ("drm/msm/mdp5: switch to standard zpos property")

With that in place:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>

>
> Cc: freedreno at lists.freedesktop.org
> Cc: linux-arm-msm at vger.kernel.org
> Cc: Abhinav Kumar <quic_abhinavk at quicinc.com>
> Cc: Rob Clark <robdclark at gmail.com>
> Cc: Sean Paul <sean at poorly.run>
> Signed-off-by: Maxime Ripard <maxime at cerno.tech>
> ---
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
> index c6b69afcbac8..d60982f4bd11 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
> @@ -48,6 +48,8 @@ static void mdp5_plane_destroy(struct drm_plane *plane)
>  static void mdp5_plane_install_properties(struct drm_plane *plane,
>                 struct drm_mode_object *obj)
>  {
> +       unsigned int zpos;
> +
>         drm_plane_create_rotation_property(plane,
>                                            DRM_MODE_ROTATE_0,
>                                            DRM_MODE_ROTATE_0 |
> @@ -59,7 +61,12 @@ static void mdp5_plane_install_properties(struct drm_plane *plane,
>                         BIT(DRM_MODE_BLEND_PIXEL_NONE) |
>                         BIT(DRM_MODE_BLEND_PREMULTI) |
>                         BIT(DRM_MODE_BLEND_COVERAGE));
> -       drm_plane_create_zpos_property(plane, 1, 1, 255);
> +
> +       if (plane->type == DRM_PLANE_TYPE_PRIMARY)
> +               zpos = STAGE_BASE;
> +       else
> +               zpos = STAGE0 + drm_plane_index(plane);
> +       drm_plane_create_zpos_property(plane, zpos, 1, 255);
>  }
>
>  static void
> --
> 2.34.1
>


-- 
With best wishes
Dmitry


More information about the Freedreno mailing list