linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0
@ 2021-10-27 16:27 Mark Yacoub
  2021-12-09  0:15 ` Chun-Kuang Hu
  2021-12-13 16:07 ` [PATCH v2] " Mark Yacoub
  0 siblings, 2 replies; 7+ messages in thread
From: Mark Yacoub @ 2021-10-27 16:27 UTC (permalink / raw)
  Cc: seanpaul, Mark Yacoub, Mark Yacoub, Chun-Kuang Hu, Philipp Zabel,
	David Airlie, Daniel Vetter, Matthias Brugger, dri-devel,
	linux-mediatek, linux-arm-kernel, linux-kernel

From: Mark Yacoub <markyacoub@google.com>

At the reset hook, call __drm_atomic_helper_plane_reset which is
called at the initialization of the plane and sets the default value of
rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

Tested on Jacuzzi (MTK).
Resolves IGT@kms_properties@plane-properties-{legacy,atomic}

Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
index e6dcb34d30522..accd26481b9fb 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
@@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
 		state = kzalloc(sizeof(*state), GFP_KERNEL);
 		if (!state)
 			return;
-		plane->state = &state->base;
 	}
 
+	__drm_atomic_helper_plane_reset(plane, &state->base);
+
 	state->base.plane = plane;
 	state->pending.format = DRM_FORMAT_RGB565;
 }
-- 
2.33.0.1079.g6e70778dc9-goog


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0
  2021-10-27 16:27 [PATCH] drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0 Mark Yacoub
@ 2021-12-09  0:15 ` Chun-Kuang Hu
  2021-12-09 17:40   ` Mark Yacoub
  2021-12-13 16:07 ` [PATCH v2] " Mark Yacoub
  1 sibling, 1 reply; 7+ messages in thread
From: Chun-Kuang Hu @ 2021-12-09  0:15 UTC (permalink / raw)
  To: markyacoub
  Cc: Sean Paul, Mark Yacoub, Chun-Kuang Hu, Philipp Zabel,
	David Airlie, Daniel Vetter, Matthias Brugger, DRI Development,
	moderated list:ARM/Mediatek SoC support, Linux ARM, linux-kernel

Hi Mark:

Mark Yacoub <markyacoub@chromium.org> 於 2021年10月28日 週四 上午12:28寫道:
>
> From: Mark Yacoub <markyacoub@google.com>
>
> At the reset hook, call __drm_atomic_helper_plane_reset which is
> called at the initialization of the plane and sets the default value of
> rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

This patch looks good to me, but please fix this checkpatch warning:

WARNING: From:/Signed-off-by: email address mismatch: 'From: Mark
Yacoub <markyacoub@google.com>' != 'Signed-off-by: Mark Yacoub
<markyacoub@chromium.org>'

total: 0 errors, 1 warnings, 11 lines checked

Regards,
Chun-Kuang.

>
> Tested on Jacuzzi (MTK).
> Resolves IGT@kms_properties@plane-properties-{legacy,atomic}
>
> Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> index e6dcb34d30522..accd26481b9fb 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> @@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
>                 state = kzalloc(sizeof(*state), GFP_KERNEL);
>                 if (!state)
>                         return;
> -               plane->state = &state->base;
>         }
>
> +       __drm_atomic_helper_plane_reset(plane, &state->base);
> +
>         state->base.plane = plane;
>         state->pending.format = DRM_FORMAT_RGB565;
>  }
> --
> 2.33.0.1079.g6e70778dc9-goog
>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0
  2021-12-09  0:15 ` Chun-Kuang Hu
