]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite17f058e50abb413dfee0ae13567f4ba3cd236ee
tree74741a53bcb9dc0ff66e1c4162e733c186461d12
parentefafd697f756dbd0182e95af845335cfad9f46d7
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