drm/nouveau/disp/gf119-: decode exception reason to human-readable string
We also change the error strings to match NVIDIA's naming. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
eb972d1474
commit
a8ce8b65e1
@ -91,15 +91,21 @@ gf119_disp_intr_error(struct nv50_disp *disp, int chid)
|
||||
{
|
||||
struct nvkm_subdev *subdev = &disp->base.engine.subdev;
|
||||
struct nvkm_device *device = subdev->device;
|
||||
u32 mthd = nvkm_rd32(device, 0x6101f0 + (chid * 12));
|
||||
u32 stat = nvkm_rd32(device, 0x6101f0 + (chid * 12));
|
||||
u32 type = (stat & 0x00007000) >> 12;
|
||||
u32 mthd = (stat & 0x00000ffc);
|
||||
u32 data = nvkm_rd32(device, 0x6101f4 + (chid * 12));
|
||||
u32 unkn = nvkm_rd32(device, 0x6101f8 + (chid * 12));
|
||||
u32 code = nvkm_rd32(device, 0x6101f8 + (chid * 12));
|
||||
const struct nvkm_enum *reason =
|
||||
nvkm_enum_find(nv50_disp_intr_error_type, type);
|
||||
|
||||
nvkm_error(subdev, "chid %d mthd %04x data %08x %08x %08x\n",
|
||||
chid, (mthd & 0x0000ffc), data, mthd, unkn);
|
||||
nvkm_error(subdev, "chid %d stat %08x reason %d [%s] mthd %04x "
|
||||
"data %08x code %08x\n",
|
||||
chid, stat, type, reason ? reason->name : "",
|
||||
mthd, data, code);
|
||||
|
||||
if (chid < ARRAY_SIZE(disp->chan)) {
|
||||
switch (mthd & 0xffc) {
|
||||
switch (mthd) {
|
||||
case 0x0080:
|
||||
nv50_disp_chan_mthd(disp->chan[chid], NV_DBG_ERROR);
|
||||
break;
|
||||
|
@ -103,10 +103,13 @@ gv100_disp_exception(struct nv50_disp *disp, int chid)
|
||||
u32 mthd = (stat & 0x00000fff) << 2;
|
||||
u32 data = nvkm_rd32(device, 0x611024 + (chid * 12));
|
||||
u32 code = nvkm_rd32(device, 0x611028 + (chid * 12));
|
||||
const struct nvkm_enum *reason =
|
||||
nvkm_enum_find(nv50_disp_intr_error_type, type);
|
||||
|
||||
nvkm_error(subdev, "chid %d %08x [type %d mthd %04x] "
|
||||
nvkm_error(subdev, "chid %d stat %08x reason %d [%s] mthd %04x "
|
||||
"data %08x code %08x\n",
|
||||
chid, stat, type, mthd, data, code);
|
||||
chid, stat, type, reason ? reason->name : "",
|
||||
mthd, data, code);
|
||||
|
||||
if (chid < ARRAY_SIZE(disp->chan) && disp->chan[chid]) {
|
||||
switch (mthd) {
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "rootnv50.h"
|
||||
|
||||
#include <core/client.h>
|
||||
#include <core/enum.h>
|
||||
#include <core/ramht.h>
|
||||
#include <subdev/bios.h>
|
||||
#include <subdev/bios/disp.h>
|
||||
@ -593,12 +592,15 @@ nv50_disp_super(struct work_struct *work)
|
||||
nvkm_wr32(device, 0x610030, 0x80000000);
|
||||
}
|
||||
|
||||
static const struct nvkm_enum
|
||||
const struct nvkm_enum
|
||||
nv50_disp_intr_error_type[] = {
|
||||
{ 3, "ILLEGAL_MTHD" },
|
||||
{ 4, "INVALID_VALUE" },
|
||||
{ 0, "NONE" },
|
||||
{ 1, "PUSHBUFFER_ERR" },
|
||||
{ 2, "TRAP" },
|
||||
{ 3, "RESERVED_METHOD" },
|
||||
{ 4, "INVALID_ARG" },
|
||||
{ 5, "INVALID_STATE" },
|
||||
{ 7, "INVALID_HANDLE" },
|
||||
{ 7, "UNRESOLVABLE_HANDLE" },
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include "priv.h"
|
||||
struct nvkm_head;
|
||||
|
||||
#include <core/enum.h>
|
||||
|
||||
struct nv50_disp {
|
||||
const struct nv50_disp_func *func;
|
||||
struct nvkm_disp base;
|
||||
@ -71,6 +73,7 @@ int nv50_disp_init(struct nv50_disp *);
|
||||
void nv50_disp_fini(struct nv50_disp *);
|
||||
void nv50_disp_intr(struct nv50_disp *);
|
||||
void nv50_disp_super(struct work_struct *);
|
||||
extern const struct nvkm_enum nv50_disp_intr_error_type[];
|
||||
|
||||
int gf119_disp_init(struct nv50_disp *);
|
||||
void gf119_disp_fini(struct nv50_disp *);
|
||||
|
Loading…
x
Reference in New Issue
Block a user