amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: [PATCH 10/15] drm/amdgpu/display: move debugfs init into core amdgpu debugfs (v2)
Date: Fri,  7 Feb 2020 14:50:53 -0500	[thread overview]
Message-ID: <20200207195058.2354-11-alexander.deucher@amd.com> (raw)
In-Reply-To: <20200207195058.2354-1-alexander.deucher@amd.com>

In order to remove the load and unload drm callbacks,
we need to reorder the init sequence to move all the drm
debugfs file handling.  Do this for display.

v2: add config guard for DC

Reviewed-by: Harry Wentland <harry.wentland@amd.com> (v1)
Acked-by: Christian König <christian.koenig@amd.com> (v1)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c       | 8 ++++++++
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 -----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 5bf43f20ec30..df3919ef886b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -32,6 +32,7 @@
 
 #include "amdgpu.h"
 #include "amdgpu_pm.h"
+#include "amdgpu_dm_debugfs.h"
 
 /**
  * amdgpu_debugfs_add_files - Add simple debugfs entries
@@ -1260,6 +1261,13 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
 	if (r)
 		DRM_ERROR("registering firmware debugfs failed (%d).\n", r);
 
+#if defined(CONFIG_DRM_AMD_DC)
+	if (amdgpu_device_has_dc_support(adev)) {
+		if (dtn_debugfs_init(adev))
+			DRM_ERROR("amdgpu: failed initialize dtn debugfs support.\n");
+	}
+#endif
+
 	return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_list,
 					ARRAY_SIZE(amdgpu_debugfs_list));
 }
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 50137df9cdad..81c8d8c61d62 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -991,11 +991,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 		goto error;
 	}
 
-#if defined(CONFIG_DEBUG_FS)
-	if (dtn_debugfs_init(adev))
-		DRM_ERROR("amdgpu: failed initialize dtn debugfs support.\n");
-#endif
-
 	DRM_DEBUG_DRIVER("KMS initialized.\n");
 
 	return 0;
-- 
2.24.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2020-02-07 19:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 19:50 [PATCH 00/15] amdgpu: remove load and unload callbacks (v3) Alex Deucher
2020-02-07 19:50 ` [PATCH 01/15] drm/amdgpu: rename amdgpu_debugfs_preempt_cleanup Alex Deucher
2020-02-07 19:50 ` [PATCH 02/15] drm/amdgpu/ttm: move debugfs init into core amdgpu debugfs Alex Deucher
2020-02-07 19:50 ` [PATCH 03/15] drm/amdgpu/pm: " Alex Deucher
2020-02-07 19:50 ` [PATCH 04/15] drm/amdgpu/sa: " Alex Deucher
2020-02-07 19:50 ` [PATCH 05/15] drm/amdgpu/fence: " Alex Deucher
2020-02-07 19:50 ` [PATCH 06/15] drm/amdgpu/gem: " Alex Deucher
2020-02-07 19:50 ` [PATCH 07/15] drm/amdgpu/regs: " Alex Deucher
2020-02-07 19:50 ` [PATCH 08/15] drm/amdgpu/firmware: " Alex Deucher
2020-02-07 19:50 ` [PATCH 09/15] drm/amdgpu: don't call drm_connector_register for non-MST ports Alex Deucher
2020-02-07 19:50 ` Alex Deucher [this message]
2020-02-07 19:50 ` [PATCH 11/15] drm/amd/display: move dpcd debugfs members setup Alex Deucher
2020-02-07 19:50 ` [PATCH 12/15] drm/amdgpu/display: add a late register connector callback Alex Deucher
2020-04-08  4:09   ` Eric Biggers
2020-02-07 19:50 ` [PATCH 13/15] drm/amdgpu/display: split dp connector registration (v2) Alex Deucher
2020-02-07 19:50 ` [PATCH 14/15] drm/amdgpu/ring: move debugfs init into core amdgpu debugfs Alex Deucher
2020-02-13  9:54   ` Daniel Vetter
2020-02-13 10:17     ` Christian König
2020-02-13 14:32       ` Alex Deucher
2020-02-13 17:28         ` Christian König
2020-02-13 17:32           ` Alex Deucher
2020-02-07 19:50 ` [PATCH 15/15] drm/amdgpu: drop legacy drm load and unload callbacks Alex Deucher
2020-02-10 10:39 ` [PATCH 00/15] amdgpu: remove load and unload callbacks (v3) Thomas Zimmermann
2020-04-08  7:38 ` Thomas Zimmermann
2020-04-08 13:51   ` Alex Deucher

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=20200207195058.2354-11-alexander.deucher@amd.com \
    --to=alexdeucher@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    /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 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).