aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2013-10-04 07:53:33 -0400
committerDave Airlie <airlied@redhat.com>2013-10-09 01:55:30 -0400
commitba0bf1200ec75722c558c56f58c596ff42a3b494 (patch)
treecc43f0514713de1793cd1ad7ae66fbc58192bc29
parent55e9edeb57ed9dd9be6773c5230187d701b14a46 (diff)
drm: Make vblank_disable_allowed bool
vblank_disable_allowed 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>
-rw-r--r--drivers/gpu/drm/drm_irq.c5
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c4
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_vidi.c4
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.c2
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c2
-rw-r--r--drivers/staging/imx-drm/imx-drm-core.c4
-rw-r--r--include/drm/drmP.h2
7 files changed, 12 insertions, 11 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index f92da0a32f0d..81b4c84449a4 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -271,7 +271,8 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs)
271 atomic_set(&dev->vblank_refcount[i], 0); 271 atomic_set(&dev->vblank_refcount[i], 0);
272 } 272 }
273 273
274 dev->vblank_disable_allowed = 0; 274 dev->vblank_disable_allowed = false;
275
275 return 0; 276 return 0;
276 277
277err: 278err:
@@ -1085,7 +1086,7 @@ void drm_vblank_post_modeset(struct drm_device *dev, int crtc)
1085 1086
1086 if (dev->vblank_inmodeset[crtc]) { 1087 if (dev->vblank_inmodeset[crtc]) {
1087 spin_lock_irqsave(&dev->vbl_lock, irqflags); 1088 spin_lock_irqsave(&dev->vbl_lock, irqflags);
1088 dev->vblank_disable_allowed = 1; 1089 dev->vblank_disable_allowed = true;
1089 spin_unlock_irqrestore(&dev->vbl_lock, irqflags); 1090 spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
1090 1091
1091 if (dev->vblank_inmodeset[crtc] & 0x2) 1092 if (dev->vblank_inmodeset[crtc] & 0x2)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 868a14d52995..1648b40700e8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -725,11 +725,11 @@ static int fimd_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
725 drm_dev->irq_enabled = 1; 725 drm_dev->irq_enabled = 1;
726 726
727 /* 727 /*
728 * with vblank_disable_allowed = 1, vblank interrupt will be disabled 728 * with vblank_disable_allowed = true, vblank interrupt will be disabled
729 * by drm timer once a current process gives up ownership of 729 * by drm timer once a current process gives up ownership of
730 * vblank event.(after drm_vblank_put function is called) 730 * vblank event.(after drm_vblank_put function is called)
731 */ 731 */
732 drm_dev->vblank_disable_allowed = 1; 732 drm_dev->vblank_disable_allowed = true;
733 733
734 /* attach this sub driver to iommu mapping if supported. */ 734 /* attach this sub driver to iommu mapping if supported. */
735 if (is_drm_iommu_supported(drm_dev)) 735 if (is_drm_iommu_supported(drm_dev))
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 26e089f4ff1c..347aa40a94f5 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -392,11 +392,11 @@ static int vidi_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
392 drm_dev->irq_enabled = 1; 392 drm_dev->irq_enabled = 1;
393 393
394 /* 394 /*
395 * with vblank_disable_allowed = 1, vblank interrupt will be disabled 395 * with vblank_disable_allowed = true, vblank interrupt will be disabled
396 * by drm timer once a current process gives up ownership of 396 * by drm timer once a current process gives up ownership of
397 * vblank event.(after drm_vblank_put function is called) 397 * vblank event.(after drm_vblank_put function is called)
398 */ 398 */
399 drm_dev->vblank_disable_allowed = 1; 399 drm_dev->vblank_disable_allowed = true;
400 400
401 return 0; 401 return 0;
402} 402}
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 30dceb43690b..dd607f820a26 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -359,7 +359,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset)
359 359
360 drm_irq_install(dev); 360 drm_irq_install(dev);
361 361
362 dev->vblank_disable_allowed = 1; 362 dev->vblank_disable_allowed = true;
363 363
364 dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ 364 dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
365 365
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 512645fdaff5..93cbacba26a2 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1330,7 +1330,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
1330 1330
1331 /* Always safe in the mode setting case. */ 1331 /* Always safe in the mode setting case. */
1332 /* FIXME: do pre/post-mode set stuff in core KMS code */ 1332 /* FIXME: do pre/post-mode set stuff in core KMS code */
1333 dev->vblank_disable_allowed = 1; 1333 dev->vblank_disable_allowed = true;
1334 if (INTEL_INFO(dev)->num_pipes == 0) 1334 if (INTEL_INFO(dev)->num_pipes == 0)
1335 return 0; 1335 return 0;
1336 1336
diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
index a2e52a0c53c9..52c29b3afa28 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -423,11 +423,11 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags)
423 goto err_init; 423 goto err_init;
424 424
425 /* 425 /*
426 * with vblank_disable_allowed = 1, vblank interrupt will be disabled 426 * with vblank_disable_allowed = true, vblank interrupt will be disabled
427 * by drm timer once a current process gives up ownership of 427 * by drm timer once a current process gives up ownership of
428 * vblank event.(after drm_vblank_put function is called) 428 * vblank event.(after drm_vblank_put function is called)
429 */ 429 */
430 imxdrm->drm->vblank_disable_allowed = 1; 430 imxdrm->drm->vblank_disable_allowed = true;
431 431
432 if (!imx_drm_device_get()) 432 if (!imx_drm_device_get())
433 ret = -EINVAL; 433 ret = -EINVAL;
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 2b9b033efea4..06cb8f785d0e 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1151,7 +1151,7 @@ struct drm_device {
1151 * Once the modeset ioctl *has* been called though, we can safely 1151 * Once the modeset ioctl *has* been called though, we can safely
1152 * disable them when unused. 1152 * disable them when unused.
1153 */ 1153 */
1154 int vblank_disable_allowed; 1154 bool vblank_disable_allowed;
1155 1155
1156 wait_queue_head_t *vbl_queue; /**< VBLANK wait queue */ 1156 wait_queue_head_t *vbl_queue; /**< VBLANK wait queue */
1157 atomic_t *_vblank_count; /**< number of VBLANK interrupts (driver must alloc the right number of counters) */ 1157 atomic_t *_vblank_count; /**< number of VBLANK interrupts (driver must alloc the right number of counters) */