@ 2021-12-09 17:40   ` Mark Yacoub
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Yacoub @ 2021-12-09 17:40 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Sean Paul, Mark Yacoub, Philipp Zabel, David Airlie,
	Daniel Vetter, Matthias Brugger, DRI Development,
	moderated list:ARM/Mediatek SoC support, Linux ARM, linux-kernel

On Wed, Dec 8, 2021 at 7:16 PM Chun-Kuang Hu <chunkuang.hu@kernel.org> wrote:
>
> Hi Mark:
>
> Mark Yacoub <markyacoub@chromium.org> 於 2021年10月28日 週四 上午12:28寫道:
> >
> > From: Mark Yacoub <markyacoub@google.com>
> >
> > At the reset hook, call __drm_atomic_helper_plane_reset which is
> > called at the initialization of the plane and sets the default value of
> > rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.
>
> This patch looks good to me, but please fix this checkpatch warning:
Uploaded a new revision. Thanks!
>
> WARNING: From:/Signed-off-by: email address mismatch: 'From: Mark
> Yacoub <markyacoub@google.com>' != 'Signed-off-by: Mark Yacoub
> <markyacoub@chromium.org>'
>
> total: 0 errors, 1 warnings, 11 lines checked
>
> Regards,
> Chun-Kuang.
>
> >
> > Tested on Jacuzzi (MTK).
> > Resolves IGT@kms_properties@plane-properties-{legacy,atomic}
> >
> > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > ---
> >  drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > index e6dcb34d30522..accd26481b9fb 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > @@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
> >                 state = kzalloc(sizeof(*state), GFP_KERNEL);
> >                 if (!state)
> >                         return;
> > -               plane->state = &state->base;
> >         }
> >
> > +       __drm_atomic_helper_plane_reset(plane, &state->base);
> > +
> >         state->base.plane = plane;
> >         state->pending.format = DRM_FORMAT_RGB565;
> >  }
> > --
> > 2.33.0.1079.g6e70778dc9-goog
> >

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH v2] drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0
  2021-10-27 16:27 [PATCH] drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0 Mark Yacoub
  2021-12-09  0:15 ` Chun-Kuang Hu
@ 2021-12-13 16:07 ` Mark Yacoub
  2021-12-13 23:27   ` Chun-Kuang Hu
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Yacoub @ 2021-12-13 16:07 UTC (permalink / raw)
  To: linux-mediatek
  Cc: seanpaul, chunkuang.hu, p.zabel, matthias.bgg, jason-jh.lin,
	tzungbi, Mark Yacoub, David Airlie, Daniel Vetter, dri-devel,
	linux-arm-kernel, linux-kernel

At the reset hook, call __drm_atomic_helper_plane_reset which is
called at the initialization of the plane and sets the default value of
rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

Tested on Jacuzzi (MTK).
Resolves IGT@kms_properties@plane-properties-{legacy,atomic}

Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
index e6dcb34d30522..accd26481b9fb 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
@@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
 		state = kzalloc(sizeof(*state), GFP_KERNEL);
 		if (!state)
 			return;
-		plane->state = &state->base;
 	}
 
+	__drm_atomic_helper_plane_reset(plane, &state->base);
+
 	state->base.plane = plane;
 	state->pending.format = DRM_FORMAT_RGB565;
 }
-- 
2.34.1.173.g76aa8bc2d0-goog


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH v2] drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0
  2021-12-13 16:07 ` [PATCH v2] " Mark Yacoub
@ 2021-12-13 23:27   ` Chun-Kuang Hu
  2021-12-14 15:26     ` Mark Yacoub
  0 siblings, 1 reply; 7+ messages in thread
From: Chun-Kuang Hu @ 2021-12-13 23:27 UTC (permalink / raw)
  To: Mark Yacoub
  Cc: moderated list:ARM/Mediatek SoC support, Sean Paul,
	Chun-Kuang Hu, Philipp Zabel, Matthias Brugger, Jason-JH Lin,
	tzungbi, David Airlie, Daniel Vetter, DRI Development, Linux ARM,
	linux-kernel

Hi, Mark:

Mark Yacoub <markyacoub@chromium.org> 於 2021年12月14日 週二 上午12:08寫道:
>
> At the reset hook, call __drm_atomic_helper_plane_reset which is
> called at the initialization of the plane and sets the default value of
> rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.

Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

>
> Tested on Jacuzzi (MTK).
> Resolves IGT@kms_properties@plane-properties-{legacy,atomic}
>
> Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> index e6dcb34d30522..accd26481b9fb 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> @@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
>                 state = kzalloc(sizeof(*state), GFP_KERNEL);
>                 if (!state)
>                         return;
> -               plane->state = &state->base;
>         }
>
> +       __drm_atomic_helper_plane_reset(plane, &state->base);
> +
>         state->base.plane = plane;
>         state->pending.format = DRM_FORMAT_RGB565;
>  }
> --
> 2.34.1.173.g76aa8bc2d0-goog
>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH v2] drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0
  2021-12-13 23:27   ` Chun-Kuang Hu
@ 2021-12-14 15:26     ` Mark Yacoub
  2021-12-29 19:30       ` Mark Yacoub
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Yacoub @ 2021-12-14 15:26 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: moderated list:ARM/Mediatek SoC support, Sean Paul,
	Philipp Zabel, Matthias Brugger, Jason-JH Lin, tzungbi,
	David Airlie, Daniel Vetter, DRI Development, Linux ARM,
	linux-kernel

