Skip to content

Commit d962807

Browse files
committed
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 <j@jannau.net>
1 parent cd422b9 commit d962807

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
@@ -238,8 +238,8 @@ void dcp_hotplug(struct work_struct *work)
238238
connector = container_of(work, struct apple_connector, hotplug_wq);
239239

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

244244
/*
245245
* 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)