diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-10-11 02:25:19 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-10-11 02:25:19 +0000 |
commit | 714b0df3190e625eafbc5086e3aa33c6c6f49fed (patch) | |
tree | c3a1423d063a8262201d8ff30f8583ce1477e597 /sys | |
parent | 9b12d8167b8cc02f3dbfc0b4a9649eccd9c81424 (diff) |
drm/amd/display: Check link_res->hpo_dp_link_enc before using it
From Alex Hung
be2ca7a2c1561390d28bf2f92654d819659ba510 in linux-6.6.y/6.6.55
0beca868cde8742240cd0038141c30482d2b7eb8 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c b/sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c index 5dd5bd609c9..d0b0553dbdd 100644 --- a/sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c +++ b/sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c @@ -28,6 +28,8 @@ #include "dccg.h" #include "clk_mgr.h" +#define DC_LOGGER link->ctx->logger + void set_hpo_dp_throttled_vcp_size(struct pipe_ctx *pipe_ctx, struct fixed31_32 throttled_vcp_size) { @@ -124,6 +126,11 @@ void disable_hpo_dp_link_output(struct dc_link *link, const struct link_resource *link_res, enum amd_signal_type signal) { + if (!link_res->hpo_dp_link_enc) { + DC_LOG_ERROR("%s: invalid hpo_dp_link_enc\n", __func__); + return; + } + link_res->hpo_dp_link_enc->funcs->link_disable(link_res->hpo_dp_link_enc); link_res->hpo_dp_link_enc->funcs->disable_link_phy( link_res->hpo_dp_link_enc, signal); |