drm/i915/gtt: Use NULL to encode scratch shadow entries
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 12 Jul 2019 09:43:27 +0000 (10:43 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 12 Jul 2019 11:22:36 +0000 (12:22 +0100)
commit6239901c576d4df87d6463c4f163bd432995d540
tree24231c2cd55fa1719f65aff0dd339f3a128ce1e6
parentc03cbe4c0a838ce03266a8c579ef8d13181907b6
drm/i915/gtt: Use NULL to encode scratch shadow entries

We can simplify our gtt walking code by comparing against NULL for
scratch entries as opposed to looking up the distinct per-level scratch
pointer.

The only caveat is to remember to protect external parties and map the
NULL to the scratch top pd.

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