Skip to contentSkip to conversation

drm/i915: Mask LPSP to get PSR working even with Power Well in use by audio.

PATCH In review Rodrigo Vivi 2 participants 6 messages Sep 25, 2013 – Oct 3, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Mask LPSP to get PSR working even with Power Well in use by audio.

Power Well in use forces constantly PSR to exit.
On recent Kernel I noticed that PSR Performance Counter was always 0 indicating that PSR was never really achieved.
By masking LPSP, PSR can work normally and save power on Haswell.

---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +1 -1
index 79c14e2..2c555f9 100644
@@ -1467,7 +1467,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)
 
 	/* Avoid continuous PSR exit by masking memup and hpd */
 	I915_WRITE(EDP_PSR_DEBUG_CTL, EDP_PSR_DEBUG_MASK_MEMUP |
-		   EDP_PSR_DEBUG_MASK_HPD);
+		   EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP);
 
 	intel_dp->psr_setup_done = true;
 }
Signature · 1 line
1.7.11.7
#1 lore raw

Hi Daniel,

Please consider to accept this for -fixes, otherwise PSR will never work on Haswell on 3.12.

Thanks,
Rodrigo.

Quoted 26 lines · Rodrigo Vivi

Power Well in use forces constantly PSR to exit.
On recent Kernel I noticed that PSR Performance Counter was always 0 indicating that PSR was never really achieved.
By masking LPSP, PSR can work normally and save power on Haswell.

---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +1 -2
index 79c14e2..2c555f9 100644
@@ -1467,7 +1467,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)
 
        /* Avoid continuous PSR exit by masking memup and hpd */
        I915_WRITE(EDP_PSR_DEBUG_CTL, EDP_PSR_DEBUG_MASK_MEMUP |
-                  EDP_PSR_DEBUG_MASK_HPD);
+                  EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP);
 
        intel_dp->psr_setup_done = true;
 }
--

1.7.11.7

Signature · 2 lines
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
#2 lore raw
Quoted 2 lines · Rodrigo Vivi

Please consider to accept this for -fixes, otherwise PSR will never work on Haswell on 3.12.

You know the drill: A feature regressed and no one noticed, which means we are lacking a fully automated testcase. I guess we need to expose in debugfs somewhere if the edp panel can do psr (if we don't do that already) to be able to skip the test correctly and then check with a little igt testcase that we actually achieve psr residency. Also please poke QA to make sure they actually have a hsw platform with psr panel.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#3 lore raw

Reporter of that Jira bugs confirmed this patch fixes the issue. debufs simplification and igt test case submited.

Thanks

Quoted 16 lines · Daniel Vetter
Quoted 2 lines · Rodrigo Vivi

Please consider to accept this for -fixes, otherwise PSR will never work on Haswell on 3.12.

You know the drill: A feature regressed and no one noticed, which means we are lacking a fully automated testcase. I guess we need to expose in debugfs somewhere if the edp panel can do psr (if we don't do that already) to be able to skip the test correctly and then check with a little igt testcase that we actually achieve psr residency. Also please poke QA to make sure they actually have a hsw platform with psr panel.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

Signature · 2 lines
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
#4 lore raw

PATCH 1/1 drm/i915: Mask LPSP to get PSR working even with Power Well in use by audio.

Power Well in use forces constantly PSR to exit.
On recent Kernel I noticed that PSR Performance Counter was always 0 indicating that PSR was never really achieved.
By masking LPSP, PSR can work normally and save power on Haswell.

Two bugs had been raised with PSR flag enabled:
- "Screen flickers when booted by enabling PSR in the kernel (i915.enable_psr=1) , the system is booting to a gray screen."
- "When booting the DUT with PSR feature enabled in the kernel (i915.enable_psr=1) , the system is booting to a gray screen."

Both bugs has been fixed by this patch.

v2: proper comment for -fixes

---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +1 -1
index 79c14e2..2c555f9 100644
@@ -1467,7 +1467,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)
 
 	/* Avoid continuous PSR exit by masking memup and hpd */
 	I915_WRITE(EDP_PSR_DEBUG_CTL, EDP_PSR_DEBUG_MASK_MEMUP |
-		   EDP_PSR_DEBUG_MASK_HPD);
+		   EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP);
 
 	intel_dp->psr_setup_done = true;
 }
Signature · 1 line
1.8.1.4
#5 lore raw
Quoted 9 lines · Rodrigo Vivi

Power Well in use forces constantly PSR to exit.
On recent Kernel I noticed that PSR Performance Counter was always 0 indicating that PSR was never really achieved.
By masking LPSP, PSR can work normally and save power on Haswell.

Two bugs had been raised with PSR flag enabled:
- "Screen flickers when booted by enabling PSR in the kernel (i915.enable_psr=1) , the system is booting to a gray screen."
- "When booting the DUT with PSR feature enabled in the kernel (i915.enable_psr=1) , the system is booting to a gray screen."

Quoted 6 lines

Both bugs has been fixed by this patch.

v2: proper comment for -fixes

Picked up for -fixes, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch