radeonsi: add support for FIJI (v4)
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Jul 2015 19:40:46 +0000 (15:40 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 14 Aug 2015 13:02:29 +0000 (15:02 +0200)
v2: incorporate comments from Marek
v3: add missing fiji case in winsys init
    use tonga raster config (double check this)
v4: rebase on harvest patch

Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v3)
Reviewed-by: Christian König <christian.koenig@amd.com> (v3)
Reviewed-by: David Zhang <david1.zhang@amd.com> (v3)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/radeon_winsys.h
src/gallium/drivers/radeonsi/si_state.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c

index a08e841f11f7d7e41c28155e5713692698ec3cf0..ed5d1dabdc380cc61f53a3f6472d05bf618b7945 100644 (file)
@@ -411,6 +411,7 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen)
        case CHIP_TONGA: return "AMD TONGA";
        case CHIP_ICELAND: return "AMD ICELAND";
        case CHIP_CARRIZO: return "AMD CARRIZO";
+       case CHIP_FIJI: return "AMD FIJI";
        default: return "AMD unknown";
        }
 }
@@ -538,6 +539,7 @@ const char *r600_get_llvm_processor_name(enum radeon_family family)
        case CHIP_TONGA: return "tonga";
        case CHIP_ICELAND: return "iceland";
        case CHIP_CARRIZO: return "carrizo";
+       case CHIP_FIJI: return "fiji";
        default: return "";
        }
 }
index 616816ebcea276b9a7922b2663687095a058026a..d7424eef27eed35dd6bea295457368e301cc5b6e 100644 (file)
@@ -136,6 +136,7 @@ enum radeon_family {
     CHIP_TONGA,
     CHIP_ICELAND,
     CHIP_CARRIZO,
+    CHIP_FIJI,
     CHIP_LAST,
 };
 
index 34ef9e49d5c512e5e29ede6d14f3fd0cb308b134..21689e71b8b38c9b49613b0cc65b20383dfc0baa 100644 (file)
@@ -3226,6 +3226,11 @@ static void si_init_config(struct si_context *sctx)
                raster_config = 0x3a00161a;
                raster_config_1 = 0x0000002e;
                break;
+       case CHIP_FIJI:
+               /* Fiji should be same as Hawaii, but that causes corruption in some cases */
+               raster_config = 0x16000012; /* 0x3a00161a */
+               raster_config_1 = 0x0000002a; /* 0x0000002e */
+               break;
        case CHIP_TONGA:
                raster_config = 0x16000012;
                raster_config_1 = 0x0000002a;
index 9020b1cefc73a68ae71e274675233da90e2e7c9c..f57f45b618f33e2ad9b24c0f45d499f98a0f6366 100644 (file)
@@ -227,6 +227,10 @@ static boolean do_winsys_init(struct amdgpu_winsys *ws)
       ws->family = FAMILY_CZ;
       ws->rev_id = CZ_CARRIZO_A0;
       break;
+   case CHIP_FIJI:
+      ws->family = FAMILY_VI;
+      ws->rev_id = VI_FIJI_P_A0;
+      break;
    default:
       fprintf(stderr, "amdgpu: Unknown family.\n");
       goto fail;