Skip to contentSkip to conversation

drm/amd/display: check if dml21_add_phantom_plane() is successful

PATCH New Alex Deucher 1 participant 3 messages Apr 13

Subsystems (4)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amd/display: check if dml21_add_phantom_plane() is successful

Verify that the phantom plane was allocated to avoid a later segfault.

Fixes 70839da63605 ("drm/amd/display: Add new DCN401 sources")
---
 .../drm/amd/display/dc/dml2_0/dml21/dml21_utils.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_utils.c +7 -8
index 4724b08c77e1c..d52c3a064b160 100644
@@ -357,14 +357,13 @@ void dml21_handle_phantom_streams_planes(const struct dc *dc, struct dc_state *c
 					main_plane = main_stream_status->plane_states[dc_plane_index];
 
 					/* create phantom planes for subvp enabled plane */
-					dml21_add_phantom_plane(dml_ctx,
-							dc,
-							context,
-							phantom_stream,
-							main_plane,
-							&dml_ctx->v21.mode_programming.programming->plane_programming[dml_plane_index]);
-
-					phantoms_added = true;
+					if (dml21_add_phantom_plane(dml_ctx,
+								    dc,
+								    context,
+								    phantom_stream,
+								    main_plane,
+								    &dml_ctx->v21.mode_programming.programming->plane_programming[dml_plane_index]))
+						phantoms_added = true;
 				}
 			}
 		}
Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH 1/1 drm/amdgpu/sdma7.1: add support for disable_kq

Plumb in support for disabling kernel queues and make it the default. For testing, kernel queues can be re-enabled by setting amdgpu.user_queue=0. Kernel queues are still created for use by the kernel driver for memory management, etc., just not user submissions.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c +12 -0
index f20e0fc3fc743..061934a2e93a3 100644
@@ -1268,6 +1268,18 @@ static int sdma_v7_1_early_init(struct amdgpu_ip_block *ip_block)
 	struct amdgpu_device *adev = ip_block->adev;
 	int r;
 
+	switch (amdgpu_user_queue) {
+	case -1:
+	default:
+		adev->sdma.no_user_submission = true;
+		adev->sdma.disable_uq = true;
+		break;
+	case 0:
+		adev->sdma.no_user_submission = false;
+		adev->sdma.disable_uq = true;
+		break;
+	}
+
 	r = amdgpu_sdma_init_microcode(adev, 0, true);
 	if (r) {
 		DRM_ERROR("Failed to init sdma firmware!\n");
Signature · 1 line
2.53.0
author maintainer
#2 lore raw

PATCH 1/1 drm/amdgpu: enable gpu recovery on SI dGPUs

In reply to Alex Deucher

Uses PCI config reset.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -7
index c7b8fbbfba366..7364e8760d093 100644
@@ -4972,13 +4972,6 @@ bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev)
 
 	if (amdgpu_gpu_recovery == -1) {
 		switch (adev->asic_type) {
-#ifdef CONFIG_DRM_AMDGPU_SI
-		case CHIP_VERDE:
-		case CHIP_TAHITI:
-		case CHIP_PITCAIRN:
-		case CHIP_OLAND:
-		case CHIP_HAINAN:
-#endif
 #ifdef CONFIG_DRM_AMDGPU_CIK
 		case CHIP_KAVERI:
 		case CHIP_KABINI:
Signature · 1 line
2.53.0