drm/amd/display: Guard cursor idle reallow by DC debug option
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Wed, 21 Feb 2024 22:14:08 +0000 (17:14 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Mar 2024 17:37:37 +0000 (13:37 -0400)
[WHY]
To control whether idle optimizations reallowed after the first cursor
update.

[HOW]
Add checks to the conditions.

Reviewed-by: Duncan Ma <duncan.ma@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_stream.c

index 51a970fcb5d05d32484726a3993f4886592191a3..212e057ed9b014bbd79b656a3451766fc3f6411c 100644 (file)
@@ -319,7 +319,7 @@ bool dc_stream_set_cursor_attributes(
        program_cursor_attributes(dc, stream, attributes);
 
        /* re-enable idle optimizations if necessary */
-       if (reset_idle_optimizations)
+       if (reset_idle_optimizations && !dc->debug.disable_dmub_reallow_idle)
                dc_allow_idle_optimizations(dc, true);
 
        return true;
@@ -394,7 +394,7 @@ bool dc_stream_set_cursor_position(
 
        program_cursor_position(dc, stream, position);
        /* re-enable idle optimizations if necessary */
-       if (reset_idle_optimizations)
+       if (reset_idle_optimizations && !dc->debug.disable_dmub_reallow_idle)
                dc_allow_idle_optimizations(dc, true);
 
        return true;