]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/display: add dmcub support check
authorFudongwang <fudong.wang@amd.com>
Mon, 1 Jul 2024 08:47:28 +0000 (16:47 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 23 Jul 2024 21:07:12 +0000 (17:07 -0400)
[Why & How]
For DCN harvest case, if there is no dmcub support, we should return false
to avoid bugcheck later.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Fudongwang <fudong.wang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 9897e322e2d5565c6f745c5ad6bdb22a8b79851b..f07b13ad4eadee2ae862bd79d12fd960b55f9172 100644 (file)
@@ -5574,6 +5574,9 @@ void dc_mclk_switch_using_fw_based_vblank_stretch_shut_down(struct dc *dc)
  */
 bool dc_is_dmub_outbox_supported(struct dc *dc)
 {
+       if (!dc->caps.dmcub_support)
+               return false;
+
        switch (dc->ctx->asic_id.chip_family) {
 
        case FAMILY_YELLOW_CARP: