Commit 0d82a0d6 authored by Jani Nikula's avatar Jani Nikula

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.
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240321161856.3517856-1-jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 2d2d92bc
...@@ -27,6 +27,9 @@ static struct intel_display_params intel_display_modparams __read_mostly = { ...@@ -27,6 +27,9 @@ static struct intel_display_params intel_display_modparams __read_mostly = {
* debugfs mode to 0. * debugfs mode to 0.
*/ */
intel_display_param_named_unsafe(dmc_firmware_path, charp, 0400,
"DMC firmware path to use instead of the default one");
intel_display_param_named_unsafe(vbt_firmware, charp, 0400, intel_display_param_named_unsafe(vbt_firmware, charp, 0400,
"Load VBT from specified file under /lib/firmware"); "Load VBT from specified file under /lib/firmware");
......
...@@ -24,6 +24,7 @@ struct drm_i915_private; ...@@ -24,6 +24,7 @@ struct drm_i915_private;
* debugfs file * debugfs file
*/ */
#define INTEL_DISPLAY_PARAMS_FOR_EACH(param) \ #define INTEL_DISPLAY_PARAMS_FOR_EACH(param) \
param(char *, dmc_firmware_path, NULL, 0400) \
param(char *, vbt_firmware, NULL, 0400) \ param(char *, vbt_firmware, NULL, 0400) \
param(int, lvds_channel_mode, 0, 0400) \ param(int, lvds_channel_mode, 0, 0400) \
param(int, panel_use_ssc, -1, 0600) \ param(int, panel_use_ssc, -1, 0600) \
......
...@@ -927,7 +927,7 @@ static void dmc_load_work_fn(struct work_struct *work) ...@@ -927,7 +927,7 @@ static void dmc_load_work_fn(struct work_struct *work)
err = request_firmware(&fw, dmc->fw_path, i915->drm.dev); err = request_firmware(&fw, dmc->fw_path, i915->drm.dev);
if (err == -ENOENT && !i915->params.dmc_firmware_path) { if (err == -ENOENT && !i915->display.params.dmc_firmware_path) {
fallback_path = dmc_fallback_path(i915); fallback_path = dmc_fallback_path(i915);
if (fallback_path) { if (fallback_path) {
drm_dbg_kms(&i915->drm, "%s not found, falling back to %s\n", drm_dbg_kms(&i915->drm, "%s not found, falling back to %s\n",
...@@ -1034,14 +1034,14 @@ void intel_dmc_init(struct drm_i915_private *i915) ...@@ -1034,14 +1034,14 @@ void intel_dmc_init(struct drm_i915_private *i915)
dmc->max_fw_size = BXT_DMC_MAX_FW_SIZE; dmc->max_fw_size = BXT_DMC_MAX_FW_SIZE;
} }
if (i915->params.dmc_firmware_path) { if (i915->display.params.dmc_firmware_path) {
if (strlen(i915->params.dmc_firmware_path) == 0) { if (strlen(i915->display.params.dmc_firmware_path) == 0) {
drm_info(&i915->drm, drm_info(&i915->drm,
"Disabling DMC firmware and runtime PM\n"); "Disabling DMC firmware and runtime PM\n");
goto out; goto out;
} }
dmc->fw_path = i915->params.dmc_firmware_path; dmc->fw_path = i915->display.params.dmc_firmware_path;
} }
if (!dmc->fw_path) { if (!dmc->fw_path) {
......
...@@ -108,9 +108,6 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400, ...@@ -108,9 +108,6 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400,
i915_param_named_unsafe(huc_firmware_path, charp, 0400, i915_param_named_unsafe(huc_firmware_path, charp, 0400,
"HuC firmware path to use instead of the default one"); "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");
i915_param_named_unsafe(gsc_firmware_path, charp, 0400, i915_param_named_unsafe(gsc_firmware_path, charp, 0400,
"GSC firmware path to use instead of the default one"); "GSC firmware path to use instead of the default one");
......
...@@ -51,7 +51,6 @@ struct drm_printer; ...@@ -51,7 +51,6 @@ struct drm_printer;
param(int, guc_log_level, -1, 0400) \ param(int, guc_log_level, -1, 0400) \
param(char *, guc_firmware_path, NULL, 0400) \ param(char *, guc_firmware_path, NULL, 0400) \
param(char *, huc_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(char *, gsc_firmware_path, NULL, 0400) \
param(bool, memtest, false, 0400) \ param(bool, memtest, false, 0400) \
param(int, mmio_debug, -IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO), 0600) \ param(int, mmio_debug, -IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO), 0600) \
......
...@@ -524,9 +524,6 @@ struct xe_device { ...@@ -524,9 +524,6 @@ struct xe_device {
unsigned int fsb_freq, mem_freq, is_ddr3; unsigned int fsb_freq, mem_freq, is_ddr3;
u8 vblank_enabled; u8 vblank_enabled;
}; };
struct {
const char *dmc_firmware_path;
} params;
void *pxp; void *pxp;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment