From: Jani Nikula Date: Wed, 26 Sep 2018 13:34:14 +0000 (+0300) Subject: drm/i915/csr: bypass firmware request on i915.dmc_firmware_path="" X-Git-Tag: v5.15~7388^2~15^2~409 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=e7351a8474d2df929751ef1397ac7f9c6d3c4e22;p=mirror_ubuntu-kernels.git drm/i915/csr: bypass firmware request on i915.dmc_firmware_path="" With i915.dmc_firmware_path="" it's obvious the intention is to disable CSR firmware loading. Bypass the firmware request altogether in this case, with more obvious debug logging. v2: Use DRM_INFO for logging (Chris) Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180926133414.22073-3-jani.nikula@intel.com --- diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c index b3a084c48a94..81935da9cd6b 100644 --- a/drivers/gpu/drm/i915/intel_csr.c +++ b/drivers/gpu/drm/i915/intel_csr.c @@ -485,6 +485,12 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv) } if (i915_modparams.dmc_firmware_path) { + if (strlen(i915_modparams.dmc_firmware_path) == 0) { + csr->fw_path = NULL; + DRM_INFO("Disabling CSR firmare and runtime PM\n"); + return; + } + csr->fw_path = i915_modparams.dmc_firmware_path; /* Bypass version check for firmware override. */ csr->required_version = 0;