Skip to content

Commit cbd4480

Browse files
committed
Merge tag 'drm-fixes-2026-01-09' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "I missed the drm-rust fixes tree for last week, so this catches up on that, along with amdgpu, and then some misc fixes across a few drivers. I hadn't got an xe pull by the time I sent this, I suspect one will arrive 10 mins after, but I don't think there is anything that can't wait for next week. Things seem to have picked up a little with people coming back from holidays, MAINTAINERS: - Fix Nova GPU driver git links - Fix typo in TYR driver entry preventing correct behavior of scripts/get_maintainer.pl - Exclude TYR driver from DRM MISC nova-core: - Correctly select RUST_FW_LOADER_ABSTRACTIONS to prevent build errors - Regenerate nova-core bindgen bindings with '--explicit-padding' to avoid uninitialized bytes - Fix length of received GSP messages, due to miscalculated message payload size - Regenerate bindings to derive MaybeZeroable - Use a bindings alias to derive the firmware version exynos: - hdmi: replace system_wq with system_percpu_wq pl111: - Fix error handling in probe mediatek/atomic/tidss: - Fix tidss in another way and revert reordering of pre-enable and post-disable operations, as it breaks other bridge drivers nouveau: - Fix regression from fwsec s/r fix pci/vga: - Fix multiple gpu's being reported a 'boot_display' fb-helper: - Fix vblank timeout during suspend/reset amdgpu: - Clang fixes - Navi1x PCIe DPM fixes - Ring reset fixes - ISP suspend fix - Analog DC fixes - VPE fixes - Mode1 reset fix radeon: - Variable sized array fix" * tag 'drm-fixes-2026-01-09' of https://gitlab.freedesktop.org/drm/kernel: (32 commits) Reapply "Revert "drm/amd: Skip power ungate during suspend for VPE"" drm/amd/display: Check NULL before calling dac_load_detection drm/amd/pm: Disable MMIO access during SMU Mode 1 reset drm/exynos: hdmi: replace use of system_wq with system_percpu_wq drm/fb-helper: Fix vblank timeout during suspend/reset PCI/VGA: Don't assume the only VGA device on a system is `boot_vga` drm/amdgpu: Fix query for VPE block_type and ip_count drm/amd/display: Add missing encoder setup to DACnEncoderControl drm/amd/display: Correct color depth for SelectCRTC_Source drm/amd/amdgpu: Fix SMU warning during isp suspend-resume drm/amdgpu: always backup and reemit fences drm/amdgpu: don't reemit ring contents more than once drm/amd/pm: force send pcie parmater on navi1x drm/amd/pm: fix wrong pcie parameter on navi1x drm/radeon: Remove __counted_by from ClockInfoArray.clockInfo[] drm/amd/display: Reduce number of arguments of dcn30's CalculateWatermarksAndDRAMSpeedChangeSupport() drm/amd/display: Reduce number of arguments of dcn30's CalculatePrefetchSchedule() drm/amd/display: Apply e4479ae to dml nouveau: don't attempt fwsec on sb on newer platforms drm/tidss: Fix enable/disable order ...
2 parents 2bfe3e0 + f6eac56 commit cbd4480

41 files changed

Lines changed: 724 additions & 813 deletions

Some content is hidden

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

MAINTAINERS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,7 +2159,7 @@ M: Alice Ryhl <aliceryhl@google.com>
21592159
L: dri-devel@lists.freedesktop.org
21602160
S: Supported
21612161
W: https://rust-for-linux.com/tyr-gpu-driver
2162-
W https://drm.pages.freedesktop.org/maintainer-tools/drm-rust.html
2162+
W: https://drm.pages.freedesktop.org/maintainer-tools/drm-rust.html
21632163
B: https://gitlab.freedesktop.org/panfrost/linux/-/issues
21642164
T: git https://gitlab.freedesktop.org/drm/rust/kernel.git
21652165
F: Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
@@ -8068,7 +8068,7 @@ W: https://rust-for-linux.com/nova-gpu-driver
80688068
Q: https://patchwork.freedesktop.org/project/nouveau/
80698069
B: https://gitlab.freedesktop.org/drm/nova/-/issues
80708070
C: irc://irc.oftc.net/nouveau
8071-
T: git https://gitlab.freedesktop.org/drm/nova.git nova-next
8071+
T: git https://gitlab.freedesktop.org/drm/rust/kernel.git drm-rust-next
80728072
F: Documentation/gpu/nova/
80738073
F: drivers/gpu/nova-core/
80748074

