diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-03-28 19:38:54 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-03-28 19:38:54 +0000 |
commit | 15ba891262cf8d841bd79c3b2afd27153ef3ad57 (patch) | |
tree | 2c64ac0a0c9da54c451a52e41185f4edbd59073a /sys/dev/pci | |
parent | 9e93fe1ffefc384b79a3db87fe579667e962071d (diff) |
Call intel_mark_busy() in the right place, and call intel_mark_fb_busy()
where we used to call intel_mark_busy().
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/i915/i915_gem.c | 15 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_gem_execbuffer.c | 5 |
2 files changed, 12 insertions, 8 deletions
diff --git a/sys/dev/pci/drm/i915/i915_gem.c b/sys/dev/pci/drm/i915/i915_gem.c index 58fb8040659..8529acdd421 100644 --- a/sys/dev/pci/drm/i915/i915_gem.c +++ b/sys/dev/pci/drm/i915/i915_gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_gem.c,v 1.5 2013/03/28 05:13:07 jsg Exp $ */ +/* $OpenBSD: i915_gem.c,v 1.6 2013/03/28 19:38:53 kettenis Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org> * @@ -1354,12 +1354,15 @@ i915_add_request(struct intel_ring_buffer *ring, ring->outstanding_lazy_request = 0; - if (dev_priv->mm.suspended == 0) { - if (was_empty) + if (!dev_priv->mm.suspended) { + if (i915_enable_hangcheck) { + timeout_add_msec(&dev_priv->hangcheck_timer, + DRM_I915_HANGCHECK_PERIOD); + } + if (was_empty) { timeout_add_sec(&dev_priv->mm.retire_timer, 1); - /* XXX was_empty? */ - timeout_add_msec(&dev_priv->hangcheck_timer, - DRM_I915_HANGCHECK_PERIOD); + intel_mark_busy(ring->dev); + } } if (out_seqno) diff --git a/sys/dev/pci/drm/i915/i915_gem_execbuffer.c b/sys/dev/pci/drm/i915/i915_gem_execbuffer.c index 57714609442..0332076c05c 100644 --- a/sys/dev/pci/drm/i915/i915_gem_execbuffer.c +++ b/sys/dev/pci/drm/i915/i915_gem_execbuffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_gem_execbuffer.c,v 1.2 2013/03/28 11:51:05 jsg Exp $ */ +/* $OpenBSD: i915_gem_execbuffer.c,v 1.3 2013/03/28 19:38:53 kettenis Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org> * @@ -363,7 +363,8 @@ i915_gem_execbuffer_move_to_active(struct drm_obj **object_list, if (obj->base.write_domain) { obj->dirty = 1; obj->last_write_seqno = intel_ring_get_seqno(ring); - intel_mark_busy(ring->dev); + if (obj->pin_count) /* check for potential scanout */ + intel_mark_fb_busy(obj); } // trace_i915_gem_object_change_domain(obj, old_read, old_write); |