drm/i915/gtt: Generalize alloc_pd
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Fri, 14 Jun 2019 16:43:45 +0000 (19:43 +0300)
committerMika Kuoppala <mika.kuoppala@linux.intel.com>
Mon, 17 Jun 2019 13:32:56 +0000 (16:32 +0300)
commit9ee7250384d877b3fca16e1ddcbeb2859a1b8d70
tree3ab9cc0fb294ae93ca4ac76f2282b7ad8574ec3d
parent56ab674190b1f3047a186954d5e13cfaf77edc59
drm/i915/gtt: Generalize alloc_pd

Allocate all page directory variants with alloc_pd. As
the lvl3 and lvl4 variants differ in manipulation, we
need to check for existence of backing phys page before accessing
it.

v2: use err in returns

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