Skip to content

Commit 7ee983c

Browse files
committed
Merge tag 'drm-fixes-2025-02-08' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Just regular drm fixes, amdgpu, xe and i915 mostly, but a few scattered fixes. I think one of the i915 fixes fixes some build combos that Guenter was seeing. amdgpu: - Add new tiling flag for DCC write compress disable - Add BO metadata flag for DCC - Fix potential out of bounds access in display - Seamless boot fix - CONFIG_FRAME_WARN fix - PSR1 fix xe: - OA uAPI related fixes - Fix SRIOV migration initialization - Restore devcoredump to a sane state i915: - Fix the build error with clamp after WARN_ON on gcc 13.x+ - HDCP related fixes - PMU fix zero delta busyness issue - Fix page cleanup on DMA remap failure - Drop 64bpp YUV formats from ICL+ SDR planes - GuC log related fix - DisplayPort related fixes ivpu: - Fix error handling komeda: - add return check zynqmp: - fix locking in DP code ast: - fix AST DP timeout cec: - fix broken CEC adapter check" * tag 'drm-fixes-2025-02-08' of https://gitlab.freedesktop.org/drm/kernel: (29 commits) drm/i915/dp: Fix potential infinite loop in 128b/132b SST Revert "drm/amd/display: Use HW lock mgr for PSR1" drm/amd/display: Respect user's CONFIG_FRAME_WARN more for dml files accel/amdxdna: Add MODULE_FIRMWARE() declarations drm/i915/dp: Iterate DSC BPP from high to low on all platforms drm/xe: Fix and re-enable xe_print_blob_ascii85() drm/xe/devcoredump: Move exec queue snapshot to Contexts section drm/xe/oa: Set stream->pollin in xe_oa_buffer_check_unlocked drm/xe/pf: Fix migration initialization drm/xe/oa: Preserve oa_ctrl unused bits drm/amd/display: Fix seamless boot sequence drm/amd/display: Fix out-of-bound accesses drm/amdgpu: add a BO metadata flag to disable write compression for Vulkan drm/i915/backlight: Return immediately when scale() finds invalid parameters drm/i915/dp: Return min bpc supported by source instead of 0 drm/i915/dp: fix the Adaptive sync Operation mode for SDP drm/i915/guc: Debug print LRC state entries only if the context is pinned drm/i915: Drop 64bpp YUV formats from ICL+ SDR planes drm/i915: Fix page cleanup on DMA remap failure drm/i915/pmu: Fix zero delta busyness issue ...
2 parents 8aa0f49 + 4f6993b commit 7ee983c

Some content is hidden

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

41 files changed

+249
-148
lines changed

drivers/accel/amdxdna/amdxdna_pci_drv.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121

2222
#define AMDXDNA_AUTOSUSPEND_DELAY 5000 /* milliseconds */
2323

24+
MODULE_FIRMWARE("amdnpu/1502_00/npu.sbin");
25+
MODULE_FIRMWARE("amdnpu/17f0_10/npu.sbin");
26+
MODULE_FIRMWARE("amdnpu/17f0_11/npu.sbin");
27+
MODULE_FIRMWARE("amdnpu/17f0_20/npu.sbin");
28+
2429
/*
2530
* Bind the driver base on (vendor_id, device_id) pair and later use the
2631
* (device_id, rev_id) pair as a key to select the devices. The devices with

drivers/accel/ivpu/ivpu_drv.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,15 +397,19 @@ int ivpu_boot(struct ivpu_device *vdev)
397397
if (ivpu_fw_is_cold_boot(vdev)) {
398398
ret = ivpu_pm_dct_init(vdev);
399399
if (ret)
400-
goto err_diagnose_failure;
400+
goto err_disable_ipc;
401401

402402
ret = ivpu_hw_sched_init(vdev);
403403
if (ret)
404-
goto err_diagnose_failure;
404+
goto err_disable_ipc;
405405
}
406406

407407
return 0;
408408

409+
err_disable_ipc:
410+
ivpu_ipc_disable(vdev);
411+
ivpu_hw_irq_disable(vdev);
412+
disable_irq(vdev->irq);
409413
err_diagnose_failure:
410414
ivpu_hw_diagnose_failure(vdev);
411415
ivpu_mmu_evtq_dump(vdev);

drivers/accel/ivpu/ivpu_pm.c

Lines changed: 47 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -115,41 +115,57 @@ static int ivpu_resume(struct ivpu_device *vdev)
115115
return ret;
116116
}
117117

118-
static void ivpu_pm_recovery_work(struct work_struct *work)
118+
static void ivpu_pm_reset_begin(struct ivpu_device *vdev)
119119
{
120-
struct ivpu_pm_info *pm = container_of(work, struct ivpu_pm_info, recovery_work);
121-
struct ivpu_device *vdev = pm->vdev;
122-
char *evt[2] = {"IVPU_PM_EVENT=IVPU_RECOVER", NULL};
123-
int ret;
124-
125-
ivpu_err(vdev, "Recovering the NPU (reset #%d)\n", atomic_read(&vdev->pm->reset_counter));
126-
127-
ret = pm_runtime_resume_and_get(vdev->drm.dev);
128-
if (ret)
129-
ivpu_err(vdev, "Failed to resume NPU: %d\n", ret);
130-
131-
ivpu_jsm_state_dump(vdev);
132-
ivpu_dev_coredump(vdev);
120+
pm_runtime_disable(vdev->drm.dev);
133121

134122
atomic_inc(&vdev->pm->reset_counter);
135123
atomic_set(&vdev->pm->reset_pending, 1);
136124
down_write(&vdev->pm->reset_lock);
125+
}
126+
127+
static void ivpu_pm_reset_complete(struct ivpu_device *vdev)
128+
{
129+
int ret;
137130

138-
ivpu_suspend(vdev);
139131
ivpu_pm_prepare_cold_boot(vdev);
140132
ivpu_jobs_abort_all(vdev);
141133
ivpu_ms_cleanup_all(vdev);
142134

143135
ret = ivpu_resume(vdev);
144-
if (ret)
136+
if (ret) {
145137
ivpu_err(vdev, "Failed to resume NPU: %d\n", ret);
138+
pm_runtime_set_suspended(vdev->drm.dev);
139+
} else {
140+
pm_runtime_set_active(vdev->drm.dev);
141+
}
146142

147143
up_write(&vdev->pm->reset_lock);
148144
atomic_set(&vdev->pm->reset_pending, 0);
149145

150-
kobject_uevent_env(&vdev->drm.dev->kobj, KOBJ_CHANGE, evt);
151146
pm_runtime_mark_last_busy(vdev->drm.dev);
152-
pm_runtime_put_autosuspend(vdev->drm.dev);
147+
pm_runtime_enable(vdev->drm.dev);
148+
}
149+
150+
static void ivpu_pm_recovery_work(struct work_struct *work)
151+
{
152+
struct ivpu_pm_info *pm = container_of(work, struct ivpu_pm_info, recovery_work);
153+
struct ivpu_device *vdev = pm->vdev;
154+
char *evt[2] = {"IVPU_PM_EVENT=IVPU_RECOVER", NULL};
155+
156+
ivpu_err(vdev, "Recovering the NPU (reset #%d)\n", atomic_read(&vdev->pm->reset_counter));
157+
158+
ivpu_pm_reset_begin(vdev);
159+
160+
if (!pm_runtime_status_suspended(vdev->drm.dev)) {
161+
ivpu_jsm_state_dump(vdev);
162+
ivpu_dev_coredump(vdev);
163+
ivpu_suspend(vdev);
164+
}
165+
166+
ivpu_pm_reset_complete(vdev);
167+
168+
kobject_uevent_env(&vdev->drm.dev->kobj, KOBJ_CHANGE, evt);
153169
}
154170

155171
void ivpu_pm_trigger_recovery(struct ivpu_device *vdev, const char *reason)
@@ -309,7 +325,10 @@ int ivpu_rpm_get(struct ivpu_device *vdev)
309325
int ret;
310326

311327
ret = pm_runtime_resume_and_get(vdev->drm.dev);
312-
drm_WARN_ON(&vdev->drm, ret < 0);
328+
if (ret < 0) {
329+
ivpu_err(vdev, "Failed to resume NPU: %d\n", ret);
330+
pm_runtime_set_suspended(vdev->drm.dev);
331+
}
313332

314333
return ret;
315334
}
@@ -325,35 +344,26 @@ void ivpu_pm_reset_prepare_cb(struct pci_dev *pdev)
325344
struct ivpu_device *vdev = pci_get_drvdata(pdev);
326345

327346
ivpu_dbg(vdev, PM, "Pre-reset..\n");
328-
atomic_inc(&vdev->pm->reset_counter);
329-
atomic_set(&vdev->pm->reset_pending, 1);
330347

331-
pm_runtime_get_sync(vdev->drm.dev);
332-
down_write(&vdev->pm->reset_lock);
333-
ivpu_prepare_for_reset(vdev);
334-
ivpu_hw_reset(vdev);
335-
ivpu_pm_prepare_cold_boot(vdev);
336-
ivpu_jobs_abort_all(vdev);
337-
ivpu_ms_cleanup_all(vdev);
348+
ivpu_pm_reset_begin(vdev);
349+
350+
if (!pm_runtime_status_suspended(vdev->drm.dev)) {
351+
ivpu_prepare_for_reset(vdev);
352+
ivpu_hw_reset(vdev);
353+
}
338354

339355
ivpu_dbg(vdev, PM, "Pre-reset done.\n");
340356
}
341357

342358
void ivpu_pm_reset_done_cb(struct pci_dev *pdev)
343359
{
344360
struct ivpu_device *vdev = pci_get_drvdata(pdev);
345-
int ret;
346361

347362
ivpu_dbg(vdev, PM, "Post-reset..\n");
348-
ret = ivpu_resume(vdev);
349-
if (ret)
350-
ivpu_err(vdev, "Failed to set RESUME state: %d\n", ret);
351-
up_write(&vdev->pm->reset_lock);
352-
atomic_set(&vdev->pm->reset_pending, 0);
353-
ivpu_dbg(vdev, PM, "Post-reset done.\n");
354363

355-
pm_runtime_mark_last_busy(vdev->drm.dev);
356-
pm_runtime_put_autosuspend(vdev->drm.dev);
364+
ivpu_pm_reset_complete(vdev);
365+
366+
ivpu_dbg(vdev, PM, "Post-reset done.\n");
357367
}
358368

359369
void ivpu_pm_init(struct ivpu_device *vdev)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@
119119
* - 3.57.0 - Compute tunneling on GFX10+
120120
* - 3.58.0 - Add GFX12 DCC support
121121
* - 3.59.0 - Cleared VRAM
122+
* - 3.60.0 - Add AMDGPU_TILING_GFX12_DCC_WRITE_COMPRESS_DISABLE (Vulkan requirement)
122123
*/
123124
#define KMS_DRIVER_MAJOR 3
124-
#define KMS_DRIVER_MINOR 59
125+
#define KMS_DRIVER_MINOR 60
125126
#define KMS_DRIVER_PATCHLEVEL 0
126127

