OSDN Git Service

drm/i915/stolen: Deduce base of reserved portion as top-size on vlv
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 12 Mar 2018 16:52:06 +0000 (16:52 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 16 Mar 2018 12:15:59 +0000 (12:15 +0000)
commit957d32feaf04d2a67fd506743e5789359480d574
treeed90263128fb38d84108bdbdd974ef148b304480
parent0efb656147e04f26433de5a399d1b03bf00e4ed6
drm/i915/stolen: Deduce base of reserved portion as top-size on vlv

On Valleyview, the HW deduces the base of the reserved portion of stolen
memory as being (top - size) and the address field within
GEN6_STOLEN_RESERVED is set to 0. Add yet another GEN6_STOLEN_RESERVED
reader to cope with the subtly different path required for vlv.

v2: Avoid using reserved_base = reserved_size = 0 as the invalid
condition as that typically falls outside of the stolen region,
provoking a consistency error.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180312165206.31772-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_stolen.c