drm/i915: Add null state batch to active list
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Wed, 21 May 2014 16:01:06 +0000 (19:01 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 22 May 2014 12:10:37 +0000 (14:10 +0200)
commit46470fc932ac8a0e8317a220b3f4ea4ed903338e
tree08b7023d82f37eda8865c7276f4ace1d24b8d191
parentd3eaf8843da6c3aa0d6b5b480820382c7bd1a89d
drm/i915: Add null state batch to active list

for proper refcounting to take place as we use
i915_add_request() for it.

i915_add_request() also takes the context for the request
from ring->last_context so move the null state batch
submission after the ring context has been set.

v2: we need to check for correct ring now (Ville Syrjälä)
v3: no need to expose i915_gem_move_object_to_active (Chris Wilson)
v4: cargoculted vma/active/inactive error handling removed (Chris Wilson)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_render_state.c