mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 14:36:42 +07:00
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>
This commit is contained in:
parent
b3d5a8d77e
commit
d312fe2ef5
@ -121,14 +121,22 @@ static int wait_status(struct refill_engine *engine, uint32_t wait_mask)
|
||||
while (true) {
|
||||
r = dmm_read(dmm, reg[PAT_STATUS][engine->id]);
|
||||
err = r & DMM_PATSTATUS_ERR;
|
||||
if (err)
|
||||
if (err) {
|
||||
dev_err(dmm->dev,
|
||||
"%s: error (engine%d). PAT_STATUS: 0x%08x\n",
|
||||
__func__, engine->id, r);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if ((r & wait_mask) == wait_mask)
|
||||
break;
|
||||
|
||||
if (--i == 0)
|
||||
if (--i == 0) {
|
||||
dev_err(dmm->dev,
|
||||
"%s: timeout (engine%d). PAT_STATUS: 0x%08x\n",
|
||||
__func__, engine->id, r);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
udelay(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user