Re: [Intel-gfx] [PATCH 2/2] drm/i915: tune the RC6 threshold for stability

2013-11-16 Thread Daniel Vetter
On Tue, Aug 13, 2013 at 10:29 PM, Daniel Vetter  wrote:
> On Tue, Aug 13, 2013 at 11:55:17AM -0700, Stéphane Marchesin wrote:
>> It's basically the same deal as the RC6+ issues on ivy bridge
>> except this time with RC6 on sandy bridge. Like last time the
>> core of the issue is that the timings don't work 100% with our
>> voltage regulator. So from time to time, the kernel will print
>> a warning message about the GPU not getting out of RC6. In
>> particular, I found this fairly easy to reproduce during
>> suspend/resume.
>>
>> Changing the threshold to 125000 instead of 5 seems to fix
>> the issue. The previous patch used 15 but as it turns out
>> this doesn't work everywhere. After getting such a machine, I
>> bisected the highest value which works, which is 125000, so here
>> it is.
>>
>> I also measured the idle power usage before/after this patch and
>> didn't see a difference on a sandy bridge laptop. On haswell and
>> up, it makes a big difference, so we want to keep it at 50k
>> there. It also seems like haswell doesn't have the RC6 issues
>> that sandy bridge has so the 50k value is fine.
>>
>> Signed-off-by: Stéphane Marchesin 
> Queued for -next, thanks for the patch.

And it blew up:

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

What do? We probably need a sysfs knob for this crap. Presuming no one
has a brilliant idea I'll queue the revert next week.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 2/2] drm/i915: tune the RC6 threshold for stability

2013-08-13 Thread Daniel Vetter
On Tue, Aug 13, 2013 at 11:55:17AM -0700, Stéphane Marchesin wrote:
> It's basically the same deal as the RC6+ issues on ivy bridge
> except this time with RC6 on sandy bridge. Like last time the
> core of the issue is that the timings don't work 100% with our
> voltage regulator. So from time to time, the kernel will print
> a warning message about the GPU not getting out of RC6. In
> particular, I found this fairly easy to reproduce during
> suspend/resume.
> 
> Changing the threshold to 125000 instead of 5 seems to fix
> the issue. The previous patch used 15 but as it turns out
> this doesn't work everywhere. After getting such a machine, I
> bisected the highest value which works, which is 125000, so here
> it is.
> 
> I also measured the idle power usage before/after this patch and
> didn't see a difference on a sandy bridge laptop. On haswell and
> up, it makes a big difference, so we want to keep it at 50k
> there. It also seems like haswell doesn't have the RC6 issues
> that sandy bridge has so the 50k value is fine.
> 
> Signed-off-by: Stéphane Marchesin 
Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 2/2] drm/i915: tune the RC6 threshold for stability

2013-08-13 Thread Stéphane Marchesin
It's basically the same deal as the RC6+ issues on ivy bridge
except this time with RC6 on sandy bridge. Like last time the
core of the issue is that the timings don't work 100% with our
voltage regulator. So from time to time, the kernel will print
a warning message about the GPU not getting out of RC6. In
particular, I found this fairly easy to reproduce during
suspend/resume.

Changing the threshold to 125000 instead of 5 seems to fix
the issue. The previous patch used 15 but as it turns out
this doesn't work everywhere. After getting such a machine, I
bisected the highest value which works, which is 125000, so here
it is.

I also measured the idle power usage before/after this patch and
didn't see a difference on a sandy bridge laptop. On haswell and
up, it makes a big difference, so we want to keep it at 50k
there. It also seems like haswell doesn't have the RC6 issues
that sandy bridge has so the 50k value is fine.

Signed-off-by: Stéphane Marchesin 
---
 drivers/gpu/drm/i915/intel_pm.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 51a2a60..71839f8 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3250,7 +3250,10 @@ static void gen6_enable_rps(struct drm_device *dev)
 
I915_WRITE(GEN6_RC_SLEEP, 0);
I915_WRITE(GEN6_RC1e_THRESHOLD, 1000);
-   I915_WRITE(GEN6_RC6_THRESHOLD, 5);
+   if (INTEL_INFO(dev)->gen <= 6 || IS_IVYBRIDGE(dev))
+   I915_WRITE(GEN6_RC6_THRESHOLD, 125000);
+   else
+   I915_WRITE(GEN6_RC6_THRESHOLD, 5);
I915_WRITE(GEN6_RC6p_THRESHOLD, 15);
I915_WRITE(GEN6_RC6pp_THRESHOLD, 64000); /* unused */
 
-- 
1.8.3

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx