* [PATCH] drm/i915: Relax the need-mappable? flag for execbuffers
@ 2012-03-25 16:56 Chris Wilson
2012-03-25 17:18 ` Chris Wilson
0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2012-03-25 16:56 UTC (permalink / raw)
To: intel-gfx
Since we now can rewrite relocation pointers using the CPU domain, for
those cases we do not need to force a mappable GTT allocation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_execbuffer.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 0a7b509..286c0e1 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -490,7 +490,7 @@ pin_and_fence_object(struct drm_i915_gem_object *obj,
entry->flags & EXEC_OBJECT_NEEDS_FENCE &&
obj->tiling_mode != I915_TILING_NONE;
need_mappable =
- entry->relocation_count ? true : need_fence;
+ need_fence ?: entry->relocation_count && obj->base.write_domain != I915_GEM_DOMAIN_CPU;
ret = i915_gem_object_pin(obj, entry->alignment, need_mappable, false);
if (ret)
@@ -548,7 +548,7 @@ i915_gem_execbuffer_reserve(struct intel_ring_buffer *ring,
entry->flags & EXEC_OBJECT_NEEDS_FENCE &&
obj->tiling_mode != I915_TILING_NONE;
need_mappable =
- entry->relocation_count ? true : need_fence;
+ need_fence ?: entry->relocation_count && obj->base.write_domain != I915_GEM_DOMAIN_CPU;
if (need_mappable)
list_move(&obj->exec_list, &ordered_objects);
@@ -589,7 +589,7 @@ i915_gem_execbuffer_reserve(struct intel_ring_buffer *ring,
entry->flags & EXEC_OBJECT_NEEDS_FENCE &&
obj->tiling_mode != I915_TILING_NONE;
need_mappable =
- entry->relocation_count ? true : need_fence;
+ need_fence ?: entry->relocation_count && obj->base.write_domain != I915_GEM_DOMAIN_CPU;
if ((entry->alignment && obj->gtt_offset & (entry->alignment - 1)) ||
(need_mappable && !obj->map_and_fenceable))
--
1.7.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-25 17:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-25 16:56 [PATCH] drm/i915: Relax the need-mappable? flag for execbuffers Chris Wilson
2012-03-25 17:18 ` Chris Wilson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.