127128
/*

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev,
309309
mutex_lock(&adev->mman.gtt_window_lock);
310310
while (src_mm.remaining) {
311311
uint64_t from, to, cur_size, tiling_flags;
312-
uint32_t num_type, data_format, max_com;
312+
uint32_t num_type, data_format, max_com, write_compress_disable;
313313
struct dma_fence *next;
314314

315315
/* Never copy more than 256MiB at once to avoid a timeout */
@@ -340,9 +340,13 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev,
340340
max_com = AMDGPU_TILING_GET(tiling_flags, GFX12_DCC_MAX_COMPRESSED_BLOCK);
341341
num_type = AMDGPU_TILING_GET(tiling_flags, GFX12_DCC_NUMBER_TYPE);
342342
data_format = AMDGPU_TILING_GET(tiling_flags, GFX12_DCC_DATA_FORMAT);
343+
write_compress_disable =
344+
AMDGPU_TILING_GET(tiling_flags, GFX12_DCC_WRITE_COMPRESS_DISABLE);
343345
copy_flags |= (AMDGPU_COPY_FLAGS_SET(MAX_COMPRESSED, max_com) |
344346
AMDGPU_COPY_FLAGS_SET(NUMBER_TYPE, num_type) |
345-
AMDGPU_COPY_FLAGS_SET(DATA_FORMAT, data_format));
347+
AMDGPU_COPY_FLAGS_SET(DATA_FORMAT, data_format) |
348+
AMDGPU_COPY_FLAGS_SET(WRITE_COMPRESS_DISABLE,
349+
write_compress_disable));
346350
}
347351

