Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba0bf120 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Dave Airlie
Browse files

drm: Make vblank_disable_allowed bool



vblank_disable_allowed is only ever 0 or 1, so make it a bool.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 55e9edeb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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)
+2 −2
Original line number Diff line number Diff line
@@ -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))
+2 −2
Original line number Diff line number Diff line
@@ -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;
}
+1 −1
Original line number Diff line number Diff line
@@ -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 */

+1 −1
Original line number Diff line number Diff line
@@ -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;

Loading