public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 0/5] drm: Allow vblank interrupts during modeset and make the code less racy
@ 2014-02-21 19:03 ville.syrjala
  2014-02-21 19:03 ` [PATCH 1/5] drm: Use correct spinlock flavor in drm_vblank_get() ville.syrjala
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: ville.syrjala @ 2014-02-21 19:03 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

From: Ville Syrjälä <ville.syrjala@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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2014-05-30  3:13 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 19:03 [PATCH 0/5] drm: Allow vblank interrupts during modeset and make the code less racy ville.syrjala
2014-02-21 19:03 ` [PATCH 1/5] drm: Use correct spinlock flavor in drm_vblank_get() ville.syrjala
2014-02-26 19:24   ` [Intel-gfx] " Jesse Barnes
2014-02-21 19:03 ` [PATCH 2/5] drm: Make the vblank disable timer per-crtc ville.syrjala
2014-02-26 19:32   ` Jesse Barnes
2014-02-21 19:03 ` [PATCH 3/5] drm: Allow the driver to reject vblank requests only when it really has the vblank interrupts disabled ville.syrjala
2014-02-26 19:41   ` Jesse Barnes
2014-03-04  9:24   ` Daniel Vetter
2014-03-05 12:38     ` Ville Syrjälä
2014-03-05 13:55       ` Daniel Vetter
2014-02-21 19:03 ` [PATCH 4/5] drm: Allow reenabling of vblank interrupts even if refcount>0 ville.syrjala
2014-02-26 19:44   ` Jesse Barnes
2014-03-04  9:16   ` Daniel Vetter
2014-03-05 12:33     ` Ville Syrjälä
2014-02-21 19:03 ` [PATCH 5/5] drm/i915: Allow vblank interrupts during modeset and eliminate some vblank races ville.syrjala
2014-02-24  3:48   ` Michel Dänzer
2014-02-24 12:11     ` Ville Syrjälä
2014-02-25  2:58       ` Michel Dänzer
2014-02-26 19:48         ` Jesse Barnes
2014-03-04  9:13         ` Daniel Vetter
2014-05-28  9:12           ` Michel Dänzer
2014-05-28 11:19             ` [Intel-gfx] " Ville Syrjälä
2014-05-29  4:11               ` Michel Dänzer
2014-05-29 10:56                 ` Daniel Vetter
2014-05-30  3:13                   ` Michel Dänzer
2014-02-28  8:56   ` Ville Syrjälä
2014-03-04  9:15     ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox