From: Fudongwang <[email protected]>

[Why & How]
For DCN harvest case, if there is no dmcub support, we should return false
to avoid bugcheck later.

Reviewed-by: Aric Cyr <[email protected]>
Signed-off-by: Jerry Zuo <[email protected]>
Signed-off-by: Fudongwang <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 9897e322e2d5..f07b13ad4ead 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -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:
-- 
2.34.1

Reply via email to