dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] use new debugfs device-centered functions
@ 2025-08-08 22:52 Brahmajit Das
  2025-08-08 22:52 ` [RFC PATCH 1/2] drm/i915/debugfs: " Brahmajit Das
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Brahmajit Das @ 2025-08-08 22:52 UTC (permalink / raw)
  To: intel-gfx, intel-xe, dri-devel, linux-next
  Cc: jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin, simona

Replace the use of drm_debugfs_create_files() with the new
drm_debugfs_add_files() function, which centers the debugfs files
management on the drm_device instead of drm_minor.

Refer:
https://docs.kernel.org/gpu/todo.html#clean-up-the-debugfs-support

Brahmajit Das (2):
  drm/i915/debugfs: use new debugfs device-centered functions
  drm/i915: use new debugfs device-centered functions

 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 5 ++---
 drivers/gpu/drm/i915/i915_debugfs.c                  | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [RFC PATCH 1/2] drm/i915/debugfs: use new debugfs device-centered functions
  2025-08-08 22:52 [RFC PATCH 0/2] use new debugfs device-centered functions Brahmajit Das
@ 2025-08-08 22:52 ` Brahmajit Das
  2025-08-08 22:52 ` [RFC PATCH 2/2] drm/i915: " Brahmajit Das
  2025-08-11 10:23 ` [RFC PATCH 0/2] " Jani Nikula
  2 siblings, 0 replies; 10+ messages in thread
From: Brahmajit Das @ 2025-08-08 22:52 UTC (permalink / raw)
  To: intel-gfx, intel-xe, dri-devel, linux-next
  Cc: jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin, simona

Replace the use of drm_debugfs_create_files() with the new
drm_debugfs_add_files() function, which centers the debugfs files
management on the drm_device instead of drm_minor.

Signed-off-by: Brahmajit Das <listout@listout.xyz>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 967c0501e91e..4c3065d3aca3 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -699,7 +699,7 @@ static const struct file_operations i915_forcewake_fops = {
 	.release = i915_forcewake_release,
 };
 
-static const struct drm_info_list i915_debugfs_list[] = {
+static const struct drm_debugfs_info i915_debugfs_list[] = {
 	{"i915_capabilities", i915_capabilities, 0},
 	{"i915_gem_objects", i915_gem_object_info, 0},
 	{"i915_frequency_info", i915_frequency_info, 0},
@@ -737,9 +737,8 @@ void i915_debugfs_register(struct drm_i915_private *dev_priv)
 				    i915_debugfs_files[i].fops);
 	}
 
-	drm_debugfs_create_files(i915_debugfs_list,
-				 ARRAY_SIZE(i915_debugfs_list),
-				 minor->debugfs_root, minor);
+	drm_debugfs_add_files(minor->dev, i915_debugfs_list,
+			      ARRAY_SIZE(i915_debugfs_list));
 
 	i915_gpu_error_debugfs_register(dev_priv);
 }
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [RFC PATCH 2/2] drm/i915: use new debugfs device-centered functions
  2025-08-08 22:52 [RFC PATCH 0/2] use new debugfs device-centered functions Brahmajit Das
  2025-08-08 22:52 ` [RFC PATCH 1/2] drm/i915/debugfs: " Brahmajit Das
@ 2025-08-08 22:52 ` Brahmajit Das
  2025-08-11 10:23 ` [RFC PATCH 0/2] " Jani Nikula
  2 siblings, 0 replies; 10+ messages in thread
From: Brahmajit Das @ 2025-08-08 22:52 UTC (permalink / raw)
  To: intel-gfx, intel-xe, dri-devel, linux-next
  Cc: jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin, simona

Replace the use of drm_debugfs_create_files() with the new
drm_debugfs_add_files() function, which centers the debugfs files
management on the drm_device instead of drm_minor.

Signed-off-by: Brahmajit Das <listout@listout.xyz>
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index ce3f9810c42d..92db369f1b94 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -805,7 +805,7 @@ static const struct file_operations i915_fifo_underrun_reset_ops = {
 	.llseek = default_llseek,
 };
 
-static const struct drm_info_list intel_display_debugfs_list[] = {
+static const struct drm_debugfs_info intel_display_debugfs_list[] = {
 	{"intel_display_caps", intel_display_caps, 0},
 	{"i915_frontbuffer_tracking", i915_frontbuffer_tracking, 0},
 	{"i915_sr_status", i915_sr_status, 0},
@@ -825,9 +825,8 @@ void intel_display_debugfs_register(struct intel_display *display)
 	debugfs_create_file("i915_fifo_underrun_reset", 0644, minor->debugfs_root,
 			    display, &i915_fifo_underrun_reset_ops);
 
-	drm_debugfs_create_files(intel_display_debugfs_list,
-				 ARRAY_SIZE(intel_display_debugfs_list),
-				 minor->debugfs_root, minor);
+	drm_debugfs_add_files(minor->dev, intel_display_debugfs_list,
+			      ARRAY_SIZE(intel_display_debugfs_list));
 
 	intel_bios_debugfs_register(display);
 	intel_cdclk_debugfs_register(display);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 0/2] use new debugfs device-centered functions
  2025-08-08 22:52 [RFC PATCH 0/2] use new debugfs device-centered functions Brahmajit Das
  2025-08-08 22:52 ` [RFC PATCH 1/2] drm/i915/debugfs: " Brahmajit Das
  2025-08-08 22:52 ` [RFC PATCH 2/2] drm/i915: " Brahmajit Das
@ 2025-08-11 10:23 ` Jani Nikula
  2025-08-11 13:11   ` Brahmajit Das
  2025-08-11 13:17   ` [RFC PATCH 0/2] " Brahmajit Das
  2 siblings, 2 replies; 10+ messages in thread
