]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Implement a better i945gm vblank irq vs. C-states workaround
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 3 Oct 2019 14:02:31 +0000 (17:02 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 4 Oct 2019 15:43:49 +0000 (18:43 +0300)
commite6b97f6ee84f4523e4762a1fc9f684d9696905c4
treea033751e6a98098bd8e6236fc150e2e0a3a2371a
parentcff077825860b9e3eca68ec92d85b01c47aec4ed
drm/i915: Implement a better i945gm vblank irq vs. C-states workaround

The current "disable C3+" workaround for the delayed vblank
irqs on i945gm no longer works. I'm not sure what changed, but
now I need to also disable C2. I also got my hands on a i915gm
machine that suffers from the same issue.

After some furious poking of registers I managed to find a
better workaround: The "Do not Turn off Core Render Clock in C
states" bit. With that I no longer have to disable any C-states,
and as a nice bonus the power cost is only ~1/4 of the
"disable C3+" method (which mind you doesn't even work anymore,
and so would have an even higher power cost if we made it work
by also disabling C2).

So let's throw out all the cpuidle/qos crap and just toggle
the magic bit as needed. And we extend the workaround to cover
i915gm as well.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191003140231.24408-1-ville.syrjala@linux.intel.com
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_irq.h
drivers/gpu/drm/i915/i915_reg.h