From: Yu Zhang Date: Tue, 10 Feb 2015 11:05:50 +0000 (+0800) Subject: drm/i915: Disable framebuffer compression for i915 driver in VM X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bd49234b6aa37fd32069e506c6997171afd326be;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/i915: Disable framebuffer compression for i915 driver in VM Framebuffer compression is disabled when driver detects it's running in a Intel GVT-g enlightened VM, because FBC is not emulated and there is no stolen memory for a vGPU. v2: take Chris' comments: - move the code into intel_update_fbc() v4: take Tvrtko's comments: - rebase the code into intel_fbc_update() Signed-off-by: Yu Zhang Signed-off-by: Jike Song Signed-off-by: Zhiyuan Lv Reviewed-by: Tvrtko Ursulin Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 7341e87221ae..ee65731baaf7 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -505,6 +505,10 @@ void intel_fbc_update(struct drm_device *dev) if (!HAS_FBC(dev)) return; + /* disable framebuffer compression in vGPU */ + if (intel_vgpu_active(dev)) + i915.enable_fbc = 0; + if (i915.enable_fbc < 0) { if (set_no_fbc_reason(dev_priv, FBC_CHIP_DEFAULT)) DRM_DEBUG_KMS("disabled per chip default\n");