drm/amd/display: trigger timing sync only if TG is running
authorjsg <jsg@openbsd.org>
Thu, 17 Aug 2023 04:14:37 +0000 (04:14 +0000)
committerjsg <jsg@openbsd.org>
Thu, 17 Aug 2023 04:14:37 +0000 (04:14 +0000)
From Aurabindo Pillai
b61a06eca15cc4fd6ff50540ba3bbdea76e52c6b in linux-6.1.y/6.1.46
6066aaf74f510fc171dbe9375153aee2d60d37aa in mainline linux

sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

index a6fde27..3940271 100644 (file)
@@ -2284,6 +2284,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);
        }