Commit d29bd94c authored by Austin Zheng's avatar Austin Zheng Committed by Alex Deucher
Browse files

drm/amd/display: Do Not Fallback To SW Cursor If HW Cursor Required



[Why/How]
Tearing can occur if there is a flip immediate plane and SW cursor.
check_subvp_sw_cursor_fallback_req falls back to SW cursor if the
stream has the potential to use subVP.
Check for fallback not needed if HW cursor is required.
e.g. Fullscreen gaming

Reviewed-by: default avatarDillon Varone <dillon.varone@amd.com>
Signed-off-by: default avatarAustin Zheng <Austin.Zheng@amd.com>
Signed-off-by: default avatarZaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b95264cf
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -292,7 +292,9 @@ bool dc_stream_set_cursor_attributes(
	 * 2. If not subvp high refresh, for single display cases, if resolution is >= 5K and refresh rate < 120hz
	 * 3. If not subvp high refresh, for multi display cases, if resolution is >= 4K and refresh rate < 120hz
	 */
	if (dc->debug.allow_sw_cursor_fallback && attributes->height * attributes->width * 4 > 16384) {
	if (dc->debug.allow_sw_cursor_fallback &&
		attributes->height * attributes->width * 4 > 16384 &&
		!stream->hw_cursor_req) {
		if (check_subvp_sw_cursor_fallback_req(dc, stream))
			return false;
	}