drm/i915/gvt: Hold a reference on the request
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 20 Oct 2016 09:29:36 +0000 (17:29 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 20 Oct 2016 09:29:36 +0000 (17:29 +0800)
commit0eb742d7af224481ab7abb7b38bd7166e47661e2
tree74ff85c97fbfd2612c2124a8ca46479526630ce0
parenteeacd86efa53e6328c63b79d1999a7d214972278
drm/i915/gvt: Hold a reference on the request

The workload took a pointer to the request, and even waited upon,
without holding a reference on the request. Take that reference
explicitly and fix up the error path following request allocation that
missed flushing the request.

v2: [zhenyuw]
- drop request put in error path for dispatch, as main thread
caller will handle it identically to a real request.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c