Mesa (staging/19.2): Revert "radv: do not emit PKT3_CONTEXT_CONTROL with AMDGPU 3.6.0+"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 15 17:07:12 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: 45ebe99a88da7e8b0dee881c82fce088aed18f4b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=45ebe99a88da7e8b0dee881c82fce088aed18f4b

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Oct 15 14:40:51 2019 +0200

Revert "radv: do not emit PKT3_CONTEXT_CONTROL with AMDGPU 3.6.0+"

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 at lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
(cherry picked from commit 4a3bdc6d229a4c5f550f25c34253d9cba8ce93ef)

---

 src/amd/vulkan/radv_device.c   | 9 +++------
 src/amd/vulkan/si_cmd_buffer.c | 9 +++------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 042e8bde622..5ebd9d54ae5 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -2057,12 +2057,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));
diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
index 32674d38bb9..ff318a29dbe 100644
--- a/src/amd/vulkan/si_cmd_buffer.c
+++ b/src/amd/vulkan/si_cmd_buffer.c
@@ -161,12 +161,9 @@ si_emit_graphics(struct radv_physical_device *physical_device,
 {
 	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 (physical_device->has_clear_state) {
 		radeon_emit(cs, PKT3(PKT3_CLEAR_STATE, 0, 0));




More information about the mesa-commit mailing list