drm/radeon/kms: add support for cayman irqs
authorAlex Deucher <alexdeucher@gmail.com>
Thu, 3 Mar 2011 01:07:32 +0000 (20:07 -0500)
committerDave Airlie <airlied@redhat.com>
Thu, 3 Mar 2011 01:51:17 +0000 (11:51 +1000)
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r600.c

index be780a6b9b1d58a37efca91bead77f4fb510ba78..1cd56dc8c8abdf087019f97af1a4042068ffd2d6 100644 (file)
@@ -47,6 +47,7 @@
 #define EVERGREEN_PFP_UCODE_SIZE 1120
 #define EVERGREEN_PM4_UCODE_SIZE 1376
 #define EVERGREEN_RLC_UCODE_SIZE 768
+#define CAYMAN_RLC_UCODE_SIZE 1024
 
 /* Firmware Names */
 MODULE_FIRMWARE("radeon/R600_pfp.bin");
@@ -2809,13 +2810,20 @@ static int r600_rlc_init(struct radeon_device *rdev)
        WREG32(RLC_HB_CNTL, 0);
        WREG32(RLC_HB_RPTR, 0);
        WREG32(RLC_HB_WPTR, 0);
-       WREG32(RLC_HB_WPTR_LSB_ADDR, 0);
-       WREG32(RLC_HB_WPTR_MSB_ADDR, 0);
+       if (rdev->family <= CHIP_CAICOS) {
+               WREG32(RLC_HB_WPTR_LSB_ADDR, 0);
+               WREG32(RLC_HB_WPTR_MSB_ADDR, 0);
+       }
        WREG32(RLC_MC_CNTL, 0);
        WREG32(RLC_UCODE_CNTL, 0);
 
        fw_data = (const __be32 *)rdev->rlc_fw->data;
-       if (rdev->family >= CHIP_CEDAR) {
+       if (rdev->family >= CHIP_CAYMAN) {
+               for (i = 0; i < CAYMAN_RLC_UCODE_SIZE; i++) {
+                       WREG32(RLC_UCODE_ADDR, i);
+                       WREG32(RLC_UCODE_DATA, be32_to_cpup(fw_data++));
+               }
+       } else if (rdev->family >= CHIP_CEDAR) {
                for (i = 0; i < EVERGREEN_RLC_UCODE_SIZE; i++) {
                        WREG32(RLC_UCODE_ADDR, i);
                        WREG32(RLC_UCODE_DATA, be32_to_cpup(fw_data++));