Skip to contentSkip to conversation

drm/i915: only disable memory self-refresh on GMCH

PATCH In review David Weinehall 3 participants 5 messages May 19, 2016 – Jun 7, 2016

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

PATCH 1/1 drm/i915: only disable memory self-refresh on GMCH

The atomic version of intel_pre_plane_update did not check for HAS_GMCH_DISPLAY before calling intel_set_memory_cxsr(). While this doesn't cause any issues on its own (it will return without doing anything if the hardware doesn't have the required feature), the drm_wait_one_vblank() that is needed if memory self-refresh is disabled introduces an unnecessary delay in the suspend path.

In cases where i915 is on the critical path it means that we slow down suspend by 16.8ms on platforms that don't need to disable memory self-refresh.

---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 94d28c795e22..542806056cd9 100644
@@ -4644,7 +4644,7 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state)
 			intel_pre_disable_primary(&crtc->base);
 	}
 
-	if (pipe_config->disable_cxsr) {
+	if (pipe_config->disable_cxsr && HAS_GMCH_DISPLAY(dev)) {
 		crtc->wm.cxsr_allowed = false;
 
 		/*
Signature · 6 lines
2.8.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Ro.CI.BAT: failure for drm/i915: only disable memory self-refresh on GMCH

== Series Details ==

== Series Details ==

Series: drm/i915: only disable memory self-refresh on GMCH
URL : https://patchwork.freedesktop.org/series/7406/
State : failure

== Summary ==

Series 7406v1 drm/i915: only disable memory self-refresh on GMCH
http://patchwork.freedesktop.org/api/1.0/series/7406/revisions/1/mbox

Test drv_hangman:

        Subgroup error-state-basic:
                fail       -> PASS       (ro-ilk1-i5-650)
Test gem_exec_flush:
        Subgroup basic-batch-kernel-default-cmd:
                pass       -> FAIL       (ro-byt-n2820)
fi-byt-n2820     total:218  pass:175  dwarn:0   dfail:0   fail:2   skip:41 
fi-hsw-i7-4770k  total:219  pass:198  dwarn:0   dfail:0   fail:0   skip:21 
fi-hsw-i7-4770r  total:219  pass:192  dwarn:0   dfail:0   fail:0   skip:27 
fi-skl-i7-6700k  total:219  pass:191  dwarn:0   dfail:0   fail:0   skip:28 
ro-bdw-i5-5250u  total:219  pass:181  dwarn:0   dfail:0   fail:0   skip:38 
ro-bdw-i7-5557U  total:219  pass:206  dwarn:0   dfail:0   fail:0   skip:13 
ro-bdw-i7-5600u  total:219  pass:187  dwarn:0   dfail:0   fail:0   skip:32 
ro-byt-n2820     total:218  pass:174  dwarn:0   dfail:0   fail:3   skip:41 
ro-hsw-i3-4010u  total:218  pass:193  dwarn:0   dfail:0   fail:0   skip:25 
ro-hsw-i7-4770r  total:219  pass:194  dwarn:0   dfail:0   fail:0   skip:25 
ro-ilk-i7-620lm  total:219  pass:151  dwarn:0   dfail:0   fail:1   skip:67 
ro-ilk1-i5-650   total:214  pass:152  dwarn:0   dfail:0   fail:1   skip:61 
ro-ivb-i7-3770   total:219  pass:183  dwarn:0   dfail:0   fail:0   skip:36 
ro-ivb2-i7-3770  total:219  pass:187  dwarn:0   dfail:0   fail:0   skip:32 
ro-skl-i7-6700hq total:214  pass:189  dwarn:0   dfail:0   fail:0   skip:25 
ro-snb-i7-2620M  total:219  pass:177  dwarn:0   dfail:0   fail:1   skip:41 

fi-bsw-n3050 failed to connect after reboot
fi-snb-i7-2600 failed to connect after reboot
ro-bsw-n3050 failed to connect after reboot

Results at /archive/results/CI_IGT_test/RO_Patchwork_941/

a2499a0 drm-intel-nightly: 2016y-05m-18d-17h-17m-55s UTC integration manifest 7810f86 drm/i915: only disable memory self-refresh on GMCH

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

Re: ✗ Ro.CI.BAT: failure for drm/i915: only disable memory self-refresh on GMCH

Quoted 6 lines · Patchwork

== Series Details ==

Series: drm/i915: only disable memory self-refresh on GMCH
URL : https://patchwork.freedesktop.org/series/7406/
State : failure

Quoted 8 lines

== Summary ==

Series 7406v1 drm/i915: only disable memory self-refresh on GMCH
http://patchwork.freedesktop.org/api/1.0/series/7406/revisions/1/mbox

Test drv_hangman:

        Subgroup error-state-basic:
                fail       -> PASS       (ro-ilk1-i5-650)

Sadly unlikely to be the result of my patch...

Quoted 3 lines

Test gem_exec_flush:

        Subgroup basic-batch-kernel-default-cmd:
                pass       -> FAIL       (ro-byt-n2820)

This testcase fails on my N2820 even without my patch.

Kind regards, David Weinehall
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: ✗ Ro.CI.BAT: failure for drm/i915: only disable memory self-refresh on GMCH

Quoted 16 lines · David Weinehall
Quoted 6 lines · Patchwork

== Series Details ==

Series: drm/i915: only disable memory self-refresh on GMCH
URL : https://patchwork.freedesktop.org/series/7406/
State : failure

Quoted 8 lines

== Summary ==

Series 7406v1 drm/i915: only disable memory self-refresh on GMCH
http://patchwork.freedesktop.org/api/1.0/series/7406/revisions/1/mbox

Test drv_hangman:

        Subgroup error-state-basic:
                fail       -> PASS       (ro-ilk1-i5-650)
Quoted 7 lines

Sadly unlikely to be the result of my patch...

Quoted 3 lines

Test gem_exec_flush:

        Subgroup basic-batch-kernel-default-cmd:
                pass       -> FAIL       (ro-byt-n2820)

This testcase fails on my N2820 even without my patch.

I would appreaciate a bit more detail in these analyses.

(gem_exec_flush:6039) CRITICAL: Test assertion failure function batch, file gem_exec_flush.c:456:
(gem_exec_flush:6039) CRITICAL: Failed assertion: map[i] == cycles + i (gem_exec_flush:6039) CRITICAL: error: 0xabcdabcd != 0x2f5
Subtest basic-batch-kernel-default-cmd failed.

https://bugs.freedesktop.org/show_bug.cgi?id=95372

Patch pushed to dinq. Thanks.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#4 lore raw
In reply to David Weinehall
Quoted 22 lines · David Weinehall

The atomic version of intel_pre_plane_update did not check for HAS_GMCH_DISPLAY before calling intel_set_memory_cxsr(). While this doesn't cause any issues on its own (it will return without doing anything if the hardware doesn't have the required feature), the drm_wait_one_vblank() that is needed if memory self-refresh is disabled introduces an unnecessary delay in the suspend path.

In cases where i915 is on the critical path it means that we slow down suspend by 16.8ms on platforms that don't need to disable memory self-refresh.

---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index 94d28c795e22..542806056cd9 100644

drivers/gpu/drm/i915/intel_display.c static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state) · line 4647

Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -4644,7 +4644,7 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state)
 			intel_pre_disable_primary(&crtc->base);
 	}
 
-	if (pipe_config->disable_cxsr) {
+	if (pipe_config->disable_cxsr && HAS_GMCH_DISPLAY(dev)) {

Might be even better to track the state of cxsr and only wait when it really changed state. But this looks OK for now.

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +0 -0
 		crtc->wm.cxsr_allowed = false;
 
 		/*
Signature · 6 lines
2.8.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx