drm/radeon/kms: add r100/r200 OQ support.
authorDave Airlie <airlied@redhat.com>
Fri, 21 Aug 2009 00:07:54 +0000 (10:07 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 21 Aug 2009 00:07:54 +0000 (10:07 +1000)
This adds the relocation necessary for OQ support on the r100/r200
chipsets.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/radeon_reg.h

index 90ff8e0ac04ee0e300cabf819da91d8513ca0791..68e728e8be4d3cda06ca678a5c363fd95a94eb84 100644 (file)
@@ -1091,6 +1091,16 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
                        tmp |= tile_flags;
                        ib[idx] = tmp;
                        break;
+               case RADEON_RB3D_ZPASS_ADDR:
+                       r = r100_cs_packet_next_reloc(p, &reloc);
+                       if (r) {
+                               DRM_ERROR("No reloc for ib[%d]=0x%04X\n",
+                                         idx, reg);
+                               r100_cs_dump_packet(p, pkt);
+                               return r;
+                       }
+                       ib[idx] = ib_chunk->kdata[idx] + ((u32)reloc->lobj.gpu_offset);
+                       break;
                default:
                        /* FIXME: we don't want to allow anyothers packet */
                        break;
index 5a098f304edbfacc39832cb7a4af155084ed6e6a..5834497b366d61bb981a49663ad5a994095fc0d6 100644 (file)
 #       define RADEON_RE_WIDTH_SHIFT        0
 #       define RADEON_RE_HEIGHT_SHIFT       16
 
+#define RADEON_RB3D_ZPASS_DATA 0x3290
+#define RADEON_RB3D_ZPASS_ADDR 0x3294
+
 #define RADEON_SE_CNTL                      0x1c4c
 #       define RADEON_FFACE_CULL_CW          (0 <<  0)
 #       define RADEON_FFACE_CULL_CCW         (1 <<  0)