Re: [PATCH 5/5] drm/i915/display: move dmc_firmware_path to display params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Jani Nikula (2024-04-18 11:39:54-03:00)
>The dmc_firmware_path parameter is clearly a display parameter. Move it
>there so it's available to both i915 and xe modules. This also cleans up
>the ugly member in struct xe_device.
>
>v2:
>- New try with the NULL/"" param value issue resolved
>
>Link: https://patchwork.freedesktop.org/patch/msgid/20240321161856.3517856-1-jani.nikula@xxxxxxxxx
>Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

Reviewed-by: Gustavo Sousa <gustavo.sousa@xxxxxxxxx>

>---
> drivers/gpu/drm/i915/display/intel_display_params.c | 4 ++++
> drivers/gpu/drm/i915/display/intel_display_params.h | 1 +
> drivers/gpu/drm/i915/display/intel_dmc.c            | 2 +-
> drivers/gpu/drm/i915/i915_params.c                  | 4 ----
> drivers/gpu/drm/i915/i915_params.h                  | 1 -
> drivers/gpu/drm/xe/xe_device_types.h                | 3 ---
> 6 files changed, 6 insertions(+), 9 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_display_params.c b/drivers/gpu/drm/i915/display/intel_display_params.c
>index f40b223cc8a1..ddce5a2c53d9 100644
>--- a/drivers/gpu/drm/i915/display/intel_display_params.c
>+++ b/drivers/gpu/drm/i915/display/intel_display_params.c
>@@ -27,6 +27,10 @@ static struct intel_display_params intel_display_modparams __read_mostly = {
>  * debugfs mode to 0.
>  */
> 
>+intel_display_param_named_unsafe(dmc_firmware_path, charp, 0400,
>+        "DMC firmware path to use instead of the default one. "
>+        "Use non-existent file to disable DMC and runtime PM.");
>+
> intel_display_param_named_unsafe(vbt_firmware, charp, 0400,
>         "Load VBT from specified file under /lib/firmware");
> 
>diff --git a/drivers/gpu/drm/i915/display/intel_display_params.h b/drivers/gpu/drm/i915/display/intel_display_params.h
>index bf8dbbdb20a1..1208a62c16d2 100644
>--- a/drivers/gpu/drm/i915/display/intel_display_params.h
>+++ b/drivers/gpu/drm/i915/display/intel_display_params.h
>@@ -24,6 +24,7 @@ struct drm_i915_private;
>  *       debugfs file
>  */
> #define INTEL_DISPLAY_PARAMS_FOR_EACH(param) \
>+        param(char *, dmc_firmware_path, NULL, 0400) \
>         param(char *, vbt_firmware, NULL, 0400) \
>         param(int, lvds_channel_mode, 0, 0400) \
>         param(int, panel_use_ssc, -1, 0600) \
>diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
>index 3e510c2be1eb..175669f7d61d 100644
>--- a/drivers/gpu/drm/i915/display/intel_dmc.c
>+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
>@@ -75,7 +75,7 @@ static struct intel_dmc *i915_to_dmc(struct drm_i915_private *i915)
> 
> static const char *dmc_firmware_param(struct drm_i915_private *i915)
> {
>-        const char *p = i915->params.dmc_firmware_path;
>+        const char *p = i915->display.params.dmc_firmware_path;
> 
>         return p && *p ? p : NULL;
> }
>diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
>index 9e7f2a9f6287..8c00169e3ab7 100644
>--- a/drivers/gpu/drm/i915/i915_params.c
>+++ b/drivers/gpu/drm/i915/i915_params.c
>@@ -108,10 +108,6 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400,
> i915_param_named_unsafe(huc_firmware_path, charp, 0400,
>         "HuC firmware path to use instead of the default one");
> 
>-i915_param_named_unsafe(dmc_firmware_path, charp, 0400,
>-        "DMC firmware path to use instead of the default one. "
>-        "Use non-existent file to disable DMC and runtime PM.");
>-
> i915_param_named_unsafe(gsc_firmware_path, charp, 0400,
>         "GSC firmware path to use instead of the default one");
> 
>diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
>index 1315d7fac850..2eb3f2115ff2 100644
>--- a/drivers/gpu/drm/i915/i915_params.h
>+++ b/drivers/gpu/drm/i915/i915_params.h
>@@ -51,7 +51,6 @@ struct drm_printer;
>         param(int, guc_log_level, -1, 0400) \
>         param(char *, guc_firmware_path, NULL, 0400) \
>         param(char *, huc_firmware_path, NULL, 0400) \
>-        param(char *, dmc_firmware_path, NULL, 0400) \
>         param(char *, gsc_firmware_path, NULL, 0400) \
>         param(bool, memtest, false, 0400) \
>         param(int, mmio_debug, -IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO), 0600) \
>diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
>index 60ced5f90c2b..c70047762222 100644
>--- a/drivers/gpu/drm/xe/xe_device_types.h
>+++ b/drivers/gpu/drm/xe/xe_device_types.h
>@@ -519,9 +519,6 @@ struct xe_device {
>                 unsigned int czclk_freq;
>                 unsigned int fsb_freq, mem_freq, is_ddr3;
>         };
>-        struct {
>-                const char *dmc_firmware_path;
>-        } params;
> 
>         void *pxp;
> #endif
>-- 
>2.39.2
>




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux