diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-10-04 14:53:35 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-10-09 15:55:31 +1000 |
commit | bf507d90cf0eecf5495f66f21dbb66e35e9131ae (patch) | |
tree | d1c36aa665cc03c3ba3e958e9c6c0bef9645a0b0 /drivers/gpu/drm/drm_irq.c | |
parent | 54edf9aec79779f85d49674580b7ccab4d6f3c4a (diff) | |
download | lwn-bf507d90cf0eecf5495f66f21dbb66e35e9131ae.tar.gz lwn-bf507d90cf0eecf5495f66f21dbb66e35e9131ae.zip |
drm: Make vblank_enabled bool
vblank_enabled is only ever 0 or 1, so make it a bool.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 81b4c84449a4..49680a8ab96a 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -115,7 +115,7 @@ static void vblank_disable_and_save(struct drm_device *dev, int crtc) spin_lock_irqsave(&dev->vblank_time_lock, irqflags); dev->driver->disable_vblank(dev, crtc); - dev->vblank_enabled[crtc] = 0; + dev->vblank_enabled[crtc] = false; /* No further vblank irq's will be processed after * this point. Get current hardware vblank count and @@ -235,7 +235,7 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs) if (!dev->vblank_refcount) goto err; - dev->vblank_enabled = kcalloc(num_crtcs, sizeof(int), GFP_KERNEL); + dev->vblank_enabled = kcalloc(num_crtcs, sizeof(bool), GFP_KERNEL); if (!dev->vblank_enabled) goto err; @@ -412,7 +412,7 @@ int drm_irq_uninstall(struct drm_device *dev) spin_lock_irqsave(&dev->vbl_lock, irqflags); for (i = 0; i < dev->num_crtcs; i++) { DRM_WAKEUP(&dev->vbl_queue[i]); - dev->vblank_enabled[i] = 0; + dev->vblank_enabled[i] = false; dev->last_vblank[i] = dev->driver->get_vblank_counter(dev, i); } @@ -973,7 +973,7 @@ int drm_vblank_get(struct drm_device *dev, int crtc) if (ret) atomic_dec(&dev->vblank_refcount[crtc]); else { - dev->vblank_enabled[crtc] = 1; + dev->vblank_enabled[crtc] = true; drm_update_vblank_count(dev, crtc); } } |