From: Alvin Lee Date: Thu, 23 Oct 2025 19:26:33 +0000 (-0400) Subject: drm/amd/display: Only initialize LSDMA if it is supported in DMU X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=edcace98fdfe20c485f33cfadabe78fce73cbe36;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Only initialize LSDMA if it is supported in DMU Need to check caps flag to determine whether LSDMA is supported in DMU Reviewed-by: Rafal Ostrowski Signed-off-by: Alvin Lee Signed-off-by: Fangzhi Zuo Tested-by: Dan Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c index fffbf1983143d..7b09af1cb306e 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c @@ -2084,6 +2084,9 @@ bool dmub_lsdma_init(struct dc_dmub_srv *dc_dmub_srv) struct dmub_cmd_lsdma_data *lsdma_data = &cmd.lsdma.lsdma_data; bool result; + if (!dc_dmub_srv->dmub->feature_caps.lsdma_support_in_dmu) + return false; + memset(&cmd, 0, sizeof(cmd)); cmd.cmd_common.header.type = DMUB_CMD__LSDMA; diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h index 9bc512a522e03..e956722209baf 100644 --- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h @@ -721,6 +721,7 @@ struct dmub_feature_caps { uint8_t replay_supported; uint8_t replay_reserved[3]; uint8_t abm_aux_backlight_support; + uint8_t lsdma_support_in_dmu; }; struct dmub_visual_confirm_color {