@@ -8080,7 +8080,7 @@ W: https://rust-for-linux.com/nova-gpu-driver
80808080
Q: https://patchwork.freedesktop.org/project/nouveau/
80818081
B: https://gitlab.freedesktop.org/drm/nova/-/issues
80828082
C: irc://irc.oftc.net/nouveau
8083-
T: git https://gitlab.freedesktop.org/drm/nova.git nova-next
8083+
T: git https://gitlab.freedesktop.org/drm/rust/kernel.git drm-rust-next
80848084
F: Documentation/gpu/nova/
80858085
F: drivers/gpu/drm/nova/
80868086
F: include/uapi/drm/nova_drm.h
@@ -8358,6 +8358,7 @@ X: drivers/gpu/drm/msm/
83588358
X: drivers/gpu/drm/nova/
83598359
X: drivers/gpu/drm/radeon/
83608360
X: drivers/gpu/drm/tegra/
8361+
X: drivers/gpu/drm/tyr/
83618362
X: drivers/gpu/drm/xe/
83628363

83638364
DRM DRIVERS AND COMMON INFRASTRUCTURE [RUST]

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3445,11 +3445,10 @@ int amdgpu_device_set_pg_state(struct amdgpu_device *adev,
34453445
(adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX ||
34463446
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SDMA))
34473447
continue;
3448-
/* skip CG for VCE/UVD/VPE, it's handled specially */
3448+
/* skip CG for VCE/UVD, it's handled specially */
34493449
if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
34503450
adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE &&
34513451
adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCN &&
3452-
adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VPE &&
34533452
adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_JPEG &&
34543453
adev->ip_blocks[i].version->funcs->set_powergating_state) {
34553454
/* enable powergating to save power */
@@ -5867,6 +5866,9 @@ int amdgpu_device_mode1_reset(struct amdgpu_device *adev)
58675866
if (ret)
58685867
goto mode1_reset_failed;
58695868

5869+
/* enable mmio access after mode 1 reset completed */
5870+
adev->no_hw_access = false;
5871+
58705872
amdgpu_device_load_pci_state(adev->pdev);
58715873
ret = amdgpu_psp_wait_for_bootloader(adev);
58725874
if (ret)

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

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ static u32 amdgpu_fence_read(struct amdgpu_ring *ring)
8989
return seq;
9090
}
9191

92+
static void amdgpu_fence_save_fence_wptr_start(struct amdgpu_fence *af)
93+
{
94+
af->fence_wptr_start = af->ring->wptr;
95+
}
96+
97+
static void amdgpu_fence_save_fence_wptr_end(struct amdgpu_fence *af)
98+
{
99+
af->fence_wptr_end = af->ring->wptr;
100+
}
101+
92102
/**
93103
* amdgpu_fence_emit - emit a fence on the requested ring
94104
*
@@ -116,8 +126,10 @@ int amdgpu_fence_emit(struct amdgpu_ring *ring, struct amdgpu_fence *af,
116126
&ring->fence_drv.lock,
117127
adev->fence_context + ring->idx, seq);
118128

129+
amdgpu_fence_save_fence_wptr_start(af);
119130
amdgpu_ring_emit_fence(ring, ring->fence_drv.gpu_addr,
120131
seq, flags | AMDGPU_FENCE_FLAG_INT);
132+
amdgpu_fence_save_fence_wptr_end(af);
121133
amdgpu_fence_save_wptr(af);
122134
pm_runtime_get_noresume(adev_to_drm(adev)->dev);
123135
ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask];
@@ -709,6 +721,7 @@ void amdgpu_fence_driver_guilty_force_completion(struct amdgpu_fence *af)
709721
struct amdgpu_ring *ring = af->ring;
710722
unsigned long flags;
711723
u32 seq, last_seq;
724+
bool reemitted = false;
712725

713726
last_seq = amdgpu_fence_read(ring) & ring->fence_drv.num_fences_mask;
714727
seq = ring->fence_drv.sync_seq & ring->fence_drv.num_fences_mask;
@@ -726,17 +739,22 @@ void amdgpu_fence_driver_guilty_force_completion(struct amdgpu_fence *af)
726739
if (unprocessed && !dma_fence_is_signaled_locked(unprocessed)) {
727740
fence = container_of(unprocessed, struct amdgpu_fence, base);
728741

729-
if (fence == af)
742+
if (fence->reemitted > 1)
743+
reemitted = true;
744+
else if (fence == af)
730745
dma_fence_set_error(&fence->base, -ETIME);
731746
else if (fence->context == af->context)
732747
dma_fence_set_error(&fence->base, -ECANCELED);
733748
}
734749
rcu_read_unlock();
735750
} while (last_seq != seq);
736751
spin_unlock_irqrestore(&ring->fence_drv.lock, flags);
737-
/* signal the guilty fence */
738-
amdgpu_fence_write(ring, (u32)af->base.seqno);
739-
amdgpu_fence_process(ring);
752+
753+
if (reemitted) {
754+
/* if we've already reemitted once then just cancel everything */
755+
amdgpu_fence_driver_force_completion(af->ring);
756+
af->ring->ring_backup_entries_to_copy = 0;
757+
}
740758
}
741759

