Skip to content

Commit d5c1b4b

Browse files
committed
Merge tag 'drm-fixes-2025-11-15' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Weekly fixes, amdgpu and vmwgfx making up the most of it, along with panthor and i915/xe. Seems about right for this time of development, nothing major outstanding. client: - Fix description of module parameter panthor: - Flush writes before mapping buffers vmwgfx: - Improve command validation - Improve ref counting - Fix cursor-plane support 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 i915: - Fix PSR's pipe to vblank conversion - Disable Panel Replay on MST links xe: - New HW workarounds affecting PTL and WCL platforms * tag 'drm-fixes-2025-11-15' of https://gitlab.freedesktop.org/drm/kernel: drm/client: fix MODULE_PARM_DESC string for "active" drm/i915/dp_mst: Disable Panel Replay drm/amdkfd: Fix GPU mappings for APU after prefetch drm/amdkfd: relax checks for over allocation of save area drm/amdgpu/jpeg: Add parse_cs for JPEG5_0_1 drm/amd/amdgpu: Ensure isp_kernel_buffer_alloc() creates a new BO drm/amd/display: Allow VRR params change if unsynced with the stream drm/amdgpu: fix lock warning in amdgpu_userq_fence_driver_process drm/amdgpu: jump to the correct label on failure drm/amdgpu: disable peer-to-peer access for DCC-enabled GC12 VRAM surfaces drm/xe/xe3lpg: Extend Wa_15016589081 for xe3lpg drm/xe/xe3: Extend wa_14023061436 drm/xe/xe3: Add WA_14024681466 for Xe3_LPG drm/i915/psr: fix pipe to vblank conversion drm/panthor: Flush shmem writes before mapping buffers CPU-uncached drm/vmwgfx: Restore Guest-Backed only cursor plane support drm/vmwgfx: Use kref in vmw_bo_dirty drm/vmwgfx: Validate command header size against SVGA_CMD_MAX_DATASIZE
2 parents ccc0011 + 362a7d4 commit d5c1b4b

File tree

17 files changed

+102
-20
lines changed

17 files changed

+102
-20
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip,
236236
r = amdgpu_xcp_select_scheds(adev, hw_ip, hw_prio, fpriv,
237237
&num_scheds, &scheds);
238238
if (r)
239-
goto cleanup_entity;
239+
goto error_free_entity;
240240
}
241241

242242
/* disable load balance if the hw engine retains context among dependent jobs */

drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf,
8282
struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
8383
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
8484

