All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm: arc: Remove unnecessary drm_plane_cleanup() wrapper
@ 2020-12-15 19:37 Laurent Pinchart
  2020-12-15 19:37 ` [PATCH 2/4] drm: sti: " Laurent Pinchart
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Laurent Pinchart @ 2020-12-15 19:37 UTC (permalink / raw)
  To: dri-devel; +Cc: Alexey Brodkin

Use the drm_plane_cleanup() function directly as the drm_plane_funcs
.destroy() handler without creating an unnecessary wrapper around it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/arc/arcpgu_crtc.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
index 042d7b54a6de..895cdd991af6 100644
--- a/drivers/gpu/drm/arc/arcpgu_crtc.c
+++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
@@ -162,15 +162,10 @@ static const struct drm_plane_helper_funcs arc_pgu_plane_helper_funcs = {
 	.atomic_update = arc_pgu_plane_atomic_update,
 };
 
-static void arc_pgu_plane_destroy(struct drm_plane *plane)
-{
-	drm_plane_cleanup(plane);
-}
-
 static const struct drm_plane_funcs arc_pgu_plane_funcs = {
 	.update_plane		= drm_atomic_helper_update_plane,
 	.disable_plane		= drm_atomic_helper_disable_plane,
-	.destroy		= arc_pgu_plane_destroy,
+	.destroy		= drm_plane_cleanup,
 	.reset			= drm_atomic_helper_plane_reset,
 	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
 	.atomic_destroy_state	= drm_atomic_helper_plane_destroy_state,
@@ -213,7 +208,7 @@ int arc_pgu_setup_crtc(struct drm_device *drm)
 	ret = drm_crtc_init_with_planes(drm, &arcpgu->crtc, primary, NULL,
 					&arc_pgu_crtc_funcs, NULL);
 	if (ret) {
-		arc_pgu_plane_destroy(primary);
+		drm_plane_cleanup(primary);
 		return ret;
 	}
 
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 2/4] drm: sti: Remove unnecessary drm_plane_cleanup() wrapper
  2020-12-15 19:37 [PATCH 1/4] drm: arc: Remove unnecessary drm_plane_cleanup() wrapper Laurent Pinchart
@ 2020-12-15 19:37 ` Laurent Pinchart
  2020-12-15 19:37 ` [PATCH 3/4] drm: vc4: " Laurent Pinchart
  2020-12-15 19:37 ` [PATCH 4/4] drm: zte: " Laurent Pinchart
  2 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2020-12-15 19:37 UTC (permalink / raw)
  To: dri-devel; +Cc: Vincent Abriou

Use the drm_plane_cleanup() function directly as the drm_plane_funcs
.destroy() handler without creating an unnecessary wrapper around it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/sti/sti_cursor.c | 9 +--------
 drivers/gpu/drm/sti/sti_gdp.c    | 9 +--------
 drivers/gpu/drm/sti/sti_hqvdp.c  | 9 +--------
 3 files changed, 3 insertions(+), 24 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/drivers/gpu/drm/sti/sti_cursor.c
index a98057431023..7476301d7142 100644
--- a/drivers/gpu/drm/sti/sti_cursor.c
+++ b/drivers/gpu/drm/sti/sti_cursor.c
@@ -330,13 +330,6 @@ static const struct drm_plane_helper_funcs sti_cursor_helpers_funcs = {
 	.atomic_disable = sti_cursor_atomic_disable,
 };
 
