Revert "radv: do not emit PKT3_CONTEXT_CONTROL with AMDGPU 3.6.0+"
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 15 Oct 2019 12:40:51 +0000 (14:40 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 15 Oct 2019 13:58:34 +0000 (15:58 +0200)
This reverts commit 2ca8629fa9b303e24783b76a7b3b0c2513e32fbd.

This was initially ported from RadeonSI, but in the meantime it has
been reverted because it might hang. Be conservative and re-introduce
this packet emission.

Unfortunately this doesn't fix anything known.

Cc: 19.2 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c
src/amd/vulkan/si_cmd_buffer.c

index 773cae3da37ea812c765858b918fb62ae5a4d2fb..37df820d9caa141c31fafe56fa0cb511d0768a69 100644 (file)
@@ -2049,12 +2049,9 @@ VkResult radv_CreateDevice(
                device->empty_cs[family] = device->ws->cs_create(device->ws, family);
                switch (family) {
                case RADV_QUEUE_GENERAL:
-                     /* Since amdgpu version 3.6.0, CONTEXT_CONTROL is emitted by the kernel */
-                       if (device->physical_device->rad_info.drm_minor < 6) {
-                               radeon_emit(device->empty_cs[family], PKT3(PKT3_CONTEXT_CONTROL, 1, 0));
-                               radeon_emit(device->empty_cs[family], CONTEXT_CONTROL_LOAD_ENABLE(1));
-                               radeon_emit(device->empty_cs[family], CONTEXT_CONTROL_SHADOW_ENABLE(1));
-                       }
+                       radeon_emit(device->empty_cs[family], PKT3(PKT3_CONTEXT_CONTROL, 1, 0));
+                       radeon_emit(device->empty_cs[family], CONTEXT_CONTROL_LOAD_ENABLE(1));
+                       radeon_emit(device->empty_cs[family], CONTEXT_CONTROL_SHADOW_ENABLE(1));
                        break;
                case RADV_QUEUE_COMPUTE:
                        radeon_emit(device->empty_cs[family], PKT3(PKT3_NOP, 0, 0));
index 3ca66acb36474854d4aeb9f30cc19bcd5cfdeafa..4ba86e31ebc0a1febb4bdae4d7c5b8b56e79f76d 100644 (file)
@@ -162,12 +162,9 @@ si_emit_graphics(struct radv_physical_device *physical_device,
        bool has_clear_state = physical_device->rad_info.has_clear_state;
        int i;
 
-       /* Since amdgpu version 3.6.0, CONTEXT_CONTROL is emitted by the kernel */
-       if (physical_device->rad_info.drm_minor < 6) {
-               radeon_emit(cs, PKT3(PKT3_CONTEXT_CONTROL, 1, 0));
-               radeon_emit(cs, CONTEXT_CONTROL_LOAD_ENABLE(1));
-               radeon_emit(cs, CONTEXT_CONTROL_SHADOW_ENABLE(1));
-       }
+       radeon_emit(cs, PKT3(PKT3_CONTEXT_CONTROL, 1, 0));
+       radeon_emit(cs, CONTEXT_CONTROL_LOAD_ENABLE(1));
+       radeon_emit(cs, CONTEXT_CONTROL_SHADOW_ENABLE(1));
 
        if (has_clear_state) {
                radeon_emit(cs, PKT3(PKT3_CLEAR_STATE, 0, 0));