From: Jani Nikula @ 2025-08-11 10:23 UTC (permalink / raw)
  To: Brahmajit Das, intel-gfx, intel-xe, dri-devel, linux-next
  Cc: rodrigo.vivi, joonas.lahtinen, tursulin, simona

On Sat, 09 Aug 2025, Brahmajit Das <listout@listout.xyz> wrote:
> Replace the use of drm_debugfs_create_files() with the new
> drm_debugfs_add_files() function, which centers the debugfs files
> management on the drm_device instead of drm_minor.

Please base your patches on top of drm-tip. They no longer apply.

BR,
Jani.

>
> Refer:
> https://docs.kernel.org/gpu/todo.html#clean-up-the-debugfs-support
>
> Brahmajit Das (2):
>   drm/i915/debugfs: use new debugfs device-centered functions
>   drm/i915: use new debugfs device-centered functions
>
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 5 ++---
>  drivers/gpu/drm/i915/i915_debugfs.c                  | 5 ++---
>  2 files changed, 4 insertions(+), 6 deletions(-)

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [RFC PATCH 0/2] use new debugfs device-centered functions
  2025-08-11 10:23 ` [RFC PATCH 0/2] " Jani Nikula
@ 2025-08-11 13:11   ` Brahmajit Das
  2025-08-11 13:11     ` [RFC PATCH 1/2] drm/i915/debugfs: " Brahmajit Das
  2025-08-11 13:11     ` [RFC PATCH 2/2] drm/i915: " Brahmajit Das
  2025-08-11 13:17   ` [RFC PATCH 0/2] " Brahmajit Das
  1 sibling, 2 replies; 10+ messages in thread
From: Brahmajit Das @ 2025-08-11 13:11 UTC (permalink / raw)
  To: jani.nikula
  Cc: dri-devel, intel-gfx, intel-xe, joonas.lahtinen, linux-next,
	listout, rodrigo.vivi, simona, tursulin

Replace the use of drm_debugfs_create_files() with the new
drm_debugfs_add_files() function, which centers the debugfs files
management on the drm_device.

Refer:
https://docs.kernel.org/gpu/todo.html#clean-up-the-debugfs-support

Brahmajit Das (2):
  drm/i915/debugfs: use new debugfs device-centered functions
  drm/i915: use new debugfs device-centered functions

 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 7 +++----
 drivers/gpu/drm/i915/i915_debugfs.c                  | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [RFC PATCH 1/2] drm/i915/debugfs: use new debugfs device-centered functions
  2025-08-11 13:11   ` Brahmajit Das
@ 2025-08-11 13:11     ` Brahmajit Das
  2025-08-11 13:11     ` [RFC PATCH 2/2] drm/i915: " Brahmajit Das
  1 sibling, 0 replies; 10+ messages in thread
From: Brahmajit Das @ 2025-08-11 13:11 UTC (permalink / raw)
  To: jani.nikula
  Cc: dri-devel, intel-gfx, intel-xe, joonas.lahtinen, linux-next,
	listout, rodrigo.vivi, simona, tursulin

Replace the use of drm_debugfs_create_files() with the new
drm_debugfs_add_files() function, which centers the debugfs files
management on the drm_device instead of drm_minor.

Signed-off-by: Brahmajit Das <listout@listout.xyz>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 23fa098c4479..e411ff3ac1fd 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -699,7 +699,7 @@ static const struct file_operations i915_forcewake_fops = {
 	.release = i915_forcewake_release,
 };
 
