Skip to content

Commit 42bb9b6

Browse files
committed
Merge tag 'drm-fixes-2025-07-04' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Weekly drm fixes, bit of a bumper crop, the usual amdgpu/xe/i915 suspects, then there is a large scattering of fixes across core and drivers. I think the simple panel lookup fix is probably the largest, the sched race fix is also fun, but I don't see anything standing out too badly. dma-buf: - fix timeout handling gem: - fix framebuffer object references sched: - fix spsc queue job count race bridge: - fix aux hpd bridge of node - panel: move missing flag handling - samsung-dsim: fix %pK usage to %p panel: - fix problem with simple panel lookup ttm: - fix error path handling amdgpu: - SDMA 5.x reset fix - Add missing firmware declaration - Fix leak in amdgpu_ctx_mgr_entity_fini() - Freesync fix - OLED backlight fix amdkfd: - mtype fix for ext coherent system memory - MMU notifier fix - gfx7/8 fix xe: - Fix chunking the PTE updates and overflowing the maximum number of dwords with with MI_STORE_DATA_IMM - Move WA BB to the LRC BO to mitigate hangs on context switch - Fix frequency/flush WAs for BMG - Fix kconfig prompt title and description - Do not require kunit - Extend 14018094691 WA to BMG - Fix wedging the device on signal i915: - Make mei interrupt top half irq disabled to fix RT builds - Fix timeline left held on VMA alloc error - Fix NULL pointer deref in vlv_dphy_param_init() - Fix selftest mock_request() to avoid NULL deref exynos: - switch to using %p instead of %pK - fix vblank NULL ptr race - fix lockup on samsung peach-pit/pi chromebooks vesadrm: - NULL ptr fix vmwgfx: - fix encrypted memory allocation bug v3d: - fix irq enabled during reset" * tag 'drm-fixes-2025-07-04' of https://gitlab.freedesktop.org/drm/kernel: (41 commits) drm/xe: Do not wedge device on killed exec queues drm/xe: Extend WA 14018094691 to BMG drm/v3d: Disable interrupts before resetting the GPU drm/gem: Acquire references on GEM handles for framebuffers drm/sched: Increment job count before swapping tail spsc queue drm/xe: Allow dropping kunit dependency as built-in drm/xe: Fix kconfig prompt drm/xe/bmg: Update Wa_22019338487 drm/xe/bmg: Update Wa_14022085890 drm/xe: Split xe_device_td_flush() drm/xe/xe_guc_pc: Lock once to update stashed frequencies drm/xe/guc_pc: Add _locked variant for min/max freq drm/xe: Make WA BB part of LRC BO drm/xe: Fix out-of-bounds field write in MI_STORE_DATA_IMM drm/i915/gsc: mei interrupt top half should be in irq disabled context drm/i915/gt: Fix timeline left held on VMA alloc error drm/vmwgfx: Fix guests running with TDX/SEV drm/amd/display: Don't allow OLED to go down to fully off drm/amd/display: Added case for when RR equals panel's max RR using freesync drm/amdkfd: add hqd_sdma_get_doorbell callbacks for gfx7/8 ...
2 parents 923d401 + da8d8e9 commit 42bb9b6

Some content is hidden

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

47 files changed

+632
-293
lines changed

drivers/dma-buf/dma-resv.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -685,11 +685,13 @@ long dma_resv_wait_timeout(struct dma_resv *obj, enum dma_resv_usage usage,
685685
dma_resv_iter_begin(&cursor, obj, usage);
686686
dma_resv_for_each_fence_unlocked(&cursor, fence) {
687687

688-
ret = dma_fence_wait_timeout(fence, intr, ret);
689-
if (ret <= 0) {
690-
dma_resv_iter_end(&cursor);
691-
return ret;
692-
}
688+
ret = dma_fence_wait_timeout(fence, intr, timeout);
689+
if (ret <= 0)
690+
break;
691+
692+
/* Even for zero timeout the return value is 1 */
693+
if (timeout)
694+
timeout = ret;
693695
}
694696
dma_resv_iter_end(&cursor);
695697

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,13 @@ static uint32_t read_vmid_from_vmfault_reg(struct amdgpu_device *adev)
561561
return REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID);
562562
}
563563

564+
static uint32_t kgd_hqd_sdma_get_doorbell(struct amdgpu_device *adev,
565+
int engine, int queue)
566+
567+
{
568+
return 0;
569+
}
570+
564571
const struct kfd2kgd_calls gfx_v7_kfd2kgd = {
565572
.program_sh_mem_settings = kgd_program_sh_mem_settings,
566573
.set_pasid_vmid_mapping = kgd_set_pasid_vmid_mapping,
@@ -578,4 +585,5 @@ const struct kfd2kgd_calls gfx_v7_kfd2kgd = {
578585
.set_scratch_backing_va = set_scratch_backing_va,
579586
.set_vm_context_page_table_base = set_vm_context_page_table_base,
580587
.read_vmid_from_vmfault_reg = read_vmid_from_vmfault_reg,
588+
.hqd_sdma_get_doorbell = kgd_hqd_sdma_get_doorbell,
581589
};

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,13 @@ static void set_vm_context_page_table_base(struct amdgpu_device *adev,
582582
lower_32_bits(page_table_base));
583583
}
584584

585+
static uint32_t kgd_hqd_sdma_get_doorbell(struct amdgpu_device *adev,
586+
int engine, int queue)
587+
588+
{
589+
return 0;
590+
}
591+
585592
const struct kfd2kgd_calls gfx_v8_kfd2kgd = {
586593
.program_sh_mem_settings = kgd_program_sh_mem_settings,
587594
.set_pasid_vmid_mapping = kgd_set_pasid_vmid_mapping,
@@ -599,4 +606,5 @@ const struct kfd2kgd_calls gfx_v8_kfd2kgd = {
599606
get_atc_vmid_pasid_mapping_info,
600607
.set_scratch_backing_va = set_scratch_backing_va,
601608
.set_vm_context_page_table_base = set_vm_context_page_table_base,
609+
.hqd_sdma_get_doorbell = kgd_hqd_sdma_get_doorbell,
602610
};

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ static void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)
944944
drm_sched_entity_fini(entity);
945945
}
946946
}
947+
kref_put(&ctx->refcount, amdgpu_ctx_fini);
947948
}
948949
}
949950

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include "amdgpu_ras.h"
4646

4747
MODULE_FIRMWARE("amdgpu/sdma_4_4_2.bin");
48+
MODULE_FIRMWARE("amdgpu/sdma_4_4_4.bin");
4849
MODULE_FIRMWARE("amdgpu/sdma_4_4_5.bin");
4950

