Skip to content

Commit d4a292c

Browse files
committed
Merge tag 'drm-next-2026-02-21' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "This is the fixes and cleanups for the end of the merge window, it's nearly all amdgpu, with some amdkfd, then a pagemap core fix, i915/xe display fixes, and some xe driver fixes. Nothing seems out of the ordinary, except amdgpu is a little more volume than usual. pagemap: - drm/pagemap: pass pagemap_addr by reference amdgpu: - DML 2.1 fixes - Panel replay fixes - Display writeback fixes - MES 11 old firmware compat fix - DC CRC improvements - DPIA fixes - XGMI fixes - ASPM fix - SMU feature bit handling fixes - DC LUT fixes - RAS fixes - Misc memory leak in error path fixes - SDMA queue reset fixes - PG handling fixes - 5 level GPUVM page table fix - SR-IOV fix - Queue reset fix - SMU 13.x fixes - DC resume lag fix - MPO fixes - DCN 3.6 fix - VSDB fixes - HWSS clean up - Replay fixes - DCE cursor fixes - DCN 3.5 SR DDR5 latency fixes - HPD fixes - Error path unwind fixes - SMU13/14 mode1 reset fixes - PSP 15 updates - SMU 15 updates - Sync fix in amdgpu_dma_buf_move_notify() - HAINAN fix - PSP 13.x fix - GPUVM locking fix - Fixes for DC analog support - DC FAMS fixes - DML 2.1 fixes - eDP fixes - Misc DC fixes - Fastboot fix - 3DLUT fixes - GPUVM fixes - 64bpp format fix - Fix for MacBooks with switchable gfx amdkfd: - Fix possible double deletion of validate list - Event setup fix - Device disconnect regression fix - APU GTT as VRAM fix - Fix piority inversion with MQDs - NULL check fix radeon: - HAINAN fix i915/xe display: - Regresion fix for HDR 4k displays (#15503) - Fixup for Dell XPS 13 7390 eDP rate limit - Memory leak fix on ACPI _DSM handling - Add missing slice count check during DP mode validation xe: - drm/xe: Prevent VFs from exposing the CCS mode sysfs file - SRIOV related fixes - PAT cache fix - MMIO read fix - W/a fixes - Adjust type of xe_modparam.force_vram_bar_size - Wedge mode fix - HWMon fix * tag 'drm-next-2026-02-21' of https://gitlab.freedesktop.org/drm/kernel: (143 commits) drm/amd/display: Remove unneeded DAC link encoder register drm/amd/display: Enable DAC in DCE link encoder drm/amd/display: Set CRTC source for DAC using registers drm/amd/display: Initialize DAC in DCE link encoder using VBIOS drm/amd/display: Turn off DAC in DCE link encoder using VBIOS drm/amd/display: Don't call find_analog_engine() twice drm/amdgpu: fix 4-level paging if GMC supports 57-bit VA v2 drm/amdgpu: keep vga memory on MacBooks with switchable graphics drm/amdgpu: Set atomics to true for xgmi drm/amdkfd: Check for NULL return values drm/amd/display: Use same max plane scaling limits for all 64 bpp formats drm/amdgpu: Set vmid0 PAGE_TABLE_DEPTH for GFX12.1 drm/amdkfd: Disable MQD queue priority drm/amd/display: Remove conditional for shaper 3DLUT power-on drm/amd/display: Check return of shaper curve to HW format drm/amd/display: Correct logic check error for fastboot drm/amd/display: Skip eDP detection when no sink Revert "drm/amd/display: Add Gfx Base Case For Linear Tiling Handling" Revert "drm/amd/display: Correct hubp GfxVersion verification" Revert "drm/amd/display: Add Handling for gfxversion DcGfxBase" ...
2 parents eee3666 + ae9e865 commit d4a292c

201 files changed

Lines changed: 2120 additions & 950 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,8 +1186,10 @@ int amdgpu_acpi_enumerate_xcc(void)
11861186
if (!dev_info)
11871187
ret = amdgpu_acpi_dev_init(&dev_info, xcc_info, sbdf);
11881188

1189-
if (ret == -ENOMEM)
1189+
if (ret == -ENOMEM) {
1190+
kfree(xcc_info);
11901191
return ret;
1192+
}
11911193

