[Intel-gfx] [PATCH 08/12] drm/i915: Don't try to load garbage dmc firmware on resume
Daniel Vetter
daniel.vetter at ffwll.ch
Thu Jul 9 13:04:44 PDT 2015
We need to make sure we don't put garbage into the hw if dmc firmware
loading failed mid-thru.
Cc: Animesh Manna <animesh.manna at intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 2 +-
drivers/gpu/drm/i915/intel_csr.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 750c859a67c7..1145a354c385 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -736,7 +736,7 @@ struct intel_uncore {
struct intel_csr {
const char *fw_path;
- __be32 *dmc_payload;
+ uint32_t *dmc_payload;
uint32_t dmc_fw_size;
uint32_t mmio_count;
uint32_t mmioaddr[8];
diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index 7ace2cc83269..b87d5dfc04ce 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -202,6 +202,9 @@ void intel_csr_load_program(struct drm_device *dev)
return;
}
+ if (!dev_priv->csr.dmc_payload)
+ return;
+
fw_size = dev_priv->csr.dmc_fw_size;
for (i = 0; i < fw_size; i++)
I915_WRITE(CSR_PROGRAM_BASE + i * 4, payload[i]);
--
2.1.4
More information about the Intel-gfx
mailing list