5051
static const struct amdgpu_hwip_reg_entry sdma_reg_list_4_4_2[] = {

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,8 +1543,13 @@ static int sdma_v5_0_reset_queue(struct amdgpu_ring *ring, unsigned int vmid)
15431543
{
15441544
struct amdgpu_device *adev = ring->adev;
15451545
u32 inst_id = ring->me;
1546+
int r;
1547+
1548+
amdgpu_amdkfd_suspend(adev, true);
1549+
r = amdgpu_sdma_reset_engine(adev, inst_id);
1550+
amdgpu_amdkfd_resume(adev, true);
15461551

1547-
return amdgpu_sdma_reset_engine(adev, inst_id);
1552+
return r;
15481553
}
15491554

15501555
static int sdma_v5_0_stop_queue(struct amdgpu_ring *ring)

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,8 +1456,13 @@ static int sdma_v5_2_reset_queue(struct amdgpu_ring *ring, unsigned int vmid)
14561456
{
14571457
struct amdgpu_device *adev = ring->adev;
14581458
u32 inst_id = ring->me;
1459+
int r;
1460+
1461+
amdgpu_amdkfd_suspend(adev, true);
1462+
r = amdgpu_sdma_reset_engine(adev, inst_id);
1463+
amdgpu_amdkfd_resume(adev, true);
14591464

1460-
return amdgpu_sdma_reset_engine(adev, inst_id);
1465+
return r;
14611466
}
14621467

14631468
static int sdma_v5_2_stop_queue(struct amdgpu_ring *ring)

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

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,13 +1171,12 @@ svm_range_split_head(struct svm_range *prange, uint64_t new_start,
11711171
}
11721172

11731173
static void
1174-
svm_range_add_child(struct svm_range *prange, struct mm_struct *mm,
1175-
struct svm_range *pchild, enum svm_work_list_ops op)
1174+
svm_range_add_child(struct svm_range *prange, struct svm_range *pchild, enum svm_work_list_ops op)
11761175
{
11771176
pr_debug("add child 0x%p [0x%lx 0x%lx] to prange 0x%p child list %d\n",
11781177
pchild, pchild->start, pchild->last, prange, op);
11791178

1180-
pchild->work_item.mm = mm;
1179+
pchild->work_item.mm = NULL;
11811180
pchild->work_item.op = op;
11821181
list_add_tail(&pchild->child_list, &prange->child_list);
11831182
}
@@ -1278,7 +1277,7 @@ svm_range_get_pte_flags(struct kfd_node *node,
12781277
mapping_flags |= ext_coherent ? AMDGPU_VM_MTYPE_UC : AMDGPU_VM_MTYPE_NC;
12791278
/* system memory accessed by the dGPU */
12801279
} else {
1281-
if (gc_ip_version < IP_VERSION(9, 5, 0))
1280+
if (gc_ip_version < IP_VERSION(9, 5, 0) || ext_coherent)
12821281
mapping_flags |= AMDGPU_VM_MTYPE_UC;
12831282
else
12841283
mapping_flags |= AMDGPU_VM_MTYPE_NC;
@@ -2394,15 +2393,17 @@ svm_range_add_list_work(struct svm_range_list *svms, struct svm_range *prange,
23942393
prange->work_item.op != SVM_OP_UNMAP_RANGE)
23952394
prange->work_item.op = op;
23962395
} else {
2397-
prange->work_item.op = op;
2398-
2399-
/* Pairs with mmput in deferred_list_work */
2400-
mmget(mm);
2401-
prange->work_item.mm = mm;
2402-
list_add_tail(&prange->deferred_list,
2403-
&prange->svms->deferred_range_list);
2404-
pr_debug("add prange 0x%p [0x%lx 0x%lx] to work list op %d\n",
2405-
prange, prange->start, prange->last, op);
2396+
/* Pairs with mmput in deferred_list_work.
2397+
* If process is exiting and mm is gone, don't update mmu notifier.
2398+
*/
2399+
if (mmget_not_zero(mm)) {
2400+
prange->work_item.mm = mm;
2401+
prange->work_item.op = op;
2402+
list_add_tail(&prange->deferred_list,
2403+
&prange->svms->deferred_range_list);
2404+
pr_debug("add prange 0x%p [0x%lx 0x%lx] to work list op %d\n",
2405+
prange, prange->start, prange->last, op);
2406+
}
24062407
}
24072408
spin_unlock(&svms->deferred_list_lock);
24082409
}
@@ -2416,8 +2417,7 @@ void schedule_deferred_list_work(struct svm_range_list *svms)
24162417
}
24172418