85+
/*
86+
* Disable peer-to-peer access for DCC-enabled VRAM surfaces on GFX12+.
87+
* Such buffers cannot be safely accessed over P2P due to device-local
88+
* compression metadata. Fallback to system-memory path instead.
89+
* Device supports GFX12 (GC 12.x or newer)
90+
* BO was created with the AMDGPU_GEM_CREATE_GFX12_DCC flag
91+
*
92+
*/
93+
if (amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(12, 0, 0) &&
94+
bo->flags & AMDGPU_GEM_CREATE_GFX12_DCC)
95+
attach->peer2peer = false;
96+
8597
if (!amdgpu_dmabuf_is_xgmi_accessible(attach_adev, bo) &&
8698
pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
8799
attach->peer2peer = false;

drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ int isp_kernel_buffer_alloc(struct device *dev, u64 size,
280280
if (ret)
281281
return ret;
282282

283+
/* Ensure *bo is NULL so a new BO will be created */
284+
*bo = NULL;
283285
ret = amdgpu_bo_create_kernel(adev,
284286
size,
285287
ISP_MC_ADDR_ALIGN,

drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,16 @@ void amdgpu_userq_fence_driver_process(struct amdgpu_userq_fence_driver *fence_d
151151
{
152152
struct amdgpu_userq_fence *userq_fence, *tmp;
153153
struct dma_fence *fence;
154+
unsigned long flags;
154155
u64 rptr;
155156
int i;
156157

157158
if (!fence_drv)
158159
return;
159160

161+
spin_lock_irqsave(&fence_drv->fence_list_lock, flags);
160162
rptr = amdgpu_userq_fence_read(fence_drv);
161163

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

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

180181
void amdgpu_userq_fence_driver_destroy(struct kref *ref)

drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ static const struct amdgpu_ring_funcs jpeg_v5_0_1_dec_ring_vm_funcs = {
878878
.get_rptr = jpeg_v5_0_1_dec_ring_get_rptr,
879879
.get_wptr = jpeg_v5_0_1_dec_ring_get_wptr,
880880
.set_wptr = jpeg_v5_0_1_dec_ring_set_wptr,
881+
.parse_cs = amdgpu_jpeg_dec_parse_cs,
881882
.emit_frame_size =
882883
SOC15_FLUSH_GPU_TLB_NUM_WREG * 6 +
883884
SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 8 +

drivers/gpu/drm/amd/amdkfd/kfd_queue.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,16 +297,16 @@ int kfd_queue_acquire_buffers(struct kfd_process_device *pdd, struct queue_prope
297297
goto out_err_unreserve;
298298
}
299299

300-
if (properties->ctx_save_restore_area_size != topo_dev->node_props.cwsr_size) {
301-
pr_debug("queue cwsr size 0x%x not equal to node cwsr size 0x%x\n",
300+
if (properties->ctx_save_restore_area_size < topo_dev->node_props.cwsr_size) {
301+
pr_debug("queue cwsr size 0x%x not sufficient for node cwsr size 0x%x\n",
302302
properties->ctx_save_restore_area_size,
303303
topo_dev->node_props.cwsr_size);
304304
err = -EINVAL;
305305
goto out_err_unreserve;
306306
}
307307

308-
total_cwsr_size = (topo_dev->node_props.cwsr_size + topo_dev->node_props.debug_memory_size)
309-
* NUM_XCC(pdd->dev->xcc_mask);
308+
total_cwsr_size = (properties->ctx_save_restore_area_size +
309+
topo_dev->node_props.debug_memory_size) * NUM_XCC(pdd->dev->xcc_mask);
310310
total_cwsr_size = ALIGN(total_cwsr_size, PAGE_SIZE);
311311

312312
err = kfd_queue_buffer_get(vm, (void *)properties->ctx_save_restore_area_address,
@@ -352,8 +352,8 @@ int kfd_queue_release_buffers(struct kfd_process_device *pdd, struct queue_prope
352352
topo_dev = kfd_topology_device_by_id(pdd->dev->id);
353353
if (!topo_dev)
354354
return -EINVAL;
355-
total_cwsr_size = (topo_dev->node_props.cwsr_size + topo_dev->node_props.debug_memory_size)
356-
* NUM_XCC(pdd->dev->xcc_mask);
355+
total_cwsr_size = (properties->ctx_save_restore_area_size +
356+
topo_dev->node_props.debug_memory_size) * NUM_XCC(pdd->dev->xcc_mask);
357357
total_cwsr_size = ALIGN(total_cwsr_size, PAGE_SIZE);
358358

359359
kfd_queue_buffer_svm_put(pdd, properties->ctx_save_restore_area_address, total_cwsr_size);

drivers/gpu/drm/amd/amdkfd/kfd_svm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3687,6 +3687,8 @@ svm_range_set_attr(struct kfd_process *p, struct mm_struct *mm,
36873687
svm_range_apply_attrs(p, prange, nattr, attrs, &update_mapping);
36883688
/* TODO: unmap ranges from GPU that lost access */
36893689
}
3690+
update_mapping |= !p->xnack_enabled && !list_empty(&remap_list);
3691+
36903692
list_for_each_entry_safe(prange, next, &remove_list, update_list) {
36913693
pr_debug("unlink old 0x%p prange 0x%p [0x%lx 0x%lx]\n",
36923694
prange->svms, prange, prange->start,

drivers/gpu/drm/amd/display/modules/freesync/freesync.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,6 +1260,17 @@ void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync,
12601260
update_v_total_for_static_ramp(
12611261
core_freesync, stream, in_out_vrr);
12621262
}
1263+
1264+
/*
1265+
* If VRR is inactive, set vtotal min and max to nominal vtotal
1266+
*/
1267+
if (in_out_vrr->state == VRR_STATE_INACTIVE) {
1268+
in_out_vrr->adjust.v_total_min =
1269+
mod_freesync_calc_v_total_from_refresh(stream,
1270+
in_out_vrr->max_refresh_in_uhz);
1271+
in_out_vrr->adjust.v_total_max = in_out_vrr->adjust.v_total_min;
1272+
return;
1273+
}
12631274
}
12641275

12651276
unsigned long long mod_freesync_calc_nominal_field_rate(

drivers/gpu/drm/clients/drm_client_setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
static char drm_client_default[16] = CONFIG_DRM_CLIENT_DEFAULT;
1414
module_param_string(active, drm_client_default, sizeof(drm_client_default), 0444);
1515
MODULE_PARM_DESC(active,
16-
"Choose which drm client to start, default is"
17-
CONFIG_DRM_CLIENT_DEFAULT "]");
16+
"Choose which drm client to start, default is "
17+
CONFIG_DRM_CLIENT_DEFAULT);
1818

1919
/**
2020
* drm_client_setup() - Setup in-kernel DRM clients

drivers/gpu/drm/i915/display/intel_psr.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,10 @@ static void _panel_replay_init_dpcd(struct intel_dp *intel_dp)
585585
struct intel_display *display = to_intel_display(intel_dp);
586586
int ret;
587587

588+
/* TODO: Enable Panel Replay on MST once it's properly implemented. */
589+
if (intel_dp->mst_detect == DRM_DP_MST)
590+
return;
591+
588592
ret = drm_dp_dpcd_read_data(&intel_dp->aux, DP_PANEL_REPLAY_CAP_SUPPORT,
589593
&intel_dp->pr_dpcd, sizeof(intel_dp->pr_dpcd));
590594
if (ret < 0)
@@ -888,7 +892,8 @@ static bool is_dc5_dc6_blocked(struct intel_dp *intel_dp)
888892
{
889893
struct intel_display *display = to_intel_display(intel_dp);
890894
u32 current_dc_state = intel_display_power_get_current_dc_state(display);
891-
struct drm_vblank_crtc *vblank = &display->drm->vblank[intel_dp->psr.pipe];
895+
struct intel_crtc *crtc = intel_crtc_for_pipe(display, intel_dp->psr.pipe);
896+
struct drm_vblank_crtc *vblank = drm_crtc_vblank_crtc(&crtc->base);
892897

893898
return (current_dc_state != DC_STATE_EN_UPTO_DC5 &&
894899
current_dc_state != DC_STATE_EN_UPTO_DC6) ||

0 commit comments

Comments
 (0)