*/
uint32_t gtt_offset;
- /** Breadcrumb of last rendering to the buffer. */
- uint32_t last_rendering_seqno;
struct intel_ring_buffer *ring;
+ /** Breadcrumb of last rendering to the buffer. */
+ uint32_t last_rendering_seqno;
/** Breadcrumb of last fenced GPU access to the buffer. */
uint32_t last_fenced_seqno;
- struct intel_ring_buffer *last_fenced_ring;
/** Current tiling stride for the object, if it's tiled. */
uint32_t stride;
if (obj->fenced_gpu_access) {
obj->last_fenced_seqno = seqno;
- obj->last_fenced_ring = ring;
/* Bump MRU to take account of the delayed flush */
if (obj->fence_reg != I915_FENCE_REG_NONE) {
BUG_ON(!list_empty(&obj->gpu_write_list));
BUG_ON(!obj->active);
obj->ring = NULL;
- obj->last_fenced_ring = NULL;
i915_gem_object_move_off_active(obj);
obj->fenced_gpu_access = false;
reg->obj->fence_reg = I915_FENCE_REG_NONE;
reg->obj->fenced_gpu_access = false;
reg->obj->last_fenced_seqno = 0;
- reg->obj->last_fenced_ring = NULL;
i915_gem_clear_fence_reg(dev, reg);
}
}
if (obj->fenced_gpu_access) {
if (obj->base.write_domain & I915_GEM_GPU_DOMAINS) {
- ret = i915_gem_flush_ring(obj->last_fenced_ring,
+ ret = i915_gem_flush_ring(obj->ring,
0, obj->base.write_domain);
if (ret)
return ret;
obj->fenced_gpu_access = false;
}
- if (obj->last_fenced_seqno && NULL != obj->last_fenced_ring) {
- if (!ring_passed_seqno(obj->last_fenced_ring,
+ if (obj->last_fenced_seqno) {
+ if (!ring_passed_seqno(obj->ring,
obj->last_fenced_seqno)) {
- ret = i915_wait_request(obj->last_fenced_ring,
+ ret = i915_wait_request(obj->ring,
obj->last_fenced_seqno,
true);
if (ret)
}
obj->last_fenced_seqno = 0;
- obj->last_fenced_ring = NULL;
}
/* Ensure that all CPU reads are completed before installing a fence
if (first == NULL)
first = reg;
- if (reg->obj->last_fenced_ring == NULL) {
+ if (reg->obj->last_fenced_seqno == 0) {
avail = reg;
break;
}
}
old->fence_reg = I915_FENCE_REG_NONE;
- old->last_fenced_ring = NULL;
old->last_fenced_seqno = 0;
drm_gem_object_unreference(&old->base);
reg->obj = obj;
list_move_tail(®->lru_list, &dev_priv->mm.fence_list);
obj->fence_reg = reg - dev_priv->fence_regs;
- obj->last_fenced_ring = NULL;
update:
obj->tiling_changed = false;