24182419
static void
2419-
svm_range_unmap_split(struct mm_struct *mm, struct svm_range *parent,
2420-
struct svm_range *prange, unsigned long start,
2420+
svm_range_unmap_split(struct svm_range *parent, struct svm_range *prange, unsigned long start,
24212421
unsigned long last)
24222422
{
24232423
struct svm_range *head;
@@ -2438,12 +2438,12 @@ svm_range_unmap_split(struct mm_struct *mm, struct svm_range *parent,
24382438
svm_range_split(tail, last + 1, tail->last, &head);
24392439

24402440
if (head != prange && tail != prange) {
2441-
svm_range_add_child(parent, mm, head, SVM_OP_UNMAP_RANGE);
2442-
svm_range_add_child(parent, mm, tail, SVM_OP_ADD_RANGE);
2441+
svm_range_add_child(parent, head, SVM_OP_UNMAP_RANGE);
2442+
svm_range_add_child(parent, tail, SVM_OP_ADD_RANGE);
24432443
} else if (tail != prange) {
2444-
svm_range_add_child(parent, mm, tail, SVM_OP_UNMAP_RANGE);
2444+
svm_range_add_child(parent, tail, SVM_OP_UNMAP_RANGE);
24452445
} else if (head != prange) {
2446-
svm_range_add_child(parent, mm, head, SVM_OP_UNMAP_RANGE);
2446+
svm_range_add_child(parent, head, SVM_OP_UNMAP_RANGE);
24472447
} else if (parent != prange) {
24482448
prange->work_item.op = SVM_OP_UNMAP_RANGE;
24492449
}
@@ -2520,14 +2520,14 @@ svm_range_unmap_from_cpu(struct mm_struct *mm, struct svm_range *prange,
25202520
l = min(last, pchild->last);
25212521
if (l >= s)
25222522
svm_range_unmap_from_gpus(pchild, s, l, trigger);
2523-
svm_range_unmap_split(mm, prange, pchild, start, last);
2523+
svm_range_unmap_split(prange, pchild, start, last);
25242524
mutex_unlock(&pchild->lock);
25252525
}
25262526
s = max(start, prange->start);
25272527
l = min(last, prange->last);
25282528
if (l >= s)
25292529
svm_range_unmap_from_gpus(prange, s, l, trigger);
2530-
svm_range_unmap_split(mm, prange, prange, start, last);
2530+
svm_range_unmap_split(prange, prange, start, last);
25312531

25322532
if (unmap_parent)
25332533
svm_range_add_list_work(svms, prange, mm, SVM_OP_UNMAP_RANGE);
@@ -2570,8 +2570,6 @@ svm_range_cpu_invalidate_pagetables(struct mmu_interval_notifier *mni,
25702570

25712571
if (range->event == MMU_NOTIFY_RELEASE)
25722572
return true;
2573-
if (!mmget_not_zero(mni->mm))
2574-
return true;
25752573

25762574
start = mni->interval_tree.start;
25772575
last = mni->interval_tree.last;
@@ -2598,7 +2596,6 @@ svm_range_cpu_invalidate_pagetables(struct mmu_interval_notifier *mni,
25982596
}
25992597

26002598
svm_range_unlock(prange);
2601-
mmput(mni->mm);
26022599

26032600
return true;
26042601
}

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3610,13 +3610,15 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
36103610

36113611
luminance_range = &conn_base->display_info.luminance_range;
36123612

3613-
if (luminance_range->max_luminance) {
3614-
caps->aux_min_input_signal = luminance_range->min_luminance;
3613+
if (luminance_range->max_luminance)
36153614
caps->aux_max_input_signal = luminance_range->max_luminance;
3616-
} else {
3617-
caps->aux_min_input_signal = 0;
3615+
else
36183616
caps->aux_max_input_signal = 512;
3619-
}
3617+
3618+
if (luminance_range->min_luminance)
3619+
caps->aux_min_input_signal = luminance_range->min_luminance;
3620+
else
3621+
caps->aux_min_input_signal = 1;
36203622

36213623
min_input_signal_override = drm_get_panel_min_brightness_quirk(aconnector->drm_edid);
36223624
if (min_input_signal_override >= 0)

drivers/gpu/drm/amd/display/dc/dc_hw_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,7 @@ struct dc_crtc_timing {
974974
uint32_t pix_clk_100hz;
975975

976976
uint32_t min_refresh_in_uhz;
977+
uint32_t max_refresh_in_uhz;
977978

978979
uint32_t vic;
979980
uint32_t hdmi_vic;

0 commit comments

Comments
 (0)