drm/i915: Simplify flushing activity on the ring
As we now always preallocate the seqno before writing to the ring, we can trivially test if we have any pending activity on the ring by inspecting the olr. This makes it then possible to flush operations that are not normally associated with a request, like power-management. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
9d7730914f
commit
b662a06632
|
@ -2485,13 +2485,9 @@ static int i915_ring_idle(struct intel_ring_buffer *ring)
|
||||||
u32 seqno;
|
u32 seqno;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* We need to add any requests required to flush the objects */
|
/* We need to add any requests required to flush the objects and ring */
|
||||||
if (!list_empty(&ring->active_list)) {
|
if (ring->outstanding_lazy_request) {
|
||||||
seqno = list_entry(ring->active_list.prev,
|
ret = i915_add_request(ring, NULL, NULL);
|
||||||
struct drm_i915_gem_object,
|
|
||||||
ring_list)->last_read_seqno;
|
|
||||||
|
|
||||||
ret = i915_gem_check_olr(ring, seqno);
|
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue