Skip to contentSkip to conversation

drm/i915/display: Dump display parameters to i915_display_capabilities

PATCH In review Bhanuprakash Modem 2 participants 2 messages Jan 17, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/display: Dump display parameters to i915_display_capabilities

Include Display parameters in i915_display_capabilities debugfs.

---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/display/intel_display_debugfs.c +4 -0
index 6f2d13c8ccf7..1eb296b5c38a 100644
@@ -625,6 +625,10 @@ static int i915_display_capabilities(struct seq_file *m, void *unused)
 	struct drm_i915_private *i915 = node_to_i915(m->private);
 	struct drm_printer p = drm_seq_file_printer(m);
 
+	kernel_param_lock(THIS_MODULE);
+	intel_display_params_dump(i915, &p);
+	kernel_param_unlock(THIS_MODULE);
+
 	intel_display_device_info_print(DISPLAY_INFO(i915),
 					DISPLAY_RUNTIME_INFO(i915), &p);
 
Signature · 1 line
2.40.0
maintainer
#1 lore raw
Quoted 1 line · Bhanuprakash Modem

Include Display parameters in i915_display_capabilities debugfs.

Maybe remove them from i915_capabilities? What's the point in having them in two places? (Or three, if you count the actual debugfs interface to the params!)

Quoted 12 lines
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/display/intel_display_debugfs.c +0 -0
index 6f2d13c8ccf7..1eb296b5c38a 100644

drivers/gpu/drm/i915/display/intel_display_debugfs.c static int i915_display_capabilities(struct seq_file *m, void *unused) · line 630

Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display_debugfs.c +3 -0
@@ -625,6 +625,10 @@ static int i915_display_capabilities(struct seq_file *m, void *unused)
 	struct drm_i915_private *i915 = node_to_i915(m->private);
 	struct drm_printer p = drm_seq_file_printer(m);
 
+	kernel_param_lock(THIS_MODULE);
+	intel_display_params_dump(i915, &p);
+	kernel_param_unlock(THIS_MODULE);

The kernel_param_lock/unlock are just cargo cult from the time these were actually module parameters. They should be removed from i915_capabilities as well.

BR,
Jani.

Quoted 3 lines
drivers/gpu/drm/i915/display/intel_display_debugfs.c +1 -0
+
 	intel_display_device_info_print(DISPLAY_INFO(i915),
 					DISPLAY_RUNTIME_INFO(i915), &p);
Signature · 1 line
Jani Nikula, Intel