-static void sti_cursor_destroy(struct drm_plane *drm_plane)
-{
-	DRM_DEBUG_DRIVER("\n");
-
-	drm_plane_cleanup(drm_plane);
-}
-
 static int sti_cursor_late_register(struct drm_plane *drm_plane)
 {
 	struct sti_plane *plane = to_sti_plane(drm_plane);
@@ -350,7 +343,7 @@ static int sti_cursor_late_register(struct drm_plane *drm_plane)
 static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
-	.destroy = sti_cursor_destroy,
+	.destroy = drm_plane_cleanup,
 	.reset = sti_plane_reset,
 	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
index 2d5a2b5b78b8..2f4a34f14d33 100644
--- a/drivers/gpu/drm/sti/sti_gdp.c
+++ b/drivers/gpu/drm/sti/sti_gdp.c
@@ -884,13 +884,6 @@ static const struct drm_plane_helper_funcs sti_gdp_helpers_funcs = {
 	.atomic_disable = sti_gdp_atomic_disable,
 };
 
-static void sti_gdp_destroy(struct drm_plane *drm_plane)
-{
-	DRM_DEBUG_DRIVER("\n");
-
-	drm_plane_cleanup(drm_plane);
-}
-
 static int sti_gdp_late_register(struct drm_plane *drm_plane)
 {
 	struct sti_plane *plane = to_sti_plane(drm_plane);
@@ -902,7 +895,7 @@ static int sti_gdp_late_register(struct drm_plane *drm_plane)
 static const struct drm_plane_funcs sti_gdp_plane_helpers_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
-	.destroy = sti_gdp_destroy,
+	.destroy = drm_plane_cleanup,
 	.reset = sti_plane_reset,
 	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index 5a4e12194a77..62f824cd5f21 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -1262,13 +1262,6 @@ static const struct drm_plane_helper_funcs sti_hqvdp_helpers_funcs = {
 	.atomic_disable = sti_hqvdp_atomic_disable,
 };
 
-static void sti_hqvdp_destroy(struct drm_plane *drm_plane)
-{
-	DRM_DEBUG_DRIVER("\n");
-
-	drm_plane_cleanup(drm_plane);
-}
-
 static int sti_hqvdp_late_register(struct drm_plane *drm_plane)
 {
 	struct sti_plane *plane = to_sti_plane(drm_plane);
@@ -1282,7 +1275,7 @@ static int sti_hqvdp_late_register(struct drm_plane *drm_plane)
 static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
-	.destroy = sti_hqvdp_destroy,
+	.destroy = drm_plane_cleanup,
 	.reset = sti_plane_reset,
 	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 3/4] drm: vc4: Remove unnecessary drm_plane_cleanup() wrapper
  2020-12-15 19:37 [PATCH 1/4] drm: arc: Remove unnecessary drm_plane_cleanup() wrapper Laurent Pinchart
  2020-12-15 19:37 ` [PATCH 2/4] drm: sti: " Laurent Pinchart
@ 2020-12-15 19:37 ` Laurent Pinchart
  2020-12-16  7:20   ` Maxime Ripard
  2020-12-15 19:37 ` [PATCH 4/4] drm: zte: " Laurent Pinchart
  2 siblings, 1 reply; 7+ messages in thread
From: Laurent Pinchart @ 2020-12-15 19:37 UTC (permalink / raw)
  To: dri-devel

Use the drm_plane_cleanup() function directly as the drm_plane_funcs
.destroy() handler without creating an unnecessary wrapper around it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/vc4/vc4_plane.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index 6b39cc2ca18d..6bd8260aa9f2 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -1268,11 +1268,6 @@ static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = {
 	.atomic_async_update = vc4_plane_atomic_async_update,
 };
 
-static void vc4_plane_destroy(struct drm_plane *plane)
-{
-	drm_plane_cleanup(plane);
-}
-
 static bool vc4_format_mod_supported(struct drm_plane *plane,
 				     uint32_t format,
 				     uint64_t modifier)
@@ -1323,7 +1318,7 @@ static bool vc4_format_mod_supported(struct drm_plane *plane,
 static const struct drm_plane_funcs vc4_plane_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
-	.destroy = vc4_plane_destroy,
+	.destroy = drm_plane_cleanup,
 	.set_property = NULL,
 	.reset = vc4_plane_reset,
 	.atomic_duplicate_state = vc4_plane_duplicate_state,
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 4/4] drm: zte: Remove unnecessary drm_plane_cleanup() wrapper
  2020-12-15 19:37 [PATCH 1/4] drm: arc: Remove unnecessary drm_plane_cleanup() wrapper Laurent Pinchart
  2020-12-15 19:37 ` [PATCH 2/4] drm: sti: " Laurent Pinchart
  2020-12-15 19:37 ` [PATCH 3/4] drm: vc4: " Laurent Pinchart
@ 2020-12-15 19:37 ` Laurent Pinchart
  2020-12-16 14:22   ` Daniel Vetter
  2 siblings, 1 reply; 7+ messages in thread
From: Laurent Pinchart @ 2020-12-15 19:37 UTC (permalink / raw)
  To: dri-devel; +Cc: Shawn Guo

Use the drm_plane_cleanup() function directly as the drm_plane_funcs
.destroy() handler without creating an unnecessary wrapper around it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/zte/zx_plane.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/zte/zx_plane.c b/drivers/gpu/drm/zte/zx_plane.c
index c8f7b21fa09e..78d787afe594 100644
--- a/drivers/gpu/drm/zte/zx_plane.c
+++ b/drivers/gpu/drm/zte/zx_plane.c
@@ -438,15 +438,10 @@ static const struct drm_plane_helper_funcs zx_gl_plane_helper_funcs = {
 	.atomic_disable = zx_plane_atomic_disable,
 };
 
-static void zx_plane_destroy(struct drm_plane *plane)
-{
-	drm_plane_cleanup(plane);
-}
-
 static const struct drm_plane_funcs zx_plane_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
-	.destroy = zx_plane_destroy,
+	.destroy = drm_plane_cleanup,
 	.reset = drm_atomic_helper_plane_reset,
 	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 3/4] drm: vc4: Remove unnecessary drm_plane_cleanup() wrapper
  2020-12-15 19:37 ` [PATCH 3/4] drm: vc4: " Laurent Pinchart
@ 2020-12-16  7:20   ` Maxime Ripard
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2020-12-16  7:20 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 353 bytes --]

