public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 00/12] irq vblank handling rework
@ 2014-05-14 18:51 Daniel Vetter
  2014-05-14 18:51 ` [PATCH 01/12] drm: Use correct spinlock flavor in drm_vblank_get() Daniel Vetter
                   ` (15 more replies)
  0 siblings, 16 replies; 52+ messages in thread
From: Daniel Vetter @ 2014-05-14 18:51 UTC (permalink / raw)
  To: DRI Development, Intel Graphics Development; +Cc: Daniel Vetter

Hi all,

This is Ville's vblank rework series, slightly pimped. I've added kerneldoc,
some polish and also some additional nasty igt testcases for these crtc on/off
vs vblank issues. Seems all to hold together nicely.

Now one thing I wanted to do is roll this out across all drm drivers, but that
looks ugly: Many drivers don't support vblanks really, and I couldn't fully
audit whether they'd e.g. blow up when userspace tries to use the vblank wait
ioctl. But I think we want to have more sanity since otherwise userspace is
doomed to carry countless ugly hacks around forever.

The last two patches are my attempt at that. By doing the drm_vblank_on/off
dance in the crtc helpers after we know that the crtc is on/off we should have
at least a somewhat sane baseline behaviour. Note that since drm_vblank_on/off
are idempotent drivers are free to call these functions in their callback at an
earlier time, where it makes more sense. But at least it's guaranteed to happen.

Otoh drivers still need to manually complete pageflips, so this doesn't solve
all the issues. But until we have a solid cross-driver testsuite for these
corner-cases (all the interesting stuff happens when you race vblank waits
against concurrent modesets, dpms, or system/runtime suspend/resume) we're
pretty much guaranteed to have some that works at best occasionally and is
guaranteed to have different behaviour in corner cases. Note that the patches
won't degrade behaviour for existing drivers, the drm core changes simply allow
us to finally fix things up correctly.

I guess in a way this is a more generic discussion for the drm subsystem at
large.

Coments and review highly welcome.

Cheers, Daniel

Daniel Vetter (8):
  drm/i915: Remove drm_vblank_pre/post_modeset calls
  drm/doc: Discourage usage of MODESET_CTL ioctl
  drm/irq: kerneldoc polish
  drm/irq: Add kms-native crtc interface functions
  drm/i915: rip our vblank reset hacks for runtime PM
  drm/i915: Accurately initialize fifo underrun state on gmch platforms
  [RFC] drm/irq: More robustness in drm_vblank_on|off
  [RFC] drm/crtc-helper: Enforce sane vblank counter semantics

Peter Hurley (1):
  drm: Use correct spinlock flavor in drm_vblank_get()

Ville Syrjälä (3):
  drm: Make the vblank disable timer per-crtc
  drm: Make blocking vblank wait return when the vblank interrupts get
    disabled
  drm: Add drm_vblank_on()

 Documentation/DocBook/drm.tmpl       |  16 +-
 drivers/gpu/drm/drm_crtc_helper.c    |  12 ++
 drivers/gpu/drm/drm_irq.c            | 377 ++++++++++++++++++++++++++---------
 drivers/gpu/drm/i915/i915_irq.c      |   4 +-
 drivers/gpu/drm/i915/intel_display.c |  36 ++--
 drivers/gpu/drm/i915/intel_drv.h     |   2 -
 drivers/gpu/drm/i915/intel_pm.c      |  40 ----
 include/drm/drmP.h                   |  10 +-
 8 files changed, 341 insertions(+), 156 deletions(-)

