summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2013-03-26 21:01:03 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2013-03-26 21:01:03 +0000
commit1dca66ccd4d26b83020d644d74b8305c0b90e7bc (patch)
treecf3a8fdf85b4b708790e25f7aca2e055344c815c
parentcac2c7c74561a03bfaa65562e250812a90202efb (diff)
Short-circuit screen switching if we're switching to the screen that's
currently active.
-rw-r--r--sys/dev/pci/drm/i915/i915_drv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c
index 8c0568523d7..19272512bdf 100644
--- a/sys/dev/pci/drm/i915/i915_drv.c
+++ b/sys/dev/pci/drm/i915/i915_drv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_drv.c,v 1.7 2013/03/25 19:50:56 kettenis Exp $ */
+/* $OpenBSD: i915_drv.c,v 1.8 2013/03/26 21:01:02 kettenis Exp $ */
/*
* Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org>
*
@@ -699,6 +699,10 @@ inteldrm_show_screen(void *v, void *cookie, int waitok,
void (*cb)(void *, int, int), void *cbarg)
{
struct inteldrm_softc *dev_priv = v;
+ struct rasops_info *ri = &dev_priv->ro;
+
+ if (cookie == ri->ri_active)
+ return (0);
dev_priv->switchcb = cb;
dev_priv->switchcbarg = cbarg;