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

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

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

 into drm-next

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

amdgpu:
- GPU reset fixes
- Doorbell fix when resizing BARs
- Fix spurious warnings in gmc
- Locking fix for AMDGPU_SCHED IOCTL
- SR-IOV fix
- DCN 3.1.4 fix
- DCN 3.2 fix
- Fix job cleanup when CS is aborted

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230504034018.7950-1-alexander.deucher@amd.com
parents fa0d9c06 1253685f
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -1276,7 +1276,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
		r = drm_sched_job_add_dependency(&leader->base, fence);
		if (r) {
			dma_fence_put(fence);
			goto error_cleanup;
			return r;
		}
	}

@@ -1303,7 +1303,8 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
	}
	if (r) {
		r = -EAGAIN;
		goto error_unlock;
		mutex_unlock(&p->adev->notifier_lock);
		return r;
	}

	p->fence = dma_fence_get(&leader->base.s_fence->finished);
@@ -1350,14 +1351,6 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
	mutex_unlock(&p->adev->notifier_lock);
	mutex_unlock(&p->bo_list->bo_list_mutex);
	return 0;

error_unlock:
	mutex_unlock(&p->adev->notifier_lock);

error_cleanup:
	for (i = 0; i < p->gang_size; ++i)
		drm_sched_job_cleanup(&p->jobs[i]->base);
	return r;
}

/* Cleanup the parser structure */
+7 −0
Original line number Diff line number Diff line
@@ -3578,6 +3578,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
	int r, i;
	bool px = false;
	u32 max_MBps;
	int tmp;

	adev->shutdown = false;
	adev->flags = flags;
@@ -3799,7 +3800,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
				}
			}
		} else {
			tmp = amdgpu_reset_method;
			/* It should do a default reset when loading or reloading the driver,
			 * regardless of the module parameter reset_method.
			 */
			amdgpu_reset_method = AMD_RESET_METHOD_NONE;
			r = amdgpu_asic_reset(adev);
			amdgpu_reset_method = tmp;
			if (r) {
				dev_err(adev->dev, "asic reset on init failed\n");
				goto failed;
+5 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
{
	struct fd f = fdget(fd);
	struct amdgpu_fpriv *fpriv;
	struct amdgpu_ctx_mgr *mgr;
	struct amdgpu_ctx *ctx;
	uint32_t id;
	int r;
@@ -51,8 +52,11 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
		return r;
	}

	idr_for_each_entry(&fpriv->ctx_mgr.ctx_handles, ctx, id)
	mgr = &fpriv->ctx_mgr;
	mutex_lock(&mgr->lock);
	idr_for_each_entry(&mgr->ctx_handles, ctx, id)
		amdgpu_ctx_priority_override(ctx, priority);
	mutex_unlock(&mgr->lock);

	fdput(f);
	return 0;
+0 −1
Original line number Diff line number Diff line
@@ -1143,7 +1143,6 @@ static int gmc_v10_0_hw_fini(void *handle)
		return 0;
	}

	amdgpu_irq_put(adev, &adev->gmc.ecc_irq, 0);
	amdgpu_irq_put(adev, &adev->gmc.vm_fault, 0);

	return 0;
+0 −1
Original line number Diff line number Diff line
@@ -951,7 +951,6 @@ static int gmc_v11_0_hw_fini(void *handle)
		return 0;
	}

	amdgpu_irq_put(adev, &adev->gmc.ecc_irq, 0);
	amdgpu_irq_put(adev, &adev->gmc.vm_fault, 0);
	gmc_v11_0_gart_disable(adev);

Loading