summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2013-07-01 20:16:59 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2013-07-01 20:16:59 +0000
commitc404474b5df9c5c3dfa37cc938b8f25ab554cd3e (patch)
tree03eb25f45130db1e03dd5b8dff1dede260983be7
parent5ffe820877cc1d6f77a9558863f6a6b6ccda391f (diff)
The fast scrolling code causes random page table errors on older hardware.
Disable that code and use the write-only rasops code instead on the affected chips.
-rw-r--r--sys/dev/pci/drm/i915/i915_drv.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c
index 67b939f43e5..cacc44a94f1 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.33 2013/06/06 16:14:26 jsg Exp $ */
+/* $OpenBSD: i915_drv.c,v 1.34 2013/07/01 20:16:58 kettenis Exp $ */
/*
* Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org>
*
@@ -1227,6 +1227,16 @@ inteldrm_attach(struct device *parent, struct device *self, void *aux)
dev_priv->sc_copyrows = ri->ri_copyrows;
ri->ri_copyrows = inteldrm_copyrows;
+ /*
+ * On older hardware the fast scrolling code causes page table
+ * errors. As a workaround, we set the "avoid framebuffer
+ * reads" flag, which has the side-effect of disabling the
+ * fast scrolling code, but still gives us a half-decent
+ * scrolling speed.
+ */
+ if (INTEL_INFO(dev)->gen < 3 || IS_I915G(dev) || IS_I915GM(dev))
+ ri->ri_flg |= RI_WRONLY;
+
inteldrm_stdscreen.capabilities = ri->ri_caps;
inteldrm_stdscreen.nrows = ri->ri_rows;
inteldrm_stdscreen.ncols = ri->ri_cols;