]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Sanitize stolen memory size calculation
authorImre Deak <imre.deak@intel.com>
Wed, 10 May 2017 09:21:52 +0000 (12:21 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 10 May 2017 10:47:53 +0000 (13:47 +0300)
commitaba7d77c5dc8bb618e48de09ccfaac3a0a0864b2
treec2f4e98d1c12211564b54cfdfcf02ff2c6e532c2
parent210d2b86248a6475d9616f1f778026a1ff6f6a9d
drm/i915: Sanitize stolen memory size calculation

On GEN8+ (not counting CHV) the calculation can in theory result in an
incorrect sign extension with all upper bits set. In practice this is
unlikely to happen since it would require 4GB of stolen memory set
aside. For consistency still prevent the sign extension explicitly
everywhere.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1494408113-379-6-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/i915_gem_gtt.c