drm: Nuke ->vblank_disable_allowed
Subsystems (17)
PATCH 1/1 drm: Nuke ->vblank_disable_allowed
This was added in
commit 0a3e67a4caac273a3bfc4ced3da364830b1ab241
Author: Jesse Barnes <[email protected]> Date: Tue Sep 30 12:14:26 2008 -0700
drm: Rework vblank-wait handling to allow interrupt reduction.
to stay backwards-compatible with old UMS code that didn't even tell the kernel when it did a modeset, so that the kernel could save/restore vblank counters. At worst this means vblanks will be somewhat funky on a setup that very likely no one still runs.
So let's just nuke it.
Plan B would be to set it unconditionally in drm_vblank_init for kms drivers, instead of in each driver separately. So if this patch breaks anything please only restore the hunks in drmP.h and drm_irq.c, plus add a check for DRIVER_MODESET in drm_vblank_init.
Stumbled over this in a discussion on irc with Chris.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/arm/hdlcd_drv.c | 1 - drivers/gpu/drm/armada/armada_drv.c | 1 - drivers/gpu/drm/drm_irq.c | 6 ------ drivers/gpu/drm/exynos/exynos_drm_drv.c | 7 ------- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - drivers/gpu/drm/gma500/psb_drv.c | 1 - drivers/gpu/drm/i915/i915_dma.c | 3 --- drivers/gpu/drm/i915/intel_psr.c | 3 +++ drivers/gpu/drm/imx/imx-drm-core.c | 7 ------- drivers/gpu/drm/radeon/radeon_irq_kms.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 7 ------- drivers/gpu/drm/tegra/drm.c | 1 - drivers/gpu/drm/vc4/vc4_kms.c | 2 -- include/drm/drmP.h | 8 -------- 15 files changed, 3 insertions(+), 47 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0 -1
@@ -219,7 +219,6 @@ int amdgpu_irq_init(struct amdgpu_device *adev)if (r) {return r; } - adev->ddev->vblank_disable_allowed = true;/* enable msi */ adev->irq.msi_enabled = false;
drivers/gpu/drm/arm/hdlcd_drv.c +0 -1
@@ -379,7 +379,6 @@ static int hdlcd_drm_bind(struct device *dev)DRM_ERROR ("failed to initialise vblank\n" ); goto err_vblank; } - drm->vblank_disable_allowed = true;drm_mode_config_reset (drm);drm_kms_helper_poll_init (drm);
drivers/gpu/drm/armada/armada_drv.c +0 -1
@@ -113,7 +113,6 @@ static int armada_drm_load(struct drm_device *dev, unsigned long flags) goto err_comp; dev->irq_enabled = true; - dev->vblank_disable_allowed =1 ; ret =armada_fbdev_init (dev);if (ret)
drivers/gpu/drm/drm_irq.c +0 -6
@@ -348,9 +348,6 @@ static void vblank_disable_fn(unsigned long arg)unsigned int pipe = vblank->pipe;unsigned long irqflags; -if (!dev->vblank_disable_allowed) -return ; -spin_lock_irqsave (&dev->vbl_lock, irqflags);if (atomic_read (&vblank->refcount) ==0 && vblank->enabled) {DRM_DEBUG ("disabling vblank on crtc %u\n" , pipe);
@@ -437,8 +434,6 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs) "get_vblank_timestamp == NULL\n"); } - dev->vblank_disable_allowed = false; -return 0 ; err:
@@ -1555,7 +1550,6 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev,if (vblank->inmodeset) {spin_lock_irqsave (&dev->vbl_lock, irqflags); - dev->vblank_disable_allowed = true;drm_reset_vblank_timestamp (dev, pipe);spin_unlock_irqrestore (&dev->vbl_lock, irqflags);
drivers/gpu/drm/exynos/exynos_drm_drv.c +0 -7
@@ -212,13 +212,6 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)*/ dev->irq_enabled = true; -/* -* 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) -*/ - dev->vblank_disable_allowed = true; -/* init kms poll for handling hpd */ drm_kms_helper_poll_init (dev);
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +0 -1
@@ -80,7 +80,6 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags)dev_err (dev->dev,"failed to initialize vblank\n" ); goto done; } - dev->vblank_disable_allowed = true; ret =fsl_dcu_drm_irq_init (dev);if (ret <0 )
drivers/gpu/drm/gma500/psb_drv.c +0 -1
@@ -374,7 +374,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)drm_irq_install (dev, dev->pdev->irq); - dev->vblank_disable_allowed = true; dev->max_vblank_count =0xffffff ;/* only 24 bits of frame count */ dev->driver->get_vblank_counter = psb_get_vblank_counter;
drivers/gpu/drm/i915/i915_dma.c +0 -3
@@ -515,9 +515,6 @@ static int i915_load_modeset_init(struct drm_device *dev)intel_modeset_gem_init (dev); -/* Always safe in the mode setting case. */ -/* FIXME: do pre/post-mode set stuff in core KMS code */ - dev->vblank_disable_allowed = true;if (INTEL_INFO (dev)->num_pipes ==0 )return 0 ;
drivers/gpu/drm/i915/intel_psr.c +3 -0
@@ -274,6 +274,9 @@ static void hsw_psr_enable_source(struct intel_dp *intel_dp)if (dev_priv->psr.link_standby) val |=EDP_PSR_LINK_STANDBY ; +printk ("tp1 wakupe time %i\n" , dev_priv->vbt.psr.tp1_wakeup_time); +printk ("tp2/3 wakupe time %i\n" , dev_priv->vbt.psr.tp2_tp3_wakeup_time); +if (dev_priv->vbt.psr.tp1_wakeup_time >5 ) val |= EDP_PSR_TP1_TIME_2500us;else if (dev_priv->vbt.psr.tp1_wakeup_time >1 )
drivers/gpu/drm/imx/imx-drm-core.c +0 -7
@@ -252,13 +252,6 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags)if (ret) goto err_kms; -/* -* 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->vblank_disable_allowed = true; -platform_set_drvdata (drm->platformdev, drm);/* Now try and bind all our sub-components */
drivers/gpu/drm/radeon/radeon_irq_kms.c +0 -1
@@ -291,7 +291,6 @@ int radeon_irq_kms_init(struct radeon_device *rdev)if (r) {return r; } - rdev->ddev->vblank_disable_allowed = true;/* enable msi */ rdev->msi_enabled =0 ;
drivers/gpu/drm/rockchip/rockchip_drm_drv.c +0 -7
@@ -217,13 +217,6 @@ static int rockchip_drm_load(struct drm_device *drm_dev, unsigned long flags)if (ret) goto err_kms_helper_poll_fini; -/* -* 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 = true; -drm_mode_config_reset (drm_dev); ret =rockchip_drm_fbdev_init (drm_dev);
drivers/gpu/drm/tegra/drm.c +0 -1
@@ -180,7 +180,6 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)/* syncpoints are used for full 32-bit hardware VBLANK counters */ drm->max_vblank_count =0xffffffff ; - drm->vblank_disable_allowed = true; err =drm_vblank_init (drm, drm->mode_config.num_crtc);if (err <0 )
drivers/gpu/drm/vc4/vc4_kms.c +0 -2
@@ -207,8 +207,6 @@ int vc4_kms_load(struct drm_device *dev) dev->mode_config.preferred_depth =24 ; dev->mode_config.async_page_flip = true; - dev->vblank_disable_allowed = true; -drm_mode_config_reset (dev); vc4->fbdev = drm_fbdev_cma_init(dev, 32,
include/drm/drmP.h +0 -8
@@ -819,14 +819,6 @@ struct drm_device {int irq;/* -* At load time, disabling the vblank interrupt won't be allowed since -* old clients may not call the modeset ioctl and therefore misbehave. -* Once the modeset ioctl *has* been called though, we can safely -* disable them when unused. -*/ -bool vblank_disable_allowed; - -/* * If true, vblank interrupt will be disabled immediately when the * refcount drops to zero, as opposed to via the vblank disable * timer.
Signature · 6 lines
2.8.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 181 lines · Daniel Vetter
This was added in
commit
0a3e67a4caac273a3bfc4ced3da364830b1ab241Author: Jesse Barnes <[email protected]> Date: Tue Sep 30 12:14:26 2008 -0700drm: Rework vblank-wait handling to allow interrupt reduction.
to stay backwards-compatible with old UMS code that didn't even tell the kernel when it did a modeset, so that the kernel could save/restore vblank counters. At worst this means vblanks will be somewhat funky on a setup that very likely no one still runs.
So let's just nuke it.
Plan B would be to set it unconditionally in
drm_vblank_initfor kms drivers, instead of in each driver separately. So if this patch breaks anything please only restore the hunks indrmP.handdrm_irq.c, plus add a check forDRIVER_MODESETindrm_vblank_init.Stumbled over this in a discussion on irc with Chris.
Cc Chris Wilson <[email protected]>Cc Alex Deucher <[email protected]>Cc Liviu Dudau <[email protected]>Cc Russell King <[email protected]>Cc Thierry Reding <[email protected]>Cc Eric Anholt <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Inki Dae <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Mark Yao <[email protected]>Cc Sascha Hauer <[email protected]>Cc Philipp Zabel <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/arm/hdlcd_drv.c | 1 - drivers/gpu/drm/armada/armada_drv.c | 1 - drivers/gpu/drm/drm_irq.c | 6 ------ drivers/gpu/drm/exynos/exynos_drm_drv.c | 7 ------- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - drivers/gpu/drm/gma500/psb_drv.c | 1 - drivers/gpu/drm/i915/i915_dma.c | 3 --- drivers/gpu/drm/i915/intel_psr.c | 3 +++ drivers/gpu/drm/imx/imx-drm-core.c | 7 ------- drivers/gpu/drm/radeon/radeon_irq_kms.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 7 ------- drivers/gpu/drm/tegra/drm.c | 1 - drivers/gpu/drm/vc4/vc4_kms.c | 2 -- include/drm/drmP.h | 8 -------- 15 files changed, 3 insertions(+), 47 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0
-1@@ -219,7 +219,6 @@ int amdgpu_irq_init(struct amdgpu_device *adev)if (r) {return r; } - adev->ddev->vblank_disable_allowed = true;/* enable msi */ adev->irq.msi_enabled = false;drivers/gpu/drm/arm/hdlcd_drv.c +0
-1@@ -379,7 +379,6 @@ static int hdlcd_drm_bind(struct device *dev)DRM_ERROR ("failed to initialise vblank\n" ); goto err_vblank; } - drm->vblank_disable_allowed = true;drm_mode_config_reset (drm);drm_kms_helper_poll_init (drm);drivers/gpu/drm/armada/armada_drv.c +0
-1@@ -113,7 +113,6 @@ static int armada_drm_load(struct drm_device *dev, unsigned long flags) goto err_comp; dev->irq_enabled = true; - dev->vblank_disable_allowed =1 ; ret =armada_fbdev_init (dev);if (ret)drivers/gpu/drm/drm_irq.c +0
-6@@ -348,9 +348,6 @@ static void vblank_disable_fn(unsigned long arg)unsigned int pipe = vblank->pipe;unsigned long irqflags; -if (!dev->vblank_disable_allowed) -return ; -spin_lock_irqsave (&dev->vbl_lock, irqflags);if (atomic_read (&vblank->refcount) ==0 && vblank->enabled) {DRM_DEBUG ("disabling vblank on crtc %u\n" , pipe);@@ -437,8 +434,6 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs) "get_vblank_timestamp == NULL\n"); } - dev->vblank_disable_allowed = false; -return 0 ; err:@@ -1555,7 +1550,6 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev,if (vblank->inmodeset) {spin_lock_irqsave (&dev->vbl_lock, irqflags); - dev->vblank_disable_allowed = true;drm_reset_vblank_timestamp (dev, pipe);spin_unlock_irqrestore (&dev->vbl_lock, irqflags);drivers/gpu/drm/exynos/exynos_drm_drv.c +0
-7@@ -212,13 +212,6 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)*/ dev->irq_enabled = true; -/* -* 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) -*/ - dev->vblank_disable_allowed = true; -/* init kms poll for handling hpd */ drm_kms_helper_poll_init (dev);drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +0
-1@@ -80,7 +80,6 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags)dev_err (dev->dev,"failed to initialize vblank\n" ); goto done; } - dev->vblank_disable_allowed = true; ret =fsl_dcu_drm_irq_init (dev);if (ret <0 )drivers/gpu/drm/gma500/psb_drv.c +0
-1@@ -374,7 +374,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)drm_irq_install (dev, dev->pdev->irq); - dev->vblank_disable_allowed = true; dev->max_vblank_count =0xffffff ;/* only 24 bits of frame count */ dev->driver->get_vblank_counter = psb_get_vblank_counter;drivers/gpu/drm/i915/i915_dma.c +0
-3@@ -515,9 +515,6 @@ static int i915_load_modeset_init(struct drm_device *dev)intel_modeset_gem_init (dev); -/* Always safe in the mode setting case. */ -/* FIXME: do pre/post-mode set stuff in core KMS code */ - dev->vblank_disable_allowed = true;if (INTEL_INFO (dev)->num_pipes ==0 )return 0 ;drivers/gpu/drm/i915/intel_psr.c +0
-0
drivers/gpu/drm/i915/intel_psr.c static void hsw_psr_enable_source(struct intel_dp *intel_dp) · line 279
Quoted 6 lines
drivers/gpu/drm/i915/intel_psr.c +3
-0@@ -274,6 +274,9 @@ static void hsw_psr_enable_source(struct intel_dp *intel_dp)if (dev_priv->psr.link_standby) val |=EDP_PSR_LINK_STANDBY ; +printk ("tp1 wakupe time %i\n" , dev_priv->vbt.psr.tp1_wakeup_time); +printk ("tp2/3 wakupe time %i\n" , dev_priv->vbt.psr.tp2_tp3_wakeup_time); +
Some leftover debugging statements?
Alex
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm: Nuke ->vblank_disable_allowed
In reply to Daniel VetterThis was added in
commit 0a3e67a4caac273a3bfc4ced3da364830b1ab241
Author: Jesse Barnes <[email protected]> Date: Tue Sep 30 12:14:26 2008 -0700
drm: Rework vblank-wait handling to allow interrupt reduction.
to stay backwards-compatible with old UMS code that didn't even tell the kernel when it did a modeset, so that the kernel could save/restore vblank counters. At worst this means vblanks will be somewhat funky on a setup that very likely no one still runs.
So let's just nuke it.
Plan B would be to set it unconditionally in drm_vblank_init for kms drivers, instead of in each driver separately. So if this patch breaks anything please only restore the hunks in drmP.h and drm_irq.c, plus add a check for DRIVER_MODESET in drm_vblank_init.
Stumbled over this in a discussion on irc with Chris.
v2: Remove leftover debug gunk from psr hacking (Alex).
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/arm/hdlcd_drv.c | 1 - drivers/gpu/drm/armada/armada_drv.c | 1 - drivers/gpu/drm/drm_irq.c | 6 ------ drivers/gpu/drm/exynos/exynos_drm_drv.c | 7 ------- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - drivers/gpu/drm/gma500/psb_drv.c | 1 - drivers/gpu/drm/i915/i915_dma.c | 3 --- drivers/gpu/drm/imx/imx-drm-core.c | 7 ------- drivers/gpu/drm/radeon/radeon_irq_kms.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 7 ------- drivers/gpu/drm/tegra/drm.c | 1 - drivers/gpu/drm/vc4/vc4_kms.c | 2 -- include/drm/drmP.h | 8 -------- 14 files changed, 47 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0 -1
@@ -219,7 +219,6 @@ int amdgpu_irq_init(struct amdgpu_device *adev)if (r) {return r; } - adev->ddev->vblank_disable_allowed = true;/* enable msi */ adev->irq.msi_enabled = false;
drivers/gpu/drm/arm/hdlcd_drv.c +0 -1
@@ -379,7 +379,6 @@ static int hdlcd_drm_bind(struct device *dev)DRM_ERROR ("failed to initialise vblank\n" ); goto err_vblank; } - drm->vblank_disable_allowed = true;drm_mode_config_reset (drm);drm_kms_helper_poll_init (drm);
drivers/gpu/drm/armada/armada_drv.c +0 -1
@@ -113,7 +113,6 @@ static int armada_drm_load(struct drm_device *dev, unsigned long flags) goto err_comp; dev->irq_enabled = true; - dev->vblank_disable_allowed =1 ; ret =armada_fbdev_init (dev);if (ret)
drivers/gpu/drm/drm_irq.c +0 -6
@@ -348,9 +348,6 @@ static void vblank_disable_fn(unsigned long arg)unsigned int pipe = vblank->pipe;unsigned long irqflags; -if (!dev->vblank_disable_allowed) -return ; -spin_lock_irqsave (&dev->vbl_lock, irqflags);if (atomic_read (&vblank->refcount) ==0 && vblank->enabled) {DRM_DEBUG ("disabling vblank on crtc %u\n" , pipe);
@@ -437,8 +434,6 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs) "get_vblank_timestamp == NULL\n"); } - dev->vblank_disable_allowed = false; -return 0 ; err:
@@ -1555,7 +1550,6 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev,if (vblank->inmodeset) {spin_lock_irqsave (&dev->vbl_lock, irqflags); - dev->vblank_disable_allowed = true;drm_reset_vblank_timestamp (dev, pipe);spin_unlock_irqrestore (&dev->vbl_lock, irqflags);
drivers/gpu/drm/exynos/exynos_drm_drv.c +0 -7
@@ -212,13 +212,6 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)*/ dev->irq_enabled = true; -/* -* 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) -*/ - dev->vblank_disable_allowed = true; -/* init kms poll for handling hpd */ drm_kms_helper_poll_init (dev);
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +0 -1
@@ -80,7 +80,6 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags)dev_err (dev->dev,"failed to initialize vblank\n" ); goto done; } - dev->vblank_disable_allowed = true; ret =fsl_dcu_drm_irq_init (dev);if (ret <0 )
drivers/gpu/drm/gma500/psb_drv.c +0 -1
@@ -374,7 +374,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)drm_irq_install (dev, dev->pdev->irq); - dev->vblank_disable_allowed = true; dev->max_vblank_count =0xffffff ;/* only 24 bits of frame count */ dev->driver->get_vblank_counter = psb_get_vblank_counter;
drivers/gpu/drm/i915/i915_dma.c +0 -3
@@ -515,9 +515,6 @@ static int i915_load_modeset_init(struct drm_device *dev)intel_modeset_gem_init (dev); -/* Always safe in the mode setting case. */ -/* FIXME: do pre/post-mode set stuff in core KMS code */ - dev->vblank_disable_allowed = true;if (INTEL_INFO (dev)->num_pipes ==0 )return 0 ;
drivers/gpu/drm/imx/imx-drm-core.c +0 -7
@@ -252,13 +252,6 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags)if (ret) goto err_kms; -/* -* 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->vblank_disable_allowed = true; -platform_set_drvdata (drm->platformdev, drm);/* Now try and bind all our sub-components */
drivers/gpu/drm/radeon/radeon_irq_kms.c +0 -1
@@ -291,7 +291,6 @@ int radeon_irq_kms_init(struct radeon_device *rdev)if (r) {return r; } - rdev->ddev->vblank_disable_allowed = true;/* enable msi */ rdev->msi_enabled =0 ;
drivers/gpu/drm/rockchip/rockchip_drm_drv.c +0 -7
@@ -217,13 +217,6 @@ static int rockchip_drm_load(struct drm_device *drm_dev, unsigned long flags)if (ret) goto err_kms_helper_poll_fini; -/* -* 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 = true; -drm_mode_config_reset (drm_dev); ret =rockchip_drm_fbdev_init (drm_dev);
drivers/gpu/drm/tegra/drm.c +0 -1
@@ -180,7 +180,6 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)/* syncpoints are used for full 32-bit hardware VBLANK counters */ drm->max_vblank_count =0xffffffff ; - drm->vblank_disable_allowed = true; err =drm_vblank_init (drm, drm->mode_config.num_crtc);if (err <0 )
drivers/gpu/drm/vc4/vc4_kms.c +0 -2
@@ -207,8 +207,6 @@ int vc4_kms_load(struct drm_device *dev) dev->mode_config.preferred_depth =24 ; dev->mode_config.async_page_flip = true; - dev->vblank_disable_allowed = true; -drm_mode_config_reset (dev); vc4->fbdev = drm_fbdev_cma_init(dev, 32,
include/drm/drmP.h +0 -8
@@ -819,14 +819,6 @@ struct drm_device {int irq;/* -* At load time, disabling the vblank interrupt won't be allowed since -* old clients may not call the modeset ioctl and therefore misbehave. -* Once the modeset ioctl *has* been called though, we can safely -* disable them when unused. -*/ -bool vblank_disable_allowed; - -/* * If true, vblank interrupt will be disabled immediately when the * refcount drops to zero, as opposed to via the vblank disable * timer.
Signature · 6 lines
2.8.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 24 lines · Daniel Vetter
This was added in
commit
0a3e67a4caac273a3bfc4ced3da364830b1ab241Author: Jesse Barnes <[email protected]> Date: Tue Sep 30 12:14:26 2008 -0700drm: Rework vblank-wait handling to allow interrupt reduction.
to stay backwards-compatible with old UMS code that didn't even tell the kernel when it did a modeset, so that the kernel could save/restore vblank counters. At worst this means vblanks will be somewhat funky on a setup that very likely no one still runs.
So let's just nuke it.
Plan B would be to set it unconditionally in
drm_vblank_initfor kms drivers, instead of in each driver separately. So if this patch breaks anything please only restore the hunks indrmP.handdrm_irq.c, plus add a check forDRIVER_MODESETindrm_vblank_init.Stumbled over this in a discussion on irc with Chris.
v2: Remove leftover debug gunk from psr hacking (Alex).
Quoted 13 lines
Cc Chris Wilson <[email protected]>Cc Alex Deucher <[email protected]>Cc Liviu Dudau <[email protected]>Cc Russell King <[email protected]>Cc Thierry Reding <[email protected]>Cc Eric Anholt <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Inki Dae <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Mark Yao <[email protected]>Cc Sascha Hauer <[email protected]>Cc Philipp Zabel <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Seems reasonable to me.
Quoted 235 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/arm/hdlcd_drv.c | 1 - drivers/gpu/drm/armada/armada_drv.c | 1 - drivers/gpu/drm/drm_irq.c | 6 ------ drivers/gpu/drm/exynos/exynos_drm_drv.c | 7 ------- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - drivers/gpu/drm/gma500/psb_drv.c | 1 - drivers/gpu/drm/i915/i915_dma.c | 3 --- drivers/gpu/drm/imx/imx-drm-core.c | 7 ------- drivers/gpu/drm/radeon/radeon_irq_kms.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 7 ------- drivers/gpu/drm/tegra/drm.c | 1 - drivers/gpu/drm/vc4/vc4_kms.c | 2 -- include/drm/drmP.h | 8 -------- 14 files changed, 47 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0
-1@@ -219,7 +219,6 @@ int amdgpu_irq_init(struct amdgpu_device *adev)if (r) {return r; } - adev->ddev->vblank_disable_allowed = true;/* enable msi */ adev->irq.msi_enabled = false;drivers/gpu/drm/arm/hdlcd_drv.c +0
-1@@ -379,7 +379,6 @@ static int hdlcd_drm_bind(struct device *dev)DRM_ERROR ("failed to initialise vblank\n" ); goto err_vblank; } - drm->vblank_disable_allowed = true;drm_mode_config_reset (drm);drm_kms_helper_poll_init (drm);drivers/gpu/drm/armada/armada_drv.c +0
-1@@ -113,7 +113,6 @@ static int armada_drm_load(struct drm_device *dev, unsigned long flags) goto err_comp; dev->irq_enabled = true; - dev->vblank_disable_allowed =1 ; ret =armada_fbdev_init (dev);if (ret)drivers/gpu/drm/drm_irq.c +0
-6@@ -348,9 +348,6 @@ static void vblank_disable_fn(unsigned long arg)unsigned int pipe = vblank->pipe;unsigned long irqflags; -if (!dev->vblank_disable_allowed) -return ; -spin_lock_irqsave (&dev->vbl_lock, irqflags);if (atomic_read (&vblank->refcount) ==0 && vblank->enabled) {DRM_DEBUG ("disabling vblank on crtc %u\n" , pipe);@@ -437,8 +434,6 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs) "get_vblank_timestamp == NULL\n"); } - dev->vblank_disable_allowed = false; -return 0 ; err:@@ -1555,7 +1550,6 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev,if (vblank->inmodeset) {spin_lock_irqsave (&dev->vbl_lock, irqflags); - dev->vblank_disable_allowed = true;drm_reset_vblank_timestamp (dev, pipe);spin_unlock_irqrestore (&dev->vbl_lock, irqflags);drivers/gpu/drm/exynos/exynos_drm_drv.c +0
-7@@ -212,13 +212,6 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)*/ dev->irq_enabled = true; -/* -* 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) -*/ - dev->vblank_disable_allowed = true; -/* init kms poll for handling hpd */ drm_kms_helper_poll_init (dev);drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +0
-1@@ -80,7 +80,6 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags)dev_err (dev->dev,"failed to initialize vblank\n" ); goto done; } - dev->vblank_disable_allowed = true; ret =fsl_dcu_drm_irq_init (dev);if (ret <0 )drivers/gpu/drm/gma500/psb_drv.c +0
-1@@ -374,7 +374,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)drm_irq_install (dev, dev->pdev->irq); - dev->vblank_disable_allowed = true; dev->max_vblank_count =0xffffff ;/* only 24 bits of frame count */ dev->driver->get_vblank_counter = psb_get_vblank_counter;drivers/gpu/drm/i915/i915_dma.c +0
-3@@ -515,9 +515,6 @@ static int i915_load_modeset_init(struct drm_device *dev)intel_modeset_gem_init (dev); -/* Always safe in the mode setting case. */ -/* FIXME: do pre/post-mode set stuff in core KMS code */ - dev->vblank_disable_allowed = true;if (INTEL_INFO (dev)->num_pipes ==0 )return 0 ;drivers/gpu/drm/imx/imx-drm-core.c +0
-7@@ -252,13 +252,6 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags)if (ret) goto err_kms; -/* -* 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->vblank_disable_allowed = true; -platform_set_drvdata (drm->platformdev, drm);/* Now try and bind all our sub-components */ drivers/gpu/drm/radeon/radeon_irq_kms.c +0
-1@@ -291,7 +291,6 @@ int radeon_irq_kms_init(struct radeon_device *rdev)if (r) {return r; } - rdev->ddev->vblank_disable_allowed = true;/* enable msi */ rdev->msi_enabled =0 ;drivers/gpu/drm/rockchip/rockchip_drm_drv.c +0
-7@@ -217,13 +217,6 @@ static int rockchip_drm_load(struct drm_device *drm_dev, unsigned long flags)if (ret) goto err_kms_helper_poll_fini; -/* -* 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 = true; -drm_mode_config_reset (drm_dev); ret =rockchip_drm_fbdev_init (drm_dev);drivers/gpu/drm/tegra/drm.c +0
-1@@ -180,7 +180,6 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)/* syncpoints are used for full 32-bit hardware VBLANK counters */ drm->max_vblank_count =0xffffffff ; - drm->vblank_disable_allowed = true; err =drm_vblank_init (drm, drm->mode_config.num_crtc);if (err <0 )drivers/gpu/drm/vc4/vc4_kms.c +0
-2@@ -207,8 +207,6 @@ int vc4_kms_load(struct drm_device *dev) dev->mode_config.preferred_depth =24 ; dev->mode_config.async_page_flip = true; - dev->vblank_disable_allowed = true; -drm_mode_config_reset (dev); vc4->fbdev = drm_fbdev_cma_init(dev, 32,include/drm/drmP.h +0
-9@@ -819,14 +819,6 @@ struct drm_device {int irq;/* -* At load time, disabling the vblank interrupt won't be allowed since -* old clients may not call the modeset ioctl and therefore misbehave. -* Once the modeset ioctl *has* been called though, we can safely -* disable them when unused. -*/ -bool vblank_disable_allowed; - -/* * If true, vblank interrupt will be disabled immediately when the * refcount drops to zero, as opposed to via the vblank disable * timer. -- 2.8.1
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 71 lines · Daniel Vetter
This was added in
commit
0a3e67a4caac273a3bfc4ced3da364830b1ab241Author: Jesse Barnes <[email protected]> Date: Tue Sep 30 12:14:26 2008 -0700drm: Rework vblank-wait handling to allow interrupt reduction.
to stay backwards-compatible with old UMS code that didn't even tell the kernel when it did a modeset, so that the kernel could save/restore vblank counters. At worst this means vblanks will be somewhat funky on a setup that very likely no one still runs.
So let's just nuke it.
Plan B would be to set it unconditionally in
drm_vblank_initfor kms drivers, instead of in each driver separately. So if this patch breaks anything please only restore the hunks indrmP.handdrm_irq.c, plus add a check forDRIVER_MODESETindrm_vblank_init.Stumbled over this in a discussion on irc with Chris.
v2: Remove leftover debug gunk from psr hacking (Alex).
Cc Chris Wilson <[email protected]>Cc Alex Deucher <[email protected]>Cc Liviu Dudau <[email protected]>Cc Russell King <[email protected]>Cc Thierry Reding <[email protected]>Cc Eric Anholt <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Inki Dae <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Mark Yao <[email protected]>Cc Sascha Hauer <[email protected]>Cc Philipp Zabel <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/arm/hdlcd_drv.c | 1 - drivers/gpu/drm/armada/armada_drv.c | 1 - drivers/gpu/drm/drm_irq.c | 6 ------ drivers/gpu/drm/exynos/exynos_drm_drv.c | 7 ------- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - drivers/gpu/drm/gma500/psb_drv.c | 1 - drivers/gpu/drm/i915/i915_dma.c | 3 --- drivers/gpu/drm/imx/imx-drm-core.c | 7 ------- drivers/gpu/drm/radeon/radeon_irq_kms.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 7 ------- drivers/gpu/drm/tegra/drm.c | 1 - drivers/gpu/drm/vc4/vc4_kms.c | 2 -- include/drm/drmP.h | 8 -------- 14 files changed, 47 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0
-1@@ -219,7 +219,6 @@ int amdgpu_irq_init(struct amdgpu_device *adev)if (r) {return r; } - adev->ddev->vblank_disable_allowed = true;/* enable msi */ adev->irq.msi_enabled = false;drivers/gpu/drm/arm/hdlcd_drv.c +0
-0
drivers/gpu/drm/arm/hdlcd_drv.c static int hdlcd_drm_bind(struct device *dev) · line 384
Quoted 7 lines
drivers/gpu/drm/arm/hdlcd_drv.c +0
-1@@ -379,7 +379,6 @@ static int hdlcd_drm_bind(struct device *dev)DRM_ERROR ("failed to initialise vblank\n" ); goto err_vblank; } - drm->vblank_disable_allowed = true;drm_mode_config_reset (drm);drm_kms_helper_poll_init (drm);
For the hdlcd_drv.c part:
Thanks,
Liviu
Quoted 194 lines
drivers/gpu/drm/armada/armada_drv.c +0
-1@@ -113,7 +113,6 @@ static int armada_drm_load(struct drm_device *dev, unsigned long flags) goto err_comp; dev->irq_enabled = true; - dev->vblank_disable_allowed =1 ; ret =armada_fbdev_init (dev);if (ret)drivers/gpu/drm/drm_irq.c +0
-6@@ -348,9 +348,6 @@ static void vblank_disable_fn(unsigned long arg)unsigned int pipe = vblank->pipe;unsigned long irqflags; -if (!dev->vblank_disable_allowed) -return ; -spin_lock_irqsave (&dev->vbl_lock, irqflags);if (atomic_read (&vblank->refcount) ==0 && vblank->enabled) {DRM_DEBUG ("disabling vblank on crtc %u\n" , pipe);@@ -437,8 +434,6 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs) "get_vblank_timestamp == NULL\n"); } - dev->vblank_disable_allowed = false; -return 0 ; err:@@ -1555,7 +1550,6 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev,if (vblank->inmodeset) {spin_lock_irqsave (&dev->vbl_lock, irqflags); - dev->vblank_disable_allowed = true;drm_reset_vblank_timestamp (dev, pipe);spin_unlock_irqrestore (&dev->vbl_lock, irqflags);drivers/gpu/drm/exynos/exynos_drm_drv.c +0
-7@@ -212,13 +212,6 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)*/ dev->irq_enabled = true; -/* -* 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) -*/ - dev->vblank_disable_allowed = true; -/* init kms poll for handling hpd */ drm_kms_helper_poll_init (dev);drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +0
-1@@ -80,7 +80,6 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags)dev_err (dev->dev,"failed to initialize vblank\n" ); goto done; } - dev->vblank_disable_allowed = true; ret =fsl_dcu_drm_irq_init (dev);if (ret <0 )drivers/gpu/drm/gma500/psb_drv.c +0
-1@@ -374,7 +374,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)drm_irq_install (dev, dev->pdev->irq); - dev->vblank_disable_allowed = true; dev->max_vblank_count =0xffffff ;/* only 24 bits of frame count */ dev->driver->get_vblank_counter = psb_get_vblank_counter;drivers/gpu/drm/i915/i915_dma.c +0
-3@@ -515,9 +515,6 @@ static int i915_load_modeset_init(struct drm_device *dev)intel_modeset_gem_init (dev); -/* Always safe in the mode setting case. */ -/* FIXME: do pre/post-mode set stuff in core KMS code */ - dev->vblank_disable_allowed = true;if (INTEL_INFO (dev)->num_pipes ==0 )return 0 ;drivers/gpu/drm/imx/imx-drm-core.c +0
-7@@ -252,13 +252,6 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags)if (ret) goto err_kms; -/* -* 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->vblank_disable_allowed = true; -platform_set_drvdata (drm->platformdev, drm);/* Now try and bind all our sub-components */ drivers/gpu/drm/radeon/radeon_irq_kms.c +0
-1@@ -291,7 +291,6 @@ int radeon_irq_kms_init(struct radeon_device *rdev)if (r) {return r; } - rdev->ddev->vblank_disable_allowed = true;/* enable msi */ rdev->msi_enabled =0 ;drivers/gpu/drm/rockchip/rockchip_drm_drv.c +0
-7@@ -217,13 +217,6 @@ static int rockchip_drm_load(struct drm_device *drm_dev, unsigned long flags)if (ret) goto err_kms_helper_poll_fini; -/* -* 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 = true; -drm_mode_config_reset (drm_dev); ret =rockchip_drm_fbdev_init (drm_dev);drivers/gpu/drm/tegra/drm.c +0
-1@@ -180,7 +180,6 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)/* syncpoints are used for full 32-bit hardware VBLANK counters */ drm->max_vblank_count =0xffffffff ; - drm->vblank_disable_allowed = true; err =drm_vblank_init (drm, drm->mode_config.num_crtc);if (err <0 )drivers/gpu/drm/vc4/vc4_kms.c +0
-2@@ -207,8 +207,6 @@ int vc4_kms_load(struct drm_device *dev) dev->mode_config.preferred_depth =24 ; dev->mode_config.async_page_flip = true; - dev->vblank_disable_allowed = true; -drm_mode_config_reset (dev); vc4->fbdev = drm_fbdev_cma_init(dev, 32,include/drm/drmP.h +0
-8@@ -819,14 +819,6 @@ struct drm_device {int irq;/* -* At load time, disabling the vblank interrupt won't be allowed since -* old clients may not call the modeset ioctl and therefore misbehave. -* Once the modeset ioctl *has* been called though, we can safely -* disable them when unused. -*/ -bool vblank_disable_allowed; - -/* * If true, vblank interrupt will be disabled immediately when the * refcount drops to zero, as opposed to via the vblank disable * timer. Signature · 1 line
2.8.1
Signature · 12 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-develHi Daniel,
Thank you for the patch.
Quoted 24 lines · On Wednesday 18 May 2016 22:29:57 Daniel Vetter wrote:
This was added in
commit
0a3e67a4caac273a3bfc4ced3da364830b1ab241Author: Jesse Barnes <[email protected]> Date: Tue Sep 30 12:14:26 2008 -0700drm: Rework vblank-wait handling to allow interrupt reduction.
to stay backwards-compatible with old UMS code that didn't even tell the kernel when it did a modeset, so that the kernel could save/restore vblank counters. At worst this means vblanks will be somewhat funky on a setup that very likely no one still runs.
So let's just nuke it.
Plan B would be to set it unconditionally in
drm_vblank_initfor kms drivers, instead of in each driver separately. So if this patch breaks anything please only restore the hunks indrmP.handdrm_irq.c, plus add a check forDRIVER_MODESETindrm_vblank_init.Stumbled over this in a discussion on irc with Chris.
v2: Remove leftover debug gunk from psr hacking (Alex).
Quoted 13 lines
Cc Chris Wilson <[email protected]>Cc Alex Deucher <[email protected]>Cc Liviu Dudau <[email protected]>Cc Russell King <[email protected]>Cc Thierry Reding <[email protected]>Cc Eric Anholt <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Inki Dae <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Mark Yao <[email protected]>Cc Sascha Hauer <[email protected]>Cc Philipp Zabel <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
and for rcar-du-drm,
Quoted 243 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/arm/hdlcd_drv.c | 1 - drivers/gpu/drm/armada/armada_drv.c | 1 - drivers/gpu/drm/drm_irq.c | 6 ------ drivers/gpu/drm/exynos/exynos_drm_drv.c | 7 ------- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - drivers/gpu/drm/gma500/psb_drv.c | 1 - drivers/gpu/drm/i915/i915_dma.c | 3 --- drivers/gpu/drm/imx/imx-drm-core.c | 7 ------- drivers/gpu/drm/radeon/radeon_irq_kms.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 7 ------- drivers/gpu/drm/tegra/drm.c | 1 - drivers/gpu/drm/vc4/vc4_kms.c | 2 -- include/drm/drmP.h | 8 -------- 14 files changed, 47 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.cindex9266c7b69808..835a3fa8d8df100644drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0
-1@@ -219,7 +219,6 @@ int amdgpu_irq_init(struct amdgpu_device *adev)if (r) {return r; } - adev->ddev->vblank_disable_allowed = true;/* enable msi */ adev->irq.msi_enabled = false;(quoted diff) +0
-0
b/drivers/gpu/drm/arm/hdlcd_drv.cindex2112f0b105e3..4f909378d581100644drivers/gpu/drm/arm/hdlcd_drv.c +0
-1@@ -379,7 +379,6 @@ static int hdlcd_drm_bind(struct device *dev)DRM_ERROR ("failed to initialise vblank\n" ); goto err_vblank; } - drm->vblank_disable_allowed = true;drm_mode_config_reset (drm);drm_kms_helper_poll_init (drm);(quoted diff) +0
-0
b/drivers/gpu/drm/armada/armada_drv.cindex531fcb946346..cb21c0b6374a100644drivers/gpu/drm/armada/armada_drv.c +0
-1@@ -113,7 +113,6 @@ static int armada_drm_load(struct drm_device *dev, unsigned long flags) goto err_comp; dev->irq_enabled = true; - dev->vblank_disable_allowed =1 ; ret =armada_fbdev_init (dev);if (ret)drivers/gpu/drm/drm_irq.c +0
-6@@ -348,9 +348,6 @@ static void vblank_disable_fn(unsigned long arg)unsigned int pipe = vblank->pipe;unsigned long irqflags; -if (!dev->vblank_disable_allowed) -return ; -spin_lock_irqsave (&dev->vbl_lock, irqflags);if (atomic_read (&vblank->refcount) ==0 && vblank->enabled) {DRM_DEBUG ("disabling vblank on crtc %u\n" , pipe);@@ -437,8 +434,6 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs) "get_vblank_timestamp == NULL\n"); } - dev->vblank_disable_allowed = false; -return 0 ; err:@@ -1555,7 +1550,6 @@ static void drm_legacy_vblank_post_modeset(struct drm_device *dev, if (vblank->inmodeset) {spin_lock_irqsave (&dev->vbl_lock, irqflags); - dev->vblank_disable_allowed = true;drm_reset_vblank_timestamp (dev, pipe);spin_unlock_irqrestore (&dev->vbl_lock, irqflags);(quoted diff) +0
-0
b/drivers/gpu/drm/exynos/exynos_drm_drv.cindex21c719e8e02b..2dd820e23b0c100644drivers/gpu/drm/exynos/exynos_drm_drv.c +0
-0@@ -212,13 +212,6 @@ static int exynos_drm_load(struct drm_device *dev,unsigned long flags) */
drivers/gpu/drm/exynos/exynos_drm_drv.c +0
-7dev->irq_enabled = true; -/* -* 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) -*/ - dev->vblank_disable_allowed = true; -/* init kms poll for handling hpd */ drm_kms_helper_poll_init (dev);(quoted diff) +0
-0
b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.cindex2e58dfd74ae1..33727d5d826a100644drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +0
-1@@ -80,7 +80,6 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags) dev_err(dev->dev, "failed to initialize vblank\n"); goto done; } - dev->vblank_disable_allowed = true; ret =fsl_dcu_drm_irq_init (dev);if (ret <0 )(quoted diff) +0
-0
b/drivers/gpu/drm/gma500/psb_drv.cindex4e1c6850520e..82b8ce418b27100644drivers/gpu/drm/gma500/psb_drv.c +0
-1@@ -374,7 +374,6 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags) drm_irq_install(dev, dev->pdev->irq); - dev->vblank_disable_allowed = true; dev->max_vblank_count =0xffffff ;/* only 24 bits of frame count */ dev->driver->get_vblank_counter = psb_get_vblank_counter;(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_dma.cindexa8c79f6512a4..fd06bff216ff100644drivers/gpu/drm/i915/i915_dma.c +0
-3@@ -515,9 +515,6 @@ static int i915_load_modeset_init(struct drm_device *dev)intel_modeset_gem_init (dev); -/* Always safe in the mode setting case. */ -/* FIXME: do pre/post-mode set stuff in core KMS code */ - dev->vblank_disable_allowed = true;if (INTEL_INFO (dev)->num_pipes ==0 )return 0 ;(quoted diff) +0
-0
b/drivers/gpu/drm/imx/imx-drm-core.cindex2453fb1c68a7..1080019e7b17100644drivers/gpu/drm/imx/imx-drm-core.c +0
-7@@ -252,13 +252,6 @@ static int imx_drm_driver_load(struct drm_device *drm, unsigned long flags) if (ret) goto err_kms; -/* -* 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->vblank_disable_allowed = true; - platform_set_drvdata(drm->platformdev, drm);/* Now try and bind all our sub-components */ (quoted diff) +0
-0
b/drivers/gpu/drm/radeon/radeon_irq_kms.cindex1e9304d1c88f..c084cadcbf21100644drivers/gpu/drm/radeon/radeon_irq_kms.c +0
-1@@ -291,7 +291,6 @@ int radeon_irq_kms_init(struct radeon_device *rdev)if (r) {return r; } - rdev->ddev->vblank_disable_allowed = true;/* enable msi */ rdev->msi_enabled =0 ;(quoted diff) +0
-0
b/drivers/gpu/drm/rockchip/rockchip_drm_drv.cindexced1e5f93cda..09a4d429c0f0100644drivers/gpu/drm/rockchip/rockchip_drm_drv.c +0
-7@@ -217,13 +217,6 @@ static int rockchip_drm_load(struct drm_device *drm_dev, unsigned long flags) if (ret) goto err_kms_helper_poll_fini; -/* -* 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 = true; -drm_mode_config_reset (drm_dev); ret =rockchip_drm_fbdev_init (drm_dev);drivers/gpu/drm/tegra/drm.c +0
-1@@ -180,7 +180,6 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)/* syncpoints are used for full 32-bit hardware VBLANK counters */ drm->max_vblank_count = 0xffffffff; - drm->vblank_disable_allowed = true; err =drm_vblank_init (drm, drm->mode_config.num_crtc);drivers/gpu/drm/tegra/drm.c +0
-0if (err <0 )drivers/gpu/drm/vc4/vc4_kms.c +0
-2@@ -207,8 +207,6 @@ int vc4_kms_load(struct drm_device *dev) dev->mode_config.preferred_depth =24 ; dev->mode_config.async_page_flip = true; - dev->vblank_disable_allowed = true; -drm_mode_config_reset (dev); vc4->fbdev = drm_fbdev_cma_init(dev, 32,include/drm/drmP.h +0
-8@@ -819,14 +819,6 @@ struct drm_device {int irq;/* -* At load time, disabling the vblank interrupt won't be allowed since -* old clients may not call the modeset ioctl and therefore misbehave. -* Once the modeset ioctl *has* been called though, we can safely -* disable them when unused. -*/ -bool vblank_disable_allowed; - -/* * If true, vblank interrupt will be disabled immediately when the * refcount drops to zero, as opposed to via the vblank disable * timer.
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel