Skip to content

Commit fd56b9c

Browse files
vgovind2tursulin
authored andcommitted
drm/i915/fbc: fix the implementation of wa_18038517565
As per the wa_18038517565, we need to disable FBC compressor clock gating before enabling FBC and enable after disabling FBC. Placing the enabling of clock gating in the fbc deactivate function can make the above wa logic go wrong in case of frontbuffer rendering FBC mechanism. FBC deactivate can get called during fb invalidate and then the corresponding FBC activate can get called without properly disabling the clock gating and can result in compression stalled. So move the enable clock gating at the end of one FBC session after FBC is completely disabled for a pipe. Bspec: 74212, 72197, 69741, 65555 Fixes: 010363c ("drm/i915/display: implement wa_18038517565") Signed-off-by: Vinod Govindapillai <[email protected]> Reviewed-by: Jouni Högander <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit 82dde04) Signed-off-by: Tvrtko Ursulin <[email protected]>
1 parent 8f5ae30 commit fd56b9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,6 @@ static void ilk_fbc_deactivate(struct intel_fbc *fbc)
552552
if (dpfc_ctl & DPFC_CTL_EN) {
553553
dpfc_ctl &= ~DPFC_CTL_EN;
554554
intel_de_write(display, ILK_DPFC_CONTROL(fbc->id), dpfc_ctl);
555-
556-
/* wa_18038517565 Enable DPFC clock gating after FBC disable */
557-
if (display->platform.dg2 || DISPLAY_VER(display) >= 14)
558-
fbc_compressor_clkgate_disable_wa(fbc, false);
559555
}
560556
}
561557

@@ -1710,6 +1706,10 @@ static void __intel_fbc_disable(struct intel_fbc *fbc)
17101706

17111707
__intel_fbc_cleanup_cfb(fbc);
17121708

1709+
/* wa_18038517565 Enable DPFC clock gating after FBC disable */
1710+
if (display->platform.dg2 || DISPLAY_VER(display) >= 14)
1711+
fbc_compressor_clkgate_disable_wa(fbc, false);
1712+
17131713
fbc->state.plane = NULL;
17141714
fbc->flip_pending = false;
17151715
fbc->busy_bits = 0;

0 commit comments

Comments
 (0)