@@ -1114,7 +1114,7 @@ static int bxt_resume_prepare(struct drm_i915_private *dev_priv)
static int skl_resume_prepare(struct drm_i915_private *dev_priv)
{
skl_init_cdclk(dev_priv);
- intel_csr_load_program(dev_priv);
+ intel_csr_load_program(dev_priv, false);
return 0;
}
@@ -210,7 +210,7 @@ static char intel_get_substepping(struct drm_device *dev)
* Everytime display comes back from low power state this function is called to
* copy the firmware from internal memory to registers.
*/
-void intel_csr_load_program(struct drm_i915_private *dev_priv)
+void intel_csr_load_program(struct drm_i915_private *dev_priv, bool force)
{
u32 *payload = dev_priv->csr.dmc_payload;
uint32_t i, fw_size;
@@ -226,7 +226,7 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv)
* Unfortunately the ACPI subsystem doesn't yet give us a way to
* differentiate this, hence figure it out with this hack.
*/
- if ((!dev_priv->csr.dmc_payload) || I915_READ(CSR_PROGRAM(0)))
+ if (!force && (!dev_priv->csr.dmc_payload || I915_READ(CSR_PROGRAM(0))))
return;
fw_size = dev_priv->csr.dmc_fw_size;
@@ -384,7 +384,7 @@ static void csr_load_work_fn(struct work_struct *work)
goto out;
/* load csr program during system boot, as needed for DC states */
- intel_csr_load_program(dev_priv);
+ intel_csr_load_program(dev_priv, true);
out:
if (dev_priv->csr.dmc_payload) {
@@ -1208,7 +1208,7 @@ u32 skl_plane_ctl_rotation(unsigned int rotation);
/* intel_csr.c */
void intel_csr_ucode_init(struct drm_i915_private *);
-void intel_csr_load_program(struct drm_i915_private *);
+void intel_csr_load_program(struct drm_i915_private *, bool);
void intel_csr_ucode_fini(struct drm_i915_private *);
/* intel_dp.c */
When booting (warm or cold) we must always program the csr. Previously we checked if the CSR program memory matched with the firmware data but this turned out to fail on warm boots. Signed-off-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com> --- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/intel_csr.c | 6 +++--- drivers/gpu/drm/i915/intel_drv.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)