On Tue, Dec 15, 2020 at 09:37:54PM +0200, Laurent Pinchart wrote:
> Use the drm_plane_cleanup() function directly as the drm_plane_funcs
> .destroy() handler without creating an unnecessary wrapper around it.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Acked-by: Maxime Ripard <mripard@kernel.org>

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 4/4] drm: zte: Remove unnecessary drm_plane_cleanup() wrapper
  2020-12-15 19:37 ` [PATCH 4/4] drm: zte: " Laurent Pinchart
@ 2020-12-16 14:22   ` Daniel Vetter
  2020-12-16 14:27     ` Laurent Pinchart
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2020-12-16 14:22 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Shawn Guo, dri-devel

On Tue, Dec 15, 2020 at 09:37:55PM +0200, Laurent Pinchart wrote:
> Use the drm_plane_cleanup() function directly as the drm_plane_funcs
> .destroy() handler without creating an unnecessary wrapper around it.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

On the series:

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I'm assuming you'll apply this somewhere.
-Daniel

> ---
>  drivers/gpu/drm/zte/zx_plane.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/zte/zx_plane.c b/drivers/gpu/drm/zte/zx_plane.c
> index c8f7b21fa09e..78d787afe594 100644
> --- a/drivers/gpu/drm/zte/zx_plane.c
> +++ b/drivers/gpu/drm/zte/zx_plane.c
> @@ -438,15 +438,10 @@ static const struct drm_plane_helper_funcs zx_gl_plane_helper_funcs = {
>  	.atomic_disable = zx_plane_atomic_disable,
>  };
>  
> -static void zx_plane_destroy(struct drm_plane *plane)
> -{
> -	drm_plane_cleanup(plane);
> -}
> -
>  static const struct drm_plane_funcs zx_plane_funcs = {
>  	.update_plane = drm_atomic_helper_update_plane,
>  	.disable_plane = drm_atomic_helper_disable_plane,
> -	.destroy = zx_plane_destroy,
> +	.destroy = drm_plane_cleanup,
>  	.reset = drm_atomic_helper_plane_reset,
>  	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
>  	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 4/4] drm: zte: Remove unnecessary drm_plane_cleanup() wrapper
  2020-12-16 14:22   ` Daniel Vetter
@ 2020-12-16 14:27     ` Laurent Pinchart
  0 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2020-12-16 14:27 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Laurent Pinchart, Shawn Guo, dri-devel

Hi Daniel,

On Wed, Dec 16, 2020 at 03:22:59PM +0100, Daniel Vetter wrote:
> On Tue, Dec 15, 2020 at 09:37:55PM +0200, Laurent Pinchart wrote:
> > Use the drm_plane_cleanup() function directly as the drm_plane_funcs
> > .destroy() handler without creating an unnecessary wrapper around it.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> 
> On the series:
> 
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> I'm assuming you'll apply this somewhere.

Yes, with the rest of my pending patches for v5.12 (I'm currently going
through my stale branches, cleaning up the bitrot and resubmitting as
appropriate), but if you want to push to drm-misc early, I won't mind
:-)

> > ---
> >  drivers/gpu/drm/zte/zx_plane.c | 7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/zte/zx_plane.c b/drivers/gpu/drm/zte/zx_plane.c
> > index c8f7b21fa09e..78d787afe594 100644
> > --- a/drivers/gpu/drm/zte/zx_plane.c
> > +++ b/drivers/gpu/drm/zte/zx_plane.c
> > @@ -438,15 +438,10 @@ static const struct drm_plane_helper_funcs zx_gl_plane_helper_funcs = {
> >  	.atomic_disable = zx_plane_atomic_disable,
> >  };
> >  
> > -static void zx_plane_destroy(struct drm_plane *plane)
> > -{
> > -	drm_plane_cleanup(plane);
> > -}
> > -
> >  static const struct drm_plane_funcs zx_plane_funcs = {
> >  	.update_plane = drm_atomic_helper_update_plane,
> >  	.disable_plane = drm_atomic_helper_disable_plane,
> > -	.destroy = zx_plane_destroy,
> > +	.destroy = drm_plane_cleanup,
> >  	.reset = drm_atomic_helper_plane_reset,
> >  	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
> >  	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-12-16 14:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 19:37 [PATCH 1/4] drm: arc: Remove unnecessary drm_plane_cleanup() wrapper Laurent Pinchart
2020-12-15 19:37 ` [PATCH 2/4] drm: sti: " Laurent Pinchart
2020-12-15 19:37 ` [PATCH 3/4] drm: vc4: " Laurent Pinchart
2020-12-16  7:20   ` Maxime Ripard
2020-12-15 19:37 ` [PATCH 4/4] drm: zte: " Laurent Pinchart
2020-12-16 14:22   ` Daniel Vetter
2020-12-16 14:27     ` Laurent Pinchart

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.