Skip to content

Commit 39d3389

Browse files
committed
Merge tag 'drm-fixes-2026-01-16' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Simona Vetter: "We've had nothing aside of a compiler noise fix until today, when the amd and drm-misc fixes showed up after Dave already went into weekend mode. So it's on me to push these out, since there's a bunch of important fixes in here I think that shouldn't be delayed for a week. Core Changes: - take gem lock when preallocating in gpuvm - add single byte read fallback to dp for broken usb-c adapters - remove duplicate drm_sysfb declarations Driver Changes: - i915: compiler noise fix - amdgpu/amdkfd: pile of fixes all over - vmwgfx: - v10 cursor regression fix - other fixes - rockchip: - waiting for cfgdone regression fix - other fixes - gud: fix oops on disconnect - simple-panel: - regression fix when connector is not set - fix for DataImage SCF0700C48GGU18 - nouveau: cursor handling locking fix" * tag 'drm-fixes-2026-01-16' of https://gitlab.freedesktop.org/drm/kernel: (33 commits) drm/amd/display: Add an hdmi_hpd_debounce_delay_ms module drm/amdgpu/userq: Fix fence reference leak on queue teardown v2 drm/amdkfd: No need to suspend whole MES to evict process Revert "drm/amdgpu: don't attach the tlb fence for SI" drm/amdgpu: validate the flush_gpu_tlb_pasid() drm/amd/pm: fix smu overdrive data type wrong issue on smu 14.0.2 drm/amd/display: Initialise backlight level values from hw drm/amd/display: Bump the HDMI clock to 340MHz drm/amd/display: Show link name in PSR status message drm/amdkfd: fix a memory leak in device_queue_manager_init() drm/amdgpu: make sure userqs are enabled in userq IOCTLs drm/amdgpu: Use correct address to setup gart page table for vram access Revert duplicate "drm/amdgpu: disable peer-to-peer access for DCC-enabled GC12 VRAM surfaces" drm/amd: Clean up kfd node on surprise disconnect drm/amdgpu: fix drm panic null pointer when driver not support atomic drm/amdgpu: Fix gfx9 update PTE mtype flag drm/sysfb: Remove duplicate declarations drm/nouveau/kms/nv50-: Assert we hold nv50_disp->lock in nv50_head_flush_* drm/nouveau/disp/nv50-: Set lock_core in curs507a_prepare drm/gud: fix NULL fb and crtc dereferences on USB disconnect ...
2 parents 6782a30 + 9dd1f5f commit 39d3389

35 files changed

Lines changed: 320 additions & 200 deletions

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ extern int amdgpu_rebar;
274274
extern int amdgpu_wbrf;
275275
extern int amdgpu_user_queue;
276276

277+
extern uint amdgpu_hdmi_hpd_debounce_delay_ms;
278+
277279
#define AMDGPU_VM_MAX_NUM_CTX 4096
278280
#define AMDGPU_SG_THRESHOLD (256*1024*1024)
279281
#define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5063,6 +5063,14 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)
50635063

50645064
amdgpu_ttm_set_buffer_funcs_status(adev, false);
50655065

5066+
/*
5067+
* device went through surprise hotplug; we need to destroy topology
5068+
* before ip_fini_early to prevent kfd locking refcount issues by calling
5069+
* amdgpu_amdkfd_suspend()
5070+
*/
5071+
if (drm_dev_is_unplugged(adev_to_drm(adev)))
5072+
amdgpu_amdkfd_device_fini_sw(adev);
5073+
50665074
amdgpu_device_ip_fini_early(adev);
50675075

