Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/omap: DMM: In case of error/timeout in wait_status() print the reason

If the wait_status() fails either because of an error reported in the
STATUS register or because of a timeout waiting for the wait_mask, print
information which might help diagnose the reason.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Peter Ujfalusi and committed by
Tomi Valkeinen
d312fe2e b3d5a8d7

+10 -2
+10 -2
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
··· 121 121 while (true) { 122 122 r = dmm_read(dmm, reg[PAT_STATUS][engine->id]); 123 123 err = r & DMM_PATSTATUS_ERR; 124 - if (err) 124 + if (err) { 125 + dev_err(dmm->dev, 126 + "%s: error (engine%d). PAT_STATUS: 0x%08x\n", 127 + __func__, engine->id, r); 125 128 return -EFAULT; 129 + } 126 130 127 131 if ((r & wait_mask) == wait_mask) 128 132 break; 129 133 130 - if (--i == 0) 134 + if (--i == 0) { 135 + dev_err(dmm->dev, 136 + "%s: timeout (engine%d). PAT_STATUS: 0x%08x\n", 137 + __func__, engine->id, r); 131 138 return -ETIMEDOUT; 139 + } 132 140 133 141 udelay(1); 134 142 }