Skip to contentSkip to conversation

drm/amd/display: trigger timing sync only if TG is running

PATCH In review Aurabindo Pillai 2 participants 2 messages Nov 21, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: trigger timing sync only if TG is running

[Why&How]
If the timing generator isnt running, it does not make sense to trigger a sync on the corresponding OTG. Check this condition before starting. Otherwise, this will cause error like:

*ERROR* GSL: Timeout on reset trigger!

Fixes 8c7924bdb0fe ("drm/amd/display: Disable phantom OTG after enable for plane disable")
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +6 -0
index 587b04b8712d..0db02e76dcc5 100644
@@ -2252,6 +2252,12 @@ void dcn10_enable_timing_synchronization(
 		opp = grouped_pipes[i]->stream_res.opp;
 		tg = grouped_pipes[i]->stream_res.tg;
 		tg->funcs->get_otg_active_size(tg, &width, &height);
+
+		if (!tg->funcs->is_tg_enabled(tg)) {
+			DC_SYNC_INFO("Skipping timing sync on disabled OTG\n");
+			return;
+		}
+
 		if (opp->funcs->opp_program_dpg_dimensions)
 			opp->funcs->opp_program_dpg_dimensions(opp, width, 2*(height) + 1);
 	}
Signature · 1 line
2.38.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · Aurabindo Pillai

[Why&How]
If the timing generator isnt running, it does not make sense to trigger a sync on the corresponding OTG. Check this condition before starting. Otherwise, this will cause error like:

*ERROR* GSL: Timeout on reset trigger!

Fixes 8c7924bdb0fe ("drm/amd/display: Disable phantom OTG after enable for plane disable")
---
  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +0 -0
index 587b04b8712d..0db02e76dcc5 100644
@@ -2252,6 +2252,12 @@ void dcn10_enable_timing_synchronization(
  		opp = grouped_pipes[i]->stream_res.opp;
  		tg = grouped_pipes[i]->stream_res.tg;

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c void dcn10_enable_timing_synchronization( · line 2263

Quoted 10 lines
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +6 -0
  		tg->funcs->get_otg_active_size(tg, &width, &height);
+
+		if (!tg->funcs->is_tg_enabled(tg)) {
+			DC_SYNC_INFO("Skipping timing sync on disabled OTG\n");
+			return;
+		}
+
  		if (opp->funcs->opp_program_dpg_dimensions)
  			opp->funcs->opp_program_dpg_dimensions(opp, width, 2*(height) + 1);
  	}