From fcee59065e58498682c60069cc6fb90694bab27e Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Wed, 18 May 2016 21:47:38 +0200 Subject: drm: Nuke ->vblank_disable_allowed This was added in commit 0a3e67a4caac273a3bfc4ced3da364830b1ab241 Author: Jesse Barnes 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. Cc: Chris Wilson Cc: Alex Deucher Cc: Liviu Dudau Cc: Russell King Cc: Thierry Reding Cc: Eric Anholt Cc: Laurent Pinchart Cc: Inki Dae Cc: Tomi Valkeinen Cc: Mark Yao Cc: Sascha Hauer Cc: Philipp Zabel Signed-off-by: Daniel Vetter Reviewed-by: Alex Deucher Acked-by: Liviu Dudau Acked-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_irq.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/gpu/drm/drm_irq.c') diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 3c1a6f18e71c..0fac801c18fe 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -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: @@ -1585,7 +1580,6 @@ void drm_vblank_post_modeset(struct drm_device *dev, unsigned int pipe) 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); -- cgit v1.2.3