-static const struct drm_info_list i915_debugfs_list[] = {
+static const struct drm_debugfs_info i915_debugfs_list[] = {
 	{"i915_capabilities", i915_capabilities, 0},
 	{"i915_gem_objects", i915_gem_object_info, 0},
 	{"i915_frequency_info", i915_frequency_info, 0},
@@ -735,9 +735,8 @@ void i915_debugfs_register(struct drm_i915_private *i915)
 				    i915_debugfs_files[i].fops);
 	}
 
-	drm_debugfs_create_files(i915_debugfs_list,
-				 ARRAY_SIZE(i915_debugfs_list),
-				 debugfs_root, i915->drm.primary);
+	drm_debugfs_add_files(&i915->drm, i915_debugfs_list,
+			      ARRAY_SIZE(i915_debugfs_list));
 
 	i915_gpu_error_debugfs_register(i915);
 }
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [RFC PATCH 2/2] drm/i915: use new debugfs device-centered functions
  2025-08-11 13:11   ` Brahmajit Das
  2025-08-11 13:11     ` [RFC PATCH 1/2] drm/i915/debugfs: " Brahmajit Das
@ 2025-08-11 13:11     ` Brahmajit Das
  1 sibling, 0 replies; 10+ messages in thread
From: Brahmajit Das @ 2025-08-11 13:11 UTC (permalink / raw)
  To: jani.nikula
  Cc: dri-devel, intel-gfx, intel-xe, joonas.lahtinen, linux-next,
	listout, rodrigo.vivi, simona, tursulin

Replace the use of drm_debugfs_create_files() with the new
drm_debugfs_add_files() function, which centers the debugfs files
management on the drm_device instead of drm_minor.

Signed-off-by: Brahmajit Das <listout@listout.xyz>
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 10dddec3796f..e191665f7832 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -805,7 +805,7 @@ static const struct file_operations i915_fifo_underrun_reset_ops = {
 	.llseek = default_llseek,
 };
 
-static const struct drm_info_list intel_display_debugfs_list[] = {
+static const struct drm_debugfs_info intel_display_debugfs_list[] = {
 	{"intel_display_caps", intel_display_caps, 0},
 	{"i915_frontbuffer_tracking", i915_frontbuffer_tracking, 0},
 	{"i915_sr_status", i915_sr_status, 0},
@@ -825,9 +825,8 @@ void intel_display_debugfs_register(struct intel_display *display)
 	debugfs_create_file("i915_fifo_underrun_reset", 0644, debugfs_root,
 			    display, &i915_fifo_underrun_reset_ops);
 
-	drm_debugfs_create_files(intel_display_debugfs_list,
-				 ARRAY_SIZE(intel_display_debugfs_list),
-				 debugfs_root, display->drm->primary);
+	drm_debugfs_add_files(display->drm, intel_display_debugfs_list,
+			      ARRAY_SIZE(intel_display_debugfs_list));
 
 	intel_bios_debugfs_register(display);
 	intel_cdclk_debugfs_register(display);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [RFC PATCH 0/2] use new debugfs device-centered functions
  2025-08-11 10:23 ` [RFC PATCH 0/2] " Jani Nikula
  2025-08-11 13:11   ` Brahmajit Das
@ 2025-08-11 13:17   ` Brahmajit Das
  2025-08-11 13:17     ` [RFC PATCH v2 1/2] drm/i915/debugfs: " Brahmajit Das
  2025-08-11 13:17     ` [RFC PATCH v2 2/2] drm/i915: " Brahmajit Das
  1 sibling, 2 replies; 10+ messages in thread
From: Brahmajit Das @ 2025-08-11 13:17 UTC (permalink / raw)
  To: jani.nikula
  Cc: dri-devel, intel-gfx, intel-xe, joonas.lahtinen, linux-next,
	listout, rodrigo.vivi, simona, tursulin

Replace the use of drm_debugfs_create_files() with the new
drm_debugfs_add_files() function, which centers the debugfs files
management on the drm_device.

V2 changes: based on drm-tip.

Refer:
https://docs.kernel.org/gpu/todo.html#clean-up-the-debugfs-support

