diff mbox series

drm/i915/display: Move display params to i915_display_capabilities

Message ID 20240122070853.5186-1-bhanuprakash.modem@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/display: Move display params to i915_display_capabilities | expand

Commit Message

Modem, Bhanuprakash Jan. 22, 2024, 7:08 a.m. UTC
Instead of mixing display & non-display stuff together, move
display parameters i915_display_capabilities debugfs. This patch
will also drops unnecessary locking.

V2: - Avoid multiple copies (Jani)
    - Drop locking (Jani)
    - Update commit msg (Bhanu)

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_debugfs.c | 2 ++
 drivers/gpu/drm/i915/i915_debugfs.c                  | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Jani Nikula Jan. 22, 2024, 10:13 a.m. UTC | #1
On Mon, 22 Jan 2024, Bhanuprakash Modem <bhanuprakash.modem@intel.com> wrote:
> Instead of mixing display & non-display stuff together, move
> display parameters i915_display_capabilities debugfs. This patch
> will also drops unnecessary locking.

The locking removal could've been a separate patch. *shrug*

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

>
> V2: - Avoid multiple copies (Jani)
>     - Drop locking (Jani)
>     - Update commit msg (Bhanu)
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 2 ++
>  drivers/gpu/drm/i915/i915_debugfs.c                  | 3 ---
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 6f2d13c8ccf7..90dc973ffb6b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -625,6 +625,8 @@ 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);
>  
> +	intel_display_params_dump(i915, &p);
> +
>  	intel_display_device_info_print(DISPLAY_INFO(i915),
>  					DISPLAY_RUNTIME_INFO(i915), &p);
>  
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 990eaa029d9c..0461327d3f82 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -74,10 +74,7 @@ static int i915_capabilities(struct seq_file *m, void *data)
>  	intel_gt_info_print(&to_gt(i915)->info, &p);
>  	intel_driver_caps_print(&i915->caps, &p);
>  
> -	kernel_param_lock(THIS_MODULE);
>  	i915_params_dump(&i915->params, &p);
> -	intel_display_params_dump(i915, &p);
> -	kernel_param_unlock(THIS_MODULE);
>  
>  	return 0;
>  }
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 6f2d13c8ccf7..90dc973ffb6b 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -625,6 +625,8 @@  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);
 
+	intel_display_params_dump(i915, &p);
+
 	intel_display_device_info_print(DISPLAY_INFO(i915),
 					DISPLAY_RUNTIME_INFO(i915), &p);
 
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 990eaa029d9c..0461327d3f82 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -74,10 +74,7 @@  static int i915_capabilities(struct seq_file *m, void *data)
 	intel_gt_info_print(&to_gt(i915)->info, &p);
 	intel_driver_caps_print(&i915->caps, &p);
 
-	kernel_param_lock(THIS_MODULE);
 	i915_params_dump(&i915->params, &p);
-	intel_display_params_dump(i915, &p);
-	kernel_param_unlock(THIS_MODULE);
 
 	return 0;
 }