From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Min He Date: Fri, 14 Sep 2018 16:10:22 +0800 Subject: [PATCH] drm/i915: to limit the supported modifiers for plane restriction In GVT-g environment, to ensure all the OS's have enough DDB to display, GVT-g will statically allocate all the DDBs for all the planes on all the pipes. However, when SOS or UOS wants to use Y/Yf tiled modifier, the watermark required will exceed the DDBs allocated by GVT-g, thus causes some display issues. So in this patch, we removed the supports of the Y/Yf tiled modifiers for both SOS and UOS when plane restriction is enabled. And a consequence is that the RBC will be disabled since _CCS modifiers will no longer be supported. Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1193 Signed-off-by: Min He Reviewed-by: Zhao Yakui Reviewed-by: Fei Jiang V2: revert commit 01ba86, cd00ba and limited to gvt_active or vgpu_active Signed-off-by: Xinyun Liu Signed-off-by: Zhao Yakui --- drivers/gpu/drm/i915/intel_display.c | 6 ++++++ drivers/gpu/drm/i915/intel_sprite.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index da537980a936..72eacb50442e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -13786,6 +13786,9 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) else modifiers = skl_format_modifiers_noccs; + if (intel_gvt_active(dev_priv) || intel_vgpu_active(dev_priv)) + modifiers = i9xx_format_modifiers; + primary->update_plane = skl_update_plane; primary->disable_plane = skl_disable_plane; primary->get_hw_state = skl_plane_get_hw_state; @@ -13947,6 +13950,9 @@ intel_skl_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe, else modifiers = skl_format_modifiers_noccs; + if (intel_gvt_active(dev_priv) || intel_vgpu_active(dev_priv)) + modifiers = i9xx_format_modifiers; + num_formats = ARRAY_SIZE(skl_primary_formats); /* diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index e10a64a6265c..7b8e2c7c9f8d 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -1629,6 +1629,9 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv, else modifiers = skl_plane_format_modifiers_noccs; + if (intel_gvt_active(dev_priv) || intel_vgpu_active(dev_priv)) + modifiers = i9xx_plane_format_modifiers; + plane_funcs = &skl_plane_funcs; } else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) { intel_plane->can_scale = false; -- https://clearlinux.org