Commit b30bed9d authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'amd-drm-fixes-6.8-2024-02-08' of...

Merge tag 'amd-drm-fixes-6.8-2024-02-08' of https://gitlab.freedesktop.org/agd5f/linux

 into drm-fixes

amd-drm-fixes-6.8-2024-02-08:

amdgpu:
- Misc NULL/bounds check fixes
- ODM pipe policy fix
- Aborted suspend fixes
- JPEG 4.0.5 fix
- DCN 3.5 fixes
- PSP fix
- DP MST fix
- Phantom pipe fix
- VRAM vendor fix
- Clang fix
- SR-IOV fix

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240208165500.4887-1-alexander.deucher@amd.com
parents 9da93fe4 534c8a5b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1078,6 +1078,8 @@ struct amdgpu_device {
	bool				in_s3;
	bool				in_s4;
	bool				in_s0ix;
	/* indicate amdgpu suspension status */
	bool				suspend_complete;

	enum pp_mp1_state               mp1_state;
	struct amdgpu_doorbell_index doorbell_index;
+2 −0
Original line number Diff line number Diff line
@@ -2476,6 +2476,7 @@ static int amdgpu_pmops_suspend(struct device *dev)
	struct drm_device *drm_dev = dev_get_drvdata(dev);
	struct amdgpu_device *adev = drm_to_adev(drm_dev);

	adev->suspend_complete = false;
	if (amdgpu_acpi_is_s0ix_active(adev))
		adev->in_s0ix = true;
	else if (amdgpu_acpi_is_s3_active(adev))
@@ -2490,6 +2491,7 @@ static int amdgpu_pmops_suspend_noirq(struct device *dev)
	struct drm_device *drm_dev = dev_get_drvdata(dev);
	struct amdgpu_device *adev = drm_to_adev(drm_dev);

	adev->suspend_complete = true;
	if (amdgpu_acpi_should_gpu_reset(adev))
		return amdgpu_asic_reset(adev);

+1 −1
Original line number Diff line number Diff line
@@ -362,7 +362,7 @@ static ssize_t ta_if_invoke_debugfs_write(struct file *fp, const char *buf, size
		}
	}

	if (copy_to_user((char *)buf, context->mem_context.shared_buf, shared_buf_len))
	if (copy_to_user((char *)&buf[copy_pos], context->mem_context.shared_buf, shared_buf_len))
		ret = -EFAULT;

err_free_shared_buf:
+8 −0
Original line number Diff line number Diff line
@@ -3034,6 +3034,14 @@ static int gfx_v9_0_cp_gfx_start(struct amdgpu_device *adev)

	gfx_v9_0_cp_gfx_enable(adev, true);

	/* Now only limit the quirk on the APU gfx9 series and already
	 * confirmed that the APU gfx10/gfx11 needn't such update.
	 */
	if (adev->flags & AMD_IS_APU &&
			adev->in_s3 && !adev->suspend_complete) {
		DRM_INFO(" Will skip the CSB packet resubmit\n");
		return 0;
	}
	r = amdgpu_ring_alloc(ring, gfx_v9_0_get_csb_size(adev) + 4 + 3);
	if (r) {
		DRM_ERROR("amdgpu: cp failed to lock ring (%d).\n", r);
+0 −8
Original line number Diff line number Diff line
@@ -1947,14 +1947,6 @@ static int gmc_v9_0_init_mem_ranges(struct amdgpu_device *adev)

static void gmc_v9_4_3_init_vram_info(struct amdgpu_device *adev)
{
	static const u32 regBIF_BIOS_SCRATCH_4 = 0x50;
	u32 vram_info;

	/* Only for dGPU, vendor informaton is reliable */
	if (!amdgpu_sriov_vf(adev) && !(adev->flags & AMD_IS_APU)) {
		vram_info = RREG32(regBIF_BIOS_SCRATCH_4);
		adev->gmc.vram_vendor = vram_info & 0xF;
	}
	adev->gmc.vram_type = AMDGPU_VRAM_TYPE_HBM;
	adev->gmc.vram_width = 128 * 64;
}
Loading