742760
void amdgpu_fence_save_wptr(struct amdgpu_fence *af)
@@ -784,10 +802,18 @@ void amdgpu_ring_backup_unprocessed_commands(struct amdgpu_ring *ring,
784802
/* save everything if the ring is not guilty, otherwise
785803
* just save the content from other contexts.
786804
*/
787-
if (!guilty_fence || (fence->context != guilty_fence->context))
805+
if (!fence->reemitted &&
806+
(!guilty_fence || (fence->context != guilty_fence->context))) {
788807
amdgpu_ring_backup_unprocessed_command(ring, wptr,
789808
fence->wptr);
809+
} else if (!fence->reemitted) {
810+
/* always save the fence */
811+
amdgpu_ring_backup_unprocessed_command(ring,
812+
fence->fence_wptr_start,
813+
fence->fence_wptr_end);
814+
}
790815
wptr = fence->wptr;
816+
fence->reemitted++;
791817
}
792818
rcu_read_unlock();
793819
} while (last_seq != seq);

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,36 @@ void isp_kernel_buffer_free(void **buf_obj, u64 *gpu_addr, void **cpu_addr)
318318
}
319319
EXPORT_SYMBOL(isp_kernel_buffer_free);
320320

321+
static int isp_resume(struct amdgpu_ip_block *ip_block)
322+
{
323+
struct amdgpu_device *adev = ip_block->adev;
324+
struct amdgpu_isp *isp = &adev->isp;
325+
326+
if (isp->funcs->hw_resume)
327+
return isp->funcs->hw_resume(isp);
328+
329+
return -ENODEV;
330+
}
331+
332+
static int isp_suspend(struct amdgpu_ip_block *ip_block)
333+
{
334+
struct amdgpu_device *adev = ip_block->adev;
335+
struct amdgpu_isp *isp = &adev->isp;
336+
337+
if (isp->funcs->hw_suspend)
338+
return isp->funcs->hw_suspend(isp);
339+
340+
return -ENODEV;
341+
}
342+
321343
static const struct amd_ip_funcs isp_ip_funcs = {
322344
.name = "isp_ip",
323345
.early_init = isp_early_init,
324346
.hw_init = isp_hw_init,
325347
.hw_fini = isp_hw_fini,
326348
.is_idle = isp_is_idle,
349+
.suspend = isp_suspend,
350+
.resume = isp_resume,
327351
.set_clockgating_state = isp_set_clockgating_state,
328352
.set_powergating_state = isp_set_powergating_state,
329353
};

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ struct amdgpu_isp;
3838
struct isp_funcs {
3939
int (*hw_init)(struct amdgpu_isp *isp);
4040
int (*hw_fini)(struct amdgpu_isp *isp);
41+
int (*hw_suspend)(struct amdgpu_isp *isp);
42+
int (*hw_resume)(struct amdgpu_isp *isp);
4143
};
4244

4345
struct amdgpu_isp {

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ static enum amd_ip_block_type
201201
type = (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_JPEG)) ?
202202
AMD_IP_BLOCK_TYPE_JPEG : AMD_IP_BLOCK_TYPE_VCN;
203203
break;
204+
case AMDGPU_HW_IP_VPE:
205+
type = AMD_IP_BLOCK_TYPE_VPE;
206+
break;
204207
default:
205208
type = AMD_IP_BLOCK_TYPE_NUM;
206209
break;
@@ -721,6 +724,9 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
721724
case AMD_IP_BLOCK_TYPE_UVD:
722725
count = adev->uvd.num_uvd_inst;
723726
break;
727+
case AMD_IP_BLOCK_TYPE_VPE:
728+
count = adev->vpe.num_instances;
729+
break;
724730
/* For all other IP block types not listed in the switch statement
725731
* the ip status is valid here and the instance count is one.
726732
*/

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,15 @@ struct amdgpu_fence {
144144
struct amdgpu_ring *ring;
145145
ktime_t start_timestamp;
146146

147-
/* wptr for the fence for resets */
147+
/* wptr for the total submission for resets */
148148
u64 wptr;
149149
/* fence context for resets */
150150
u64 context;
151+
/* has this fence been reemitted */
152+
unsigned int reemitted;
153+
/* wptr for the fence for the submission */
154+
u64 fence_wptr_start;
155+
u64 fence_wptr_end;
151156
};
152157

