Skip to content

Commit b74571a

Browse files
charliu-AMDENGalexdeucher
authored andcommitted
drm/amd/display: Use full update for swizzle mode change
[WHY & HOW] 1) We did linear/non linear transition properly long ago 2) We used that path to handle SystemDisplayEnable 3) We fixed a SystemDisplayEnable inability to fallback to passive by impacting the transition flow generically 4) AFMF later relied on the generic transition behavior Separating the two flows to make (3) non-generic is the best immediate coarse of action. DC can discern SSAMPO3 very easily from SDE. Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Chris Park <chris.park@amd.com> Signed-off-by: Charlene Liu <Charlene.Liu@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 4bdc5b5 commit b74571a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

  • drivers/gpu/drm/amd/display/dc

drivers/gpu/drm/amd/display/dc/core/dc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,7 +2376,7 @@ static bool is_surface_in_context(
23762376
return false;
23772377
}
23782378

2379-
static enum surface_update_type get_plane_info_update_type(const struct dc_surface_update *u)
2379+
static enum surface_update_type get_plane_info_update_type(const struct dc *dc, const struct dc_surface_update *u)
23802380
{
23812381
union surface_update_flags *update_flags = &u->surface->update_flags;
23822382
enum surface_update_type update_type = UPDATE_TYPE_FAST;
@@ -2455,7 +2455,7 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa
24552455
/* todo: below are HW dependent, we should add a hook to
24562456
* DCE/N resource and validated there.
24572457
*/
2458-
if (u->plane_info->tiling_info.gfx9.swizzle != DC_SW_LINEAR) {
2458+
if (!dc->debug.skip_full_updated_if_possible) {
24592459
/* swizzled mode requires RQ to be setup properly,
24602460
* thus need to run DML to calculate RQ settings
24612461
*/
@@ -2547,7 +2547,7 @@ static enum surface_update_type det_surface_update(const struct dc *dc,
25472547

25482548
update_flags->raw = 0; // Reset all flags
25492549

2550-
type = get_plane_info_update_type(u);
2550+
type = get_plane_info_update_type(dc, u);
25512551
elevate_update_type(&overall_type, type);
25522552

25532553
type = get_scaling_info_update_type(dc, u);

drivers/gpu/drm/amd/display/dc/dc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,7 @@ struct dc_debug_options {
10601060
bool enable_ips_visual_confirm;
10611061
unsigned int sharpen_policy;
10621062
unsigned int scale_to_sharpness_policy;
1063+
bool skip_full_updated_if_possible;
10631064
};
10641065

10651066

0 commit comments

Comments
 (0)