Commit 98982458 authored by Wayne Lin's avatar Wayne Lin Committed by Alex Deucher
Browse files

drm/amd/display: Add case for dcn35 to support usb4 dmub hpd event



[Why & how]
Refactor dc_is_dmub_outbox_supported() a bit and add case for dcn35 to
register dmub outbox notification irq to handle usb4 relevant hpd event.

Reviewed-by: default avatarRoman Li <roman.li@amd.com>
Reviewed-by: default avatarJun Lei <jun.lei@amd.com>
Signed-off-by: default avatarWayne Lin <wayne.lin@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3248211d
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
@@ -5095,18 +5095,28 @@ void dc_mclk_switch_using_fw_based_vblank_stretch_shut_down(struct dc *dc)
 */
bool dc_is_dmub_outbox_supported(struct dc *dc)
{
	switch (dc->ctx->asic_id.chip_family) {

	case FAMILY_YELLOW_CARP:
		/* DCN31 B0 USB4 DPIA needs dmub notifications for interrupts */
	if (dc->ctx->asic_id.chip_family == FAMILY_YELLOW_CARP &&
	    dc->ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0 &&
		if (dc->ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0 &&
		    !dc->debug.dpia_debug.bits.disable_dpia)
			return true;
	break;

	if (dc->ctx->asic_id.chip_family == AMDGPU_FAMILY_GC_11_0_1 &&
	    !dc->debug.dpia_debug.bits.disable_dpia)
	case AMDGPU_FAMILY_GC_11_0_1:
	case AMDGPU_FAMILY_GC_11_5_0:
		if (!dc->debug.dpia_debug.bits.disable_dpia)
			return true;
	break;

	default:
		break;
	}

	/* dmub aux needs dmub notifications to be enabled */
	return dc->debug.enable_dmub_aux_for_legacy_ddc;

}

/**