[Intel-gfx] [PATCH 0/5] drm: Allow vblank interrupts during modeset and make the code less racy
ville.syrjala at linux.intel.com
ville.syrjala at linux.intel.com
Fri Feb 21 20:03:30 CET 2014
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
I'm going to require vblank interrupts during modeset in i915 soon, however
the drm vblank code won't currently allow it. It simply refuses to re-enable
the vblank interrupts whenever they were disable and the refcount is
already elevated. That means anyone holding a vblank reference across a
modeset/dpms cycle can prevent the driver from operating correctly.
The same problem can also cause wait for vblank ioctls issued soon after
a modeset to fail. I've cooked up a few i-g-t/kms_flip subtests to excercise
this.
I don't want to be responsible for potentially breaking every other drm
driver, so I've made the new behaviour opt in. If the driver uses the new
way of doing things, vblank interrupts (and ioctls) are allowed everywhere
except between drm_vblank_off() and drm_vblanl_on(). Any wait for vblank
ioctl currently pending will get completed when drm_vblank_off() is called,
including blocking waits which previously could have just sat there until
the timeout expired.
I also fixed the vblank disable timer to act predictably when multiple
crtcs are involved , and I hoovered up an old patch from Peter Hurley
to skip the double irqsave in drm_vblank_get().
Peter Hurley (1):
drm: Use correct spinlock flavor in drm_vblank_get()
Ville Syrjälä (4):
drm: Make the vblank disable timer per-crtc
drm: Allow the driver to reject vblank requests only when it really
has the vblank interrupts disabled
drm: Allow reenabling of vblank interrupts even if refcount>0
drm/i915: Allow vblank interrupts during modeset and eliminate some
vblank races
drivers/gpu/drm/armada/armada_crtc.c | 2 +-
drivers/gpu/drm/drm_irq.c | 78 ++++++++++++++++++++++----------
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 2 +-
drivers/gpu/drm/gma500/gma_display.c | 2 +-
drivers/gpu/drm/i915/i915_dma.c | 6 +++
drivers/gpu/drm/i915/intel_display.c | 23 ++++++----
drivers/gpu/drm/tegra/dc.c | 2 +-
include/drm/drmP.h | 14 +++++-
8 files changed, 91 insertions(+), 38 deletions(-)
--
1.8.3.2
More information about the Intel-gfx
mailing list