drm/i915/gtt: Introduce release_pd_entry
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Fri, 5 Jul 2019 21:52:04 +0000 (22:52 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 6 Jul 2019 09:21:31 +0000 (10:21 +0100)
commit50b38bc4d39aa6fa5639aabcccfb828c19b89278
treebc4544bbec38cc1ec5a6fda7f5bd5a459378a185
parent73a8fdef5d6f525932a361104c0d46e5e2585c28
drm/i915/gtt: Introduce release_pd_entry

By encapsulating the locking upper level and used check for entry
into a helper function, we can use it in all callsites.

v2: get rid of atomic_reads on lower level clears (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190705215204.4559-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c