@@ -1173,7 +1173,7 @@ void drm_vblank_off(struct drm_device *dev, int crtc)
continue;
DRM_DEBUG("Sending premature vblank event on disable: \
wanted %d, current %d\n",
- e->event.sequence, seq);
+ e->item.wanted_seq, seq);
list_del(&e->base.link);
drm_vblank_put(dev, e->item.pipe);
drm_wait_vblank_callback(dev, e, seq, &now, true);
@@ -1469,7 +1469,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe,
trace_drm_vblank_event_queued(current->pid, pipe,
vblwait->request.sequence);
- e->event.sequence = vblwait->request.sequence;
+ e->item.wanted_seq = vblwait->request.sequence;
if ((seq - vblwait->request.sequence) <= (1 << 23)) {
drm_vblank_put(dev, pipe);
drm_wait_vblank_callback(dev, e, seq, &now, false);
@@ -1646,11 +1646,11 @@ static void drm_handle_vblank_events(struct drm_device *dev, int crtc)
list_for_each_entry_safe(e, t, &dev->vblank_event_list, base.link) {
if (e->item.pipe != crtc)
continue;
- if ((seq - e->event.sequence) > (1<<23))
+ if ((seq - e->item.wanted_seq) > (1<<23))
continue;
DRM_DEBUG("vblank event on %d, current %d\n",
- e->event.sequence, seq);
+ e->item.wanted_seq, seq);
list_del(&e->base.link);
drm_vblank_put(dev, e->item.pipe);
@@ -667,6 +667,7 @@ typedef void (*drm_vblank_callback_t)(struct drm_device *dev,
struct drm_vblank_wait_item {
int pipe;
+ unsigned int wanted_seq;
drm_vblank_callback_t callback;
bool callback_from_work;