summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-07-04 09:57:24 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-07-04 09:57:24 +0000
commitd17d1f7e29d856ee24a706fb998eea2874690543 (patch)
tree5ebfcd7f4ba2e312ec070fb926f105012ac3cd94 /sys/dev
parent9cd505ec97dc090540c41b04ea6088cddaeba855 (diff)
Fixup Oops in the pipe config computation
from linux 3.8.13
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/i915/intel_display.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/sys/dev/pci/drm/i915/intel_display.c b/sys/dev/pci/drm/i915/intel_display.c
index aa98338629a..bb77636d64b 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.6 2013/07/04 09:55:01 jsg Exp $ */
+/* $OpenBSD: intel_display.c,v 1.7 2013/07/04 09:57:23 jsg Exp $ */
/*
* Copyright © 2006-2007 Intel Corporation
*
@@ -8341,22 +8341,25 @@ intel_modeset_affected_pipes(struct drm_crtc *crtc, unsigned *modeset_pipes,
if (crtc->enabled)
*prepare_pipes |= 1 << intel_crtc->pipe;
- /* We only support modeset on one single crtc, hence we need to do that
- * only for the passed in crtc iff we change anything else than just
- * disable crtcs.
- *
- * This is actually not true, to be fully compatible with the old crtc
- * helper we automatically disable _any_ output (i.e. doesn't need to be
- * connected to the crtc we're modesetting on) if it's disconnected.
- * Which is a rather nutty api (since changed the output configuration
- * without userspace's explicit request can lead to confusion), but
- * alas. Hence we currently need to modeset on all pipes we prepare. */
+ /*
+ * For simplicity do a full modeset on any pipe where the output routing
+ * changed. We could be more clever, but that would require us to be
+ * more careful with calling the relevant encoder->mode_set functions.
+ */
if (*prepare_pipes)
*modeset_pipes = *prepare_pipes;
/* ... and mask these out. */
*modeset_pipes &= ~(*disable_pipes);
*prepare_pipes &= ~(*disable_pipes);
+
+ /*
+ * HACK: We don't (yet) fully support global modesets. intel_set_config
+ * obies this rule, but the modeset restore mode of
+ * intel_modeset_setup_hw_state does not.
+ */
+ *modeset_pipes &= 1 << intel_crtc->pipe;
+ *prepare_pipes &= 1 << intel_crtc->pipe;
}
bool