348352
r = amdgpu_copy_buffer(ring, from, to, cur_size, resv,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ struct amdgpu_copy_mem {
119119
#define AMDGPU_COPY_FLAGS_NUMBER_TYPE_MASK 0x07
120120
#define AMDGPU_COPY_FLAGS_DATA_FORMAT_SHIFT 8
121121
#define AMDGPU_COPY_FLAGS_DATA_FORMAT_MASK 0x3f
122+
#define AMDGPU_COPY_FLAGS_WRITE_COMPRESS_DISABLE_SHIFT 14
123+
#define AMDGPU_COPY_FLAGS_WRITE_COMPRESS_DISABLE_MASK 0x1
122124

123125
#define AMDGPU_COPY_FLAGS_SET(field, value) \
124126
(((__u32)(value) & AMDGPU_COPY_FLAGS_##field##_MASK) << AMDGPU_COPY_FLAGS_##field##_SHIFT)

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,11 +1741,12 @@ static void sdma_v7_0_emit_copy_buffer(struct amdgpu_ib *ib,
17411741
uint32_t byte_count,
17421742
uint32_t copy_flags)
17431743
{
1744-
uint32_t num_type, data_format, max_com;
1744+
uint32_t num_type, data_format, max_com, write_cm;
17451745

17461746
max_com = AMDGPU_COPY_FLAGS_GET(copy_flags, MAX_COMPRESSED);
17471747
data_format = AMDGPU_COPY_FLAGS_GET(copy_flags, DATA_FORMAT);
17481748
num_type = AMDGPU_COPY_FLAGS_GET(copy_flags, NUMBER_TYPE);
1749+
write_cm = AMDGPU_COPY_FLAGS_GET(copy_flags, WRITE_COMPRESS_DISABLE) ? 2 : 1;
17491750

17501751
ib->ptr[ib->length_dw++] = SDMA_PKT_COPY_LINEAR_HEADER_OP(SDMA_OP_COPY) |
17511752
SDMA_PKT_COPY_LINEAR_HEADER_SUB_OP(SDMA_SUBOP_COPY_LINEAR) |
@@ -1762,7 +1763,7 @@ static void sdma_v7_0_emit_copy_buffer(struct amdgpu_ib *ib,
17621763
if ((copy_flags & (AMDGPU_COPY_FLAGS_READ_DECOMPRESSED | AMDGPU_COPY_FLAGS_WRITE_COMPRESSED)))
17631764
ib->ptr[ib->length_dw++] = SDMA_DCC_DATA_FORMAT(data_format) | SDMA_DCC_NUM_TYPE(num_type) |
17641765
((copy_flags & AMDGPU_COPY_FLAGS_READ_DECOMPRESSED) ? SDMA_DCC_READ_CM(2) : 0) |
1765-
((copy_flags & AMDGPU_COPY_FLAGS_WRITE_COMPRESSED) ? SDMA_DCC_WRITE_CM(1) : 0) |
1766+
((copy_flags & AMDGPU_COPY_FLAGS_WRITE_COMPRESSED) ? SDMA_DCC_WRITE_CM(write_cm) : 0) |
17661767
SDMA_DCC_MAX_COM(max_com) | SDMA_DCC_MAX_UCOM(1);
17671768
else
17681769
ib->ptr[ib->length_dw++] = 0;

drivers/gpu/drm/amd/display/dc/core/dc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
21332133

21342134
dc_enable_stereo(dc, context, dc_streams, context->stream_count);
21352135

2136-
if (context->stream_count > get_seamless_boot_stream_count(context) ||
2136+
if (get_seamless_boot_stream_count(context) == 0 ||
21372137
context->stream_count == 0) {
21382138
/* Must wait for no flips to be pending before doing optimize bw */
21392139
hwss_wait_for_no_pipes_pending(dc, context);

drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ void dmub_hw_lock_mgr_inbox0_cmd(struct dc_dmub_srv *dmub_srv,
6363

6464
bool should_use_dmub_lock(struct dc_link *link)
6565
{
66-
if (link->psr_settings.psr_version == DC_PSR_VERSION_SU_1 ||
67-
link->psr_settings.psr_version == DC_PSR_VERSION_1)
66+
if (link->psr_settings.psr_version == DC_PSR_VERSION_SU_1)
6867
return true;
6968

7069
if (link->replay_settings.replay_feature_enabled)

drivers/gpu/drm/amd/display/dc/dml/Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ dml_ccflags := $(CC_FLAGS_FPU)
2929
dml_rcflags := $(CC_FLAGS_NO_FPU)
3030

3131
ifneq ($(CONFIG_FRAME_WARN),0)
32-
ifeq ($(filter y,$(CONFIG_KASAN)$(CONFIG_KCSAN)),y)
33-
frame_warn_flag := -Wframe-larger-than=3072
34-
else
35-
frame_warn_flag := -Wframe-larger-than=2048
36-
endif
32+
ifeq ($(filter y,$(CONFIG_KASAN)$(CONFIG_KCSAN)),y)
33+
frame_warn_limit := 3072
34+
else
35+
frame_warn_limit := 2048
36+
endif
37+
38+
ifeq ($(call test-lt, $(CONFIG_FRAME_WARN), $(frame_warn_limit)),y)
39+
frame_warn_flag := -Wframe-larger-than=$(frame_warn_limit)
40+
endif
3741
endif
3842

3943
CFLAGS_$(AMDDALPATH)/dc/dml/display_mode_lib.o := $(dml_ccflags)

0 commit comments

Comments
 (0)