Commit a6e610dc authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm: Pass flags to drm_update_vblank_count()

We'll soon have use for the 'flags' in drm_update_vblank_count() so pass
it in.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 66f59c5c
...@@ -120,7 +120,8 @@ static void store_vblank(struct drm_device *dev, unsigned int pipe, ...@@ -120,7 +120,8 @@ static void store_vblank(struct drm_device *dev, unsigned int pipe,
* Note: caller must hold dev->vbl_lock since this reads & writes * Note: caller must hold dev->vbl_lock since this reads & writes
* device vblank fields. * device vblank fields.
*/ */
static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe) static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
unsigned long flags)
{ {
struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
u32 cur_vblank, diff; u32 cur_vblank, diff;
...@@ -141,7 +142,7 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe) ...@@ -141,7 +142,7 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe)
*/ */
do { do {
cur_vblank = dev->driver->get_vblank_counter(dev, pipe); cur_vblank = dev->driver->get_vblank_counter(dev, pipe);
rc = drm_get_last_vbltimestamp(dev, pipe, &t_vblank, 0); rc = drm_get_last_vbltimestamp(dev, pipe, &t_vblank, flags);
} while (cur_vblank != dev->driver->get_vblank_counter(dev, pipe)); } while (cur_vblank != dev->driver->get_vblank_counter(dev, pipe));
/* Deal with counter wrap */ /* Deal with counter wrap */
...@@ -207,7 +208,7 @@ static void vblank_disable_and_save(struct drm_device *dev, unsigned int pipe) ...@@ -207,7 +208,7 @@ static void vblank_disable_and_save(struct drm_device *dev, unsigned int pipe)
*/ */
if (!vblank->enabled && if (!vblank->enabled &&
drm_get_last_vbltimestamp(dev, pipe, &tvblank, 0)) { drm_get_last_vbltimestamp(dev, pipe, &tvblank, 0)) {
drm_update_vblank_count(dev, pipe); drm_update_vblank_count(dev, pipe, 0);
spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags); spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags);
return; return;
} }
...@@ -1027,7 +1028,7 @@ static int drm_vblank_enable(struct drm_device *dev, unsigned int pipe) ...@@ -1027,7 +1028,7 @@ static int drm_vblank_enable(struct drm_device *dev, unsigned int pipe)
atomic_dec(&vblank->refcount); atomic_dec(&vblank->refcount);
else { else {
vblank->enabled = true; vblank->enabled = true;
drm_update_vblank_count(dev, pipe); drm_update_vblank_count(dev, pipe, 0);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment