Commit 63444b4c authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'amd-drm-fixes-6.18-2025-11-12' of...

Merge tag 'amd-drm-fixes-6.18-2025-11-12' of https://gitlab.freedesktop.org/agd5f/linux

 into drm-fixes

amd-drm-fixes-6.18-2025-11-12:

amdgpu:
- Disallow P2P DMA for GC 12 DCC surfaces
- ctx error handling fix
- UserQ fixes
- VRR fix
- ISP fix
- JPEG 5.0.1 fix

amdkfd:
- Save area check fix
- Fix GPU mappings for APU after prefetch

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

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patch.msgid.link/20251112200930.8788-1-alexander.deucher@amd.com
parents e9a6fb0b eac32ff4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip,
		r = amdgpu_xcp_select_scheds(adev, hw_ip, hw_prio, fpriv,
						&num_scheds, &scheds);
		if (r)
			goto cleanup_entity;
			goto error_free_entity;
	}

	/* disable load balance if the hw engine retains context among dependent jobs */
+12 −0
Original line number Diff line number Diff line
@@ -82,6 +82,18 @@ static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf,
	struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
	struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);

	/*
	 * Disable peer-to-peer access for DCC-enabled VRAM surfaces on GFX12+.
	 * Such buffers cannot be safely accessed over P2P due to device-local
	 * compression metadata. Fallback to system-memory path instead.
	 * Device supports GFX12 (GC 12.x or newer)
	 * BO was created with the AMDGPU_GEM_CREATE_GFX12_DCC flag
	 *
	 */
	if (amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(12, 0, 0) &&
	    bo->flags & AMDGPU_GEM_CREATE_GFX12_DCC)
		attach->peer2peer = false;

	if (!amdgpu_dmabuf_is_xgmi_accessible(attach_adev, bo) &&
	    pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
		attach->peer2peer = false;
+2 −0
Original line number Diff line number Diff line
@@ -280,6 +280,8 @@ int isp_kernel_buffer_alloc(struct device *dev, u64 size,
	if (ret)
		return ret;

	/* Ensure *bo is NULL so a new BO will be created */
	*bo = NULL;
	ret = amdgpu_bo_create_kernel(adev,
				      size,
				      ISP_MC_ADDR_ALIGN,
+3 −2
Original line number Diff line number Diff line
@@ -151,15 +151,16 @@ void amdgpu_userq_fence_driver_process(struct amdgpu_userq_fence_driver *fence_d
{
	struct amdgpu_userq_fence *userq_fence, *tmp;
	struct dma_fence *fence;
	unsigned long flags;
	u64 rptr;
	int i;

	if (!fence_drv)
		return;

	spin_lock_irqsave(&fence_drv->fence_list_lock, flags);
	rptr = amdgpu_userq_fence_read(fence_drv);

	spin_lock(&fence_drv->fence_list_lock);
	list_for_each_entry_safe(userq_fence, tmp, &fence_drv->fences, link) {
		fence = &userq_fence->base;

@@ -174,7 +175,7 @@ void amdgpu_userq_fence_driver_process(struct amdgpu_userq_fence_driver *fence_d
		list_del(&userq_fence->link);
		dma_fence_put(fence);
	}
	spin_unlock(&fence_drv->fence_list_lock);
	spin_unlock_irqrestore(&fence_drv->fence_list_lock, flags);
}

void amdgpu_userq_fence_driver_destroy(struct kref *ref)
+1 −0
Original line number Diff line number Diff line
@@ -878,6 +878,7 @@ static const struct amdgpu_ring_funcs jpeg_v5_0_1_dec_ring_vm_funcs = {
	.get_rptr = jpeg_v5_0_1_dec_ring_get_rptr,
	.get_wptr = jpeg_v5_0_1_dec_ring_get_wptr,
	.set_wptr = jpeg_v5_0_1_dec_ring_set_wptr,
	.parse_cs = amdgpu_jpeg_dec_parse_cs,
	.emit_frame_size =
		SOC15_FLUSH_GPU_TLB_NUM_WREG * 6 +
		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 8 +
Loading