]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm: Make vblank_disable_allowed bool
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 4 Oct 2013 11:53:33 +0000 (14:53 +0300)
committerDave Airlie <airlied@redhat.com>
Wed, 9 Oct 2013 05:55:30 +0000 (15:55 +1000)
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>
drivers/gpu/drm/drm_irq.c
drivers/gpu/drm/exynos/exynos_drm_fimd.c
drivers/gpu/drm/exynos/exynos_drm_vidi.c
drivers/gpu/drm/gma500/psb_drv.c
drivers/gpu/drm/i915/i915_dma.c
drivers/staging/imx-drm/imx-drm-core.c
include/drm/drmP.h

index f92da0a32f0d30d02fe8afeb09f5272a16b8a060..81b4c84449a410b729bfb2dde70660f3c44bea10 100644 (file)
@@ -271,7 +271,8 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs)
                atomic_set(&dev->vblank_refcount[i], 0);
        }
 
-       dev->vblank_disable_allowed = 0;
+       dev->vblank_disable_allowed = false;
+
        return 0;
 
 err:
@@ -1085,7 +1086,7 @@ void drm_vblank_post_modeset(struct drm_device *dev, int crtc)
 
        if (dev->vblank_inmodeset[crtc]) {
                spin_lock_irqsave(&dev->vbl_lock, irqflags);
-               dev->vblank_disable_allowed = 1;
+               dev->vblank_disable_allowed = true;
                spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
 
                if (dev->vblank_inmodeset[crtc] & 0x2)
index 868a14d529956545204ac34d29083c1fa60dbd10..1648b40700e8d6787b47d0718396efed4bc0fc52 100644 (file)
@@ -725,11 +725,11 @@ static int fimd_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
        drm_dev->irq_enabled = 1;
 
        /*
-        * with vblank_disable_allowed = 1, vblank interrupt will be disabled
+        * with vblank_disable_allowed = true, vblank interrupt will be disabled
         * by drm timer once a current process gives up ownership of
         * vblank event.(after drm_vblank_put function is called)
         */
-       drm_dev->vblank_disable_allowed = 1;
+       drm_dev->vblank_disable_allowed = true;
 
        /* attach this sub driver to iommu mapping if supported. */
        if (is_drm_iommu_supported(drm_dev))
index 26e089f4ff1c751a5866639f0c1c3c9b8b861347..347aa40a94f5929b93dd24acbd6437906c074f63 100644 (file)
@@ -392,11 +392,11 @@ static int vidi_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
        drm_dev->irq_enabled = 1;
 
        /*
-        * with vblank_disable_allowed = 1, vblank interrupt will be disabled
+        * with vblank_disable_allowed = true, vblank interrupt will be disabled
         * by drm timer once a current process gives up ownership of
         * vblank event.(after drm_vblank_put function is called)
         */
-       drm_dev->vblank_disable_allowed = 1;
+       drm_dev->vblank_disable_allowed = true;
 
        return 0;
 }
index 30dceb43690b5ccf6013158203fa188f434e37c7..dd607f820a26f42475e7f84e6e1656e1c5693d8c 100644 (file)
@@ -359,7 +359,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset)
 
        drm_irq_install(dev);
 
-       dev->vblank_disable_allowed = 1;
+       dev->vblank_disable_allowed = true;
 
        dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
 
index 512645fdaff5f2d28487b41df4ea6ced0a65bbf5..93cbacba26a212ca3466a0097fd2d547e8f0065b 100644 (file)
@@ -1330,7 +1330,7 @@ static int i915_load_modeset_init(struct drm_device *dev)
 
        /* Always safe in the mode setting case. */
        /* FIXME: do pre/post-mode set stuff in core KMS code */
-       dev->vblank_disable_allowed = 1;
+       dev->vblank_disable_allowed = true;
        if (INTEL_INFO(dev)->num_pipes == 0)
                return 0;
 
index a2e52a0c53c981690dc7b711a1a97625c01a9a0f..52c29b3afa282f5aae1bd71863aaa7eda5e7bfee 100644 (file)
@@ -423,11 +423,11 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags)
                goto err_init;
 
        /*
-        * with vblank_disable_allowed = 1, vblank interrupt will be disabled
+        * with vblank_disable_allowed = true, vblank interrupt will be disabled
         * by drm timer once a current process gives up ownership of
         * vblank event.(after drm_vblank_put function is called)
         */
-       imxdrm->drm->vblank_disable_allowed = 1;
+       imxdrm->drm->vblank_disable_allowed = true;
 
        if (!imx_drm_device_get())
                ret = -EINVAL;
index 2b9b033efea4435870173c5619adb3fe5b4aaf15..06cb8f785d0eef4308ec6783850bd360fddbd496 100644 (file)
@@ -1151,7 +1151,7 @@ struct drm_device {
         * Once the modeset ioctl *has* been called though, we can safely
         * disable them when unused.
         */
-       int vblank_disable_allowed;
+       bool vblank_disable_allowed;
 
        wait_queue_head_t *vbl_queue;   /**< VBLANK wait queue */
        atomic_t *_vblank_count;        /**< number of VBLANK interrupts (driver must alloc the right number of counters) */