11921194
if (!dev_info) {
11931195
kfree(xcc_info);

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,7 @@ int amdgpu_amdkfd_post_reset(struct amdgpu_device *adev)
317317
void amdgpu_amdkfd_gpu_reset(struct amdgpu_device *adev)
318318
{
319319
if (amdgpu_device_should_recover_gpu(adev))
320-
amdgpu_reset_domain_schedule(adev->reset_domain,
321-
&adev->kfd.reset_work);
320+
(void)amdgpu_reset_domain_schedule(adev->reset_domain, &adev->kfd.reset_work);
322321
}
323322

324323
int amdgpu_amdkfd_alloc_kernel_mem(struct amdgpu_device *adev, size_t size,
@@ -720,9 +719,8 @@ void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)
720719
if (gfx_block != NULL)
721720
gfx_block->version->funcs->set_powergating_state((void *)gfx_block, state);
722721
}
723-
amdgpu_dpm_switch_power_profile(adev,
724-
PP_SMC_POWER_PROFILE_COMPUTE,
725-
!idle);
722+
(void)amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_COMPUTE, !idle);
723+
726724
}
727725

728726
bool amdgpu_amdkfd_is_kfd_vmid(struct amdgpu_device *adev, u32 vmid)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static const char *amdkfd_fence_get_timeline_name(struct dma_fence *f)
107107
{
108108
struct amdgpu_amdkfd_fence *fence = to_amdgpu_amdkfd_fence(f);
109109

110-
return fence->timeline_name;
110+
return fence ? fence->timeline_name : NULL;
111111
}
112112

113113
/**

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ static int kfd_mem_attach(struct amdgpu_device *adev, struct kgd_mem *mem,
878878
struct amdgpu_bo *bo[2] = {NULL, NULL};
879879
struct amdgpu_bo_va *bo_va;
880880
bool same_hive = false;
881+
struct drm_exec exec;
881882
int i, ret;
882883

883884
if (!va) {
@@ -958,19 +959,25 @@ static int kfd_mem_attach(struct amdgpu_device *adev, struct kgd_mem *mem,
958959
goto unwind;
959960
}
960961

961-
/* Add BO to VM internal data structures */
962-
ret = amdgpu_bo_reserve(bo[i], false);
963-
if (ret) {
964-
pr_debug("Unable to reserve BO during memory attach");
965-
goto unwind;
962+
drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT, 0);
963+
drm_exec_until_all_locked(&exec) {
964+
ret = amdgpu_vm_lock_pd(vm, &exec, 0);
965+
drm_exec_retry_on_contention(&exec);
966+
if (unlikely(ret))
967+
goto unwind;
968+
ret = drm_exec_lock_obj(&exec, &bo[i]->tbo.base);
969+
drm_exec_retry_on_contention(&exec);
970+
if (unlikely(ret))
971+
goto unwind;
966972
}
973+
967974
bo_va = amdgpu_vm_bo_find(vm, bo[i]);
968975
if (!bo_va)
969976
bo_va = amdgpu_vm_bo_add(adev, vm, bo[i]);
970977
else
971978
++bo_va->ref_count;
972979
attachment[i]->bo_va = bo_va;
973-
amdgpu_bo_unreserve(bo[i]);
980+
drm_exec_fini(&exec);
974981
if (unlikely(!attachment[i]->bo_va)) {
975982
ret = -ENOMEM;
976983
pr_err("Failed to add BO object to VM. ret == %d\n",

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,10 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
892892
struct amdgpu_bo *bo = e->bo;
893893

894894
e->range = amdgpu_hmm_range_alloc(NULL);
895-
if (unlikely(!e->range))
896-
return -ENOMEM;
895+
if (unlikely(!e->range)) {
896+
r = -ENOMEM;
897+
goto out_free_user_pages;
898+
}
897899

898900
r = amdgpu_ttm_tt_get_user_pages(bo, e->range);
899901
if (r)

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

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3504,9 +3504,6 @@ static int amdgpu_device_ip_fini_early(struct amdgpu_device *adev)
35043504
}
35053505
}
35063506

3507-
amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
3508-
amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
3509-
35103507
amdgpu_amdkfd_suspend(adev, true);
35113508
amdgpu_amdkfd_teardown_processes(adev);
35123509
amdgpu_userq_suspend(adev);
@@ -4618,9 +4615,10 @@ int amdgpu_device_init(struct amdgpu_device *adev,
46184615
/* APUs w/ gfx9 onwards doesn't reply on PCIe atomics, rather it is a
46194616
* internal path natively support atomics, set have_atomics_support to true.
46204617
*/
4621-
} else if ((adev->flags & AMD_IS_APU) &&
4622-
(amdgpu_ip_version(adev, GC_HWIP, 0) >
4623-
IP_VERSION(9, 0, 0))) {
4618+
} else if ((adev->flags & AMD_IS_APU &&
4619+
amdgpu_ip_version(adev, GC_HWIP, 0) > IP_VERSION(9, 0, 0)) ||
4620+
(adev->gmc.xgmi.connected_to_cpu &&
4621+
amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(12, 1, 0))) {
46244622
adev->have_atomics_support = true;
46254623
} else {
46264624
adev->have_atomics_support =
@@ -4655,9 +4653,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
46554653
dev_info(adev->dev, "Pending hive reset.\n");
46564654
amdgpu_set_init_level(adev,
46574655
AMDGPU_INIT_LEVEL_MINIMAL_XGMI);
4658-
} else if (amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 10) &&
4659-
!amdgpu_device_has_display_hardware(adev)) {
4660-
r = psp_gpu_reset(adev);
46614656
} else {
46624657
tmp = amdgpu_reset_method;
46634658
/* It should do a default reset when loading or reloading the driver,
@@ -4902,6 +4897,9 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)
49024897
amdgpu_virt_fini_data_exchange(adev);
49034898
}
49044899

4900+
amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
4901+
amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
4902+
49054903
/* disable all interrupts */
49064904
amdgpu_irq_disable_all(adev);
49074905
if (adev->mode_info.mode_config_initialized) {
@@ -4924,7 +4922,7 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)
49244922
* before ip_fini_early to prevent kfd locking refcount issues by calling
49254923
* amdgpu_amdkfd_suspend()
49264924
*/
4927-
if (drm_dev_is_unplugged(adev_to_drm(adev)))
4925+
if (pci_dev_is_disconnected(adev->pdev))
49284926
amdgpu_amdkfd_device_fini_sw(adev);
49294927

49304928
amdgpu_device_ip_fini_early(adev);
@@ -4936,7 +4934,7 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)
49364934

49374935
amdgpu_gart_dummy_page_fini(adev);
49384936

4939-
if (drm_dev_is_unplugged(adev_to_drm(adev)))
4937+
if (pci_dev_is_disconnected(adev->pdev))
49404938
amdgpu_device_unmap_mmio(adev);
49414939

49424940
}
@@ -5733,6 +5731,9 @@ int amdgpu_device_mode1_reset(struct amdgpu_device *adev)
57335731
/* enable mmio access after mode 1 reset completed */
57345732
adev->no_hw_access = false;
57355733

5734+
/* ensure no_hw_access is updated before we access hw */
5735+
smp_mb();
5736+
57365737
amdgpu_device_load_pci_state(adev->pdev);
57375738
ret = amdgpu_psp_wait_for_bootloader(adev);
57385739
if (ret)
@@ -7357,6 +7358,9 @@ void amdgpu_device_halt(struct amdgpu_device *adev)
73577358
amdgpu_xcp_dev_unplug(adev);
73587359
drm_dev_unplug(ddev);
73597360

7361+
amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
7362+
amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
7363+
73607364
amdgpu_irq_disable_all(adev);
73617365

73627366
amdgpu_fence_driver_hw_fini(adev);

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2164,6 +2164,7 @@ static int amdgpu_discovery_set_psp_ip_blocks(struct amdgpu_device *adev)
21642164
case IP_VERSION(13, 0, 11):
21652165
case IP_VERSION(13, 0, 12):
21662166
case IP_VERSION(13, 0, 14):
2167+
case IP_VERSION(13, 0, 15):
21672168
case IP_VERSION(14, 0, 0):
21682169
case IP_VERSION(14, 0, 1):
21692170
case IP_VERSION(14, 0, 4):
@@ -2988,9 +2989,11 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
29882989
case IP_VERSION(11, 5, 1):
29892990
case IP_VERSION(11, 5, 2):
29902991
case IP_VERSION(11, 5, 3):
2991-
case IP_VERSION(11, 5, 4):
29922992
adev->family = AMDGPU_FAMILY_GC_11_5_0;
29932993
break;
2994+
case IP_VERSION(11, 5, 4):
2995+
adev->family = AMDGPU_FAMILY_GC_11_5_4;
2996+
break;
29942997
case IP_VERSION(12, 0, 0):
29952998
case IP_VERSION(12, 0, 1):
29962999
case IP_VERSION(12, 1, 0):

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,15 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach)
514514
r = dma_resv_reserve_fences(resv, 2);
515515
if (!r)
516516
r = amdgpu_vm_clear_freed(adev, vm, NULL);
517+
518+
/* Don't pass 'ticket' to amdgpu_vm_handle_moved: we want the clear=true
519+
* path to be used otherwise we might update the PT of another process
520+
* while it's using the BO.
521+
* With clear=true, amdgpu_vm_bo_update will sync to command submission
522+
* from the same VM.
523+
*/
517524
if (!r)
518-
r = amdgpu_vm_handle_moved(adev, vm, ticket);
525+
r = amdgpu_vm_handle_moved(adev, vm, NULL);
519526

520527
if (r && r != -EBUSY)
521528
DRM_ERROR("Failed to invalidate VM page tables (%d))\n",

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

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ static int amdgpu_gem_object_open(struct drm_gem_object *obj,
232232
struct amdgpu_vm *vm = &fpriv->vm;
233233
struct amdgpu_bo_va *bo_va;
234234
struct mm_struct *mm;
235+
struct drm_exec exec;
235236
int r;
236237

237238
mm = amdgpu_ttm_tt_get_usermm(abo->tbo.ttm);
@@ -242,9 +243,18 @@ static int amdgpu_gem_object_open(struct drm_gem_object *obj,
242243
!amdgpu_vm_is_bo_always_valid(vm, abo))
243244
return -EPERM;
244245

245-
r = amdgpu_bo_reserve(abo, false);
246-
if (r)
247-
return r;
246+
drm_exec_init(&exec, DRM_EXEC_IGNORE_DUPLICATES, 0);
247+
drm_exec_until_all_locked(&exec) {
248+
r = drm_exec_prepare_obj(&exec, &abo->tbo.base, 1);
249+
drm_exec_retry_on_contention(&exec);
250+
if (unlikely(r))
251+
goto out_unlock;
252+
253+
r = amdgpu_vm_lock_pd(vm, &exec, 0);
254+
drm_exec_retry_on_contention(&exec);
255+
if (unlikely(r))
256+
goto out_unlock;
257+
}
248258

249259
amdgpu_vm_bo_update_shared(abo);
250260
bo_va = amdgpu_vm_bo_find(vm, abo);
@@ -260,8 +270,7 @@ static int amdgpu_gem_object_open(struct drm_gem_object *obj,
260270
amdgpu_bo_unreserve(abo);
261271
return r;
262272
}
263-
264-
amdgpu_bo_unreserve(abo);
273+
drm_exec_fini(&exec);
265274

266275
/* Validate and add eviction fence to DMABuf imports with dynamic
267276
* attachment in compute VMs. Re-validation will be done by
@@ -294,7 +303,10 @@ static int amdgpu_gem_object_open(struct drm_gem_object *obj,
294303
}
295304
}
296305
mutex_unlock(&vm->process_info->lock);
306+
return r;
297307

308+
out_unlock:
309+
drm_exec_fini(&exec);
298310
return r;
299311
}
300312

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,16 @@ void amdgpu_gmc_get_vbios_allocations(struct amdgpu_device *adev)
10681068
case CHIP_RENOIR:
10691069
adev->mman.keep_stolen_vga_memory = true;
10701070
break;
1071+
case CHIP_POLARIS10:
1072+
case CHIP_POLARIS11:
1073+
case CHIP_POLARIS12:
1074+
/* MacBookPros with switchable graphics put VRAM at 0 when
1075+
* the iGPU is enabled which results in cursor issues if
1076+
* the cursor ends up at 0. Reserve vram at 0 in that case.
1077+
*/
1078+
if (adev->gmc.vram_start == 0)
1079+
adev->mman.keep_stolen_vga_memory = true;
1080+
break;
10711081
default:
10721082
adev->mman.keep_stolen_vga_memory = false;
10731083
break;
@@ -1436,7 +1446,7 @@ int amdgpu_gmc_get_nps_memranges(struct amdgpu_device *adev,
14361446
if (!*exp_ranges)
14371447
*exp_ranges = range_cnt;
14381448
err:
1439-
kfree(ranges);
1449+
kvfree(ranges);
14401450

14411451
return ret;
14421452
}

0 commit comments

Comments
 (0)