From b4cdfb512871f0cb2efff3489eecc4b7bf5d8c8f Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Tue, 25 Jan 2022 11:40:18 +0800 Subject: [PATCH] mb/amd/majolica: Add variant to disable HDMI For one specific type of APU, it doesn't have HDMI. When we detect this APU, we need to explicitly disable HDMI in DDI settings, otherwise the system would freeze. Please refer src/mainboard/google/guybrush/variants/dewatt/variant.c Change-Id: I8d7637467d2f16377d3c3064cdb0934d1658fdf7 Signed-off-by: Zheng Bao Reviewed-on: https://review.coreboot.org/c/coreboot/+/61361 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/mainboard/amd/majolica/port_descriptors.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mainboard/amd/majolica/port_descriptors.c b/src/mainboard/amd/majolica/port_descriptors.c index 9c771f4742..4cbccf626a 100644 --- a/src/mainboard/amd/majolica/port_descriptors.c +++ b/src/mainboard/amd/majolica/port_descriptors.c @@ -3,6 +3,7 @@ #include #include #include +#include static const fsp_dxio_descriptor majolica_czn_dxio_descriptors[] = { { /* MXM */ @@ -92,7 +93,7 @@ static const fsp_dxio_descriptor majolica_czn_dxio_descriptors[] = { } }; -static const fsp_ddi_descriptor majolica_czn_ddi_descriptors[] = { +static fsp_ddi_descriptor majolica_czn_ddi_descriptors[] = { { /* DDI0 - DP */ .connector_type = DDI_DP, .aux_index = DDI_AUX1, @@ -124,6 +125,9 @@ void mainboard_get_dxio_ddi_descriptors( const fsp_dxio_descriptor **dxio_descs, size_t *dxio_num, const fsp_ddi_descriptor **ddi_descs, size_t *ddi_num) { + if ((get_cpu_count() == 4 && get_threads_per_core() == 2) || get_cpu_count() == 2) + majolica_czn_ddi_descriptors[1].connector_type = DDI_UNUSED_TYPE; + *dxio_descs = majolica_czn_dxio_descriptors; *dxio_num = ARRAY_SIZE(majolica_czn_dxio_descriptors); *ddi_descs = majolica_czn_ddi_descriptors;