radv: add support for Raven2
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 30 Oct 2018 10:52:37 +0000 (11:52 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 1 Nov 2018 07:48:52 +0000 (08:48 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/si_cmd_buffer.c

index 508fbb27721897306f17431f321435856826f909..6367c732dbb3b424bebf33ca49b11e1780186249 100644 (file)
@@ -113,6 +113,7 @@ radv_get_device_name(enum radeon_family family, char *name, size_t name_len)
        case CHIP_VEGA10: chip_string = "AMD RADV VEGA10"; break;
        case CHIP_VEGA12: chip_string = "AMD RADV VEGA12"; break;
        case CHIP_RAVEN: chip_string = "AMD RADV RAVEN"; break;
+       case CHIP_RAVEN2: chip_string = "AMD RADV RAVEN2"; break;
        default: chip_string = "AMD RADV unknown"; break;
        }
 
@@ -336,7 +337,8 @@ radv_physical_device_init(struct radv_physical_device *device,
                device->has_rbplus = true;
                device->rbplus_allowed = device->rad_info.family == CHIP_STONEY ||
                                         device->rad_info.family == CHIP_VEGA12 ||
-                                        device->rad_info.family == CHIP_RAVEN;
+                                        device->rad_info.family == CHIP_RAVEN ||
+                                        device->rad_info.family == CHIP_RAVEN2;
        }
 
        /* The mere presence of CLEAR_STATE in the IB causes random GPU hangs
@@ -1635,11 +1637,13 @@ VkResult radv_CreateDevice(
 
        device->pbb_allowed = device->physical_device->rad_info.chip_class >= GFX9 &&
                        ((device->instance->perftest_flags & RADV_PERFTEST_BINNING) ||
-                        device->physical_device->rad_info.family == CHIP_RAVEN);
+                        device->physical_device->rad_info.family == CHIP_RAVEN ||
+                        device->physical_device->rad_info.family == CHIP_RAVEN2);
 
        /* Disabled and not implemented for now. */
        device->dfsm_allowed = device->pbb_allowed &&
-                              device->physical_device->rad_info.family == CHIP_RAVEN;
+                              (device->physical_device->rad_info.family == CHIP_RAVEN ||
+                               device->physical_device->rad_info.family == CHIP_RAVEN2);
 
 #ifdef ANDROID
        device->always_use_syncobj = device->physical_device->rad_info.has_syncobj_wait_for_submit;
index 4babb24a8eb1f0c33bf7ebbf93e46416c55ed0bb..304597216924d84af3329dbb9b441abcc3ca6372 100644 (file)
@@ -2544,6 +2544,7 @@ radv_pipeline_generate_binning_state(struct radeon_cmdbuf *cs,
                fpovs_per_batch = 63;
                break;
        case CHIP_RAVEN:
+       case CHIP_RAVEN2:
                context_states_per_bin = 6;
                persistent_states_per_bin = 32;
                fpovs_per_batch = 63;
index 214bcead68ca25d32bb0d06d5d436150efa3b231..9b5ebb29d612a859740a4d865a5626dccc4a7b7f 100644 (file)
@@ -337,6 +337,7 @@ si_emit_graphics(struct radv_physical_device *physical_device,
                        pc_lines = 4096;
                        break;
                case CHIP_RAVEN:
+               case CHIP_RAVEN2:
                        pc_lines = 1024;
                        break;
                default: