summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915_drv.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@openbsd.org>2013-02-23 23:06:54 +0100
committerMark Kettenis <kettenis@openbsd.org>2013-02-23 23:06:54 +0100
commitdbffdee574a480eaf10c8e2775db60decb368887 (patch)
treeafe8a56f1881ff92df9412fc3953c896649affe5 /sys/dev/pci/drm/i915_drv.c
parent03da76002d80497163d9e708ff051551c37543c2 (diff)
Turns out mm.suspended gets reset before the hardware is properly initialized
in the resume path. As a consequence we may do some debug printfs before the rings are properly set up again. This makes us hang on resume on chips that have the seperate blitter ring.
Diffstat (limited to 'sys/dev/pci/drm/i915_drv.c')
-rw-r--r--sys/dev/pci/drm/i915_drv.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index 1fbeb64790c..11b54bc4c25 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -664,7 +664,7 @@ inteldrm_copycols(void *cookie, int row, int src, int dst, int num)
struct rasops_info *ri = cookie;
struct inteldrm_softc *sc = ri->ri_hw;
- if (sc->mm.suspended)
+ if (sc->noaccel)
return sc->noaccel_ops.copycols(cookie, row, src, dst, num);
num *= ri->ri_font->fontwidth;
@@ -686,7 +686,7 @@ inteldrm_erasecols(void *cookie, int row, int col, int num, long attr)
struct inteldrm_softc *sc = ri->ri_hw;
int bg, fg;
- if (sc->mm.suspended)
+ if (sc->noaccel)
return sc->noaccel_ops.erasecols(cookie, row, col, num, attr);
ri->ri_ops.unpack_attr(cookie, attr, &fg, &bg, NULL);
@@ -707,7 +707,7 @@ inteldrm_copyrows(void *cookie, int src, int dst, int num)
struct rasops_info *ri = cookie;
struct inteldrm_softc *sc = ri->ri_hw;
- if (sc->mm.suspended)
+ if (sc->noaccel)
return sc->noaccel_ops.copyrows(cookie, src, dst, num);
num *= ri->ri_font->fontheight;
@@ -728,7 +728,7 @@ inteldrm_eraserows(void *cookie, int row, int num, long attr)
int bg, fg;
int x, y, w;
- if (sc->mm.suspended)
+ if (sc->noaccel)
return sc->noaccel_ops.eraserows(cookie, row, num, attr);
ri->ri_ops.unpack_attr(cookie, attr, &fg, &bg, NULL);
@@ -1149,6 +1149,7 @@ inteldrm_activate(struct device *arg, int act)
switch (act) {
case DVACT_QUIESCE:
// inteldrm_quiesce(dev_priv);
+ dev_priv->noaccel = 1;
i915_drm_freeze(dev);
break;
case DVACT_SUSPEND:
@@ -1161,6 +1162,7 @@ inteldrm_activate(struct device *arg, int act)
// wakeup(&dev_priv->flags);
i915_drm_thaw(dev);
intel_fb_restore_mode(dev);
+ dev_priv->noaccel = 0;
break;
}