diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2017-09-29 14:49:47 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-12-19 11:32:00 +0300 |
commit | d312fe2ef581b3cd0971ffa4ed24677b9ea9b4bc (patch) | |
tree | 800321dbae1b79291c7cecd3d7ebc3c9f8026247 /drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | |
parent | b3d5a8d77eb807aba7cdbb71f15d0161b53b399b (diff) | |
download | linux-d312fe2ef581b3cd0971ffa4ed24677b9ea9b4bc.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_dmm_tiler.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index c60a85e82c6d..e3725dc60e2c 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -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); } |