Skip to content

Commit 89748ac

Browse files
committed
Merge tag 'drm-next-2025-08-01' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Just a bunch of amdgpu and xe fixes. amdgpu: - DSC divide by 0 fix - clang fix - DC debugfs fix - Userq fixes - Avoid extra evict-restore with KFD - Backlight fix - Documentation fix - RAS fix - Add new kicker handling - DSC fix for DCN 3.1.4 - PSR fix - Atomic fix - DC reset fixes - DCN 3.0.1 fix - MMHUB client mapping fix xe: - Fix BMG probe on unsupported mailbox command - Fix OA static checker warning about null gt - Fix a NULL vs IS_ERR() bug in xe_i2c_register_adapter - Fix missing unwind goto in GuC/HuC - Don't register I2C devices if VF - Clear whole GuC g2h_fence during initialization - Avoid call kfree for drmm_kzalloc - Fix pci_dev reference leak on configfs - SRIOV: Disable CSC support on VF * tag 'drm-next-2025-08-01' of https://gitlab.freedesktop.org/drm/kernel: (24 commits) drm/xe/vf: Disable CSC support on VF drm/amdgpu: update mmhub 4.1.0 client id mappings drm/amd/display: Allow DCN301 to clear update flags drm/amd/display: Pass up errors for reset GPU that fails to init HW drm/amd/display: Only finalize atomic_obj if it was initialized drm/amd/display: Avoid configuring PSR granularity if PSR-SU not supported drm/amd/display: Disable dsc_power_gate for dcn314 by default drm/amdgpu: add kicker fws loading for gfx12/smu14/psp14 drm/amd/amdgpu: fix missing lock for cper.ring->rptr/wptr access drm/amd/display: Fix misuse of /** to /* in 'dce_i2c_hw.c' drm/amd/display: fix initial backlight brightness calculation drm/amdgpu: Avoid extra evict-restore process. drm/amdgpu: track whether a queue is a kernel queue in amdgpu_mqd_prop drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities drm/amdgpu: Initialize data to NULL in imu_v12_0_program_rlc_ram() drm/amd/display: Fix divide by zero when calculating min ODM factor drm/xe/configfs: Fix pci_dev reference leak drm/xe/hw_engine_group: Avoid call kfree() for drmm_kzalloc() drm/xe/guc: Clear whole g2h_fence during initialization drm/xe/vf: Don't register I2C devices if VF ...
2 parents 07b4382 + 6531a2c commit 89748ac

25 files changed

+111
-94
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,7 @@ struct amdgpu_mqd_prop {
883883
uint64_t csa_addr;
884884
uint64_t fence_address;
885885
bool tmz_queue;
886+
bool kernel_queue;
886887
};
887888

