drm/i915/guc: Unwind GuC workqueue reservation if request construction fails
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Oct 2016 06:53:27 +0000 (07:53 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Oct 2016 07:27:23 +0000 (08:27 +0100)
commit5ba899082cbffb779ccb39420fe1718850daf857
treef1fd07aea949eac2782cd2f2939baa554d0ca3d1
parentad07dfcddf1394e6fed094e7fb426b4242a6814e
drm/i915/guc: Unwind GuC workqueue reservation if request construction fails

We reserve space in the GuC workqueue for submitting the request in the
future. However, if we fail to construct the request, we need to give
that reserved space back to the system.

Fixes: dadd481bfe55 ("drm/i915/guc: Prepare for nonblocking execbuf submission")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97978
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161007065327.24515-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_guc_submission.c
drivers/gpu/drm/i915/intel_guc.h
drivers/gpu/drm/i915/intel_lrc.c