Commit 13aa38f8 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'amd-drm-fixes-6.4-2023-05-24' of...

Merge tag 'amd-drm-fixes-6.4-2023-05-24' of https://gitlab.freedesktop.org/agd5f/linux

 into drm-fixes

amd-drm-fixes-6.4-2023-05-24:

amdgpu:
- Fix missing BO unlocking in KIQ error path
- Avoid spurious secure display error messages
- SMU13 fix
- Fix an OD regression
- GPU reset display IRQ warning fix
- MST fix

radeon:
- Fix a DP regression

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230524211238.7749-1-alexander.deucher@amd.com
parents 94d39d01 482e6ad9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -6892,8 +6892,10 @@ static int gfx_v10_0_kiq_resume(struct amdgpu_device *adev)
		return r;

	r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
	if (unlikely(r != 0))
	if (unlikely(r != 0)) {
		amdgpu_bo_unreserve(ring->mqd_obj);
		return r;
	}

	gfx_v10_0_kiq_init_queue(ring);
	amdgpu_bo_kunmap(ring->mqd_obj);
+3 −1
Original line number Diff line number Diff line
@@ -3617,8 +3617,10 @@ static int gfx_v9_0_kiq_resume(struct amdgpu_device *adev)
		return r;

	r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
	if (unlikely(r != 0))
	if (unlikely(r != 0)) {
		amdgpu_bo_unreserve(ring->mqd_obj);
		return r;
	}

	gfx_v9_0_kiq_init_queue(ring);
	amdgpu_bo_kunmap(ring->mqd_obj);
+7 −1
Original line number Diff line number Diff line
@@ -57,7 +57,13 @@ static int psp_v10_0_init_microcode(struct psp_context *psp)
	if (err)
		return err;

	return psp_init_ta_microcode(psp, ucode_prefix);
	err = psp_init_ta_microcode(psp, ucode_prefix);
	if ((adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 1, 0)) &&
		(adev->pdev->revision == 0xa1) &&
		(psp->securedisplay_context.context.bin_desc.fw_version >= 0x27000008)) {
		adev->psp.securedisplay_context.context.bin_desc.size_bytes = 0;
	}
	return err;
}

static int psp_v10_0_ring_create(struct psp_context *psp,
+15 −10
Original line number Diff line number Diff line
@@ -2479,20 +2479,25 @@ static void dm_gpureset_toggle_interrupts(struct amdgpu_device *adev,
		if (acrtc && state->stream_status[i].plane_count != 0) {
			irq_source = IRQ_TYPE_PFLIP + acrtc->otg_inst;
			rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
			DRM_DEBUG_VBL("crtc %d - vupdate irq %sabling: r=%d\n",
				      acrtc->crtc_id, enable ? "en" : "dis", rc);
			if (rc)
				DRM_WARN("Failed to %s pflip interrupts\n",
					 enable ? "enable" : "disable");

			if (enable) {
				rc = amdgpu_dm_crtc_enable_vblank(&acrtc->base);
				if (amdgpu_dm_crtc_vrr_active(to_dm_crtc_state(acrtc->base.state)))
					rc = amdgpu_dm_crtc_set_vupdate_irq(&acrtc->base, true);
			} else
				rc = amdgpu_dm_crtc_set_vupdate_irq(&acrtc->base, false);

			if (rc)
					DRM_WARN("Failed to enable vblank interrupts\n");
			} else {
				amdgpu_dm_crtc_disable_vblank(&acrtc->base);
			}
				DRM_WARN("Failed to %sable vupdate interrupt\n", enable ? "en" : "dis");

			irq_source = IRQ_TYPE_VBLANK + acrtc->otg_inst;
			/* During gpu-reset we disable and then enable vblank irq, so
			 * don't use amdgpu_irq_get/put() to avoid refcount change.
			 */
			if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
				DRM_WARN("Failed to %sable vblank interrupt\n", enable ? "en" : "dis");
		}
	}

@@ -2852,7 +2857,7 @@ static int dm_resume(void *handle)
		 * this is the case when traversing through already created
		 * MST connectors, should be skipped
		 */
		if (aconnector->dc_link->type == dc_connection_mst_branch)
		if (aconnector && aconnector->mst_root)
			continue;

		mutex_lock(&aconnector->hpd_lock);
@@ -6737,7 +6742,7 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder,
	int clock, bpp = 0;
	bool is_y420 = false;

	if (!aconnector->mst_output_port || !aconnector->dc_sink)
	if (!aconnector->mst_output_port)
		return 0;

	mst_port = aconnector->mst_output_port;
+3 −13
Original line number Diff line number Diff line
@@ -146,7 +146,6 @@ static void vblank_control_worker(struct work_struct *work)

static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
{
	enum dc_irq_source irq_source;
	struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
	struct amdgpu_device *adev = drm_to_adev(crtc->dev);
	struct dm_crtc_state *acrtc_state = to_dm_crtc_state(crtc->state);
@@ -169,18 +168,9 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
	if (rc)
		return rc;

	if (amdgpu_in_reset(adev)) {
		irq_source = IRQ_TYPE_VBLANK + acrtc->otg_inst;
		/* During gpu-reset we disable and then enable vblank irq, so
		 * don't use amdgpu_irq_get/put() to avoid refcount change.
		 */
		if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
			rc = -EBUSY;
	} else {
	rc = (enable)
		? amdgpu_irq_get(adev, &adev->crtc_irq, acrtc->crtc_id)
		: amdgpu_irq_put(adev, &adev->crtc_irq, acrtc->crtc_id);
	}

	if (rc)
		return rc;
Loading