Skip to content

Commit 69ee5c1

Browse files
jannaumarcan
authored andcommitted
drm: apple: dptx: Adapt dptxport_connect() to observed behavior
Adapt to behavior seen on j474s with dcp0 driving lpdptx-phy and dp2hdmi using the macOS 13.5 firmware. Signed-off-by: Janne Grunau <[email protected]>
1 parent 0b1437b commit 69ee5c1

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/gpu/drm/apple/dptxep.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ int dptxport_connect(struct apple_epic_service *service, u8 core, u8 atc,
8989
{
9090
struct dptx_port *dptx = service->cookie;
9191
struct dcpdptx_connection_cmd cmd, resp;
92+
u32 unk_field = 0x0; // seen as 0x100 under some conditions
9293
int ret;
9394
u32 target = FIELD_PREP(DCPDPTX_REMOTE_PORT_CORE, core) |
9495
FIELD_PREP(DCPDPTX_REMOTE_PORT_ATC, atc) |
@@ -98,16 +99,17 @@ int dptxport_connect(struct apple_epic_service *service, u8 core, u8 atc,
9899
trace_dptxport_connect(dptx, core, atc, die);
99100

100101
cmd.target = cpu_to_le32(target);
101-
cmd.unk = cpu_to_le32(0x100);
102+
cmd.unk = cpu_to_le32(unk_field);
102103
ret = afk_service_call(service, 0, 11, &cmd, sizeof(cmd), 24, &resp,
103104
sizeof(resp), 24);
104105
if (ret)
105106
return ret;
106107

107108
if (le32_to_cpu(resp.target) != target)
108109
return -EINVAL;
109-
if (le32_to_cpu(resp.unk) != 0x100)
110-
return -EINVAL;
110+
if (le32_to_cpu(resp.unk) != unk_field)
111+
dev_notice(service->ep->dcp->dev, "unexpected unk field in reply: 0x%x (0x%x)\n",
112+
le32_to_cpu(resp.unk), unk_field);
111113

112114
return 0;
113115
}

0 commit comments

Comments
 (0)