From 5245fc6a5864643a0aa83bed0cc7da57015e254d Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 25 Nov 2023 20:07:48 +0100 Subject: [PATCH] dcp: Pass the die number for dptx' connectTo method Apperently just informative as display init on M2 Ultra in m1n1 worked as expected despite passing '0' as die number. Signed-off-by: Janne Grunau --- src/dcp.c | 4 +++- src/dcp.h | 1 + src/dcp/dptx_port_ep.c | 4 ++-- src/dcp/dptx_port_ep.h | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/dcp.c b/src/dcp.c index 8cccf4f56..1a931e73a 100644 --- a/src/dcp.c +++ b/src/dcp.c @@ -55,6 +55,8 @@ static int dcp_hdmi_dptx_init(dcp_dev_t *dcp, const display_config_t *cfg) } } + dcp->die = cfg->die; + dcp->phy = dptx_phy_init(cfg->dptx_phy, cfg->dcp_index); if (!dcp->phy) { printf("dcp: failed to init (lp)dptx-phy '%s'\n", cfg->dptx_phy); @@ -93,7 +95,7 @@ static int dcp_hdmi_dptx_init(dcp_dev_t *dcp, const display_config_t *cfg) int dcp_connect_dptx(dcp_dev_t *dcp) { if (dcp->dptx_ep && dcp->phy) { - return dcp_dptx_connect(dcp->dptx_ep, dcp->phy, 0); + return dcp_dptx_connect(dcp->dptx_ep, dcp->phy, dcp->die, 0); } return 0; diff --git a/src/dcp.h b/src/dcp.h index fb323184c..12cd4f7aa 100644 --- a/src/dcp.h +++ b/src/dcp.h @@ -35,6 +35,7 @@ typedef struct dcp_dev { dcp_dpav_if_t *dpav_ep; dcp_dptx_if_t *dptx_ep; dptx_phy_t *phy; + u32 die; u32 dp2hdmi_pwr_gpio; u32 hdmi_pwr_gpio; } dcp_dev_t; diff --git a/src/dcp/dptx_port_ep.c b/src/dcp/dptx_port_ep.c index cfe0deb30..1b52ddb9a 100644 --- a/src/dcp/dptx_port_ep.c +++ b/src/dcp/dptx_port_ep.c @@ -510,7 +510,7 @@ static const afk_epic_service_ops_t dcp_dptx_ops[] = { {}, }; -int dcp_dptx_connect(dcp_dptx_if_t *dptx, dptx_phy_t *phy, u32 port) +int dcp_dptx_connect(dcp_dptx_if_t *dptx, dptx_phy_t *phy, u32 die, u32 port) { if (port > 1) return -1; @@ -521,7 +521,7 @@ int dcp_dptx_connect(dcp_dptx_if_t *dptx, dptx_phy_t *phy, u32 port) dptx->port[port].phy = dptx->phy = phy; - dptxport_connect(dptx->port[port].service, 0, dptx_phy_dcp_output(phy), 0); + dptxport_connect(dptx->port[port].service, 0, dptx_phy_dcp_output(phy), die); dptxport_request_display(dptx->port[port].service); return 0; diff --git a/src/dcp/dptx_port_ep.h b/src/dcp/dptx_port_ep.h index 5a1eff139..2acd57653 100644 --- a/src/dcp/dptx_port_ep.h +++ b/src/dcp/dptx_port_ep.h @@ -55,7 +55,7 @@ enum dptx_link_rate { dcp_dptx_if_t *dcp_dptx_init(dcp_dev_t *dcp, u32 num_dptxports); int dcp_dptx_shutdown(dcp_dptx_if_t *dptx); -int dcp_dptx_connect(dcp_dptx_if_t *dptx, dptx_phy_t *phy, u32 port); +int dcp_dptx_connect(dcp_dptx_if_t *dptx, dptx_phy_t *phy, u32 die, u32 port); int dcp_dptx_hpd(dcp_dptx_if_t *dptx, u32 port, bool hpd); int dcp_dptx_disconnect(dcp_dptx_if_t *dptx, u32 port); int dcp_dptx_hpd(dcp_dptx_if_t *dptx, u32 port, bool hpd);