153158
extern const struct drm_sched_backend_ops amdgpu_sched_ops;

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
*/
2727

2828
#include <linux/gpio/machine.h>
29+
#include <linux/pm_runtime.h>
2930
#include "amdgpu.h"
3031
#include "isp_v4_1_1.h"
3132

@@ -145,6 +146,9 @@ static int isp_genpd_add_device(struct device *dev, void *data)
145146
return -ENODEV;
146147
}
147148

149+
/* The devices will be managed by the pm ops from the parent */
150+
dev_pm_syscore_device(dev, true);
151+
148152
exit:
149153
/* Continue to add */
150154
return 0;
@@ -177,12 +181,47 @@ static int isp_genpd_remove_device(struct device *dev, void *data)
177181
drm_err(&adev->ddev, "Failed to remove dev from genpd %d\n", ret);
178182
return -ENODEV;
179183
}
184+
dev_pm_syscore_device(dev, false);
180185

181186
exit:
182187
/* Continue to remove */
183188
return 0;
184189
}
185190

191+
static int isp_suspend_device(struct device *dev, void *data)
192+
{
193+
return pm_runtime_force_suspend(dev);
194+
}
195+
196+
static int isp_resume_device(struct device *dev, void *data)
197+
{
198+
return pm_runtime_force_resume(dev);
199+
}
200+
201+
static int isp_v4_1_1_hw_suspend(struct amdgpu_isp *isp)
202+
{
203+
int r;
204+
205+
r = device_for_each_child(isp->parent, NULL,
206+
isp_suspend_device);
207+
if (r)
208+
dev_err(isp->parent, "failed to suspend hw devices (%d)\n", r);
209+
210+
return r;
211+
}
212+
213+
static int isp_v4_1_1_hw_resume(struct amdgpu_isp *isp)
214+
{
215+
int r;
216+
217+
r = device_for_each_child(isp->parent, NULL,
218+
isp_resume_device);
219+
if (r)
220+
dev_err(isp->parent, "failed to resume hw device (%d)\n", r);
221+
222+
return r;
223+
}
224+
186225
static int isp_v4_1_1_hw_init(struct amdgpu_isp *isp)
187226
{
188227
const struct software_node *amd_camera_node, *isp4_node;
@@ -369,6 +408,8 @@ static int isp_v4_1_1_hw_fini(struct amdgpu_isp *isp)
369408
static const struct isp_funcs isp_v4_1_1_funcs = {
370409
.hw_init = isp_v4_1_1_hw_init,
371410
.hw_fini = isp_v4_1_1_hw_fini,
411+
.hw_suspend = isp_v4_1_1_hw_suspend,
412+
.hw_resume = isp_v4_1_1_hw_resume,
372413
};
373414

374415
void isp_v4_1_1_set_isp_funcs(struct amdgpu_isp *isp)

drivers/gpu/drm/amd/display/dc/bios/bios_parser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,14 +763,14 @@ static enum bp_result bios_parser_encoder_control(
763763
return BP_RESULT_FAILURE;
764764

765765
return bp->cmd_tbl.dac1_encoder_control(
766-
bp, cntl->action == ENCODER_CONTROL_ENABLE,
766+
bp, cntl->action,
767767
cntl->pixel_clock, ATOM_DAC1_PS2);
768768
} else if (cntl->engine_id == ENGINE_ID_DACB) {
769769
if (!bp->cmd_tbl.dac2_encoder_control)
770770
return BP_RESULT_FAILURE;
771771

772772
return bp->cmd_tbl.dac2_encoder_control(
773-
bp, cntl->action == ENCODER_CONTROL_ENABLE,
773+
bp, cntl->action,
774774
cntl->pixel_clock, ATOM_DAC1_PS2);
775775
}
776776

0 commit comments

Comments
 (0)