All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
Subject: [DPU PATCH 08/15] drm/msm: dpu: Do debugfs init in the debugfs_init() hook
Date: Thu, 28 Jun 2018 14:28:59 -0400	[thread overview]
Message-ID: <20180628182906.84926-9-seanpaul@chromium.org> (raw)
In-Reply-To: <20180628182906.84926-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>

This allows us to remove postinit, which was added with dpu support.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 13 ++++++-------
 drivers/gpu/drm/msm/msm_drv.c           |  9 ---------
 drivers/gpu/drm/msm/msm_kms.h           |  1 -
 3 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 61eecae15ab3..1f2163430caf 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -323,11 +323,6 @@ static void _dpu_debugfs_destroy(struct dpu_kms *dpu_kms)
 	}
 }
 #else
-static int _dpu_debugfs_init(struct dpu_kms *dpu_kms)
-{
-	return 0;
-}
-
 static void _dpu_debugfs_destroy(struct dpu_kms *dpu_kms)
 {
 }
@@ -991,7 +986,8 @@ void dpu_kms_fbo_unreference(struct dpu_kms_fbo *fbo)
 	}
 }
 
-static int dpu_kms_postinit(struct msm_kms *kms)
+#ifdef CONFIG_DEBUG_FS
+static int dpu_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor)
 {
 	struct dpu_kms *dpu_kms = to_dpu_kms(kms);
 	struct drm_device *dev;
@@ -1010,6 +1006,7 @@ static int dpu_kms_postinit(struct msm_kms *kms)
 
 	return rc;
 }
+#endif
 
 static long dpu_kms_round_pixclk(struct msm_kms *kms, unsigned long rate,
 		struct drm_encoder *encoder)
@@ -1289,7 +1286,6 @@ void _dpu_kms_set_encoder_mode(struct msm_kms *kms,
 
 static const struct msm_kms_funcs kms_funcs = {
 	.hw_init         = dpu_kms_hw_init,
-	.postinit        = dpu_kms_postinit,
 	.irq_preinstall  = dpu_irq_preinstall,
 	.irq_postinstall = dpu_irq_postinstall,
 	.irq_uninstall   = dpu_irq_uninstall,
@@ -1311,6 +1307,9 @@ static const struct msm_kms_funcs kms_funcs = {
 	.destroy         = dpu_kms_destroy,
 	.get_address_space = _dpu_kms_get_address_space,
 	.set_encoder_mode = _dpu_kms_set_encoder_mode,
+#ifdef CONFIG_DEBUG_FS
+	.debugfs_init    = dpu_kms_debugfs_init,
+#endif
 };
 
 /* the caller api needs to turn on clock before calling it */
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index bcd001603768..1e8d67381b5a 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -593,15 +593,6 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
 	if (ret)
 		goto fail;
 
-	/* perform subdriver post initialization */
-	if (kms && kms->funcs && kms->funcs->postinit) {
-		ret = kms->funcs->postinit(kms);
-		if (ret) {
-			pr_err("kms post init failed: %d\n", ret);
-			goto fail;
-		}
-	}
-
 	drm_kms_helper_poll_init(ddev);
 
 	return 0;
diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h
index 3a583ee2f27a..2f1c9702b820 100644
--- a/drivers/gpu/drm/msm/msm_kms.h
+++ b/drivers/gpu/drm/msm/msm_kms.h
@@ -34,7 +34,6 @@
 struct msm_kms_funcs {
 	/* hw initialization: */
 	int (*hw_init)(struct msm_kms *kms);
-	int (*postinit)(struct msm_kms *kms);
 	/* irq handling: */
 	void (*irq_preinstall)(struct msm_kms *kms);
 	int (*irq_postinstall)(struct msm_kms *kms);
-- 
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  parent reply	other threads:[~2018-06-28 18:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28 18:28 [DPU PATCH 00/15] drm/msm: dpu cleanup in msm Sean Paul
     [not found] ` <20180628182906.84926-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-28 18:28   ` [DPU PATCH 01/15] drm/msm: Remove more dpu changes from msm core Sean Paul
2018-06-28 18:28   ` [DPU PATCH 02/15] video: Remove LF copyright in mipi_display.h Sean Paul
2018-06-28 18:28   ` [DPU PATCH 03/15] drm/msm: Move dpu_dbg init/destroy into dpu_kms Sean Paul
2018-06-28 18:28   ` [DPU PATCH 04/15] drm/msm: Remove more dpu-related code from msm_drv Sean Paul
     [not found]     ` <20180628182906.84926-5-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-28 20:09       ` Jordan Crouse
     [not found]         ` <20180628200955.GF24526-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2018-06-28 20:29           ` Sean Paul
2018-06-28 18:28   ` [DPU PATCH 05/15] drm/msm: More cleanup in msm_drv Sean Paul
2018-06-28 18:28   ` [DPU PATCH 06/15] drm/msm: Move debugfs root tracking to dpu Sean Paul
2018-06-28 18:28   ` [DPU PATCH 07/15] drm/msm: Remove _dpu_format_calc_offset_linear() Sean Paul
2018-06-28 18:28   ` Sean Paul [this message]
2018-06-28 18:29   ` [DPU PATCH 09/15] drm/msm: Remove get_address_space msm_kms hook Sean Paul
2018-06-28 18:29   ` [DPU PATCH 10/15] drm/msm: Remove dpu_kms_fbo and associated functions Sean Paul
2018-06-28 18:29   ` [DPU PATCH 11/15] drm/msm: Remove dpu module parameters Sean Paul
2018-06-28 18:29   ` [DPU PATCH 12/15] drm/msm: Remove unused backpointers from dpu_crtc Sean Paul
2018-06-28 18:29   ` [DPU PATCH 13/15] drm/msm: Reduce dpu_crtc_atomic_check frame size Sean Paul
2018-06-28 18:29   ` [DPU PATCH 14/15] drm/msm: Remove atomic_check() from msm_kms Sean Paul
2018-06-28 18:29   ` [DPU PATCH 15/15] drm/msm: Remove wait_for_tx_complete() " Sean Paul

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=20180628182906.84926-9-seanpaul@chromium.org \
    --to=seanpaul-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
    --cc=abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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.