]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: Trigger full update after DCC on/off
authorJake Wang <haonan.wang2@amd.com>
Fri, 14 May 2021 19:41:39 +0000 (15:41 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Jun 2021 16:15:20 +0000 (12:15 -0400)
[Why]
During DCC on/off, stutter period is calculated before DCC has fully transitioned.
This results in incorrect stutter period calculation.

[How]
Trigger a full update when DCC changes between on/off.

Signed-off-by: Jake Wang <haonan.wang2@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Stylon Wang <stylon.wang@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.c

index 7017db8007185f3974c13f348fe9ae9f827c2403..0a8ecb8863acba3703ff1e5b0ae8796a985909da 100644 (file)
@@ -1927,8 +1927,13 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa
        if (u->plane_info->dcc.enable != u->surface->dcc.enable
                        || u->plane_info->dcc.independent_64b_blks != u->surface->dcc.independent_64b_blks
                        || u->plane_info->dcc.meta_pitch != u->surface->dcc.meta_pitch) {
+               /* During DCC on/off, stutter period is calculated before
+                * DCC has fully transitioned. This results in incorrect
+                * stutter period calculation. Triggering a full update will
+                * recalculate stutter period.
+                */
                update_flags->bits.dcc_change = 1;
-               elevate_update_type(&update_type, UPDATE_TYPE_MED);
+               elevate_update_type(&update_type, UPDATE_TYPE_FULL);
        }
 
        if (resource_pixel_format_to_bpp(u->plane_info->format) !=