From 4fc05063519cb7699142909e63807e55e03bde34 Mon Sep 17 00:00:00 2001 From: Joonas Lahtinen Date: Fri, 11 Aug 2017 12:51:26 +0300 Subject: [PATCH] drm/i915: Disconnect 32 and 48 bit ppGTT support Git-commit: 4fc05063519cb7699142909e63807e55e03bde34 Patch-mainline: v4.14-rc1 References: FATE#322643 bsc#1055900 Configurations like virtualized environments may support only 48 bit ppGTT without supporting 32 bit ppGTT. Support this by disconnecting the relationship of the two feature bits. Cc: Tina Zhang Cc: Chris Wilson Cc: Zhi Wang Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Signed-off-by: Zhenyu Wang Acked-by: Takashi Iwai --- drivers/gpu/drm/i915/i915_gem_gtt.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -180,10 +180,15 @@ int intel_sanitize_enable_ppgtt(struct d return 0; } - if (INTEL_GEN(dev_priv) >= 8 && i915.enable_execlists && has_full_ppgtt) - return has_full_48bit_ppgtt ? 3 : 2; - else - return has_aliasing_ppgtt ? 1 : 0; + if (INTEL_GEN(dev_priv) >= 8 && i915.enable_execlists) { + if (has_full_48bit_ppgtt) + return 3; + + if (has_full_ppgtt) + return 2; + } + + return has_aliasing_ppgtt ? 1 : 0; } static int ppgtt_bind_vma(struct i915_vma *vma,