drm/i915: fix pm refcounting on fence error in execbuf
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Fri, 3 Feb 2017 22:45:29 +0000 (14:45 -0800)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 4 Feb 2017 09:42:07 +0000 (09:42 +0000)
commit4a04e371228937d104fd03d5219f8c25fda29757
tree3b89fba5b2ddf8afbb4b3eccf9233ed6a0c773f6
parent955b8e9ca8b924f8c21d43797f8bf8f39908efd3
drm/i915: fix pm refcounting on fence error in execbuf

Fences are creted/checked before the pm ref is taken, so if we jump to
pre_mutex_err we will uncorrectly call intel_runtime_pm_put.

v2: Massage unwind error paths

Fixes: fec0445caa27 (drm/i915: Support explicit fencing for execbuf)
Testcase: igt/gem_exec_params
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1486161930-11764-1-git-send-email-daniele.ceraolospurio@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem_execbuffer.c