aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-02-19 12:36:08 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-05-20 15:13:33 -0400
commite69595c2501094d85d5bbca87592acb8a481109a (patch)
treee7b3910270104711cab832ab2aae4f8a0b696ed8 /include/drm/drmP.h
parent97cbc883d0d5ec7fb34e770db67d2cae8992b3ea (diff)
drm: Make the vblank disable timer per-crtc
Currently there's one per-device vblank disable timer, and it gets reset wheneven the vblank refcount for any crtc drops to zero. That means that one crtc could accidentally be keeping the vblank interrupts for other crtcs enabled even if there are no users for them. Make the disable timer per-crtc to avoid this issue. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 12f10bc2395f..9d982d483f12 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1024,14 +1024,17 @@ struct drm_pending_vblank_event {
1024}; 1024};
1025 1025
1026struct drm_vblank_crtc { 1026struct drm_vblank_crtc {
1027 struct drm_device *dev; /* pointer to the drm_device */
1027 wait_queue_head_t queue; /**< VBLANK wait queue */ 1028 wait_queue_head_t queue; /**< VBLANK wait queue */
1028 struct timeval time[DRM_VBLANKTIME_RBSIZE]; /**< timestamp of current count */ 1029 struct timeval time[DRM_VBLANKTIME_RBSIZE]; /**< timestamp of current count */
1030 struct timer_list disable_timer; /* delayed disable timer */
1029 atomic_t count; /**< number of VBLANK interrupts */ 1031 atomic_t count; /**< number of VBLANK interrupts */
1030 atomic_t refcount; /* number of users of vblank interruptsper crtc */ 1032 atomic_t refcount; /* number of users of vblank interruptsper crtc */
1031 u32 last; /* protected by dev->vbl_lock, used */ 1033 u32 last; /* protected by dev->vbl_lock, used */
1032 /* for wraparound handling */ 1034 /* for wraparound handling */
1033 u32 last_wait; /* Last vblank seqno waited per CRTC */ 1035 u32 last_wait; /* Last vblank seqno waited per CRTC */
1034 unsigned int inmodeset; /* Display driver is setting mode */ 1036 unsigned int inmodeset; /* Display driver is setting mode */
1037 int crtc; /* crtc index */
1035 bool enabled; /* so we don't call enable more than 1038 bool enabled; /* so we don't call enable more than
1036 once per disable */ 1039 once per disable */
1037}; 1040};
@@ -1119,7 +1122,6 @@ struct drm_device {
1119 1122
1120 spinlock_t vblank_time_lock; /**< Protects vblank count and time updates during vblank enable/disable */ 1123 spinlock_t vblank_time_lock; /**< Protects vblank count and time updates during vblank enable/disable */
1121 spinlock_t vbl_lock; 1124 spinlock_t vbl_lock;
1122 struct timer_list vblank_disable_timer;
1123 1125
1124 u32 max_vblank_count; /**< size of vblank counter register */ 1126 u32 max_vblank_count; /**< size of vblank counter register */
1125 1127