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 03/15] drm/msm: Move dpu_dbg init/destroy into dpu_kms
Date: Thu, 28 Jun 2018 14:28:54 -0400	[thread overview]
Message-ID: <20180628182906.84926-4-seanpaul@chromium.org> (raw)
In-Reply-To: <20180628182906.84926-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>

No need to have this in msm_drv, so move it into dpu. While we're at
it, remove the other CONFIG_DRM_MSM_DPU ifdef gates.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 18 ++++++++++-
 drivers/gpu/drm/msm/msm_drv.c           | 41 -------------------------
 2 files changed, 17 insertions(+), 42 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 3003176e731d..0b813a089cba 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -279,6 +279,12 @@ static int _dpu_debugfs_init(struct dpu_kms *dpu_kms)
 	if (!debugfs_root)
 		return -EINVAL;
 
+	rc = dpu_dbg_debugfs_register(debugfs_root);
+	if (rc) {
+		DRM_ERROR("failed to reg dpu dbg debugfs: %d\n", rc);
+		return rc;
+	}
+
 	/* allow debugfs_root to be NULL */
 	debugfs_create_x32(DPU_DEBUGFS_HWMASKNAME, 0600, debugfs_root, p);
 
@@ -1072,6 +1078,8 @@ static void dpu_kms_destroy(struct msm_kms *kms)
 	}
 
 	dpu_kms = to_dpu_kms(kms);
+
+	dpu_dbg_destroy();
 	_dpu_kms_hw_destroy(dpu_kms);
 }
 
@@ -1401,10 +1409,16 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
 		goto end;
 	}
 
+	rc = dpu_dbg_init(&dpu_kms->pdev->dev);
+	if (rc) {
+		DRM_ERROR("failed to init dpu dbg: %d\n", rc);
+		goto end;
+	}
+
 	priv = dev->dev_private;
 	if (!priv) {
 		DPU_ERROR("invalid private data\n");
-		goto end;
+		goto dbg_destroy;
 	}
 
 	dpu_kms->mmio = msm_ioremap(dpu_kms->pdev, "mdp_phys", "mdp_phys");
@@ -1592,6 +1606,8 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
 	pm_runtime_put_sync(&dpu_kms->pdev->dev);
 error:
 	_dpu_kms_hw_destroy(dpu_kms);
+dbg_destroy:
+	dpu_dbg_destroy();
 end:
 	return rc;
 }
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 51d6b310ca33..6177b3f18912 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -26,9 +26,6 @@
 #include "msm_fence.h"
 #include "msm_gpu.h"
 #include "msm_kms.h"
-#ifdef CONFIG_DRM_MSM_DPU
-#include "dpu_dbg.h"
-#endif
 
 /*
  * MSM driver version:
@@ -307,10 +304,6 @@ static int msm_drm_uninit(struct device *dev)
 
 	component_unbind_all(dev, ddev);
 
-#ifdef CONFIG_DRM_MSM_DPU
-	dpu_dbg_destroy();
-#endif
-
 	debugfs_remove_recursive(priv->debug_root);
 
 	if (mdss && mdss->funcs)
@@ -485,14 +478,6 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
 
 	drm_mode_config_init(ddev);
 
-#ifdef CONFIG_DRM_MSM_DPU
-	ret = dpu_dbg_init(&pdev->dev);
-	if (ret) {
-		dev_err(dev, "failed to init dpu dbg: %d\n", ret);
-		goto dbg_init_fail;
-	}
-#endif
-
 	msm_gem_shrinker_init(ddev);
 
 	ret = msm_init_vram(ddev);
@@ -511,11 +496,9 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
 	case KMS_MDP5:
 		kms = mdp5_kms_init(ddev);
 		break;
-#ifdef CONFIG_DRM_MSM_DPU
 	case KMS_DPU:
 		kms = dpu_kms_init(ddev);
 		break;
-#endif
 	default:
 		kms = ERR_PTR(-ENODEV);
 		break;
@@ -665,14 +648,6 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
 		goto fail;
 	}
 
-#ifdef CONFIG_DRM_MSM_DPU
-	ret = dpu_dbg_debugfs_register(priv->debug_root);
-	if (ret) {
-		dev_err(dev, "failed to reg dpu dbg debugfs: %d\n", ret);
-		goto fail;
-	}
-#endif
-
 	/* perform subdriver post initialization */
 	if (kms && kms->funcs && kms->funcs->postinit) {
 		ret = kms->funcs->postinit(kms);
@@ -690,10 +665,6 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
 	msm_drm_uninit(dev);
 	return ret;
 bind_fail:
-#ifdef CONFIG_DRM_MSM_DPU
-	dpu_dbg_destroy();
-dbg_init_fail:
-#endif
 	if (mdss && mdss->funcs)
 		mdss->funcs->destroy(ddev);
 mdss_init_fail:
@@ -1413,9 +1384,7 @@ static int msm_pdev_remove(struct platform_device *pdev)
 static const struct of_device_id dt_match[] = {
 	{ .compatible = "qcom,mdp4", .data = (void *)KMS_MDP4 },
 	{ .compatible = "qcom,mdss", .data = (void *)KMS_MDP5 },
-#ifdef CONFIG_DRM_MSM_DPU
 	{ .compatible = "qcom,dpu-mdss", .data = (void *)KMS_DPU },
-#endif
 	{}
 };
 MODULE_DEVICE_TABLE(of, dt_match);
@@ -1430,16 +1399,6 @@ static struct platform_driver msm_platform_driver = {
 	},
 };
 
-#ifdef CONFIG_QCOM_KGSL
-void __init adreno_register(void)
-{
-}
-
-void __exit adreno_unregister(void)
-{
-}
-#endif
-
 static int __init msm_drm_register(void)
 {
 	if (!modeset)
-- 
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   ` Sean Paul [this message]
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   ` [DPU PATCH 08/15] drm/msm: dpu: Do debugfs init in the debugfs_init() hook Sean Paul
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-4-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.