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

Merge tag 'amd-drm-fixes-7.1-2026-04-23' of...

Merge tag 'amd-drm-fixes-7.1-2026-04-23' of https://gitlab.freedesktop.org/agd5f/linux

 into drm-next

amd-drm-fixes-7.1-2026-04-23:

amdgpu:
- DC idle state manager fix
- ASPM fix
- GPUVM SVM fix
- DCE 6 fix

amdkfd:
- num_of_nodes bounds check fix

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

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patch.msgid.link/20260423170129.2345978-1-alexander.deucher@amd.com
parents 52edde74 74b73fa5
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1334,18 +1334,15 @@ static bool amdgpu_device_aspm_support_quirk(struct amdgpu_device *adev)
#if IS_ENABLED(CONFIG_X86)
	struct cpuinfo_x86 *c = &cpu_data(0);

	if (!(amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(12, 0, 0) ||
		  amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(12, 0, 1)))
		return false;

	if (c->x86 == 6 &&
		adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN5) {
	if (c->x86_vendor == X86_VENDOR_INTEL) {
		switch (c->x86_model) {
		case VFM_MODEL(INTEL_ALDERLAKE):
		case VFM_MODEL(INTEL_ALDERLAKE_L):
		case VFM_MODEL(INTEL_RAPTORLAKE):
		case VFM_MODEL(INTEL_RAPTORLAKE_P):
		case VFM_MODEL(INTEL_RAPTORLAKE_S):
		case VFM_MODEL(INTEL_TIGERLAKE):
		case VFM_MODEL(INTEL_TIGERLAKE_L):
			return true;
		default:
			return false;
+5 −2
Original line number Diff line number Diff line
@@ -693,8 +693,11 @@ static void amdgpu_vm_pte_update_flags(struct amdgpu_vm_update_params *params,
		   !(flags & AMDGPU_PTE_VALID) &&
		   !(flags & AMDGPU_PTE_PRT_FLAG(params->adev))) {

		/* Workaround for fault priority problem on GMC9 */
		flags |= AMDGPU_PTE_EXECUTABLE;
		/* Workaround for fault priority problem on GMC9 and GFX12,
		 * EXECUTABLE for GMC9 fault priority and init_pte_flags
		 * (e.g. AMDGPU_PTE_IS_PTE on GFX12)
		 */
		flags |= AMDGPU_PTE_EXECUTABLE | adev->gmc.init_pte_flags;
	}

	/*
+3 −0
Original line number Diff line number Diff line
@@ -776,6 +776,9 @@ static int kfd_ioctl_get_process_apertures_new(struct file *filp,
		goto out_unlock;
	}

	if (args->num_of_nodes > kfd_topology_get_num_devices())
		return -EINVAL;

	/* Fill in process-aperture information for all available
	 * nodes, but not more than args->num_of_nodes as that is
	 * the amount of memory allocated by user
+1 −0
Original line number Diff line number Diff line
@@ -1191,6 +1191,7 @@ static inline struct kfd_node *kfd_node_by_irq_ids(struct amdgpu_device *adev,
	return NULL;
}
int kfd_topology_enum_kfd_devices(uint8_t idx, struct kfd_node **kdev);
uint32_t kfd_topology_get_num_devices(void);
int kfd_numa_node_to_apic_id(int numa_node_id);
uint32_t kfd_gpu_node_num(void);

+11 −0
Original line number Diff line number Diff line
@@ -2297,6 +2297,17 @@ int kfd_topology_remove_device(struct kfd_node *gpu)
	return res;
}

uint32_t kfd_topology_get_num_devices(void)
{
	uint32_t num_devices;

	down_read(&topology_lock);
	num_devices = sys_props.num_devices;
	up_read(&topology_lock);

	return num_devices;
}

/* kfd_topology_enum_kfd_devices - Enumerate through all devices in KFD
 *	topology. If GPU device is found @idx, then valid kfd_dev pointer is
 *	returned through @kdev
Loading