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

Merge tag 'amd-drm-fixes-7.0-2026-03-19' of...

Merge tag 'amd-drm-fixes-7.0-2026-03-19' of https://gitlab.freedesktop.org/agd5f/linux

 into drm-fixes

amd-drm-fixes-7.0-2026-03-19:

amdgpu:
- Fix gamma 2.2 colorop TFs
- BO list fix
- LTO fix
- DC FP fix
- DisplayID handling fix
- DCN 2.01 fix
- MMHUB boundary fixes
- ISP fix
- TLB fence fix
- Hainan pm fix

radeon:
- Hainan pm fix

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

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patch.msgid.link/20260319131013.36639-1-alexander.deucher@amd.com
parents 437eccb1 86650ee2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@

#define AMDGPU_BO_LIST_MAX_PRIORITY	32u
#define AMDGPU_BO_LIST_NUM_BUCKETS	(AMDGPU_BO_LIST_MAX_PRIORITY + 1)
#define AMDGPU_BO_LIST_MAX_ENTRIES	(128 * 1024)

static void amdgpu_bo_list_free_rcu(struct rcu_head *rcu)
{
@@ -188,6 +189,9 @@ int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in,
	const uint32_t bo_number = in->bo_number;
	struct drm_amdgpu_bo_list_entry *info;

	if (bo_number > AMDGPU_BO_LIST_MAX_ENTRIES)
		return -EINVAL;

	/* copy the handle array from userspace to a kernel buffer */
	if (likely(info_size == bo_info_size)) {
		info = vmemdup_array_user(uptr, bo_number, info_size);
+6 −1
Original line number Diff line number Diff line
@@ -1069,7 +1069,10 @@ amdgpu_vm_tlb_flush(struct amdgpu_vm_update_params *params,
	}

	/* Prepare a TLB flush fence to be attached to PTs */
	if (!params->unlocked) {
	/* The check for need_tlb_fence should be dropped once we
	 * sort out the issues with KIQ/MES TLB invalidation timeouts.
	 */
	if (!params->unlocked && vm->need_tlb_fence) {
		amdgpu_vm_tlb_fence_create(params->adev, vm, fence);

		/* Makes sure no PD/PT is freed before the flush */
@@ -2602,6 +2605,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
	ttm_lru_bulk_move_init(&vm->lru_bulk_move);

	vm->is_compute_context = false;
	vm->need_tlb_fence = amdgpu_userq_enabled(&adev->ddev);

	vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode &
				    AMDGPU_VM_USE_CPU_FOR_GFX);
@@ -2739,6 +2743,7 @@ int amdgpu_vm_make_compute(struct amdgpu_device *adev, struct amdgpu_vm *vm)
	dma_fence_put(vm->last_update);
	vm->last_update = dma_fence_get_stub();
	vm->is_compute_context = true;
	vm->need_tlb_fence = true;

unreserve_bo:
	amdgpu_bo_unreserve(vm->root.bo);
+2 −0
Original line number Diff line number Diff line
@@ -441,6 +441,8 @@ struct amdgpu_vm {
	struct ttm_lru_bulk_move lru_bulk_move;
	/* Flag to indicate if VM is used for compute */
	bool			is_compute_context;
	/* Flag to indicate if VM needs a TLB fence (KFD or KGD) */
	bool			need_tlb_fence;

	/* Memory partition number, -1 means any partition */
	int8_t			mem_id;
+14 −7
Original line number Diff line number Diff line
@@ -662,28 +662,35 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
	} else {
		switch (amdgpu_ip_version(adev, MMHUB_HWIP, 0)) {
		case IP_VERSION(9, 0, 0):
			mmhub_cid = mmhub_client_ids_vega10[cid][rw];
			mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_vega10) ?
				mmhub_client_ids_vega10[cid][rw] : NULL;
			break;
		case IP_VERSION(9, 3, 0):
			mmhub_cid = mmhub_client_ids_vega12[cid][rw];
			mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_vega12) ?
				mmhub_client_ids_vega12[cid][rw] : NULL;
			break;
		case IP_VERSION(9, 4, 0):
			mmhub_cid = mmhub_client_ids_vega20[cid][rw];
			mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_vega20) ?
				mmhub_client_ids_vega20[cid][rw] : NULL;
			break;
		case IP_VERSION(9, 4, 1):
			mmhub_cid = mmhub_client_ids_arcturus[cid][rw];
			mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_arcturus) ?
				mmhub_client_ids_arcturus[cid][rw] : NULL;
			break;
		case IP_VERSION(9, 1, 0):
		case IP_VERSION(9, 2, 0):
			mmhub_cid = mmhub_client_ids_raven[cid][rw];
			mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_raven) ?
				mmhub_client_ids_raven[cid][rw] : NULL;
			break;
		case IP_VERSION(1, 5, 0):
		case IP_VERSION(2, 4, 0):
			mmhub_cid = mmhub_client_ids_renoir[cid][rw];
			mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_renoir) ?
				mmhub_client_ids_renoir[cid][rw] : NULL;
			break;
		case IP_VERSION(1, 8, 0):
		case IP_VERSION(9, 4, 2):
			mmhub_cid = mmhub_client_ids_aldebaran[cid][rw];
			mmhub_cid = cid < ARRAY_SIZE(mmhub_client_ids_aldebaran) ?
				mmhub_client_ids_aldebaran[cid][rw] : NULL;
			break;
		default:
			mmhub_cid = NULL;
+2 −2
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ static int isp_genpd_add_device(struct device *dev, void *data)
	if (!pdev)
		return -EINVAL;

	if (!dev->type->name) {
	if (!dev->type || !dev->type->name) {
		drm_dbg(&adev->ddev, "Invalid device type to add\n");
		goto exit;
	}
@@ -165,7 +165,7 @@ static int isp_genpd_remove_device(struct device *dev, void *data)
	if (!pdev)
		return -EINVAL;

	if (!dev->type->name) {
	if (!dev->type || !dev->type->name) {
		drm_dbg(&adev->ddev, "Invalid device type to remove\n");
		goto exit;
	}
Loading