]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Wait for vblank after enabling the primary plane on BDW
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 24 Jun 2014 10:59:28 +0000 (13:59 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 27 Jun 2014 14:36:11 +0000 (17:36 +0300)
commit59b88ed0a02d995f74709fefef281dd7a2e0bfd3
tree66213c0c82d4bd191831a00db67bc11df5ce4344
parent6b9a752658f012694947b25864d709d36443ea30
drm/i915: Wait for vblank after enabling the primary plane on BDW

BDW signals the flip done interrupt immediately after the DSPSURF write
when the plane is disabled. This is true even if we've already armed
DSPCNTR to enable the plane at the next vblank. This causes major
problems for our page flip code which relies on the flip done interrupts
happening at vblank time.

So what happens is that we enable the plane, and immediately allow
userspace to submit a page flip. If the plane is still in the process
of being enabled when the page flip is issued, the flip done gets
signalled immediately. Our DSPSURFLIVE check catches this to prevent
premature flip completion, but it also means that we don't get a flip
done interrupt when the plane actually gets enabled, and so the page
flip is never completed.

Work around this by re-introducing blocking vblank waits on BDW
whenever we enable the primary plane.

I removed some of the vblank waits here:
 commit a7782d9a2d862f89c52cdf98016c4854e7f08793
 Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
 Date:   Fri Apr 25 13:30:12 2014 +0300

    drm/i915: Drop the excessive vblank waits from modeset codepaths

To avoid these blocking vblank waits we should start using the vblank
interrupt instead of the flip done interrupt to complete page flips.
But that's material for another patch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79354
Tested-by: Guo Jinxian <jinxianx.guo@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_sprite.c