drm/nve0/fifo: single printk for sched error data
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
885f3ced1a
commit
0a7760e0b3
1 changed files with 10 additions and 4 deletions
|
@ -404,7 +404,8 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct nouveau_enum nve0_fifo_sched_reason[] = {
|
static const struct nouveau_enum
|
||||||
|
nve0_fifo_sched_reason[] = {
|
||||||
{ 0x0a, "CTXSW_TIMEOUT" },
|
{ 0x0a, "CTXSW_TIMEOUT" },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
@ -414,9 +415,14 @@ nve0_fifo_intr_sched(struct nve0_fifo_priv *priv)
|
||||||
{
|
{
|
||||||
u32 intr = nv_rd32(priv, 0x00254c);
|
u32 intr = nv_rd32(priv, 0x00254c);
|
||||||
u32 code = intr & 0x000000ff;
|
u32 code = intr & 0x000000ff;
|
||||||
nv_error(priv, "SCHED_ERROR [");
|
const struct nouveau_enum *en;
|
||||||
nouveau_enum_print(nve0_fifo_sched_reason, code);
|
char enunk[6] = "";
|
||||||
pr_cont("]\n");
|
|
||||||
|
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
|
static void
|
||||||
|
|
Loading…
Add table
Reference in a new issue