aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-12-29 20:48:03 -0500
committerBen Skeggs <bskeggs@redhat.com>2010-12-29 20:48:03 -0500
commit6effe39364f1212aa57e1b5f0bd0f388ebfe9b24 (patch)
tree942012d65fe6af084f473373a10db28424a49be8
parenteae5e7f304222ee795936e9466110a9d5d5ec558 (diff)
drm/nv50: sync up gr data error names with rnn, use for nvc0 also
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.h1
-rw-r--r--drivers/gpu/drm/nouveau/nv50_graph.c49
-rw-r--r--drivers/gpu/drm/nouveau/nvc0_graph.c7
3 files changed, 44 insertions, 13 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index e8157568735..6d749b79208 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -1189,6 +1189,7 @@ extern int nv50_graph_unload_context(struct drm_device *);
1189extern int nv50_grctx_init(struct nouveau_grctx *); 1189extern int nv50_grctx_init(struct nouveau_grctx *);
1190extern void nv50_graph_tlb_flush(struct drm_device *dev); 1190extern void nv50_graph_tlb_flush(struct drm_device *dev);
1191extern void nv86_graph_tlb_flush(struct drm_device *dev); 1191extern void nv86_graph_tlb_flush(struct drm_device *dev);
1192extern struct nouveau_enum nv50_data_error_names[];
1192 1193
1193/* nvc0_graph.c */ 1194/* nvc0_graph.c */
1194extern int nvc0_graph_init(struct drm_device *); 1195extern int nvc0_graph_init(struct drm_device *);
diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c
index c510e74acf4..2d7ea75a09d 100644
--- a/drivers/gpu/drm/nouveau/nv50_graph.c
+++ b/drivers/gpu/drm/nouveau/nv50_graph.c
@@ -554,13 +554,48 @@ static struct nouveau_bitfield nv50_graph_trap_ccache[] = {
554}; 554};
555 555
556/* There must be a *lot* of these. Will take some time to gather them up. */ 556/* There must be a *lot* of these. Will take some time to gather them up. */
557static struct nouveau_enum nv50_data_error_names[] = { 557struct nouveau_enum nv50_data_error_names[] = {
558 { 4, "INVALID_VALUE" }, 558 { 0x00000003, "INVALID_QUERY_OR_TEXTURE" },
559 { 5, "INVALID_ENUM" }, 559 { 0x00000004, "INVALID_VALUE" },
560 { 8, "INVALID_OBJECT" }, 560 { 0x00000005, "INVALID_ENUM" },
561 { 0xc, "INVALID_BITFIELD" }, 561 { 0x00000008, "INVALID_OBJECT" },
562 { 0x28, "MP_NO_REG_SPACE" }, 562 { 0x00000009, "READ_ONLY_OBJECT" },
563 { 0x2b, "MP_BLOCK_SIZE_MISMATCH" }, 563 { 0x0000000a, "SUPERVISOR_OBJECT" },
564 { 0x0000000b, "INVALID_ADDRESS_ALIGNMENT" },
565 { 0x0000000c, "INVALID_BITFIELD" },
566 { 0x0000000d, "BEGIN_END_ACTIVE" },
567 { 0x0000000e, "SEMANTIC_COLOR_BACK_OVER_LIMIT" },
568 { 0x0000000f, "VIEWPORT_ID_NEEDS_GP" },
569 { 0x00000010, "RT_DOUBLE_BIND" },
570 { 0x00000011, "RT_TYPES_MISMATCH" },
571 { 0x00000012, "RT_LINEAR_WITH_ZETA" },
572 { 0x00000015, "FP_TOO_FEW_REGS" },
573 { 0x00000016, "ZETA_FORMAT_CSAA_MISMATCH" },
574 { 0x00000017, "RT_LINEAR_WITH_MSAA" },
575 { 0x00000018, "FP_INTERPOLANT_START_OVER_LIMIT" },
576 { 0x00000019, "SEMANTIC_LAYER_OVER_LIMIT" },
577 { 0x0000001a, "RT_INVALID_ALIGNMENT" },
578 { 0x0000001b, "SAMPLER_OVER_LIMIT" },
579 { 0x0000001c, "TEXTURE_OVER_LIMIT" },
580 { 0x0000001e, "GP_TOO_MANY_OUTPUTS" },
581 { 0x0000001f, "RT_BPP128_WITH_MS8" },
582 { 0x00000021, "Z_OUT_OF_BOUNDS" },
583 { 0x00000023, "XY_OUT_OF_BOUNDS" },
584 { 0x00000027, "CP_MORE_PARAMS_THAN_SHARED" },
585 { 0x00000028, "CP_NO_REG_SPACE_STRIPED" },
586 { 0x00000029, "CP_NO_REG_SPACE_PACKED" },
587 { 0x0000002a, "CP_NOT_ENOUGH_WARPS" },
588 { 0x0000002b, "CP_BLOCK_SIZE_MISMATCH" },
589 { 0x0000002c, "CP_NOT_ENOUGH_LOCAL_WARPS" },
590 { 0x0000002d, "CP_NOT_ENOUGH_STACK_WARPS" },
591 { 0x0000002e, "CP_NO_BLOCKDIM_LATCH" },
592 { 0x00000031, "ENG2D_FORMAT_MISMATCH" },
593 { 0x0000003f, "PRIMITIVE_ID_NEEDS_GP" },
594 { 0x00000044, "SEMANTIC_VIEWPORT_OVER_LIMIT" },
595 { 0x00000045, "SEMANTIC_COLOR_FRONT_OVER_LIMIT" },
596 { 0x00000046, "LAYER_ID_NEEDS_GP" },
597 { 0x00000047, "SEMANTIC_CLIP_OVER_LIMIT" },
598 { 0x00000048, "SEMANTIC_PTSZ_OVER_LIMIT" },
564 {} 599 {}
565}; 600};
566 601
diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.c b/drivers/gpu/drm/nouveau/nvc0_graph.c
index 8352d6b92cc..43b44a4b3ab 100644
--- a/drivers/gpu/drm/nouveau/nvc0_graph.c
+++ b/drivers/gpu/drm/nouveau/nvc0_graph.c
@@ -693,11 +693,6 @@ nvc0_graph_init(struct drm_device *dev)
693 return 0; 693 return 0;
694} 694}
695 695
696static struct nouveau_enum nvc0_graph_data_error[] = {
697 { 5, "INVALID_ENUM" },
698 {}
699};
700
701static int 696static int
702nvc0_graph_isr_chid(struct drm_device *dev, u64 inst) 697nvc0_graph_isr_chid(struct drm_device *dev, u64 inst)
703{ 698{
@@ -750,7 +745,7 @@ nvc0_graph_isr(struct drm_device *dev)
750 745
751 if (stat & 0x00100000) { 746 if (stat & 0x00100000) {
752 NV_INFO(dev, "PGRAPH: DATA_ERROR ["); 747 NV_INFO(dev, "PGRAPH: DATA_ERROR [");
753 nouveau_enum_print(nvc0_graph_data_error, code); 748 nouveau_enum_print(nv50_data_error_names, code);
754 printk("] ch %d [0x%010llx] subc %d class 0x%04x " 749 printk("] ch %d [0x%010llx] subc %d class 0x%04x "
755 "mthd 0x%04x data 0x%08x\n", 750 "mthd 0x%04x data 0x%08x\n",
756 chid, inst, subc, class, mthd, data); 751 chid, inst, subc, class, mthd, data);