clear-pkgs-linux-iot-lts2018/0649-drm-i915-to-limit-the-...

74 lines
2.8 KiB
Diff
Raw Permalink Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2018-10-11 02:06:46 +08:00
From: Min He <min.he@intel.com>
Date: Fri, 14 Sep 2018 16:10:22 +0800
Subject: [PATCH] drm/i915: to limit the supported modifiers for plane
2018-10-11 02:06:46 +08:00
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 <min.he@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Fei Jiang <fei.jiang@intel.com>
V2: revert commit 01ba86, cd00ba and limited to gvt_active or vgpu_active
Signed-off-by: Xinyun Liu <xinyun.liu@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2018-10-11 02:06:46 +08:00
---
drivers/gpu/drm/i915/intel_display.c | 6 ++++++
drivers/gpu/drm/i915/intel_sprite.c | 3 +++
2 files changed, 9 insertions(+)
2018-10-11 02:06:46 +08:00
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
2020-10-27 02:14:06 +08:00
index da537980a936..72eacb50442e 100644
2018-10-11 02:06:46 +08:00
--- 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;
2018-10-11 02:06:46 +08:00
+ if (intel_gvt_active(dev_priv) || intel_vgpu_active(dev_priv))
+ modifiers = i9xx_format_modifiers;
+
2018-10-11 02:06:46 +08:00
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);
/*
2018-10-11 02:06:46 +08:00
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
2020-10-27 02:14:06 +08:00
index e10a64a6265c..7b8e2c7c9f8d 100644
2018-10-11 02:06:46 +08:00
--- 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;
2018-10-11 02:06:46 +08:00
+ if (intel_gvt_active(dev_priv) || intel_vgpu_active(dev_priv))
+ modifiers = i9xx_plane_format_modifiers;
+
2018-10-11 02:06:46 +08:00
plane_funcs = &skl_plane_funcs;
} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
intel_plane->can_scale = false;
2018-10-11 02:06:46 +08:00
--
https://clearlinux.org
2018-10-11 02:06:46 +08:00