888889
struct amdgpu_mqd {

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ static u32 amdgpu_cper_ring_get_ent_sz(struct amdgpu_ring *ring, u64 pos)
459459

460460
void amdgpu_cper_ring_write(struct amdgpu_ring *ring, void *src, int count)
461461
{
462-
u64 pos, wptr_old, rptr = *ring->rptr_cpu_addr & ring->ptr_mask;
462+
u64 pos, wptr_old, rptr;
463463
int rec_cnt_dw = count >> 2;
464464
u32 chunk, ent_sz;
465465
u8 *s = (u8 *)src;
@@ -472,9 +472,11 @@ void amdgpu_cper_ring_write(struct amdgpu_ring *ring, void *src, int count)
472472
return;
473473
}
474474

475+
mutex_lock(&ring->adev->cper.ring_lock);
476+
475477
wptr_old = ring->wptr;
478+
rptr = *ring->rptr_cpu_addr & ring->ptr_mask;
476479

477-
mutex_lock(&ring->adev->cper.ring_lock);
478480
while (count) {
479481
ent_sz = amdgpu_cper_ring_get_ent_sz(ring, ring->wptr);
480482
chunk = umin(ent_sz, count);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ static void amdgpu_ring_to_mqd_prop(struct amdgpu_ring *ring,
719719
prop->eop_gpu_addr = ring->eop_gpu_addr;
720720
prop->use_doorbell = ring->use_doorbell;
721721
prop->doorbell_index = ring->doorbell_index;
722+
prop->kernel_queue = true;
722723

723724
/* map_queues packet doesn't need activate the queue,
724725
* so only kiq need set this field.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
static const struct kicker_device kicker_device_list[] = {
3434
{0x744B, 0x00},
35+
{0x7551, 0xC8}
3536
};
3637

3738
static void amdgpu_ucode_print_common_hdr(const struct common_firmware_header *hdr)

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2414,13 +2414,11 @@ void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size,
24142414
*/
24152415
long amdgpu_vm_wait_idle(struct amdgpu_vm *vm, long timeout)
24162416
{
2417-
timeout = dma_resv_wait_timeout(vm->root.bo->tbo.base.resv,
2418-
DMA_RESV_USAGE_BOOKKEEP,
2419-
true, timeout);
2417+
timeout = drm_sched_entity_flush(&vm->immediate, timeout);
24202418
if (timeout <= 0)
24212419
return timeout;
24222420

2423-
return dma_fence_wait_timeout(vm->last_unlocked, true, timeout);
2421+
return drm_sched_entity_flush(&vm->delayed, timeout);
24242422
}
24252423

24262424
static void amdgpu_vm_destroy_task_info(struct kref *kref)

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ MODULE_FIRMWARE("amdgpu/gc_12_0_1_pfp.bin");
7979
MODULE_FIRMWARE("amdgpu/gc_12_0_1_me.bin");
8080
MODULE_FIRMWARE("amdgpu/gc_12_0_1_mec.bin");
8181
MODULE_FIRMWARE("amdgpu/gc_12_0_1_rlc.bin");
82+
MODULE_FIRMWARE("amdgpu/gc_12_0_1_rlc_kicker.bin");
8283
MODULE_FIRMWARE("amdgpu/gc_12_0_1_toc.bin");
8384

8485
static const struct amdgpu_hwip_reg_entry gc_reg_list_12_0[] = {
@@ -586,7 +587,7 @@ static int gfx_v12_0_init_toc_microcode(struct amdgpu_device *adev, const char *
586587

587588
static int gfx_v12_0_init_microcode(struct amdgpu_device *adev)
588589
{
589-
char ucode_prefix[15];
590+
char ucode_prefix[30];
590591
int err;
591592
const struct rlc_firmware_header_v2_0 *rlc_hdr;
592593
uint16_t version_major;
@@ -613,9 +614,14 @@ static int gfx_v12_0_init_microcode(struct amdgpu_device *adev)
613614
amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_ME_P0_STACK);
614615

615616
if (!amdgpu_sriov_vf(adev)) {
616-
err = amdgpu_ucode_request(adev, &adev->gfx.rlc_fw,
617-
AMDGPU_UCODE_REQUIRED,
618-
"amdgpu/%s_rlc.bin", ucode_prefix);
617+
if (amdgpu_is_kicker_fw(adev))
618+
err = amdgpu_ucode_request(adev, &adev->gfx.rlc_fw,
619+
AMDGPU_UCODE_REQUIRED,
620+
"amdgpu/%s_rlc_kicker.bin", ucode_prefix);
621+
else
622+
err = amdgpu_ucode_request(adev, &adev->gfx.rlc_fw,
623+
AMDGPU_UCODE_REQUIRED,
624+
"amdgpu/%s_rlc.bin", ucode_prefix);
619625
if (err)
620626
goto out;
621627
rlc_hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data;

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,26 @@
3434

3535
MODULE_FIRMWARE("amdgpu/gc_12_0_0_imu.bin");
3636
MODULE_FIRMWARE("amdgpu/gc_12_0_1_imu.bin");
37+
MODULE_FIRMWARE("amdgpu/gc_12_0_1_imu_kicker.bin");
3738

3839
#define TRANSFER_RAM_MASK 0x001c0000
3940

4041
static int imu_v12_0_init_microcode(struct amdgpu_device *adev)
4142
{
42-
char ucode_prefix[15];
43+
char ucode_prefix[30];
4344
int err;
4445
const struct imu_firmware_header_v1_0 *imu_hdr;
4546
struct amdgpu_firmware_info *info = NULL;
4647

4748
DRM_DEBUG("\n");
4849

4950
amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix, sizeof(ucode_prefix));
50-
err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, AMDGPU_UCODE_REQUIRED,
51-
"amdgpu/%s_imu.bin", ucode_prefix);
51+
if (amdgpu_is_kicker_fw(adev))
52+
err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, AMDGPU_UCODE_REQUIRED,
53+
"amdgpu/%s_imu_kicker.bin", ucode_prefix);
54+
else
55+
err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, AMDGPU_UCODE_REQUIRED,
56+
"amdgpu/%s_imu.bin", ucode_prefix);
5257
if (err)
5358
goto out;
5459

@@ -362,7 +367,7 @@ static void program_imu_rlc_ram(struct amdgpu_device *adev,
362367
static void imu_v12_0_program_rlc_ram(struct amdgpu_device *adev)
363368
{
364369
u32 reg_data, size = 0;
365-
const u32 *data;
370+
const u32 *data = NULL;
366371
int r = -EINVAL;
367372

368373
WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_INDEX, 0x2);

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

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,39 +37,31 @@
3737
static const char *mmhub_client_ids_v4_1_0[][2] = {
3838
[0][0] = "VMC",
3939
[4][0] = "DCEDMC",
40-
[5][0] = "DCEVGA",
4140
[6][0] = "MP0",
4241
[7][0] = "MP1",
4342
[8][0] = "MPIO",
44-
[16][0] = "HDP",
45-
[17][0] = "LSDMA",
46-
[18][0] = "JPEG",
47-
[19][0] = "VCNU0",
48-
[21][0] = "VSCH",
49-
[22][0] = "VCNU1",
50-
[23][0] = "VCN1",
51-
[32+20][0] = "VCN0",
52-
[2][1] = "DBGUNBIO",
43+
[16][0] = "LSDMA",
44+
[17][0] = "JPEG",
45+
[19][0] = "VCNU",
46+
[22][0] = "VSCH",
47+
[23][0] = "HDP",
48+
[32+23][0] = "VCNRD",
5349
[3][1] = "DCEDWB",
5450
[4][1] = "DCEDMC",
55-
[5][1] = "DCEVGA",
5651
[6][1] = "MP0",
5752
[7][1] = "MP1",
5853
[8][1] = "MPIO",
5954
[10][1] = "DBGU0",
6055
[11][1] = "DBGU1",
61-
[12][1] = "DBGU2",
62-
[13][1] = "DBGU3",
56+
[12][1] = "DBGUNBIO",
6357
[14][1] = "XDP",
6458
[15][1] = "OSSSYS",
65-
[16][1] = "HDP",
66-
[17][1] = "LSDMA",
67-
[18][1] = "JPEG",
68-
[19][1] = "VCNU0",
69-
[20][1] = "VCN0",
70-
[21][1] = "VSCH",
71-
[22][1] = "VCNU1",
72-
[23][1] = "VCN1",
59+
[16][1] = "LSDMA",
60+
[17][1] = "JPEG",
61+
[18][1] = "VCNWR",
62+
[19][1] = "VCNU",
63+
[22][1] = "VSCH",
64+
[23][1] = "HDP",
7365
};
7466

7567
static uint32_t mmhub_v4_1_0_get_invalidate_req(unsigned int vmid,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
MODULE_FIRMWARE("amdgpu/psp_14_0_2_sos.bin");
3535
MODULE_FIRMWARE("amdgpu/psp_14_0_2_ta.bin");
3636
MODULE_FIRMWARE("amdgpu/psp_14_0_3_sos.bin");
37+
MODULE_FIRMWARE("amdgpu/psp_14_0_3_sos_kicker.bin");
3738
MODULE_FIRMWARE("amdgpu/psp_14_0_3_ta.bin");
39+
MODULE_FIRMWARE("amdgpu/psp_14_0_3_ta_kicker.bin");
3840
MODULE_FIRMWARE("amdgpu/psp_14_0_5_toc.bin");
3941
MODULE_FIRMWARE("amdgpu/psp_14_0_5_ta.bin");
4042

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3398,8 +3398,10 @@ static int dm_resume(struct amdgpu_ip_block *ip_block)
33983398
link_enc_cfg_copy(adev->dm.dc->current_state, dc_state);
33993399

34003400
r = dm_dmub_hw_init(adev);
3401-
if (r)
3401+
if (r) {
34023402
drm_err(adev_to_drm(adev), "DMUB interface failed to initialize: status=%d\n", r);
3403+
return r;
3404+
}
34033405

34043406
dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D0);
34053407
dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D0);
@@ -4983,9 +4985,9 @@ amdgpu_dm_register_backlight_device(struct amdgpu_dm_connector *aconnector)
49834985
caps = &dm->backlight_caps[aconnector->bl_idx];
49844986
if (get_brightness_range(caps, &min, &max)) {
49854987
if (power_supply_is_system_supplied() > 0)
4986-
props.brightness = (max - min) * DIV_ROUND_CLOSEST(caps->ac_level, 100);
4988+
props.brightness = DIV_ROUND_CLOSEST((max - min) * caps->ac_level, 100);
49874989
else
4988-
props.brightness = (max - min) * DIV_ROUND_CLOSEST(caps->dc_level, 100);
4990+
props.brightness = DIV_ROUND_CLOSEST((max - min) * caps->dc_level, 100);
49894991
/* min is zero, so max needs to be adjusted */
49904992
props.max_brightness = max - min;
49914993
drm_dbg(drm, "Backlight caps: min: %d, max: %d, ac %d, dc %d\n", min, max,
@@ -5410,7 +5412,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
54105412

54115413
static void amdgpu_dm_destroy_drm_device(struct amdgpu_display_manager *dm)
54125414
{
5413-
drm_atomic_private_obj_fini(&dm->atomic_obj);
5415+
if (dm->atomic_obj.state)
5416+
drm_atomic_private_obj_fini(&dm->atomic_obj);
54145417
}
54155418

54165419
/******************************************************************************

0 commit comments

Comments
 (0)