]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Make the decision to keep vblank irq enabled earlier
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 24 Mar 2017 17:30:58 +0000 (17:30 +0000)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 29 Mar 2017 10:51:26 +0000 (13:51 +0300)
commit9b27a24ac195a8dfa1708373ebdf91f6c17849ba
tree14c5aec4996d9bf770f4e666de780f60d2216a1f
parent13f1a49f92bf7120f313ee56d5232586b3850563
drm: Make the decision to keep vblank irq enabled earlier

We want to provide the vblank irq shadow for pageflip events as well as
vblank queries. Such events are completed within the vblank interrupt
handler, and so the current check for disabling the irq will disable it
from with the same interrupt as the last pageflip event. If we move the
decision on whether to disable the irq (based on there no being no
remaining vblank events, i.e. vblank->refcount == 0) to before we signal
the events, we will only disable the irq on the interrupt after the last
event was signaled. In the normal course of events, this will keep the
vblank irq enabled for the entire flip sequence whereas before it would
flip-flop around every interrupt.

v2: Move the disable_fn() call outside of the vblank_event_lock.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Dave Airlie <airlied@redhat.com>,
Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> #v1
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com> #v1
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170324173058.23051-1-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_irq.c