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 <j@jannau.net>
This commit is contained in:
Janne Grunau 2023-11-25 20:07:48 +01:00 committed by Hector Martin
parent ba69847862
commit 5245fc6a58
4 changed files with 7 additions and 4 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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);