Thank you so much!

On Mon, Dec 13, 2021 at 6:27 PM Chun-Kuang Hu <chunkuang.hu@kernel.org> wrote:
>
> Hi, Mark:
>
> Mark Yacoub <markyacoub@chromium.org> 於 2021年12月14日 週二 上午12:08寫道:
> >
> > At the reset hook, call __drm_atomic_helper_plane_reset which is
> > called at the initialization of the plane and sets the default value of
> > rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.
>
> Applied to mediatek-drm-next [1], thanks.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next
>
> Regards,
> Chun-Kuang.
>
> >
> > Tested on Jacuzzi (MTK).
> > Resolves IGT@kms_properties@plane-properties-{legacy,atomic}
> >
> > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > ---
> >  drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > index e6dcb34d30522..accd26481b9fb 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > @@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
> >                 state = kzalloc(sizeof(*state), GFP_KERNEL);
> >                 if (!state)
> >                         return;
> > -               plane->state = &state->base;
> >         }
> >
> > +       __drm_atomic_helper_plane_reset(plane, &state->base);
> > +
> >         state->base.plane = plane;
> >         state->pending.format = DRM_FORMAT_RGB565;
> >  }
> > --
> > 2.34.1.173.g76aa8bc2d0-goog
> >

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH v2] drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0
  2021-12-14 15:26     ` Mark Yacoub
@ 2021-12-29 19:30       ` Mark Yacoub
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Yacoub @ 2021-12-29 19:30 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: moderated list:ARM/Mediatek SoC support, Sean Paul,
	Philipp Zabel, Matthias Brugger, Jason-JH Lin, tzungbi,
	David Airlie, Daniel Vetter, DRI Development, Linux ARM,
	linux-kernel

hey - uploaded v2 that takes care of the panel:
https://patchwork.kernel.org/project/linux-mediatek/patch/20211229184420.793234-1-markyacoub@chromium.org/

Thanks!

On Tue, Dec 14, 2021 at 10:26 AM Mark Yacoub <markyacoub@chromium.org> wrote:
>
> Thank you so much!
>
> On Mon, Dec 13, 2021 at 6:27 PM Chun-Kuang Hu <chunkuang.hu@kernel.org> wrote:
> >
> > Hi, Mark:
> >
> > Mark Yacoub <markyacoub@chromium.org> 於 2021年12月14日 週二 上午12:08寫道:
> > >
> > > At the reset hook, call __drm_atomic_helper_plane_reset which is
> > > called at the initialization of the plane and sets the default value of
> > > rotation on all planes to DRM_MODE_ROTATE_0 which is equal to 1.
> >
> > Applied to mediatek-drm-next [1], thanks.
> >
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next
> >
> > Regards,
> > Chun-Kuang.
> >
> > >
> > > Tested on Jacuzzi (MTK).
> > > Resolves IGT@kms_properties@plane-properties-{legacy,atomic}
> > >
> > > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > > ---
> > >  drivers/gpu/drm/mediatek/mtk_drm_plane.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > > index e6dcb34d30522..accd26481b9fb 100644
> > > --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > > +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > > @@ -44,9 +44,10 @@ static void mtk_plane_reset(struct drm_plane *plane)
> > >                 state = kzalloc(sizeof(*state), GFP_KERNEL);
> > >                 if (!state)
> > >                         return;
> > > -               plane->state = &state->base;
> > >         }
> > >
> > > +       __drm_atomic_helper_plane_reset(plane, &state->base);
> > > +
> > >         state->base.plane = plane;
> > >         state->pending.format = DRM_FORMAT_RGB565;
> > >  }
> > > --
> > > 2.34.1.173.g76aa8bc2d0-goog
> > >

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

end of thread, other threads:[~2021-12-29 19:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 16:27 [PATCH] drm/mediatek: Set the default value of rotation to DRM_MODE_ROTATE_0 Mark Yacoub
2021-12-09  0:15 ` Chun-Kuang Hu
2021-12-09 17:40   ` Mark Yacoub
2021-12-13 16:07 ` [PATCH v2] " Mark Yacoub
2021-12-13 23:27   ` Chun-Kuang Hu
2021-12-14 15:26     ` Mark Yacoub
2021-12-29 19:30       ` Mark Yacoub

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).