50685076
amdgpu_irq_fini_hw(adev);

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,12 @@ int amdgpu_display_get_scanout_buffer(struct drm_plane *plane,
18801880
struct drm_scanout_buffer *sb)
18811881
{
18821882
struct amdgpu_bo *abo;
1883-
struct drm_framebuffer *fb = plane->state->fb;
1883+
struct drm_framebuffer *fb;
1884+
1885+
if (drm_drv_uses_atomic_modeset(plane->dev))
1886+
fb = plane->state->fb;
1887+
else
1888+
fb = plane->fb;
18841889

18851890
if (!fb)
18861891
return -EINVAL;

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

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

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

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ int amdgpu_damage_clips = -1; /* auto */
247247
int amdgpu_umsch_mm_fwlog;
248248
int amdgpu_rebar = -1; /* auto */
249249
int amdgpu_user_queue = -1;
250+
uint amdgpu_hdmi_hpd_debounce_delay_ms;
250251

251252
DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0,
252253
"DRM_UT_CORE",
@@ -1123,6 +1124,16 @@ module_param_named(rebar, amdgpu_rebar, int, 0444);
11231124
MODULE_PARM_DESC(user_queue, "Enable user queues (-1 = auto (default), 0 = disable, 1 = enable, 2 = enable UQs and disable KQs)");
11241125
module_param_named(user_queue, amdgpu_user_queue, int, 0444);
11251126

1127+
/*
1128+
* DOC: hdmi_hpd_debounce_delay_ms (uint)
1129+
* HDMI HPD disconnect debounce delay in milliseconds.
1130+
*
1131+
* Used to filter short disconnect->reconnect HPD toggles some HDMI sinks
1132+
* generate while entering/leaving power save. Set to 0 to disable by default.
1133+
*/
1134+
MODULE_PARM_DESC(hdmi_hpd_debounce_delay_ms, "HDMI HPD disconnect debounce delay in milliseconds (0 to disable (by default), 1500 is common)");
1135+
module_param_named(hdmi_hpd_debounce_delay_ms, amdgpu_hdmi_hpd_debounce_delay_ms, uint, 0644);
1136+
11261137
/* These devices are not supported by amdgpu.
11271138
* They are supported by the mach64, r128, radeon drivers
11281139
*/

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ void amdgpu_gart_map(struct amdgpu_device *adev, uint64_t offset,
375375
* @start_page: first page to map in the GART aperture
376376
* @num_pages: number of pages to be mapped
377377
* @flags: page table entry flags
378-
* @dst: CPU address of the GART table
378+
* @dst: valid CPU address of GART table, cannot be null
379379
*
380380
* Binds a BO that is allocated in VRAM to the GART page table
381381
* (all ASICs).
@@ -396,7 +396,7 @@ void amdgpu_gart_map_vram_range(struct amdgpu_device *adev, uint64_t pa,
396396
return;
397397

398398
for (i = 0; i < num_pages; ++i) {
399-
amdgpu_gmc_set_pte_pde(adev, adev->gart.ptr,
399+
amdgpu_gmc_set_pte_pde(adev, dst,
400400
start_page + i, pa + AMDGPU_GPU_PAGE_SIZE * i, flags);
401401
}
402402

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,10 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid,
732732
return 0;
733733

734734
if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready) {
735+
736+
if (!adev->gmc.gmc_funcs->flush_gpu_tlb_pasid)
737+
return 0;
738+
735739
if (adev->gmc.flush_tlb_needs_extra_type_2)
736740
adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid,
737741
2, all_hub,

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,12 +885,28 @@ static int amdgpu_userq_input_args_validate(struct drm_device *dev,
885885
return 0;
886886
}
887887

888+
bool amdgpu_userq_enabled(struct drm_device *dev)
889+
{
890+
struct amdgpu_device *adev = drm_to_adev(dev);
891+
int i;
892+
893+
for (i = 0; i < AMDGPU_HW_IP_NUM; i++) {
894+
if (adev->userq_funcs[i])
895+
return true;
896+
}
897+
898+
return false;
899+
}
900+
888901
int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
889902
struct drm_file *filp)
890903
{
891904
union drm_amdgpu_userq *args = data;
892905
int r;
893906

907+
if (!amdgpu_userq_enabled(dev))
908+
return -ENOTSUPP;
909+
894910
if (amdgpu_userq_input_args_validate(dev, args, filp) < 0)
895911
return -EINVAL;
896912

drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ uint64_t amdgpu_userq_get_doorbell_index(struct amdgpu_userq_mgr *uq_mgr,
141141
struct drm_file *filp);
142142

143143
u32 amdgpu_userq_get_supported_ip_mask(struct amdgpu_device *adev);
144+
bool amdgpu_userq_enabled(struct drm_device *dev);
144145

145146
int amdgpu_userq_suspend(struct amdgpu_device *adev);
146147
int amdgpu_userq_resume(struct amdgpu_device *adev);

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ static void amdgpu_userq_walk_and_drop_fence_drv(struct xarray *xa)
141141
void
142142
amdgpu_userq_fence_driver_free(struct amdgpu_usermode_queue *userq)
143143
{
144+
dma_fence_put(userq->last_fence);
145+
144146
amdgpu_userq_walk_and_drop_fence_drv(&userq->fence_drv_xa);
145147
xa_destroy(&userq->fence_drv_xa);
146148
/* Drop the fence_drv reference held by user queue */
@@ -471,6 +473,9 @@ int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
471473
struct drm_exec exec;
472474
u64 wptr;
473475

476+
if (!amdgpu_userq_enabled(dev))
477+
return -ENOTSUPP;
478+
474479
num_syncobj_handles = args->num_syncobj_handles;
475480
syncobj_handles = memdup_user(u64_to_user_ptr(args->syncobj_handles),
476481
size_mul(sizeof(u32), num_syncobj_handles));
@@ -653,6 +658,9 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
653658
int r, i, rentry, wentry, cnt;
654659
struct drm_exec exec;
655660

661+
if (!amdgpu_userq_enabled(dev))
662+
return -ENOTSUPP;
663+
656664
num_read_bo_handles = wait_info->num_bo_read_handles;
657665
bo_handles_read = memdup_user(u64_to_user_ptr(wait_info->bo_read_handles),
658666
size_mul(sizeof(u32), num_read_bo_handles));

0 commit comments

Comments
 (0)