aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2021-05-26 13:49:01 +0100
committerMatthew Auld <[email protected]>2021-05-27 10:11:34 +0100
commit40e40e63f7be028ff8dc2a2dcef4a812539e86cc (patch)
treee9c6646c256bfb9cf9491d3df0b243825165544b
parent994a4c3e226a40fb6404ca9999e20d1e43096470 (diff)
drm/i915/display: relax 2big checking around initial fb
The kernel prefers enabling fbc over the initial fb, since this leads to actual runtime power savings, so if the initial fb is deemed too big using some heuristic, then we simply skip allocating stolen for it. However if the kernel is not configured with fbcon then it should be possible to relax this, since unlike with fbcon the display server shouldn't preserve it when later replacing it, and so we should be able to re-use the stolen memory for fbc and friends. This patch is reported to fix some flicker seen during boot splash on some devices. v2: s/FRAMEBUFFER_CONSOLE/CONFIG_FRAMEBUFFER_CONSOLE Signed-off-by: Chris Wilson <[email protected]> Signed-off-by: Matthew Auld <[email protected]> Cc: Lee Shawn C <[email protected]> Cc: Ville Syrjälä <[email protected]> Cc: Daniel Vetter <[email protected]> Reviewed-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/i915/display/intel_display.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index f51da4f53574..b4eb48a33caa 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1690,7 +1690,8 @@ initial_plane_vma(struct drm_i915_private *i915,
* important and we should probably use that space with FBC or other
* features.
*/
- if (size * 2 > i915->stolen_usable_size)
+ if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
+ size * 2 > i915->stolen_usable_size)
return NULL;
obj = i915_gem_object_create_stolen_for_preallocated(i915, base, size);