summaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)Author
2026-09-02drm/amdgpu/gfx8: only apply compute quantums to KCQsAlex Deucher
Don't apply to KIQ. Seems to cause problems on KIQ on some ARM platforms. Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5658 Fixes: 91cf34bc5a55 ("drm/amdgpu/gfx8: align mqd settings with KFD") Reviewed-by: Jesse Zhang <jesse.zhang@amd.com> Reviewed-by: Kent Russell <kent.russell@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amdgpu: correct oversubscription timer interval for gfx11Eric Huang
oversubscription_timer in MES is in micro second, so change the timer's interval in KFD/useq to micro second. Signed-off-by: Eric Huang <jinhuieric.huang@amd.com> Suggested-by: Leo Lin <Leo.Lin@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amd/display: Enable HDMI ALLM for Gaming-VRRFangzhi Zuo
why: HDMI 2.1 Auto Low-Latency Mode (ALLM) lets a Source request the Sink's low-latency mode through the HF-VSIF. HDMI 2.1 Section 7.6.6 requires that when Gaming-VRR is enabled (VRR_EN=1) and the Sink advertises ALLM in the SCDS, the Source shall transmit the HF-VSIF and set ALLM_Mode=1. amdgpu never set ALLM_Mode, so this requirement was not met. how: - In update_freesync_state_on_stream(), set ALLM_Mode=1 in the HF-VSIF when Gaming-VRR is active (vrr state ACTIVE_VARIABLE/ACTIVE_FIXED, i.e. VRR_EN=1) and the sink advertises ALLM, per HDMI 2.1 Section 7.6.6, and push the updated HF-VSIF (vsp_infopacket) as a stream update. - ALLM is driven by the mandatory Gaming-VRR case. Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amd/display: Add HDMI 2.1 VRR support for HF-VSDBFangzhi Zuo
why: HDMI 2.1 sinks advertise their VRR range in the HDMI Forum VSDB (HF-VSDB), but amdgpu derived FreeSync capability only from the AMD VSDB. Sinks that expose just the HDMI Forum VRR capability (e.g. HDMI compliance EDIDs) were therefore reported as not VRR capable. how: - In amdgpu_dm_update_freesync_caps(), when the AMD VSDB does not provide a valid FreeSync range, fall back to the HDMI 2.1 VRR range parsed by DRM core from the HF-VSDB (connector->display_info.hdmi.vrr_cap). VRRMAX = 0 means "up to the Base Refresh Rate"; when the EDID provides no monitor range maximum either, fall back to the Base Refresh Rate (the highest refresh-rate mode of the preferred timing) so a valid VRR range is still reported to userspace. - Add VRR debug logging along the FreeSync capability and config paths. Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/edid: parse HDMI 2.1 gaming (ALLM/VRR) capabilities from HF-VSDBTomasz Pakuła
Parse the HDMI 2.1 gaming-related capabilities advertised in the HDMI Forum VSDB (HF-VSDB) and expose them through struct drm_hdmi_info so drivers can consume them. Add struct drm_hdmi_vrr_cap describing the sink's VRR capabilities: Fast VActive (Quick Frame Transport), Negative M VRR, Cinema VRR, MDelta, and the VRRmin/VRRmax range, together with a "supported" flag derived from that range. Add the fapa_start_location and allm (Auto Low Latency Mode) flags to struct drm_hdmi_info. drm_parse_hdmi_gaming_info() reads byte 8 of the HF-VSDB for the FAPA/ALLM/FVA/CNMVRR/CinemaVRR/MDelta flags and bytes 9-10 for VRRmin/VRRmax. Per HDMI 2.1, VRR is considered supported when VRRmin is within 1-48 and VRRmax is either 0 (maximum based on the video mode) or >= 100. It is invoked from drm_parse_hdmi_forum_scds(), and the parsed values are logged for debugging. Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Tested-by: Bernhard Berger <bernhard.berger@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amdgpu: restrict BAR0 fallback read to SR-IOV VFs onlyMario Limonciello
The BAR0 fallback read path was introduced as a workaround for SR-IOV VFs where the VRAM aperture is not available during early init. Restrict this workaround to only SR-IOV VFs where it's needed. Reported-by: gloveless@jqluv.com Fixes: cba4928cdffa ("drm/amdgpu: reduce early full GPU access during SR-IOV init") Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patch.msgid.link/20260826185102.2269511-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amdgpu: Set queue reset method for GC 12.1Amber Lin
Explicitely set use_mmio_for_reset = false in gfx_v12_1_sw_init for using MES to perform queue/pipe reset Signed-off-by: Amber Lin <amber.lin@amd.com> Reviewed-by: Jesse Zhang <Jesse.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amd/display: Add HDMI 2.1 FreeSync support for AMD VSDBFangzhi Zuo
why: HDMI FRL sinks were not parsed for the AMD VSDB and no VTEM info packet was emitted for them, so 2.1 FreeSync over HDMI FRL did not work. It is backward-compatible with 2.0 FreeSync. how: - Accept SIGNAL_TYPE_HDMI_FRL alongside SIGNAL_TYPE_HDMI_TYPE_A when parsing the AMD VSDB in amdgpu_dm_update_freesync_caps(). - Build and send the VTEM info packet via mod_build_infopacket_vtem() when the stream signal is HDMI FRL during the freesync state update. - Set the VTEM Data_Set_Length to 0 when no VTEM feature is enabled. build_infopacket_header_vtem() hardcodes Data_Set_Length = 4, so a VTEM with Data_Set_Length = 4 would be transmitted even when no VTEM feature is enabled (VRR_EN = 0 and no FVA), e.g. when the sink advertises VRRMIN = 0 and vrr_capable is false. This fails HDMI GCTS HF1-58 step 6.2. The VTEM must keep being transmitted every MTW while VRR is enabled (HF1-58 steps 8.1 and 8.3), so it cannot simply be suppressed per frame. Instead, follow the MLDS option in HDMI 2.1 10.10.2.4: keep transmitting the VTEM but set Data_Set_Length = 0 when no feature is enabled. When VRR becomes active the full Data_Set_Length = 4 payload with VRR_EN = 1 is sent as before. Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amdkfd: Add TLB flush after MES queue eviction/suspensionPriya Hosur
MES (Micro Engine Scheduler) does not perform heavy-weight TLB invalidation after unmapping queues, unlike HWS which does this automatically. This causes a race condition where in-flight DMA descriptors can access memory that has been unmapped, leading to page faults and GPU queue hangs during SVM page migration. The issue manifests as KFDSVMRangeTest.MultiThreadMigrationTest failures on gfx1151 (Strix Point) with XNACK mode 1 enabled - the GPU compute queue hangs with packets submitted but never consumed. Add kfd_flush_tlb() calls after MES queue removal in two locations: - evict_process_queues_cpsch(): after all queues removed during eviction - suspend_queues(): after debug/criu queue suspension (with mem_fence barrier) This ensures all in-flight memory accesses from unmapped queues are flushed before memory is freed or migrated. Signed-off-by: Priya Hosur <Priya.Hosur@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amd/ras: take a log batch id only once there is something to logXiang Liu
The id is claimed before the banks are read, so a poll that ends up logging nothing still burns one and leaves a gap that every reader of the log then has to walk over. Claim it when the first record of the batch is about to go in. Signed-off-by: Xiang Liu <xiang.liu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amd/ras: report how far a CPER record query gotXiang Liu
The caller walks the log with cper_start_id and resumes at cper_start_id + real_cper_num, but the reply only counts the ids that held a record. A batch id that holds nothing therefore never moves the caller forward, and every such id makes it read the next populated batch one more time. Count the ids covered instead. The rewind to the last populated batch when the query starts at the end has the same effect once the caller has drained the log, and the latest id is already reported by the snapshot query, so drop it. Signed-off-by: Xiang Liu <xiang.liu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amdgpu/userq: use fence_val instead or rptrSunil Khatri
In function amdgpu_userq_fence_signaled rptr is a confusing variabile name as it is a fence value written by the cp in the fence address and no where related to the rptr. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amdgpu/userq: use fence_val instead or rptrSunil Khatri
In function amdgpu_userq_fence_driver_process rptr is a confusing variable name as it is a fence value written by the cp in the fence address and no where related to the rptr. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amd/ras: report the banks the scrubber loggedXiang Liu
A bank carrying the scrub bit was found by the background scrubber rather than by an access, which is worth telling apart from the rest when reading a log. Signed-off-by: Xiang Liu <xiang.liu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amd/ras: drop the ras_ prefix from the ACA v5 file namesXiang Liu
The prefix marks the files that back a hardware IP block. ACA is a bank format rather than an IP, and the rest of its files are named after it alone, so the v5 pair is the odd one out. Signed-off-by: Xiang Liu <xiang.liu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amdgpu: use underscores in TLB fence driver and timeline namesPrike Liang
Replace spaces with hyphens in amdgpu_tlb_fence_get_driver_name() and amdgpu_tlb_fence_get_timeline_name(). Returning string literals with spaces makes ftrace fence events and debugfs fence entries visually ambiguous and harder to parse using standard log analysis tools. Signed-off-by: Prike Liang <Prike.Liang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amd/ras: skip poison banks read through the UE channelXiang Liu
Outside of UMC a bank with the poison bit set describes the consumption of an error that was already reported, not a new uncorrectable one. Injecting an uncorrectable error while a workload is running therefore buries the real bank under a dump of GFX poison banks collected from every other device of the hive. Signed-off-by: Xiang Liu <xiang.liu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-09-02drm/amd/display: advertise PIXEL_NONE and PREMULTI blend mode for DCEMelissa Wen
DCE can support PREMULTI and COVERAGE blend mode depending on its generation, however current driver implementation either doesn't expose more than primary and cursor plane, or doesn't program registers for any blend mode other than PIXEL_NONE. To fix the missing-blend-mode-prop warning according to current DCE plane caps, create blend mode property with PIXEL_NONE and PREMULTI for primary planes. As long as the background is black and there is no overlay plane, PIXEL_NONE and PREMULTI are equivalent, and PREMULTI has been the mandatory/default mode for years, so keep it to avoid regressions. Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") Tested-by: Viktor Jägersküpper <viktor_jaegerskuepper@freenet.de> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> #v3 Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> #v2 Signed-off-by: Melissa Wen <mwen@igalia.com> Link: https://patch.msgid.link/20260826104143.39077-4-mwen@igalia.com
2026-09-02drm/amd/display: fix missing blend-mode-prop warning for DCNMelissa Wen
validate_blend_mode_for_alpha_formats() warns when a plane supports formats with alpha but doesn't expose the blend mode property. Fix this by adding the same overlay plane blend modes to primary plane, since they are all universal planes in DCN-generation. Cursor planes support ARGB8888 format and CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA is set by default (other color formats are not implemented), so only expose support to PREMULTI, which is the default blend mode on DRM. Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> Signed-off-by: Melissa Wen <mwen@igalia.com> Link: https://patch.msgid.link/20260826104143.39077-3-mwen@igalia.com
2026-09-02drm/atomic-state-helper: set pixel_blend_mode to prop default on resetMelissa Wen
In __drm_atomic_helper_plane_state_init(), pixel_blend_mode is always reset to DRM_MODE_BLEND_PREMULTI. That was consistent while drm_plane_create_blend_mode_property() required PREMULTI in the supported modes, but it now falls back to COVERAGE or PIXEL_NONE when the driver doesn't support PREMULTI. The hardcoded default may therefore not be a blend mode the hardware can do, nor one the property advertises. Initialize pixel_blend_mode from the blend mode property default instead, keeping DRM_MODE_BLEND_PREMULTI for planes without the property. Fixes: 9813e158d13d ("drm/drm_blend: allow blend mode property without PREMULTI") Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> Signed-off-by: Melissa Wen <mwen@igalia.com> Link: https://patch.msgid.link/20260826104143.39077-2-mwen@igalia.com
2026-09-02drm: of: drm_of_find_panel_or_bridge: simplify error return pathsLuca Ceresoli
In prepataion to further modify the logic of this function, simplify the error-returning code. With this change, on any error there is an immediate 'return -<ERRNO>;' statement, without having to carry on the return value until the end. Additionally, clear both the panel and the bridge pointers at the beginning. Even though this is redundant in some code paths, it allows to have a simpler code in the rest of the function. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patch.msgid.link/20260814-drm-bridge-every-panel-v1-2-19cd5277cc8d@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-09-02drm: of: drm_of_find_panel_or_bridge: simplify freeing the remote node pointerLuca Ceresoli
In prepataion to further modify the logic of this function, simplify putting the struct device_node pointer by using a cleanup action. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patch.msgid.link/20260814-drm-bridge-every-panel-v1-1-19cd5277cc8d@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-09-02drm/panel-edp: Add support for BOE panel used in KD116N36-30NB-A001Yongxing Mou
Add the BOE 0x0b21 panel entry used in the K&D Technology KD116N36-30NB-A001 eDP LCM, place the EDID here for subsequent reference. Timing values come from the KD116N36-30NB-A001 spec. 00 ff ff ff ff ff ff 00 09 e5 21 0b 00 00 00 00 01 1e 01 04 a5 1a 0e 78 0a 24 10 97 59 54 8e 27 1e 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 b2 39 80 d4 70 38 4b 40 30 20 36 00 04 8c 10 00 00 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe 00 51 56 31 31 36 46 48 42 2d 4e 38 31 0a 00 b3 Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patch.msgid.link/20260901-edp-id-boe-v1-1-f5e2c44255f7@oss.qualcomm.com
2026-09-02drm/bridge: parade-ps8640: select DRM_PANEL_BRIDGE, not DRM_PANELLuca Ceresoli
This driver does not use the drm_panel APIs at all, so no need to select DRM_PANEL. But it uses devm_drm_of_get_bridge(), which is enabled by DRM_PANEL_BRIDGE. Cc: Douglas Anderson <dianders@chromium.org> Cc: Jitao Shi <jitao.shi@mediatek.com> Cc: CK Hu <ck.hu@mediatek.com> Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com> Cc: Pin-yen Lin <treapking@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://patch.msgid.link/20260831-drm-bridge-drm_panel-cleanup-v3-8-50efd8168b3e@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-09-02drm/bridge: ti-sn65dsi83: select DRM_PANEL_BRIDGELuca Ceresoli
This driver uses the drm_panel_bridge API and not the drm_panel API so it should select DRM_PANEL_BRIDGE and not DRM_PANEL. Cc: Marek Vasut <marex@denx.de> Cc: Sudarshan Shetty <tessolveupstream@gmail.com> Cc: Alexander Stein <alexander.stein@ew.tq-group.com> Cc: Herve Codina <herve.codina@bootlin.com> Cc: Esben Haabendal <esben@geanix.com> Reviewed-by: Herve Codina <herve.codina@bootlin.com> Acked-by: Esben Haabendal <esben@geanix.com> Link: https://patch.msgid.link/20260831-drm-bridge-drm_panel-cleanup-v3-5-50efd8168b3e@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-09-02drm/bridge: ti-sn65dsi86: don't select unused DRM_PANEL, select DRM_PANEL_BRIDGELuca Ceresoli
This driver does not use the drm_panel APIs at all, so no need to select DRM_PANEL. But it uses devm_drm_of_get_bridge(), which is enabled by DRM_PANEL_BRIDGE. Cc: Douglas Anderson <dianders@chromium.org> Cc: Franz Schnyder <franz.schnyder@toradex.com> Cc: John Ripple <john.ripple@keysight.com> Cc: Michael Walle <mwalle@kernel.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://patch.msgid.link/20260831-drm-bridge-drm_panel-cleanup-v3-4-50efd8168b3e@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-09-02drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: don't select unused DRM_PANELLuca Ceresoli
This driver does not use the drm_panel APIs at all, so no need to select DRM_PANEL. Cc: Peter Senna Tschudin <peter.senna@gmail.com> Cc: Martyn Welch <martyn.welch@collabora.co.uk> Cc: Andy Yan <andyshrk@163.com> Reviewed-by: Ian Ray <ian.ray@gehealthcare.com> Link: https://patch.msgid.link/20260831-drm-bridge-drm_panel-cleanup-v3-1-50efd8168b3e@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-09-02drm/panel: Use managed helpers in display vendor panelsOsama Abdelkader
Use the managed MIPI DSI attach and panel add helpers in display vendor panel drivers and drop the corresponding manual detach and panel remove calls from remove paths. Suggested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20260812152535.82238-1-osama.abdelkader@gmail.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-09-02drm/panel: Use managed helpers in Himax and Ilitek panelsOsama Abdelkader
Use the managed MIPI DSI attach and panel add helpers in Himax and Ilitek panel drivers and drop the corresponding manual detach and panel remove calls from remove paths. Suggested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20260812151000.74799-1-osama.abdelkader@gmail.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-09-02drm/panel: Use managed helpers in Samsung panelsOsama Abdelkader
Use the managed MIPI DSI attach and panel add helpers in Samsung panel drivers and drop the corresponding manual detach and panel remove calls from remove paths. Also, switch to devm_backlight_device_register in s6e3ha2 and s6e63j0x03. Suggested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20260812144426.62074-1-osama.abdelkader@gmail.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-09-02drm: bridge: dw_hdmi: Fix constant truncation warning on phy_maskSean Chang
In dw_hdmi_probe(), casting the bitwise complement of (HDMI_PHY_HPD | HDMI_PHY_RX_SENSE) directly to u8 triggers a compiler warning (-Wconstant-conversion). Due to C integer promotion rules, the bitwise OR and bitwise NOT are evaluated as 32-bit signed integers, producing 0xFFFFFF0D before being cast down to u8. Fix this by explicitly masking the inverted 32-bit result with 0xFF to keep only the lower byte and prevent implicit upper-bit truncation. Signed-off-by: Sean Chang <seanwascoding@gmail.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20260819151216.56833-1-seanwascoding@gmail.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-09-02drm/i915/psr: clear the Panel Replay error status registerJake Steinman
psr_get_status_and_error_status() selects the DPCD offset to read the error status from based on whether Panel Replay is enabled: offset = intel_dp->psr.panel_replay_enabled ? DP_PANEL_REPLAY_ERROR_STATUS : DP_PSR_ERROR_STATUS; but intel_psr_short_pulse() acknowledges it unconditionally to the PSR register. Under Panel Replay the error is therefore read from DP_PANEL_REPLAY_ERROR_STATUS (0x2020) and the acknowledgment written to DP_PSR_ERROR_STATUS (0x2006). DP_PANEL_REPLAY_ERROR_STATUS is never written anywhere in the tree; it appears only in the read above and in its own The sink's Panel Replay error latch can consequently never be cleared. Once it latches, every subsequent short pulse re-reads the same errors, so PSR is disabled with sink_not_reliable set permanently, and until a short pulse arrives the driver keeps Panel Replay enabled while the sink is reporting errors it cannot see. Observed on a Dell XPS 16 DA16260 (Panther Lake, Arc B390, display version 30.00) with the eDP Panel Replay quirk from commit cb8d155b0806 ("drm/i915/psr: Disable Panel Replay on Dell XPS 16 DA16260 as a quirk") removed locally so the feature could be exercised. The sink reports a persistently latched error: Sink PANEL-REPLAY status: 0x2 [active, display from RFB] Sink PANEL-REPLAY error status: 0x1: PANEL-REPLAY Link CRC error which survives across reads indefinitely, while dmesg stays silent and Panel Replay Selective Update remains enabled. Use the same conditional offset when clearing. psr->panel_replay_enabled cannot be used at that point because intel_psr_disable_locked() clears it earlier in the same function whenever an error was detected, which is exactly the case that needs the Panel Replay offset, so save it beforehand. v2: use a copy of panel_replay_enabled taken before intel_psr_disable_locked() clears it. In v1 the condition was evaluated after the disable, so it selected DP_PSR_ERROR_STATUS in the error path and the patch was a no-op there. Caught by Sashiko AI review. Signed-off-by: Jake Steinman <j@metarealtyinc.ca> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patch.msgid.link/20260901205956.130779-1-j@metarealtyinc.ca Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> [Rodrigo: adjusted commit message based on checkpatch]
2026-09-02gpu: nova-core: fix barrier usage in GSP->CPU messaging pathGary Guo
In the GSP->CPU messaging path, the code reads the write pointer from GSP, reads the response and advances the read pointer. A LOAD->LOAD ordering is required after the write pointer read and the data read. Add it as this is currently missing. A LOAD->STORE ordering is required after the data read and the advance of read pointer. Currently a Rust `SeqCst` barrier is used, which roughly maps to `smp_mb(Full)`; this however does not order DMA operations (notably on ARM, the generate barrier orders inner shareable and not outer shareable, which is ordered by `dma_mb`). This ordering does not need to be in between read pointer read and write, because it's for ordering between the ring buffer data and the pointer; the RMW operation does not internally need a barrier (nor it has to be atomic, as CPU pointers are updated by CPU only), so move it to before the RMW sequence for clarity. Signed-off-by: Gary Guo <gary@garyguo.net> Reviewed-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260901-rust-barrier-v4-2-94427f445310@garyguo.net Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-02gpu: nova-core: fix barrier usage in CPU->GSP messaging pathGary Guo
In the CPU->GSP messaging path, the code reads the read pointer from GSP, writes the command, advances the write pointer, and then notifies the GSP. A LOAD->STORE ordering is needed after reading the read pointer from GSP and writing the command. Control dependency exists here which provide the needed ordering, but it's best to avoid depending on it. A STORE->STORE ordering is needed after the command write and before the write pointer advance. This is currently incorrectly done after the write pointer advance (and before GSP notification), but this can cause issue if GSP is still processing ring buffer, as it may observe the write pointer advance before command write. Thus move this barrier to be before the write pointer advance. Note that barriers are not needed between write pointer advance and GSP notification, as MMIO accessors already carries the required barrier. Signed-off-by: Gary Guo <gary@garyguo.net> Reviewed-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260901-rust-barrier-v4-1-94427f445310@garyguo.net Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-01drm/nouveau: Use write-combined maps for coherentFaith Ekstrand
On Tegra devices, uncached maps translate to device memory, causing unaligned accesses by userspace resulting in a SIGBUS. Instead, use write-combined maps to ensure proper access. This would also affect discrete cards on any Arm device. It was determined that discrete cards regardless of cpu arch should use write-combined maps for coherent anyways. Thus this change is made for all gpu types. Cc: stable@vger.kernel.org Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com> Co-developed-by: Aaron Kling <webgeek1234@gmail.com> Signed-off-by: Aaron Kling <webgeek1234@gmail.com> Fixes: 1b4ea4c5980f ("drm/ttm: set the tt caching state at creation time") Link: https://patch.msgid.link/20260821-tegra-coherent-wc-v2-1-2b1ddb67bf18@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-01drm/xe/oa: Remove sysfs entry on idr_alloc failure in xe_oa_add_config_ioctl()Lu Yao
If idr_alloc() fails after create_dynamic_oa_sysfs_entry() has succeeded, the error path frees the OA config without removing the metrics sysfs group. Remove the sysfs group before releasing the config, and fix up the misleading error message copied from the sysfs creation failure path. Fixes: cdf02fe1a94a ("drm/xe/oa/uapi: Add/remove OA config perf ops") Signed-off-by: Lu Yao <yaolu@kylinos.cn> Link: https://patch.msgid.link/20260831014218.28515-1-yaolu@kylinos.cn Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (cherry picked from commit 2c6fbda5fdde461d6dedb82a59285182720b8fef) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-09-01drm/nouveau/dmem: fix callocated underflow on large folio splitZhenhao Wan
nouveau_dmem_folio_free() drops chunk->callocated once per freed folio, while a large (compound) device-private folio is only counted once when it is allocated. When such a folio is split, the mm core invokes ->folio_split() (nouveau_dmem_folio_split()) once for each new sub-folio, but the hook only fixes up the sub-folio metadata and leaves chunk->callocated unchanged. Each resulting sub-folio is later freed separately, so after a split the single allocation (+1) is met by N frees (-N), leaving chunk->callocated short by N-1. On the first split/free cycle it underflows: WARN_ON(!chunk->callocated) fires, the unsigned counter wraps and never returns to zero, so the chunk can no longer be reclaimed (nouveau_dmem_fini() also warns on the leaked count). Account for the new sub-folio in the split hook, under the same lock as nouveau_dmem_folio_free(), so the count stays balanced. Fixes: c32287471077 ("gpu/drm/nouveau: enable THP support for GPU memory migration") Reported-by: Yuhao Jiang <danisjiang@gmail.com> Assisted-by: Claude:claude-opus-5 Cc: stable@vger.kernel.org Signed-off-by: Zhenhao Wan <whi4ed0g@gmail.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20260811-b4-nouveau-dmem-thp-fixes-v1-2-2cdf9860af2a@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-01drm/nouveau/dmem: fix mismatched DMA unmap size for large foliosZhenhao Wan
Device-private THP migration maps migration buffers with page_size() and records that length in dma_info->size. For a compound folio page_size() is PAGE_SIZE << order, but two teardown sites still pass a literal PAGE_SIZE to dma_unmap_page(): - nouveau_dmem_migrate_to_ram() on the success path, and - nouveau_dmem_migrate_copy_one() on the copy-error path. For an order > 0 folio this unmaps less than was mapped, leaking the remainder of the IOMMU/IOVA mapping. The other unmap sites, in nouveau_dmem_migrate_chunk() and nouveau_dmem_evict_chunk(), already use the saved size; use it here too. Fixes: c32287471077 ("gpu/drm/nouveau: enable THP support for GPU memory migration") Reported-by: Yuhao Jiang <danisjiang@gmail.com> Assisted-by: Claude:claude-opus-5 Cc: stable@vger.kernel.org Signed-off-by: Zhenhao Wan <whi4ed0g@gmail.com> Link: https://patch.msgid.link/20260811-b4-nouveau-dmem-thp-fixes-v1-1-2cdf9860af2a@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-01nouveau/instmem: handle iomapping already existingDave Airlie
Turns out sashiko was right, and I should protect this properly Fixes: 34e27b90552a ("nouveau/instmem: use iomapping interface for instmem handling") Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260825030615.3464436-1-airlied@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-01drm/i915/cursor: Allow joiner cursor fast path updateNemesa Garg
The legacy cursor path forced all joiner updates to the slow path by checking joiner_pipes. Drop the condition so that joiner cursor updates can use the fast path. v4: Trimmed to only the joiner_pipes gate drop. [Chaitanya] Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Nemesa Garg <nemesa.garg@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260901072813.2596383-6-nemesa.garg@intel.com
2026-09-01drm/i915/cursor: Program secondary cursor planesNemesa Garg
Iterate over all joined pipes when arming/disabling the cursor plane so secondary pipes are updated together with the primary. The pin, check and state duplication for secondary pipes was already prepared in the previous commit; this converts the update_arm pass to a loop over the joined_pipe_state[] array. Because the whole loop runs inside a single primary vblank-evade, sample intel_crtc_get_vblank_counter() per pipe around each arm and emit a drm_err() if the counter ticks during that pipe's own programming. v2: Check primary and secondary pipe together. [Ville] v3: Use struct intel_cursor_joiner_state. [Ville] v4: Add per-pipe vblank straddle detection around the arm loop. [Chaitanya] v5: Move straddle check outside the loop to cover all pipes together. Sample vblank counter from primary pipe only. Move drm_err() after local_irq_enable(). [Chaitanya] Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Nemesa Garg <nemesa.garg@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260901072813.2596383-5-nemesa.garg@intel.com
2026-09-01drm/i915/cursor: Handle secondary cursor stateNemesa Garg
In joiner mode the fast path cursor update must handle secondary pipes. Iterate over all joined pipes uniformly to duplicate plane state, run check_plane(), pin the framebuffer and on success swap in the new plane state for each secondary cursor. Track every successfully prepared pipe in a joined_pipe_state[] array of struct intel_cursor_joiner_state so that later frontbuffer, unpin and error-cleanup paths treat primary and secondaries uniformly, and ensures the primary's pinned framebuffer is released if a secondary fails partway through. Convert the primary-only vblank unpin block into a loop over the joined_pipe_state[] array so each pipe's old cursor framebuffer is scheduled for unpin (or unpinned inline when unchanged) independently. All unpin work is armed on the primary crtc's vblank (&crtc->base), consistent with the single primary vblank evasion used above. v2: Use intel_crtc_joined_pipe_mask(). [Ville] Add locking mechanism. [Ville] v3: Drop the per-pipe fastpath mutex array. [sashiko] v4: Fold parallel arrays into struct intel_cursor_joiner_state joined_pipe_state[]. Unify primary/secondary in a single loop. Use bare check_plane(). [Chaitanya] v5: Fix secondary uapi.crtc to each pipe's own crtc. Rename intel_cursor_pipe to intel_cursor_joiner_state and joined[] to joined_pipe_state[]. [Chaitanya] v6: Mirror primary uapi into secondary hw state, don't set uapi.crtc. [sashiko] v7: Squash the per-pipe cursor unpin scheduling into this patch.[Chaitanya] v8: Resolve checkpatch errors. Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Nemesa Garg <nemesa.garg@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260901072813.2596383-4-nemesa.garg@intel.com
2026-09-01drm/i915/cursor: Add helper to update cursor planeNemesa Garg
Move cursor fast path plane state update into helper function. The target hw.crtc is passed as a parameter so a later patch can reuse the helper for joiner secondary pipes, where hw.crtc points at the secondary being programmed while uapi.crtc stays on the primary. v4: Drop uapi.crtc assignment from the helper. [Chaitanya] Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Nemesa Garg <nemesa.garg@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260901072813.2596383-3-nemesa.garg@intel.com
2026-09-01drm/i915/cursor: Check joiner cursor commit statusNemesa Garg
In joiner mode, secondary cursor commits may still be running even when the primary cursor commit is done. Walking the secondary pipes also requires holding the secondary planes modeset locks. Add intel_cursor_lock_joined_planes() to acquire modeset locks for all secondary cursor planes. Check all joined cursor commit status before taking the fast path. If any commit is still pending, fallback to slow path. v2: Use intel_crtc_joined_pipe_mask(). [Ville] v3: Lock secondary cursor CRTCs and planes. [sashiko] v4: Iterate the full joined mask uniformly in both helpers, no primary special-case. Move the parameter-change check above the lock acquisition so we don't grab secondary locks just to fall to slow path. [Chaitanya] v5: Remove extra header declaration. [Chaitanya] Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Nemesa Garg <nemesa.garg@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260901072813.2596383-2-nemesa.garg@intel.com
2026-09-01drm/nouveau/uvmm: clear the dirty flag when unwinding an OP_UNMAP_SPARSEZhenhao Wan
A successful OP_UNMAP_SPARSE marks its region dirty with nouveau_uvma_region_dirty() and defers the teardown to nouveau_uvmm_bind_job_cleanup(); it does not remove the region from uvmm->region_mt. If a later op in the job fails, the unwind path never clears reg->dirty (set in one place, cleared nowhere) and sets op->reg = NULL, so cleanup skips the teardown. The region is left in the tree with dirty set and its completion never signalled. Later binds over that range then fail permanently -- -ENOENT or -EINVAL from the dirty checks, or an unkillable wait_for_completion() in bind_validate_region() -- for the lifetime of the uvmm. Clear reg->dirty when the unwind reverts the sparse unmap, restoring the region to the state it was found in. Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI") Reported-by: Yuhao Jiang <danisjiang@gmail.com> Assisted-by: Claude:claude-opus-5 Cc: stable@vger.kernel.org Signed-off-by: Zhenhao Wan <whi4ed0g@gmail.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20260811-nouveau-uvmm-vmbind-fixes-v2-3-aaee4b395d04@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-01drm/nouveau/uvmm: fix premature region free on failed OP_UNMAP_SPARSEZhenhao Wan
In nouveau_uvmm_bind_job_submit()'s OP_UNMAP_SPARSE arm, op->reg is set from nouveau_uvma_region_find(), which only looks the region up and takes no reference; a region's sole reference is its membership in uvmm->region_mt. Two failure paths leave op->reg set: the -ENOENT check when the region is busy, and the drm_gpuvm_sm_unmap_ops_create() failure. The sibling nouveau_uvmm_sm_unmap_prepare() failure just below clears op->reg; these two do not. unwind_continue steps back one op, so the failing op is skipped by the unwind loop and its op->reg stays set. nouveau_uvmm_bind_job_cleanup() then enters its if (op->reg) branch and calls nouveau_uvma_region_remove() and nouveau_uvma_region_put() on it, dropping the tree's sole reference and freeing a region this job never created. The comment above the cleanup loop documents the broken invariant: op->reg must be NULL on submit failure. This frees a live region on an unrelated failure, reachable single-job when drm_gpuvm_sm_unmap_ops_create() returns -ENOMEM; if another job owns the same region, its cleanup then removes and puts the freed region, a use-after-free. Clear op->reg on both failure paths. Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI") Reported-by: Yuhao Jiang <danisjiang@gmail.com> Assisted-by: Claude:claude-opus-5 Cc: stable@vger.kernel.org Signed-off-by: Zhenhao Wan <whi4ed0g@gmail.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20260811-nouveau-uvmm-vmbind-fixes-v2-2-aaee4b395d04@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-01drm/nouveau/uvmm: fix NULL deref unwinding an OP_MAP_SPARSE opZhenhao Wan
Each bind_job_op is zeroed by kzalloc_obj() in bind_job_op_from_uop(), and the OP_MAP_SPARSE case in nouveau_uvmm_bind_job_submit() only creates a region, so op->ops stays NULL for a successfully processed sparse map. If a later op in the same job fails, the reverse unwind loop revisits that op and calls drm_gpuva_ops_free(&uvmm->base, op->ops) unconditionally. drm_gpuva_ops_free() dereferences its argument right away (list_for_each_entry_safe on &ops->list), so a NULL op->ops oopses. The path is reachable by any render-node fd holder, since NOUVEAU_VM_BIND is DRM_RENDER_ALLOW. Guard the free with IS_ERR_OR_NULL(), as nouveau_uvmm_bind_job_cleanup() already does for the identical free. Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI") Reported-by: Yuhao Jiang <danisjiang@gmail.com> Assisted-by: Claude:claude-opus-5 Cc: stable@vger.kernel.org Signed-off-by: Zhenhao Wan <whi4ed0g@gmail.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20260811-nouveau-uvmm-vmbind-fixes-v2-1-aaee4b395d04@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-01Merge drm/drm-fixes into drm-misc-fixesMaxime Ripard
Let's start the 7.3 drm-misc-fixes cycle. Signed-off-by: Maxime Ripard <mripard@kernel.org>
2026-09-01drm/i915/dp: Gate UHBR SST SDP splitting on sink capabilityMitul Golani
SDP splitting for 128b/132b (UHBR) SST audio must only be enabled when the sink advertises support for it. Previously sdp_split_enable was set for every UHBR SST stream carrying audio, regardless of sink capability. In MST mode SDP splitting is inherently supported, so the sink capability check (DP_SST_SPLIT_SDP_CAP) is applied only to the SST path. Fixes: 8853750dbad8 ("drm/i915: Enable SDP split for DP2.0") Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260825073204.872441-1-mitulkumar.ajitkumar.golani@intel.com
2026-09-01gpu: nova-core: fix incorrect naming/framing of GSP-FMC firmwareAlexandre Courbot
The GSP-FMC firmware code lived in `firmware/fsp.rs` and described itself as running on the FSP. This is incorrect: GSP-FMC is loaded by the FSP, but runs on the GSP as the loader and verifier of GSP-RM. FSP secure-boots on its own before the driver even starts. Correct the naming and location of the GSP-FMC code by: - Renaming `firmware/fsp.rs` to `firmware/gsp_fmc.rs` (as GSP-FMC is not the FSP firmware), - Changing the prefix of some declarations in that file to `FMC` or `GspFmc` (interestingly some were already correct), - Rewording the `fsp.rs` module documentation to describe the actual boot flow. Reviewed-by: Danilo Krummrich <dakr@kernel.org> Reviewed-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260825-gsp-fmc-rename-v1-1-f82526f01d7d@nvidia.com [acourbot: drop the documentation change to be picked up by Zhi, reword commit message a bit.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>