diff options
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index c8a34476570a..af9662e58272 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -131,12 +131,11 @@ static void drm_update_vblank_count(struct drm_device *dev, int crtc) | |||
131 | 131 | ||
132 | /* Reinitialize corresponding vblank timestamp if high-precision query | 132 | /* Reinitialize corresponding vblank timestamp if high-precision query |
133 | * available. Skip this step if query unsupported or failed. Will | 133 | * available. Skip this step if query unsupported or failed. Will |
134 | * reinitialize delayed at next vblank interrupt in that case. | 134 | * reinitialize delayed at next vblank interrupt in that case and |
135 | * assign 0 for now, to mark the vblanktimestamp as invalid. | ||
135 | */ | 136 | */ |
136 | if (rc) { | 137 | tslot = atomic_read(&vblank->count) + diff; |
137 | tslot = atomic_read(&vblank->count) + diff; | 138 | vblanktimestamp(dev, crtc, tslot) = rc ? t_vblank : (struct timeval) {0, 0}; |
138 | vblanktimestamp(dev, crtc, tslot) = t_vblank; | ||
139 | } | ||
140 | 139 | ||
141 | smp_mb__before_atomic(); | 140 | smp_mb__before_atomic(); |
142 | atomic_add(diff, &vblank->count); | 141 | atomic_add(diff, &vblank->count); |