From: Alex Deucher <alexdeucher@gmail.com> To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: "Alex Deucher" <alexander.deucher@amd.com>, "Christian König" <christian.koenig@amd.com> Subject: [PATCH 03/15] drm/amdgpu/pm: move debugfs init into core amdgpu debugfs Date: Wed, 5 Feb 2020 10:39:48 -0500 [thread overview] Message-ID: <20200205154000.536145-4-alexander.deucher@amd.com> (raw) In-Reply-To: <20200205154000.536145-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 pm. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 9 +-------- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index f49604c0d0b8..c1d66cc6e6d8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -31,6 +31,7 @@ #include <drm/drm_debugfs.h> #include "amdgpu.h" +#include "amdgpu_pm.h" /** * amdgpu_debugfs_add_files - Add simple debugfs entries @@ -1234,6 +1235,12 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) return r; } + r = amdgpu_debugfs_pm_init(adev); + if (r) { + DRM_ERROR("Failed to register debugfs file for dpm!\n"); + return r; + } + return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_list, ARRAY_SIZE(amdgpu_debugfs_list)); } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index b03b1eb7ba04..bc3cf04a1a94 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -41,8 +41,6 @@ #include "hwmgr.h" #define WIDTH_4K 3840 -static int amdgpu_debugfs_pm_init(struct amdgpu_device *adev); - static const struct cg_flag_name clocks[] = { {AMD_CG_SUPPORT_GFX_MGCG, "Graphics Medium Grain Clock Gating"}, {AMD_CG_SUPPORT_GFX_MGLS, "Graphics Medium Grain memory Light Sleep"}, @@ -3398,11 +3396,6 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) DRM_ERROR("failed to create device file unique_id\n"); return ret; } - ret = amdgpu_debugfs_pm_init(adev); - if (ret) { - DRM_ERROR("Failed to register debugfs file for dpm!\n"); - return ret; - } if ((adev->asic_type >= CHIP_VEGA10) && !(adev->flags & AMD_IS_APU)) { @@ -3669,7 +3662,7 @@ static const struct drm_info_list amdgpu_pm_info_list[] = { }; #endif -static int amdgpu_debugfs_pm_init(struct amdgpu_device *adev) +int amdgpu_debugfs_pm_init(struct amdgpu_device *adev) { #if defined(CONFIG_DEBUG_FS) return amdgpu_debugfs_add_files(adev, amdgpu_pm_info_list, ARRAY_SIZE(amdgpu_pm_info_list)); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h index 3da1da277805..5db0ef86e84c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h @@ -43,4 +43,6 @@ void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable); void amdgpu_dpm_enable_vce(struct amdgpu_device *adev, bool enable); void amdgpu_dpm_enable_jpeg(struct amdgpu_device *adev, bool enable); +int amdgpu_debugfs_pm_init(struct amdgpu_device *adev); + #endif -- 2.24.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Alex Deucher <alexdeucher@gmail.com> To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: "Alex Deucher" <alexander.deucher@amd.com>, "Christian König" <christian.koenig@amd.com> Subject: [PATCH 03/15] drm/amdgpu/pm: move debugfs init into core amdgpu debugfs Date: Wed, 5 Feb 2020 10:39:48 -0500 [thread overview] Message-ID: <20200205154000.536145-4-alexander.deucher@amd.com> (raw) In-Reply-To: <20200205154000.536145-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 pm. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 9 +-------- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index f49604c0d0b8..c1d66cc6e6d8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -31,6 +31,7 @@ #include <drm/drm_debugfs.h> #include "amdgpu.h" +#include "amdgpu_pm.h" /** * amdgpu_debugfs_add_files - Add simple debugfs entries @@ -1234,6 +1235,12 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) return r; } + r = amdgpu_debugfs_pm_init(adev); + if (r) { + DRM_ERROR("Failed to register debugfs file for dpm!\n"); + return r; + } + return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_list, ARRAY_SIZE(amdgpu_debugfs_list)); } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index b03b1eb7ba04..bc3cf04a1a94 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -41,8 +41,6 @@ #include "hwmgr.h" #define WIDTH_4K 3840 -static int amdgpu_debugfs_pm_init(struct amdgpu_device *adev); - static const struct cg_flag_name clocks[] = { {AMD_CG_SUPPORT_GFX_MGCG, "Graphics Medium Grain Clock Gating"}, {AMD_CG_SUPPORT_GFX_MGLS, "Graphics Medium Grain memory Light Sleep"}, @@ -3398,11 +3396,6 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) DRM_ERROR("failed to create device file unique_id\n"); return ret; } - ret = amdgpu_debugfs_pm_init(adev); - if (ret) { - DRM_ERROR("Failed to register debugfs file for dpm!\n"); - return ret; - } if ((adev->asic_type >= CHIP_VEGA10) && !(adev->flags & AMD_IS_APU)) { @@ -3669,7 +3662,7 @@ static const struct drm_info_list amdgpu_pm_info_list[] = { }; #endif -static int amdgpu_debugfs_pm_init(struct amdgpu_device *adev) +int amdgpu_debugfs_pm_init(struct amdgpu_device *adev) { #if defined(CONFIG_DEBUG_FS) return amdgpu_debugfs_add_files(adev, amdgpu_pm_info_list, ARRAY_SIZE(amdgpu_pm_info_list)); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h index 3da1da277805..5db0ef86e84c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h @@ -43,4 +43,6 @@ void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable); void amdgpu_dpm_enable_vce(struct amdgpu_device *adev, bool enable); void amdgpu_dpm_enable_jpeg(struct amdgpu_device *adev, bool enable); +int amdgpu_debugfs_pm_init(struct amdgpu_device *adev); + #endif -- 2.24.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2020-02-05 15:40 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-05 15:39 [PATCH 00/15] amdgpu: remove load and unload callbacks (v2) Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 01/15] drm/amdgpu: rename amdgpu_debugfs_preempt_cleanup Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 02/15] drm/amdgpu/ttm: move debugfs init into core amdgpu debugfs Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` Alex Deucher [this message] 2020-02-05 15:39 ` [PATCH 03/15] drm/amdgpu/pm: " Alex Deucher 2020-02-05 15:39 ` [PATCH 04/15] drm/amdgpu/sa: " Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 05/15] drm/amdgpu/fence: " Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 06/15] drm/amdgpu/gem: " Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 07/15] drm/amdgpu/regs: " Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 08/15] drm/amdgpu/firmware: " Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 09/15] drm/amdgpu: don't call drm_connector_register for non-MST ports Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 10/15] drm/amdgpu/display: move debugfs init into core amdgpu debugfs Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 11/15] drm/amd/display: move dpcd debugfs members setup Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 12/15] drm/amdgpu/display: add a late register connector callback Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 13/15] drm/amdgpu/display: split dp connector registration Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:39 ` [PATCH 14/15] drm/amdgpu/ring: move debugfs init into core amdgpu debugfs Alex Deucher 2020-02-05 15:39 ` Alex Deucher 2020-02-05 15:40 ` [PATCH 15/15] drm/amdgpu: drop legacy drm load and unload callbacks Alex Deucher 2020-02-05 15:40 ` Alex Deucher 2020-02-05 16:23 ` [PATCH 00/15] amdgpu: remove load and unload callbacks (v2) Thomas Zimmermann 2020-02-05 16:23 ` Thomas Zimmermann 2020-02-07 19:50 [PATCH 00/15] amdgpu: remove load and unload callbacks (v3) Alex Deucher 2020-02-07 19:50 ` [PATCH 03/15] drm/amdgpu/pm: move debugfs init into core amdgpu debugfs Alex Deucher 2020-02-07 19:50 ` 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=20200205154000.536145-4-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 \ /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: linkBe 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.