Skip to content

Commit 7fce142

Browse files
committed
drm: apple: Reduce log spam about busy command channel
The most likely cause for this is an unexpected callback form which the current driver doesn't recover. Warn only once about it. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent cf4fa2f commit 7fce142

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

drivers/gpu/drm/apple/dcp-internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ struct dcp_channel {
7171

7272
/* Current depth of the call stack. Less than DCP_MAX_CALL_DEPTH */
7373
u8 depth;
74+
/* Already warned about busy channel */
75+
bool warned_busy;
7476
};
7577

7678
struct dcp_fb_reference {

drivers/gpu/drm/apple/iomfb.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,17 @@ void dcp_flush(struct drm_crtc *crtc, struct drm_atomic_state *state)
482482

483483
if (dcp_channel_busy(&dcp->ch_cmd))
484484
{
485-
dev_err(dcp->dev, "unexpected busy command channel\n");
485+
if (!dcp->ch_cmd.warned_busy) {
486+
dev_err(dcp->dev, "unexpected busy command channel\n");
487+
dcp->ch_cmd.warned_busy = true;
488+
}
486489
/* HACK: issue a delayed vblank event to avoid timeouts in
487490
* drm_atomic_helper_wait_for_vblanks().
488491
*/
489492
schedule_work(&dcp->vblank_wq);
490493
return;
494+
} else if (dcp->ch_cmd.warned_busy) {
495+
dcp->ch_cmd.warned_busy = false;
491496
}
492497

493498
switch (dcp->fw_compat) {

0 commit comments

Comments
 (0)