summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2013-11-11 02:53:26 +0000
committerjsg <jsg@openbsd.org>2013-11-11 02:53:26 +0000
commit3f67b1e161bd09afb0a8744b6418c0389c44f30b (patch)
tree398b48db90852834722db1a65294bc52f5eee2ee
parentdrm/i915: do not update cursor in crtc mode set (diff)
downloadwireguard-openbsd-3f67b1e161bd09afb0a8744b6418c0389c44f30b.tar.xz
wireguard-openbsd-3f67b1e161bd09afb0a8744b6418c0389c44f30b.zip
drm/i915: Don't enable the cursor on a disable pipe
On HSW enabling a plane on a disabled pipe may hang the entire system. And there's no good reason for doing it ever, so just don't. v2: Move the crtc active checks to intel_crtc_cursor_{set,move} to avoid confusing people during modeset From Ville Syrjala f6c0873963a9b8ea1d94541e0e219e6ea090012b in ubuntu 3.8 f2f5f771c5fc0fa252cde3d0d0452dcc785cc17a in mainline linux
-rw-r--r--sys/dev/pci/drm/i915/intel_display.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/i915/intel_display.c b/sys/dev/pci/drm/i915/intel_display.c
index 7da9b668756..a61479075db 100644
--- a/sys/dev/pci/drm/i915/intel_display.c
+++ b/sys/dev/pci/drm/i915/intel_display.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_display.c,v 1.16 2013/11/11 02:48:04 jsg Exp $ */
+/* $OpenBSD: intel_display.c,v 1.17 2013/11/11 02:53:26 jsg Exp $ */
/*
* Copyright © 2006-2007 Intel Corporation
*
@@ -6633,7 +6633,8 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
intel_crtc->cursor_width = width;
intel_crtc->cursor_height = height;
- intel_crtc_update_cursor(crtc, true);
+ if (intel_crtc->active)
+ intel_crtc_update_cursor(crtc, true);
return 0;
fail_unpin:
@@ -6652,7 +6653,8 @@ static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
intel_crtc->cursor_x = x;
intel_crtc->cursor_y = y;
- intel_crtc_update_cursor(crtc, true);
+ if (intel_crtc->active)
+ intel_crtc_update_cursor(crtc, true);
return 0;
}