OSDN Git Service

drm/i915/ringbuffer: Make context pin/unpin symmetric
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Jun 2018 08:53:48 +0000 (09:53 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Jun 2018 14:16:07 +0000 (15:16 +0100)
commitd901e8e6733544e772713a23ab345eb79153de8c
tree53fe447484cdc67117572c4964391fdd8a302888
parent52b2416ceb72e8f757eb56de5a98ade04d9b062d
drm/i915/ringbuffer: Make context pin/unpin symmetric

Currently, we have a special routine for pinning the context state at
the start of activity tracking, but lack the complementary unpin
routine. Create it to to ease later patches that want to do partial
teardown on error, and, not least, to improve the readability of the
code.

Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180605085348.3018-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_ringbuffer.c