* [PATCH 04/23] drm/msm/mdp5: Fix zpos initial value mismatch
[not found] <20220207163515.1038648-1-maxime@cerno.tech>
@ 2022-02-07 16:34 ` Maxime Ripard
2022-02-07 19:27 ` Dmitry Baryshkov
2022-02-07 16:35 ` [PATCH 12/23] drm/msm/mdp5: Remove redundant zpos initialisation Maxime Ripard
1 sibling, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2022-02-07 16:34 UTC (permalink / raw)
To: Daniel Vetter, David Airlie
Cc: dri-devel, Maarten Lankhorst, Thomas Zimmermann, Maxime Ripard,
Dave Stevenson, Phil Elwell, Tim Gover, Dom Cobley, freedreno,
linux-arm-msm, Abhinav Kumar, Rob Clark, Sean Paul
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.
Cc: freedreno@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Signed-off-by: Maxime Ripard <maxime@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 12/23] drm/msm/mdp5: Remove redundant zpos initialisation
[not found] <20220207163515.1038648-1-maxime@cerno.tech>
2022-02-07 16:34 ` [PATCH 04/23] drm/msm/mdp5: Fix zpos initial value mismatch Maxime Ripard
@ 2022-02-07 16:35 ` Maxime Ripard
1 sibling, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2022-02-07 16:35 UTC (permalink / raw)
To: Daniel Vetter, David Airlie
Cc: dri-devel, Maarten Lankhorst, Thomas Zimmermann, Maxime Ripard,
Dave Stevenson, Phil Elwell, Tim Gover, Dom Cobley, freedreno,
linux-arm-msm, Abhinav Kumar, Rob Clark, Sean Paul
The mdp KMS driver will call drm_plane_create_zpos_property() with an
init value depending on the plane purpose.
Since the initial value wasn't carried over in the state, the driver had
to set it again in mdp5_plane_reset(). However, the helpers have been
adjusted to set it properly at reset, so this is not needed anymore.
Cc: freedreno@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
index d60982f4bd11..5d8ac84c510b 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
@@ -98,13 +98,6 @@ static void mdp5_plane_reset(struct drm_plane *plane)
kfree(to_mdp5_plane_state(plane->state));
mdp5_state = kzalloc(sizeof(*mdp5_state), GFP_KERNEL);
-
- if (plane->type == DRM_PLANE_TYPE_PRIMARY)
- mdp5_state->base.zpos = STAGE_BASE;
- else
- mdp5_state->base.zpos = STAGE0 + drm_plane_index(plane);
- mdp5_state->base.normalized_zpos = mdp5_state->base.zpos;
-
__drm_atomic_helper_plane_reset(plane, &mdp5_state->base);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 04/23] drm/msm/mdp5: Fix zpos initial value mismatch
2022-02-07 16:34 ` [PATCH 04/23] drm/msm/mdp5: Fix zpos initial value mismatch Maxime Ripard
@ 2022-02-07 19:27 ` Dmitry Baryshkov
2022-02-10 8:43 ` Maxime Ripard
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Baryshkov @ 2022-02-07 19:27 UTC (permalink / raw)
To: Maxime Ripard
Cc: Daniel Vetter, David Airlie, dri-devel, Maarten Lankhorst,
Thomas Zimmermann, Dave Stevenson, Phil Elwell, Tim Gover,
Dom Cobley, freedreno, linux-arm-msm, Abhinav Kumar, Rob Clark,
Sean Paul
On Mon, 7 Feb 2022 at 19:56, Maxime Ripard <maxime@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@linaro.org>
>
> Cc: freedreno@lists.freedesktop.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Sean Paul <sean@poorly.run>
> Signed-off-by: Maxime Ripard <maxime@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 04/23] drm/msm/mdp5: Fix zpos initial value mismatch
2022-02-07 19:27 ` Dmitry Baryshkov
@ 2022-02-10 8:43 ` Maxime Ripard
0 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2022-02-10 8:43 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Daniel Vetter, David Airlie, dri-devel, Maarten Lankhorst,
Thomas Zimmermann, Dave Stevenson, Phil Elwell, Tim Gover,
Dom Cobley, freedreno, linux-arm-msm, Abhinav Kumar, Rob Clark,
Sean Paul
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
Hi,
On Mon, Feb 07, 2022 at 10:27:24PM +0300, Dmitry Baryshkov wrote:
> On Mon, 7 Feb 2022 at 19:56, Maxime Ripard <maxime@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")
If we are to merge both patches, we can't have a fixes tag, since it
relies on the other framework patches that won't get backported.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-10 8:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20220207163515.1038648-1-maxime@cerno.tech>
2022-02-07 16:34 ` [PATCH 04/23] drm/msm/mdp5: Fix zpos initial value mismatch Maxime Ripard
2022-02-07 19:27 ` Dmitry Baryshkov
2022-02-10 8:43 ` Maxime Ripard
2022-02-07 16:35 ` [PATCH 12/23] drm/msm/mdp5: Remove redundant zpos initialisation Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).