Commit f425d08b authored by Jani Nikula's avatar Jani Nikula

drm/i915: add support for specifying DMC firmware override by module param

Use i915.dmc_firmware_path to override default firmware for the platform
and bypassing version checks.

v2: add missing param struct member declaration (David)
Tested-by: default avatarDavid Weinehall <david.weinehall@linux.intel.com>
Reviewed-by: default avatarDavid Weinehall <david.weinehall@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: David Weinehall <david.weinehall@linux.intel.com>
Acked-by: default avatarAnusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180424122016.2416-1-jani.nikula@intel.com
parent 53f071e1
...@@ -164,6 +164,9 @@ i915_param_named_unsafe(guc_firmware_path, charp, 0400, ...@@ -164,6 +164,9 @@ 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(enable_dp_mst, bool, 0600, i915_param_named_unsafe(enable_dp_mst, bool, 0600,
"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)"); "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)");
......
...@@ -51,6 +51,7 @@ struct drm_printer; ...@@ -51,6 +51,7 @@ struct drm_printer;
param(int, guc_log_level, -1) \ param(int, guc_log_level, -1) \
param(char *, guc_firmware_path, NULL) \ param(char *, guc_firmware_path, NULL) \
param(char *, huc_firmware_path, NULL) \ param(char *, huc_firmware_path, NULL) \
param(char *, dmc_firmware_path, NULL) \
param(int, mmio_debug, 0) \ param(int, mmio_debug, 0) \
param(int, edp_vswing, 0) \ param(int, edp_vswing, 0) \
param(int, reset, 2) \ param(int, reset, 2) \
......
...@@ -298,7 +298,10 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, ...@@ -298,7 +298,10 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv,
csr->version = css_header->version; csr->version = css_header->version;
if (IS_CANNONLAKE(dev_priv)) { if (csr->fw_path == i915_modparams.dmc_firmware_path) {
/* Bypass version check for firmware override. */
required_version = csr->version;
} else if (IS_CANNONLAKE(dev_priv)) {
required_version = CNL_CSR_VERSION_REQUIRED; required_version = CNL_CSR_VERSION_REQUIRED;
} else if (IS_GEMINILAKE(dev_priv)) { } else if (IS_GEMINILAKE(dev_priv)) {
required_version = GLK_CSR_VERSION_REQUIRED; required_version = GLK_CSR_VERSION_REQUIRED;
...@@ -453,7 +456,9 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv) ...@@ -453,7 +456,9 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)
if (!HAS_CSR(dev_priv)) if (!HAS_CSR(dev_priv))
return; return;
if (IS_CANNONLAKE(dev_priv)) if (i915_modparams.dmc_firmware_path)
csr->fw_path = i915_modparams.dmc_firmware_path;
else if (IS_CANNONLAKE(dev_priv))
csr->fw_path = I915_CSR_CNL; csr->fw_path = I915_CSR_CNL;
else if (IS_GEMINILAKE(dev_priv)) else if (IS_GEMINILAKE(dev_priv))
csr->fw_path = I915_CSR_GLK; csr->fw_path = I915_CSR_GLK;
......
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