All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Subject: [PATCH 03/12] drm: arc: Use drm_atomic_helper_shutdown() to disable planes on removal
Date: Wed, 17 Jan 2018 23:55:26 +0200	[thread overview]
Message-ID: <20180117215535.16517-4-laurent.pinchart+renesas@ideasonboard.com> (raw)
In-Reply-To: <20180117215535.16517-1-laurent.pinchart+renesas@ideasonboard.com>

The plane cleanup handler currently calls drm_plane_helper_disable(),
which is a legacy helper function. Replace it with a call to
drm_atomic_helper_shutdown() at removal time. The plane .destroy()
handler now consisting only of a call to drm_plane_cleanup(), replace it
with direct calls to that function.

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

diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
index 26f360ef7f91..6e7036a5f6df 100644
--- a/drivers/gpu/drm/arc/arcpgu_crtc.c
+++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
@@ -185,16 +185,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_helper_disable(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,
@@ -240,7 +234,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;
 	}
 
diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
index f067de4e1e82..e85e3a349f24 100644
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -134,6 +134,7 @@ static int arcpgu_unload(struct drm_device *drm)
 		arcpgu->fbdev = NULL;
 	}
 	drm_kms_helper_poll_fini(drm);
+	drm_atomic_helper_shutdown(drm);
 	drm_mode_config_cleanup(drm);
 
 	return 0;
-- 
Regards,

Laurent Pinchart

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

  parent reply	other threads:[~2018-01-17 21:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 21:55 [PATCH 00/12] Cargo cult cleanup in atomic drivers Laurent Pinchart
2018-01-17 21:55 ` [PATCH 01/12] drm: arc: Don't set CRTC .mode_set and .mode_set_base handlers Laurent Pinchart
2018-01-17 21:55 ` [PATCH 02/12] drm: atmel-hlcdc: " Laurent Pinchart
2018-01-18  8:44   ` Boris Brezillon
2018-01-17 21:55 ` Laurent Pinchart [this message]
2018-01-17 21:55 ` [PATCH 04/12] drm: arm: hdlcd: Don't destroy plane manually in hdlcd_setup_crtc() Laurent Pinchart
2018-01-17 21:55 ` [PATCH 05/12] drm: arm: hdlcd: Use drm_atomic_helper_shutdown() to disable planes on removal Laurent Pinchart
2018-01-17 21:55 ` [PATCH 06/12] drm: arm: malidp: Don't destroy planes manually in error handlers Laurent Pinchart
2018-01-17 21:55 ` [PATCH 07/12] drm: arm: malidp: Use drm_atomic_helper_shutdown() to disable planes on removal Laurent Pinchart
2018-01-19 15:48   ` Liviu Dudau
2018-01-17 21:55 ` [PATCH 08/12] drm: msm: " Laurent Pinchart
2018-01-19  4:51   ` Archit Taneja
2018-01-17 21:55 ` [PATCH 09/12] drm: sti: Cleanup KMS objects " Laurent Pinchart
2018-01-17 21:55 ` [PATCH 10/12] drm: sti: Use drm_atomic_helper_shutdown() to disable planes " Laurent Pinchart
2018-01-17 21:55 ` [PATCH 11/12] drm: vc4: " Laurent Pinchart
2018-01-18  5:44   ` Eric Anholt
2018-01-20 11:54   ` kbuild test robot
2018-01-20 12:03   ` kbuild test robot
2018-01-17 21:55 ` [PATCH 12/12] drm: zte: " Laurent Pinchart
2018-02-02  7:48   ` Shawn Guo
2018-01-18 17:32 ` [PATCH 00/12] Cargo cult cleanup in atomic drivers Liviu Dudau
2018-01-18 18:00 ` Alexey Brodkin
2018-01-19 15:00 ` Benjamin Gaignard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180117215535.16517-4-laurent.pinchart+renesas@ideasonboard.com \
    --to=laurent.pinchart+renesas@ideasonboard.com \
    --cc=abrodkin@synopsys.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.