-- 
1.8.3.1

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

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

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

Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14 18:51 [PATCH 00/12] irq vblank handling rework Daniel Vetter
2014-05-14 18:51 ` [PATCH 01/12] drm: Use correct spinlock flavor in drm_vblank_get() Daniel Vetter
2014-05-21 11:08   ` Thierry Reding
2014-05-14 18:51 ` [PATCH 02/12] drm: Make the vblank disable timer per-crtc Daniel Vetter
2014-05-21 11:17   ` Thierry Reding
2014-05-21 12:10     ` Daniel Vetter
2014-05-14 18:51 ` [PATCH 03/12] drm: Make blocking vblank wait return when the vblank interrupts get disabled Daniel Vetter
2014-05-21 11:20   ` Thierry Reding
2014-05-21 11:24     ` Thierry Reding
2014-05-14 18:51 ` [PATCH 04/12] drm: Add drm_vblank_on() Daniel Vetter
2014-05-14 18:55   ` Daniel Vetter
2014-05-21 11:32   ` Thierry Reding
2014-05-21 12:15     ` Daniel Vetter
2014-05-14 18:51 ` [PATCH 05/12] drm/i915: Remove drm_vblank_pre/post_modeset calls Daniel Vetter
2014-05-21 11:40   ` Thierry Reding
2014-05-14 18:51 ` [PATCH 06/12] drm/doc: Discourage usage of MODESET_CTL ioctl Daniel Vetter
2014-05-15  4:27   ` Michel Dänzer
2014-05-15 13:00   ` [PATCH] " Daniel Vetter
2014-05-15 20:36     ` Laurent Pinchart
2014-05-14 18:51 ` [PATCH 07/12] drm/irq: kerneldoc polish Daniel Vetter
2014-05-15  4:44   ` Michel Dänzer
2014-05-15  9:55     ` Daniel Vetter
2014-05-15  7:21   ` Thierry Reding
2014-05-15 13:00   ` [PATCH] " Daniel Vetter
2014-05-14 18:51 ` [PATCH 08/12] drm/irq: Add kms-native crtc interface functions Daniel Vetter
2014-05-15  7:34   ` Thierry Reding
2014-05-15 10:10     ` Daniel Vetter
2014-05-15 10:42       ` Thierry Reding
2014-05-15 11:11         ` Daniel Vetter
2014-05-15 13:34   ` [PATCH 1/2] " Daniel Vetter
2014-05-15 13:34     ` [PATCH 2/2] drm/i915: Use new kms-native vblank functions Daniel Vetter
2014-05-14 18:51 ` [PATCH 09/12] drm/i915: rip our vblank reset hacks for runtime PM Daniel Vetter
2014-05-20 12:03   ` [Intel-gfx] " Ville Syrjälä
2014-05-20 13:38     ` Daniel Vetter
2014-05-20 14:03       ` Ville Syrjälä
2014-05-20 14:20         ` Daniel Vetter
2014-05-20 15:17           ` Daniel Vetter
2014-05-21 12:49     ` Thierry Reding
2014-05-14 18:51 ` [PATCH 09/12] drm/irq: Lack of interrupt support in drm_vblank_on|off Daniel Vetter
2014-05-21 12:49   ` Thierry Reding
2014-05-14 18:51 ` [PATCH 10/12] drm/i915: Accurately initialize fifo underrun state on gmch platforms Daniel Vetter
2014-05-14 18:51 ` [PATCH 10/12] drm/i915: rip our vblank reset hacks for runtime PM Daniel Vetter
2014-05-14 18:51 ` [PATCH 11/12] drm/i915: Accurately initialize fifo underrun state on gmch platforms Daniel Vetter
2014-05-14 19:39   ` Imre Deak
2014-05-14 18:51 ` [PATCH 11/12] [RFC] drm/irq: More robustness in drm_vblank_on|off Daniel Vetter
2014-05-21 12:53   ` Thierry Reding
2014-05-21 13:11     ` Daniel Vetter
2014-05-14 18:51 ` [PATCH 12/12] [RFC] drm/crtc-helper: Enforce sane vblank counter semantics Daniel Vetter
2014-05-21  8:26 ` [PATCH 00/12] irq vblank handling rework Ville Syrjälä
2014-05-21  8:35   ` Daniel Vetter
2014-05-21  8:58     ` Ville Syrjälä
2014-05-21 12:55     ` Thierry Reding

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