From: Daniel Vetter Date: Wed, 28 Oct 2015 21:59:01 +0000 (+0200) Subject: drm/i915/gen9: Don't try to load garbage dmc firmware on resume X-Git-Tag: v4.14-rc1~2738^2~45^2~1164 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bffbcd934360721cee27ed45a6558830b0cb7d29;p=platform%2Fkernel%2Flinux-rpi.git drm/i915/gen9: Don't try to load garbage dmc firmware on resume We need to make sure we don't put garbage into the hw if dmc firmware loading failed mid-thru. Cc: Damien Lespiau Cc: Imre Deak Cc: Sunil Kamath Signed-off-by: Daniel Vetter Signed-off-by: Animesh Manna Signed-off-by: Imre Deak Tested-by: Daniel Stone # SKL Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1446069547-24760-8-git-send-email-imre.deak@intel.com --- diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c index 4bd2747..a65a8d5 100644 --- a/drivers/gpu/drm/i915/intel_csr.c +++ b/drivers/gpu/drm/i915/intel_csr.c @@ -223,7 +223,7 @@ void intel_csr_load_program(struct drm_device *dev) * Unfortunately the ACPI subsystem doesn't yet give us a way to * differentiate this, hence figure it out with this hack. */ - if (I915_READ(CSR_PROGRAM(0))) + if ((!dev_priv->csr.dmc_payload) || I915_READ(CSR_PROGRAM(0))) return; fw_size = dev_priv->csr.dmc_fw_size;