Skip to content

Commit e9913f0

Browse files
committed
drm/i915/display: move dmc_firmware_path to display params
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 Reviewed-by: Gustavo Sousa <[email protected]> Acked-by: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/7c8223b68fdafbc72bee0bf5afdb2ab15261cf00.1713519628.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <[email protected]>
1 parent 068d6e9 commit e9913f0

File tree

6 files changed

+6
-9
lines changed

6 files changed

+6
-9
lines changed

drivers/gpu/drm/i915/display/intel_display_params.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ static struct intel_display_params intel_display_modparams __read_mostly = {
2727
* debugfs mode to 0.
2828
*/
2929

30+
intel_display_param_named_unsafe(dmc_firmware_path, charp, 0400,
31+
"DMC firmware path to use instead of the default one. "
32+
"Use /dev/null to disable DMC and runtime PM.");
33+
3034
intel_display_param_named_unsafe(vbt_firmware, charp, 0400,
3135
"Load VBT from specified file under /lib/firmware");
3236

drivers/gpu/drm/i915/display/intel_display_params.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ struct drm_i915_private;
2424
* debugfs file
2525
*/
2626
#define INTEL_DISPLAY_PARAMS_FOR_EACH(param) \
27+
param(char *, dmc_firmware_path, NULL, 0400) \
2728
param(char *, vbt_firmware, NULL, 0400) \
2829
param(int, lvds_channel_mode, 0, 0400) \
2930
param(int, panel_use_ssc, -1, 0600) \

drivers/gpu/drm/i915/display/intel_dmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static struct intel_dmc *i915_to_dmc(struct drm_i915_private *i915)
7575

7676
static const char *dmc_firmware_param(struct drm_i915_private *i915)
7777
{
78-
const char *p = i915->params.dmc_firmware_path;
78+
const char *p = i915->display.params.dmc_firmware_path;
7979

8080
return p && *p ? p : NULL;
8181
}

drivers/gpu/drm/i915/i915_params.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400,
108108
i915_param_named_unsafe(huc_firmware_path, charp, 0400,
109109
"HuC firmware path to use instead of the default one");
110110

111-
i915_param_named_unsafe(dmc_firmware_path, charp, 0400,
112-
"DMC firmware path to use instead of the default one. "
113-
"Use /dev/null to disable DMC and runtime PM.");
114-
115111
i915_param_named_unsafe(gsc_firmware_path, charp, 0400,
116112
"GSC firmware path to use instead of the default one");
117113

drivers/gpu/drm/i915/i915_params.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ struct drm_printer;
5151
param(int, guc_log_level, -1, 0400) \
5252
param(char *, guc_firmware_path, NULL, 0400) \
5353
param(char *, huc_firmware_path, NULL, 0400) \
54-
param(char *, dmc_firmware_path, NULL, 0400) \
5554
param(char *, gsc_firmware_path, NULL, 0400) \
5655
param(bool, memtest, false, 0400) \
5756
param(int, mmio_debug, -IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO), 0600) \

drivers/gpu/drm/xe/xe_device_types.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,6 @@ struct xe_device {
512512
unsigned int czclk_freq;
513513
unsigned int fsb_freq, mem_freq, is_ddr3;
514514
};
515-
struct {
516-
const char *dmc_firmware_path;
517-
} params;
518515

519516
void *pxp;
520517
#endif

0 commit comments

Comments
 (0)