Skip to content

Commit

Permalink
dcp: Pass the die number for dptx' connectTo method
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jannau authored and marcan committed Nov 27, 2023
1 parent ba69847 commit 5245fc6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/dcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/dcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/dcp/dptx_port_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/dcp/dptx_port_ep.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5245fc6

Please sign in to comment.