drm/amd/display: Prevent crash when disable stream
authorjsg <jsg@openbsd.org>
Thu, 11 Apr 2024 03:20:22 +0000 (03:20 +0000)
committerjsg <jsg@openbsd.org>
Thu, 11 Apr 2024 03:20:22 +0000 (03:20 +0000)
From Chris Park
4356a2c3f296503c8b420ae8adece053960a9f06 in linux-6.6.y/6.6.26
72d72e8fddbcd6c98e1b02d32cf6f2b04e10bd1c in mainline linux

sys/dev/pci/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index 357e47d..cdb63b9 100644 (file)
@@ -1181,7 +1181,8 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
                if (dccg) {
                        dccg->funcs->disable_symclk32_se(dccg, dp_hpo_inst);
                        dccg->funcs->set_dpstreamclk(dccg, REFCLK, tg->inst, dp_hpo_inst);
-                       dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
+                       if (dccg && dccg->funcs->set_dtbclk_dto)
+                               dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
                }
        } else if (dccg && dccg->funcs->disable_symclk_se) {
                dccg->funcs->disable_symclk_se(dccg, stream_enc->stream_enc_inst,