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

Merge tag 'amd-drm-next-6.2-2022-11-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-next



amd-drm-next-6.2-2022-11-25:

amdgpu:
- Old GCC fix
- GFX11 fixes
- PSP suspend/resume fix
- PCI ref count fix
- DC KASAN fix
- DCN 3.2.x fixes
- Dell platform suspend/resume fixes
- DCN 3.1.4 fixes
- RAS fixes
- SMU 13.x fixes
- Flex array changes
- VCN 4.0 RAS updates
- Add missing licsense to some files
- Documentation updates
- SR-IOV fixes
- DP MST DSC fix

amdkfd:
- Fix topology locking in error case

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221125180519.6389-1-alexander.deucher@amd.com
parents 02339a83 10d2d1fc
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -327,7 +327,6 @@ static void amdgpu_connector_free_edid(struct drm_connector *connector)

	kfree(amdgpu_connector->edid);
	amdgpu_connector->edid = NULL;
	drm_connector_update_edid_property(connector, NULL);
}

static int amdgpu_connector_ddc_get_modes(struct drm_connector *connector)
+16 −11
Original line number Diff line number Diff line
@@ -4181,21 +4181,15 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)

	r = amdgpu_device_ip_resume(adev);

	/* no matter what r is, always need to properly release full GPU */
	if (amdgpu_sriov_vf(adev)) {
		amdgpu_virt_init_data_exchange(adev);
		amdgpu_virt_release_full_gpu(adev, true);
	}

	if (r) {
		dev_err(adev->dev, "amdgpu_device_ip_resume failed (%d).\n", r);
		return r;
		goto exit;
	}
	amdgpu_fence_driver_hw_init(adev);

	r = amdgpu_device_ip_late_init(adev);
	if (r)
		return r;
		goto exit;

	queue_delayed_work(system_wq, &adev->delayed_init_work,
			   msecs_to_jiffies(AMDGPU_RESUME_MS));
@@ -4203,12 +4197,19 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
	if (!adev->in_s0ix) {
		r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
		if (r)
			return r;
			goto exit;
	}

exit:
	if (amdgpu_sriov_vf(adev)) {
		amdgpu_virt_init_data_exchange(adev);
		amdgpu_virt_release_full_gpu(adev, true);
	}

	if (r)
		return r;

	/* Make sure IB tests flushed */
	if (amdgpu_sriov_vf(adev))
		amdgpu_irq_gpu_reset_resume_helper(adev);
	flush_delayed_work(&adev->delayed_init_work);

	if (adev->in_s0ix) {
@@ -5045,6 +5046,8 @@ static void amdgpu_device_resume_display_audio(struct amdgpu_device *adev)
		pm_runtime_enable(&(p->dev));
		pm_runtime_resume(&(p->dev));
	}

	pci_dev_put(p);
}

static int amdgpu_device_suspend_display_audio(struct amdgpu_device *adev)
@@ -5083,6 +5086,7 @@ static int amdgpu_device_suspend_display_audio(struct amdgpu_device *adev)

		if (expires < ktime_get_mono_fast_ns()) {
			dev_warn(adev->dev, "failed to suspend display audio\n");
			pci_dev_put(p);
			/* TODO: abort the succeeding gpu reset? */
			return -ETIMEDOUT;
		}
@@ -5090,6 +5094,7 @@ static int amdgpu_device_suspend_display_audio(struct amdgpu_device *adev)

	pm_runtime_disable(&(p->dev));

	pci_dev_put(p);
	return 0;
}

+2 −0
Original line number Diff line number Diff line
@@ -1702,11 +1702,13 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev)
	return 0;
}

#if defined(CONFIG_DRM_AMD_DC)
static void amdgpu_discovery_set_sriov_display(struct amdgpu_device *adev)
{
	amdgpu_device_set_sriov_virtual_display(adev);
	amdgpu_device_ip_block_add(adev, &amdgpu_vkms_ip_block);
}
#endif

static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
{
+1 −2
Original line number Diff line number Diff line
@@ -238,8 +238,7 @@ module_param_named(gartsize, amdgpu_gart_size, uint, 0600);

/**
 * DOC: gttsize (int)
 * Restrict the size of GTT domain in MiB for testing. The default is -1 (It's VRAM size if 3GB < VRAM < 3/4 RAM,
 * otherwise 3/4 RAM size).
 * Restrict the size of GTT domain in MiB for testing. The default is -1 (Use 1/2 RAM, minimum value is 3GB).
 */
MODULE_PARM_DESC(gttsize, "Size of the GTT domain in megabytes (-1 = auto)");
module_param_named(gttsize, amdgpu_gtt_size, int, 0600);
+6 −0
Original line number Diff line number Diff line
@@ -479,6 +479,12 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev)
	unsigned i;
	unsigned vmhub, inv_eng;

	if (adev->enable_mes) {
		/* reserve engine 5 for firmware */
		for (vmhub = 0; vmhub < AMDGPU_MAX_VMHUBS; vmhub++)
			vm_inv_engs[vmhub] &= ~(1 << 5);
	}

	for (i = 0; i < adev->num_rings; ++i) {
		ring = adev->rings[i];
		vmhub = ring->funcs->vmhub;
Loading