From 9e3911e5b244c01886f25ce1cb453dd9c5334853 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 20 Aug 2015 14:54:13 +1000 Subject: [PATCH] drm/nouveau/sec: switch to subdev printk macros Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/include/nvkm/core/enum.h | 1 - drivers/gpu/drm/nouveau/nvkm/core/enum.c | 11 ----------- drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c | 14 ++++++++------ 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/enum.h b/drivers/gpu/drm/nouveau/include/nvkm/core/enum.h index a5d4c65bbbc2..40429a82f792 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/enum.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/enum.h @@ -10,7 +10,6 @@ struct nvkm_enum { }; const struct nvkm_enum *nvkm_enum_find(const struct nvkm_enum *, u32 value); -const struct nvkm_enum *nvkm_enum_print(const struct nvkm_enum *, u32 value); struct nvkm_bitfield { u32 mask; diff --git a/drivers/gpu/drm/nouveau/nvkm/core/enum.c b/drivers/gpu/drm/nouveau/nvkm/core/enum.c index 64bdbd04a73a..b9581feb24cc 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/enum.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/enum.c @@ -38,17 +38,6 @@ nvkm_enum_find(const struct nvkm_enum *en, u32 value) return NULL; } -const struct nvkm_enum * -nvkm_enum_print(const struct nvkm_enum *en, u32 value) -{ - en = nvkm_enum_find(en, value); - if (en) - pr_cont("%s", en->name); - else - pr_cont("(unknown enum 0x%08x)", value); - return en; -} - void nvkm_snprintbf(char *data, int size, const struct nvkm_bitfield *bf, u32 value) { diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c b/drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c index a1096f0e4081..b60719092154 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c @@ -84,23 +84,25 @@ g98_sec_intr(struct nvkm_subdev *subdev) u32 mthd = (addr & 0x07ff) << 2; u32 subc = (addr & 0x3800) >> 11; u32 data = nvkm_rd32(device, 0x087044); + const struct nvkm_enum *en; int chid; engctx = nvkm_engctx_get(engine, inst); chid = fifo->chid(fifo, engctx); if (stat & 0x00000040) { - nv_error(sec, "DISPATCH_ERROR ["); - nvkm_enum_print(g98_sec_isr_error_name, ssta); - pr_cont("] ch %d [0x%010llx %s] subc %d mthd 0x%04x data 0x%08x\n", - chid, (u64)inst << 12, nvkm_client_name(engctx), - subc, mthd, data); + en = nvkm_enum_find(g98_sec_isr_error_name, ssta); + nvkm_error(subdev, "DISPATCH_ERROR %04x [%s] " + "ch %d [%010llx %s] subc %d " + "mthd %04x data %08x\n", ssta, + en ? en->name : "", chid, (u64)inst << 12, + nvkm_client_name(engctx), subc, mthd, data); nvkm_wr32(device, 0x087004, 0x00000040); stat &= ~0x00000040; } if (stat) { - nv_error(sec, "unhandled intr 0x%08x\n", stat); + nvkm_error(subdev, "intr %08x\n", stat); nvkm_wr32(device, 0x087004, stat); }