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-Url: https://git.stricted.de/?a=commitdiff_plain;h=bffbcd934360721cee27ed45a6558830b0cb7d29;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 4bd2747d9c92..a65a8d508dc9 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;