Brahmajit Das (2):
  drm/i915/debugfs: use new debugfs device-centered functions
  drm/i915: use new debugfs device-centered functions

 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 7 +++----
 drivers/gpu/drm/i915/i915_debugfs.c                  | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [RFC PATCH v2 1/2] drm/i915/debugfs: use new debugfs device-centered functions
  2025-08-11 13:17   ` [RFC PATCH 0/2] " Brahmajit Das
@ 2025-08-11 13:17     ` Brahmajit Das
  2025-08-11 13:17     ` [RFC PATCH v2 2/2] drm/i915: " Brahmajit Das
  1 sibling, 0 replies; 10+ messages in thread
From: Brahmajit Das @ 2025-08-11 13:17 UTC (permalink / raw)
  To: jani.nikula
  Cc: dri-devel, intel-gfx, intel-xe, joonas.lahtinen, linux-next,
	listout, rodrigo.vivi, simona, tursulin

Replace the use of drm_debugfs_create_files() with the new
drm_debugfs_add_files() function, which centers the debugfs files
management on the drm_device instead of drm_minor.

Signed-off-by: Brahmajit Das <listout@listout.xyz>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 23fa098c4479..e411ff3ac1fd 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -699,7 +699,7 @@ static const struct file_operations i915_forcewake_fops = {
 	.release = i915_forcewake_release,
 };
 
-static const struct drm_info_list i915_debugfs_list[] = {
+static const struct drm_debugfs_info i915_debugfs_list[] = {
 	{"i915_capabilities", i915_capabilities, 0},
 	{"i915_gem_objects", i915_gem_object_info, 0},
 	{"i915_frequency_info", i915_frequency_info, 0},
@@ -735,9 +735,8 @@ void i915_debugfs_register(struct drm_i915_private *i915)
 				    i915_debugfs_files[i].fops);
 	}
 
-	drm_debugfs_create_files(i915_debugfs_list,
-				 ARRAY_SIZE(i915_debugfs_list),
-				 debugfs_root, i915->drm.primary);
+	drm_debugfs_add_files(&i915->drm, i915_debugfs_list,
+			      ARRAY_SIZE(i915_debugfs_list));
 
 	i915_gpu_error_debugfs_register(i915);
 }
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [RFC PATCH v2 2/2] drm/i915: use new debugfs device-centered functions
  2025-08-11 13:17   ` [RFC PATCH 0/2] " Brahmajit Das
  2025-08-11 13:17     ` [RFC PATCH v2 1/2] drm/i915/debugfs: " Brahmajit Das
@ 2025-08-11 13:17     ` Brahmajit Das
  1 sibling, 0 replies; 10+ messages in thread
From: Brahmajit Das @ 2025-08-11 13:17 UTC (permalink / raw)
  To: jani.nikula
  Cc: dri-devel, intel-gfx, intel-xe, joonas.lahtinen, linux-next,
	listout, rodrigo.vivi, simona, tursulin

Replace the use of drm_debugfs_create_files() with the new
drm_debugfs_add_files() function, which centers the debugfs files
management on the drm_device instead of drm_minor.

Signed-off-by: Brahmajit Das <listout@listout.xyz>
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 10dddec3796f..e191665f7832 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -805,7 +805,7 @@ static const struct file_operations i915_fifo_underrun_reset_ops = {
 	.llseek = default_llseek,
 };
 
-static const struct drm_info_list intel_display_debugfs_list[] = {
+static const struct drm_debugfs_info intel_display_debugfs_list[] = {
 	{"intel_display_caps", intel_display_caps, 0},
 	{"i915_frontbuffer_tracking", i915_frontbuffer_tracking, 0},
 	{"i915_sr_status", i915_sr_status, 0},
@@ -825,9 +825,8 @@ void intel_display_debugfs_register(struct intel_display *display)
 	debugfs_create_file("i915_fifo_underrun_reset", 0644, debugfs_root,
 			    display, &i915_fifo_underrun_reset_ops);
 
-	drm_debugfs_create_files(intel_display_debugfs_list,
-				 ARRAY_SIZE(intel_display_debugfs_list),
-				 debugfs_root, display->drm->primary);
+	drm_debugfs_add_files(display->drm, intel_display_debugfs_list,
+			      ARRAY_SIZE(intel_display_debugfs_list));
 
 	intel_bios_debugfs_register(display);
 	intel_cdclk_debugfs_register(display);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-08-12  7:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-08 22:52 [RFC PATCH 0/2] use new debugfs device-centered functions Brahmajit Das
2025-08-08 22:52 ` [RFC PATCH 1/2] drm/i915/debugfs: " Brahmajit Das
2025-08-08 22:52 ` [RFC PATCH 2/2] drm/i915: " Brahmajit Das
2025-08-11 10:23 ` [RFC PATCH 0/2] " Jani Nikula
2025-08-11 13:11   ` Brahmajit Das
2025-08-11 13:11     ` [RFC PATCH 1/2] drm/i915/debugfs: " Brahmajit Das
2025-08-11 13:11     ` [RFC PATCH 2/2] drm/i915: " Brahmajit Das
2025-08-11 13:17   ` [RFC PATCH 0/2] " Brahmajit Das
2025-08-11 13:17     ` [RFC PATCH v2 1/2] drm/i915/debugfs: " Brahmajit Das
2025-08-11 13:17     ` [RFC PATCH v2 2/2] drm/i915: " Brahmajit Das

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).