drm/i915: Check if the stolen memory "reserved" area is enabled or not
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 2 Nov 2017 15:17:35 +0000 (17:17 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 15 Nov 2017 16:39:26 +0000 (18:39 +0200)
commitdb7fb60593e42824ea217ff8ed14b74376ac98c8
tree74741a53bcb9dc0ff66e1c4162e733c186461d12
parent764b9f2c4d252fd893a07b39b4ab14ae8044c9cb
drm/i915: Check if the stolen memory "reserved" area is enabled or not

Apparently there are some machines that put semi-sensible looking values
into the stolen "reserved" base and size, except those values are actually
outside the stolen memory. There is a bit in the register which
supposedly could tell us whether the reserved area is even enabled or
not. Let's check for that before we go trusting the base and size.

Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171102151737.23336-1-ville.syrjala@linux.intel.com
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
drivers/gpu/drm/i915/i915_gem_stolen.c
drivers/gpu/drm/i915/i915_reg.h