diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-02-23 23:20:46 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-03-26 14:00:51 +1000 |
commit | 0a7760e0b3bd7fe879fb6f633e2379f4774fe93f (patch) | |
tree | 122adc85634ae6fc716da8a5166b2c0fb333bf9f | |
parent | 885f3ced1a48385110c726af80a85cd5d2898279 (diff) |
drm/nve0/fifo: single printk for sched error data
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c index 9c8ff65e14a..186523cd6e6 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c @@ -404,7 +404,8 @@ out: return ret; } -static const struct nouveau_enum nve0_fifo_sched_reason[] = { +static const struct nouveau_enum +nve0_fifo_sched_reason[] = { { 0x0a, "CTXSW_TIMEOUT" }, {} }; @@ -414,9 +415,14 @@ nve0_fifo_intr_sched(struct nve0_fifo_priv *priv) { u32 intr = nv_rd32(priv, 0x00254c); u32 code = intr & 0x000000ff; - nv_error(priv, "SCHED_ERROR ["); - nouveau_enum_print(nve0_fifo_sched_reason, code); - pr_cont("]\n"); + const struct nouveau_enum *en; + char enunk[6] = ""; + + en = nouveau_enum_find(nve0_fifo_sched_reason, code); + if (!en) + snprintf(enunk, sizeof(enunk), "UNK%02x", code); + + nv_error(priv, "SCHED_ERROR [ %s ]\n", en ? en->name : enunk); } static void |