[PATCH 5/5] drm/i915: Allow vblank interrupts during modeset and eliminate some vblank races (original) (raw)

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Feb 28 00:56:20 PST 2014


On Fri, Feb 21, 2014 at 09:03:35PM +0200, ville.syrjala at linux.intel.com wrote:

From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Tell the drm core vblank code to reject drmvblankget()s only between drmvblankoff() and drmvblankon() calls, and sprinkle the appropriate drmvblankon() calls to the .crtcenable() hooks. At this time I kept the off calls in their current position, and added the on calls to the end of .crtcenable(). Later on these will be moved inwards a bit to allow vblank interrupts during plane enable/disable steps. We can kill of the drmvblank{pre,post}modeset() calls since those are there simply to make drmvblankget() fail during a modeset. The way they do it is by grabbing a vblank reference, and after drmvblankoff() gets called this will results in drmvblankget() failing due to the elevated refcount while vblank interrupts are disabled. Unfortunately this means there's no point during modeset where the behaviour can be restored back to the normal state until the vblank refcount drops to 0. There's no gurantee of that happening even after the modeset has completed, so simply dropping the drmvblank{pre,post}modeset() calls is the best option. The new reject mechanism will take care of things in a much more consistent and race free manner. Testcase: igt/kmsflip/{dpms,modeset}-vs-vblank-race

QA hit the new tests and filed a bug.

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

-- Ville Syrjälä Intel OTC



More information about the dri-devel mailing list