Skip to content

Commit 7db5176

Browse files
jannaumarcan
authored andcommitted
drm: apple: iomfb: Extend hotplug/mode parsing logging
Under unknown but slightly broken conditions dcp sends timing modes without linked color modes. Log a warning when this happens and log the number of valid modes before emitting HPD events. Signed-off-by: Janne Grunau <[email protected]>
1 parent a0943d4 commit 7db5176

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/gpu/drm/apple/iomfb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ void dcp_hotplug(struct work_struct *work)
237237
connector = container_of(work, struct apple_connector, hotplug_wq);
238238

239239
dcp = platform_get_drvdata(connector->dcp);
240-
dev_info(dcp->dev, "%s() connected:%d valid_mode:%d\n", __func__,
241-
connector->connected, dcp->valid_mode);
240+
dev_info(dcp->dev, "%s() connected:%d valid_mode:%d nr_modes:%u\n", __func__,
241+
connector->connected, dcp->valid_mode, dcp->nr_modes);
242242

243243
/*
244244
* DCP defers link training until we set a display mode. But we set

drivers/gpu/drm/apple/iomfb_template.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,8 @@ static bool dcpep_process_chunks(struct apple_dcp *dcp,
567567
dcp->nr_modes = 0;
568568
return false;
569569
}
570+
if (dcp->nr_modes == 0)
571+
dev_warn(dcp->dev, "TimingElements without valid modes!\n");
570572
} else if (!strcmp(req->key, "DisplayAttributes")) {
571573
/* DisplayAttributes are empty for integrated displays, use
572574
* display dimensions read from the devicetree

0 commit comments

Comments
 (0)