Skip to content

Commit a6989c8

Browse files
committed
drm/i915/fbc: Make FBC check stolen at use time
As a preparation for Xe change stolen memory initialization check to be done in use-time instead of during initialization. In case of xe, stolen memory is initialised much later so it can't be checked during init. There is no specific reason to check this in init for i915 either -> perform the check in use-time. This also gives us benefit fbc_no_reason reporting missing initialization being reason for disabled fbc. Signed-off-by: Jouni Högander <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Jeevan B <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 1d47074 commit a6989c8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/gpu/drm/i915/display/intel_fbc.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,11 @@ static int intel_fbc_check_plane(struct intel_atomic_state *state,
10561056
if (!fbc)
10571057
return 0;
10581058

1059+
if (!i915_gem_stolen_initialized(i915)) {
1060+
plane_state->no_fbc_reason = "stolen memory not initialised";
1061+
return 0;
1062+
}
1063+
10591064
if (intel_vgpu_active(i915)) {
10601065
plane_state->no_fbc_reason = "VGPU active";
10611066
return 0;
@@ -1709,9 +1714,6 @@ void intel_fbc_init(struct drm_i915_private *i915)
17091714
{
17101715
enum intel_fbc_id fbc_id;
17111716

1712-
if (!i915_gem_stolen_initialized(i915))
1713-
DISPLAY_RUNTIME_INFO(i915)->fbc_mask = 0;
1714-
17151717
if (need_fbc_vtd_wa(i915))
17161718
DISPLAY_RUNTIME_INFO(i915)->fbc_mask = 0;
17171719

0 commit comments

Comments
 (0)