aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_irq.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-05-18 15:47:38 -0400
committerDave Airlie <airlied@redhat.com>2016-05-20 17:03:31 -0400
commitfcee59065e58498682c60069cc6fb90694bab27e (patch)
treebea115621d1291a80d6bb57c2af3a36e366b84f5 /drivers/gpu/drm/drm_irq.c
parentfc7fedc20b7c819b9ef003afa16a64dc9e5ac30e (diff)
drm: Nuke ->vblank_disable_allowed
This was added in commit 0a3e67a4caac273a3bfc4ced3da364830b1ab241 Author: Jesse Barnes <jbarnes@virtuousgeek.org> 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 <chris@chris-wilson.co.uk> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r--drivers/gpu/drm/drm_irq.c6
1 files changed, 0 insertions, 6 deletions
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)
348 unsigned int pipe = vblank->pipe; 348 unsigned int pipe = vblank->pipe;
349 unsigned long irqflags; 349 unsigned long irqflags;
350 350
351 if (!dev->vblank_disable_allowed)
352 return;
353
354 spin_lock_irqsave(&dev->vbl_lock, irqflags); 351 spin_lock_irqsave(&dev->vbl_lock, irqflags);
355 if (atomic_read(&vblank->refcount) == 0 && vblank->enabled) { 352 if (atomic_read(&vblank->refcount) == 0 && vblank->enabled) {
356 DRM_DEBUG("disabling vblank on crtc %u\n", pipe); 353 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)
437 "get_vblank_timestamp == NULL\n"); 434 "get_vblank_timestamp == NULL\n");
438 } 435 }
439 436
440 dev->vblank_disable_allowed = false;
441
442 return 0; 437 return 0;
443 438
444err: 439err:
@@ -1585,7 +1580,6 @@ void drm_vblank_post_modeset(struct drm_device *dev, unsigned int pipe)
1585 1580
1586 if (vblank->inmodeset) { 1581 if (vblank->inmodeset) {
1587 spin_lock_irqsave(&dev->vbl_lock, irqflags); 1582 spin_lock_irqsave(&dev->vbl_lock, irqflags);
1588 dev->vblank_disable_allowed = true;
1589 drm_reset_vblank_timestamp(dev, pipe); 1583 drm_reset_vblank_timestamp(dev, pipe);
1590 spin_unlock_irqrestore(&dev->vbl_lock, irqflags); 1584 spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
1591 1585