summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/amdgpu_dm
AgeCommit message (Collapse)Author
3 daysdrm/amd/display: Use FreeSync v3 infopacket for sinks above 255 HzCooper Morgan
Native DP, eDP, and HDMI sinks get the v1 FreeSync infopacket unless they are a whitelisted PCON or support Replay. v1 holds each refresh rate in one byte, so a sink whose range goes above 255 Hz cannot be told its real maximum. The v3 packet carries the high bits in PB11/PB12. The AMD VSDB version is already stored for every DP, eDP, and HDMI sink. Send v3 when the sink advertises AMD VSDB v3 and its maximum refresh rate is above 255 Hz. The choice follows the sink's maximum rather than the current mode, so such a sink gets v3 at every mode and the packet version stays fixed per sink. Sinks whose maximum is 255 Hz or less are unchanged. Tested with this series backported to v7.2.13 on an MSI MAG 271QPX32 (AMD VSDB v3, 48-320 Hz) over DP 1.4 on an RX 9070 XT: 320 Hz shows a correct picture, and with VRR active the refresh rate tracks frame caps of 300, 270, and 100 Hz. At 240 Hz, where the sink now gets v3 instead of v1, the picture is correct and VRR tracks a 100 Hz cap. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/5988 Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Cooper Morgan <ext-github@cwooper.dev> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit e1c2682397f2f8f40eada17c817b5d3b300124b6) Cc: stable@vger.kernel.org
3 daysdrm/amd/display: Saturate refresh rates in v1/v2 FreeSync infopacketsCooper Morgan
The v1 and v2 FreeSync infopackets carry the minimum and maximum refresh rate in one byte each, and build_vrr_infopacket_data_v1() casts the rate in Hz to unsigned char. On a sink whose range goes above 255 Hz the value wraps: a 320 Hz mode is advertised as a 64 Hz maximum. Sinks that treat the field as authoritative misbehave once the wrapped value lands inside their range. An MSI MAG 271QPX32 (48-320 Hz) over native DP looks like a ~720p image upscaled to the full screen at 320 Hz and runs its self-test pattern at 305-315 Hz, while 300 Hz (wrapping to 44 Hz, below its minimum) is fine. Capping the EDID range at 255 Hz, so the packet says 255, gives a correct picture at 320 Hz. Saturate the fields at 255 Hz instead of wrapping. Capping v1 at 255 as a fallback was suggested by oystersuki in the linked issue. Fixes: 98e6436d3af5 ("drm/amd/display: Refactor FreeSync module") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5988 Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Cooper Morgan <ext-github@cwooper.dev> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 8f91c13d9a14085216725f60b55546fce5c2dd19) Cc: stable@vger.kernel.org
3 daysdrm/amd/display: Hold the VRR vblank reference only on active CRTCsHugo Sales
amdgpu_dm_handle_vrr_transition() takes a vblank reference when a CRTC state turns VRR on and drops it when a later state turns it off. It only looks at freesync_config.state, and disabling a CRTC keeps that state, so a suspend or DPMS off with VRR active keeps the reference On resume, drm_atomic_helper_resume() first calls drm_mode_config_reset(), which swaps the CRTC state for a zeroed one. The restored state then goes from VRR_STATE_UNSUPPORTED to active and takes a second reference, and the first is never dropped. The vblank irq stays on for good, so the CRTC never idles and PSR is never entered A VRR change on a disabled CRTC can't take the reference at all, since vblank is off there and drm_crtc_vblank_get() fails with a WARN On a Cezanne laptop with VRR always on, each suspend added one to the eDP CRTC's vblank refcount, and it stayed at 1 rather than 0 after VRR was turned off again Treat VRR as active for the reference only while the CRTC is active too. Disabling the CRTC then drops it and enabling it takes it again, which balances suspend, resume and DPMS, and the get only happens once manage_dm_interrupts() has turned vblank on Fixes: 66b0c973d7f7 ("drm/amd/display: Prevent vblank irq disable while VRR is active. (v3)") Reviewed-by: Ivan Lipski <ivan.lipski@amd.com> Signed-off-by: Hugo Sales <hugo@hsal.es> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 4232ec2333ab3ef16520b399b30d50f17ceb9c63) Cc: stable@vger.kernel.org
3 daysdrm/amd/display: Add the AUX backlight minimum once on the custom curveHugo Sales
On an AUX backlight, convert_brightness_from_user() maps the user level through the ATIF custom brightness curve with convert_custom_brightness(), which rescales the result to user_min..user_max. convert_brightness_from_user() then rescales it again, from 0..user_max to user_min..user_max, so the minimum goes in twice. On the 1..512 nits AUX fallback range, a request for 0 gives 1998 millinits instead of 1000 Rescale the curve's output to 0..user_max and leave the offset to the caller Fixes: 8dbd72cb7900 ("drm/amd/display: Export full brightness range to userspace") Reviewed-by: Ray Wu <ray.wu@amd.com> Signed-off-by: Hugo Sales <hugo@hsal.es> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 5f95ef2cfd208ca7efe446abfc9e3144dc5ce4fa) Cc: stable@vger.kernel.org
3 daysdrm/amd/display: Keep FreeSync flip timing across plane resetsDavey Hughes
dm_update_plane_state() replaces the DC plane with a newly allocated one whenever the plane is reset. The new plane's flip timing is zero, and mod_freesync_handle_preflip() runs before DC stores the new plane's first flip timestamp, so FreeSync takes the 32-bit microsecond timestamp itself as the last render time: the monotonic clock modulo about 71.6 minutes. On a panel with below-the-range compensation (BTR), that engages BTR and pins the frame time at the BTR mid-point (13.447 ms on a 48-165 Hz panel). A panel without BTR (max refresh below twice the min) goes through the fixed refresh path instead and locks to its max refresh after six frames. It takes a reset on every flip to keep the panel there, and color management changes reset the plane. DRM sets color_mgmt_changed whenever a color property is given a different blob, even one with the same contents, and KWin 6.8.1 with HDR enabled and its color accuracy setting at "Prefer efficiency" sets a new GAMMA_LUT blob on every commit (current KWin master no longer does). Plane resets for CRTC color changes, added by commit 7316c4ad2996 ("drm/amd/display: Reset planes for color management changes"), and later for plane color properties and colorops, made this reachable on every flip. Copy the flip timing from the old DC plane into the new one when the plane stays on the same CRTC. Do it in amdgpu_dm_commit_planes() before the preflip, after drm_atomic_helper_wait_for_dependencies() has waited for the previous commit, so the copy holds that commit's flip and does not race with DC writing it. This covers both the BTR and the fixed refresh path. A plane that is newly enabled or moved to another CRTC still starts without history. Fixes: 180db303ff46 ("drm/amd/display: Add below the range support for FreeSync") Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Davey Hughes <davidralphhughes@gmail.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 4acf82d2a2dcca2d7df8649ecafb3da6c1245003) Cc: stable@vger.kernel.org
3 daysdrm/amd/display: Don't warn about vendor infoframe for non-infoframe sinksPaul Menzel
With an EIZO EV2781 connected over HDMI to an AMD Ryzen 3 2200G (Raven) on an MSI B350M MORTAR (MS-7A37), Linux logs at every boot since v6.16: amdgpu 0000:30:00.0: [drm] Failed to setup vendor infoframe on connector HDMI-A-1: -22 Commit 6027cbee1900 ("drm/amd/display: Add error check for avi and vendor infoframe setup function") started to log the return value of drm_hdmi_vendor_infoframe_from_display_mode(). With `frame` and `mode` being non-NULL, the helper only fails with -EINVAL, if the sink does not support HDMI infoframes, that means, if `connector->display_info.has_hdmi_infoframe` is false, and its kernel-doc says, that this error can be safely ignored. drm_parse_hdmi_vsdb_video() only sets `has_hdmi_infoframe`, if the HDMI VSDB has HDMI_Video_present set, and drm_parse_hdmi_forum_scds() sets it for sinks with an HF-SCDB. So an HDMI sink, whose VSDB lacks HDMI_Video_present, triggers the warning, although nothing failed. The EIZO EV2781 is such a sink. Its HDMI VSDB has a payload of only seven bytes (source physical address, Supports_AI, and a maximum TMDS clock of 250 MHz), so the byte with HDMI_Video_present is absent, and the EDID has no HF-SCDB: 67 03 0c 00 10 00 80 32 Only warn, if the sink supports HDMI infoframes. The infoframe setup itself is unchanged. Fixes: 6027cbee1900 ("drm/amd/display: Add error check for avi and vendor infoframe setup function") Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5025 Reviewed-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 2abfc667f622eb7132b139db2e175642713662f8) Cc: stable@vger.kernel.org
3 daysdrm/amd: Select the firmware signing scheme the PSP reportsMario Limonciello
Some platforms ship BIOS with either a default or an alternative trust authority, so firmware for every IP must be signed with the matching scheme. The PSP advertises which one is in use in bit 6 of C2PMSG_63, and in bit 28 whether this is a preproduction part, which needs firmware of its own. Add amdgpu_psp_init_fw_variant() which reads those bits through amdgpu's own MMIO, and keep the result in adev->firmware.sign_type next to load_type, where preproduction is a type of its own. It is initialized once, after IP discovery has populated the register bases and only when firmware is loaded through the front door (the PSP). Only MP0 15.0.0 and 15.0.9 report it. For all other ASICs, SR-IOV VFs and an inaccessible register (all ones) the defaults are kept: AMDGPU_FW_SIGN_DEFAULT. A preproduction part that also reports the alternative scheme is not expected. Mark it AMDGPU_FW_SIGN_UNKNOWN, so that firmware requests warn and fail with -EINVAL rather than load firmware that would be rejected. Firmware for preproduction parts is named with a "_p" suffix before the extension and firmware for the alternative scheme with an "_l" suffix (e.g. "foo.bin" becomes "foo_p.bin" or "foo_l.bin"). Production parts on the default scheme use the plain names. Do the substitution centrally in amdgpu_ucode_request() so it covers every IP that loads firmware through it (PSP, SMU, DMUB, GC, IMU, MES, SDMA, VCN, VPE, ...) without each loader having to care. There is no fallback to the default file: it would be rejected anyway. Declare the variants with MODULE_FIRMWARE() so that initramfs generators include them. Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patch.msgid.link/20261114160925.390350-1-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 2fe41c5fb704e05ccf2bf00634e1b5ad2db4e5b7)
3 daysdrm/amd/display: Apply the HDMI RGB range default only to HDMI signalsAdrian Betschart
Since d23f735d0eac, Broadcast RGB "Automatic" selects limited range on CTA modes when display_info.is_hdmi is set. That flag comes from an HDMI VSDB in the EDID and says nothing about the link, so a native DisplayPort monitor whose EDID carries an HDMI VSDB now gets limited range on CTA modes too. Monitors that ignore the DP range signal show grey blacks, where 7.2 sent full range. Require an HDMI signal as well, as the original commit intended. DP++ passive adapters drive an HDMI signal and keep the HDMI behaviour; native DP, DP MST and active DP-to-HDMI converters get full range again. Reported and analysed by Andrés Rodríguez in the issue below. Fixes: d23f735d0eac ("drm/amd/display: Default HDMI RGB output to limited range on CTA modes") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/6052 Reviewed-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Adrian Betschart <adrian.betschart@cinemaone.ch> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 39f37a2346410a33edf4af17a873ac96bb5244ce) Cc: stable@vger.kernel.org # 7.3
3 daysdrm/amd/display: Take every stream out of self-refresh before a modesetHugo Sales
Commit 3c108046e1d6 ("drm/amd/display: Add power module on Linux") dropped amdgpu_dm_psr_disable_all() and amdgpu_dm_replay_disable_all() from amdgpu_dm_commit_streams(). Since then, a modeset only disables self-refresh on the CRTCs in the commit, so an eDP on another CRTC stays in PSR through dc_commit_streams() Commit 6ee90e88b976 ("drm/amd/display: PSR eDP p-state warning occurs intermittently after unplug DP") added that disable-all for this very case. With it gone, turning off or unplugging an HDMI monitor while the eDP is in PSR hangs DMUB on a Cezanne laptop (DCN 2.1), on the first try: dc_dmub_srv_log_diagnostic_data: DMCUB error Error queueing DMUB command: status=2 The eDP then stays frozen until a GPU reset Do the same through the power module's events. When a CRTC that is or was active needs a modeset, raise the PSR and Replay pause events on every stream mod_power tracks and wait for self-refresh to exit, before amdgpu_dm_mod_power_update_streams() changes the stream set. Clear them on the commit's streams after amdgpu_dm_mod_power_setup_streams(), since enabling a stream clears psr_feature_enabled until then. Use psr_event_pause and replay_event_pause rather than the hw_programming events, which a fast update on the eDP can clear in amdgpu_dm_enable_self_refresh() while the modeset is still running Fixes: 3c108046e1d6 ("drm/amd/display: Add power module on Linux") Reviewed-by: Ray Wu <ray.wu@amd.com> Signed-off-by: Hugo Sales <hugo@hsal.es> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 5d90fdb959505b5f42f2dec699521ac56b4174be) Cc: stable@vger.kernel.org
3 daysdrm/amd/display: Stop HDMI FRL status polling on finiFangzhi Zuo
[Why] The HDMI FRL status polling work re-queues itself and its workqueue was not stopped during amdgpu_dm_fini(). During unbind or unload, the worker could access freed DC state, and the workqueue was leaked. This fixes the FRL polling teardown introduced by the HDMI FRL support change. [How] Cancel the delayed polling work synchronously and destroy the workqueue in amdgpu_dm_fini() before the remaining display state is torn down. Cc: Harry Wentland <harry.wentland@amd.com> Reported-by: Eren Özen <erenozen@protonmail.com> Link: https://lore.kernel.org/all/20261110-frl-polling-wq-teardown-v1-0-0ff028d5c35b@protonmail.com/ Reviewed-by: ChiaHsuan Chung <chiahsuan.chung@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 709b7a5aff3addf2288dedf42bc62c45ae1ab163)
3 daysdrm/amd/display: Move HDMI FRL Polling Outside dc_lockFangzhi Zuo
[Why] amdgpu_dm_commit_streams() started or cancelled the self-rearming HDMI FRL poll under dm->dc_lock. cancel_delayed_work_sync() can wait for a worker that needs the same lock, creating a lock dependency that could deadlock. [How] Release dm->dc_lock after dc_commit_streams() and the idle-optimization update, then scan the committed streams and start or stop FRL polling outside the lock. Cc: Harry Wentland <harry.wentland@amd.com> Reviewed-by: ChiaHsuan Chung <chiahsuan.chung@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 7a1807cd11a8c2bd26d48de6829d82ae62ad622d)
12 daysMerge tag 'devm_kmalloc_obj-v7.4-rc2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull devm_kmalloc_obj conversion from Kees Cook: - treewide refresh of kmalloc_obj() conversions - devm_kmalloc_obj conversion rules added to Coccinelle scripting - treewide conversion of devm_kmalloc() family to devm_kmalloc_obj() * tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family coccinelle: kmalloc_obj: Include devm_kmalloc_obj conversion rules treewide: refresh kmalloc_obj() conversions
2026-11-05treewide: refresh kmalloc_obj() conversionsKees Cook
Refresh the tree with run of the existing Coccinelle rules in scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert arrays of multi-byte integers. The conversions break down as: 435 kzalloc_objs() 169 kmalloc_objs() 52 kvzalloc_objs() 47 kzalloc_obj() 42 kvmalloc_objs() 8 kmalloc_obj() 2 kzalloc_flex() 2 kvmalloc_flex() and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL. Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64, i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc, xtensa, and openrisc with GCC 16.2.0 with no new warnings. Signed-off-by: Kees Cook <kees+treewide@kernel.org>
2026-11-04Revert "drm/amd/display: Allocate DCN32/1 dmub memory to GTT"Calvin Owens
After commit a637a140ab860310 ("drm/amd/display: Allocate DCN32/1 dmub memory to GTT"), a machine with a Radeon RX 7900 shows random garbage on the screen. It reproduces sporadically, but at times it is so bad the machine is more or less unusable. The garbage is always horizontal bars extending across the entire screen, always approximately 200 pixels tall on a 3840x2160 screen, for what looks like a single frame. The bars are mostly black, but will sometimes exhibit striping and periodic artifacts which smell like non-framebuffer data is being rendered to the screen. It took some patience on the "good" side, but I was able to nail it down to commit a637a140ab860310818a14fb4d37e39e51a06be4 with this bisect: bad: [cee9395acd8043be0644b25c34bfa86623f2b935] Linux 7.3-rc1 good: [8d3ae59288f1e7d58d76558a6ee96d533bc5019f] Linux 7.2 good: [55ab7e14222e5f0b0fd9f7711ca391d2924b35e3] Merge tag 'for-7.3/block-20260819' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux bad: [df51bdc5e80dae43cab81f6cc641e98638303c88] Merge tag 'mtd/for-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux bad: [29daacacf4cd84e6917f09de6a99fb170071c14c] Merge tag 'drm-rust-next-2026-08-08' of https://gitlab.freedesktop.org/drm/rust/kernel into drm-next good: [fff648aec5e2790d117a0ec5c849a284d9d33d70] drm/amdgpu: include amdgpu_video_codecs.h only where needed bad: [336e0cd576817ac64a4b394ca2b3680029f3e37f] Revert "drm/amdgpu: fix aperture mapping leak" bad: [789f7486a384ca58b9d7a76abba5efa0e80e8dab] drm/amd/display: Test plane colorop helper walkers good: [e0e426f10ad653c5e9dd33fb4a76d55f06101992] drm/amd/display: Test helper_check_state rejects bad: [982b2a43682b55e7d9800000f2592832ff2865ba] drm/amdgpu: Fix IP block NULL check during soft reset bad: [9102b39fa924dcc3dc75a3137bfa9633c40b88c0] drm/amdgpu/userq: fix indefinite fence wait during GPU reset bad: [b23470a026afe64de5c1df4ad181587b49c22923] drm/amd/display: Exit LS for ISHARP before coefficient write bad: [f02b2e47355e9d381a7f34acc997e1c47879ca21] drm/amd/display: Add KUnit test for wb jobs bad: [c6a13d145cc811b19c8a0620f25868cf7d5700c0] drm/amd/display: remove unused dcn42 socbb values good: [1d8327353de6f1f34063840f362c208c84064f54] drm/amd/display: Fix VABC Init and OLED Support bad: [a637a140ab860310818a14fb4d37e39e51a06be4] drm/amd/display: Allocate DCN32/1 dmub memory to GTT first 'bad' commit: [a637a140ab860310818a14fb4d37e39e51a06be4] drm/amd/display: Allocate DCN32/1 dmub memory to GTT Sure enough, reverting a637a140ab860310818a14fb4d37e39e51a06be4 on top of v7.3 completely and totally eliminates the problem for me. Mikhail has separately reported this regression: https://lore.kernel.org/all/20260829010525.29935-1-mikhail.v.gavrilov@gmail.com/ ...but it seems to be much more consistent for me than for Mikhail, it's never taken more than 30 minutes even when the machine is completely idle. I've also never been able to reproduce any artifact one single time without commit a637a140, despite a lot of effort. I'm not sure reverting this is the right way forward, since presumably this would re-regress the timing issue Fangzhi alluded to in the original commit. But nobody has proposed anything concrete yet... so let's start the discussion here. I'm happy to help test other better ideas as well :) Fixes: a637a140ab86 ("drm/amd/display: Allocate DCN32/1 dmub memory to GTT") Closes: https://lore.kernel.org/all/20260829010525.29935-1-mikhail.v.gavrilov@gmail.com/ Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5714 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Calvin Owens <calvin@wbinvd.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 899489d2e2aa854cf5e933677d6561dfcbb94529) Cc: stable@vger.kernel.org
2026-11-04drm/amd/display: Signal PQ EOTF in FreeSync infopacket for DP HDRMelissa Wen
Commit c2791297013e ("drm/amd/display: Add color bit info to freesync infoframe") created the app_tf interface for FreeSync HDR and commit c21a764a98cb ("drm/amd/display: Send PQ bit in AMD VSIF") used it to set PB9 bit 5 (PQ EOTF) in v2/v3 AMD Freesync infopacket. However, Linux never made use of this interface: DM ignores what userspace sets regarding HDR and always passes TRANSFER_FUNC_UNKNOWN as app_tf, so the PQ bit is never set in the infopacket received by the eDP panel. Check the EOTF in the HDR static metadata and set the PQ bit in Freesync infopacket for DP accordingly. This fixes gray-washed HDR on KDE/GNOME on Framework 13 Pro AI 9 HX 370 (DCN 3.5) and may fix similar issues on other VRR-capable panels that advertise Replay in its AMD VSDB. It doesn't affect color/EOTF bits on infopackets for SDR and native HDMI. Reported-by: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com> Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/3200 Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit b318f3e13dd73781404670d3b3c6cf2177e0119c) Cc: stable@vger.kernel.org
2026-11-04drm/amd/display: set allow_freesync before validating a new streamMikhail Gavrilov
After resume from S3, DC enables SubVP on a single FreeSync display at a high refresh rate, although dcn32_allow_subvp_high_refresh_rate() is meant to keep SubVP off that configuration ("For single display cases, freesync must be disabled"). On an RX 7900 XTX driving a FreeSync TV at 3840x2160@120, amdgpu_dm_capabilities reports sub-viewport disabled after boot and enabled after "rtcwake -m mem", and the memory clock starts switching. It stays that way until a later commit re-validates the state; a CRTC gamma change (toggling Night Light) turns SubVP off again. The policy reads dc_stream_state::allow_freesync while the new state is validated, but amdgpu_dm sets that field only in amdgpu_dm_update_freesync_state_on_stream(), on the first flip after the commit. A stream created by a modeset is therefore validated as if FreeSync were off. On resume, dm_destroy_cached_state() drops the streams and forces a modeset, so the resumed state is validated without FreeSync. Set allow_freesync in amdgpu_dm_get_freesync_config_for_crtc(), which atomic check calls for every active CRTC and which already writes ignore_msa_timing_param to the stream. It uses vrr_supported, the condition the flip-time value is derived from. With this change the same TV keeps SubVP disabled across "rtcwake -m mem". On this machine SubVP is also what exposes the single-frame scanout corruption reported in the thread linked below, so the FreeSync setting stopped working as a workaround after every suspend. Fixes: 87f0c16e0eeb ("drm/amd/display: Enable SubVP for high refresh rate displays") Link: https://lore.kernel.org/all/20260829010525.29935-1-mikhail.v.gavrilov@gmail.com/ Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5714#note_3736349 Tested-by: Josh Kasten <jkasten@gmail.com> Signed-off-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 29793918b0eb63b6810b248a906f87dd79b70be5) Cc: stable@vger.kernel.org
2026-11-04drm/amd/display: Accept HDMI 2.2 FRL rates from the sink EDIDFangzhi Zuo
[Why] get_max_frl_rate() converts the DRM lane count / per-lane rate pair back into the FRL rate index used by DC, but it only knows the rates up to 12 Gbps. A sink advertising 16, 20 or 24 Gbps per lane therefore falls into the else branch and reports edid_caps.max_frl_rate = 0. [How] Map the remaining 4-lane rates to the matching hdmi_frl_link_rate values (16 Gbps -> 7, 20 Gbps -> 8, 24 Gbps -> 9) and extend the KUnit coverage alongside the existing per-rate cases. 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> (cherry picked from commit 175fcf337795cccc52242e20c5a88ac4a51ebc22)
2026-10-27drm/amd/display: refresh cached HDMI FreeSync stateFangzhi Zuo
When an HDMI sink re-reports an EDID without an AMD VSDB, get_amd_vsdb() returns false but the connector's cached vsdb_info was previously updated only on success. A previous FreeSync-capable EDID could therefore leave freesync_supported set and keep selecting the FreeSync SPD path instead of the HDMI VRR VTEM path. Refresh the cached VSDB record for every HDMI EDID update so a missing AMD VSDB clears stale FreeSync state. Keep the existing SPD/VTEM packet separation and protocol-selection logic unchanged. Fixes: 123e9515f7e0 ("drm/amd/display: Send HDMI VRR metadata in VTEM info packet slot") Reviewed-by: IVAN LIPSKI <ivan.lipski@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: PeiHsin Yang <peihsiny@valvesoftware.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 732a165000944e618ed38769922daf11b0fe35eb) Cc: stable@vger.kernel.org
2026-10-27drm/amd/display: Cap DSC bpp for USB4 DP tunnelsFangzhi Zuo
On pre-DCN4.2 platforms, USB4 DP bandwidth allocation is unavailable. SST and MST streams are sized against their native DP link bandwidth even when multiple DP tunnels share the host router. A high-bandwidth DSC stream can consume too much shared tunnel capacity and cause intermittent display corruption when another tunnel is active. Cap the DSC target at 8 bpp for USB4 DPIA SST and MST streams when bandwidth allocation is unavailable. For MST, cap the DSC fairness range while preserving its per-link allocation. When bandwidth allocation is enabled on DCN4.2, retain forced DSC and the existing minimum-bpp behavior required to fit the tunnel grant. This is a follow-up to commit c30b9813bce1 ("drm/amd/display: Force DSC to 8bpp for SST DP tunneling over USB4") and commit cd53dcd2a7d7 ("drm/amd/display: Force DSC to 8bpp for MST DP tunneling over USB4"). Reviewed-by: Ivan Lipski <ivan.lipski@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit e2bd5d908a89252ad4ee11a3dbc9fd57c257accd)
2026-10-27drm/amd/display: Poll passive DVI sinks for EDID readinessFangzhi Zuo
A passive DP-DVI adapter is identified when the adapter DDC probe does not respond, but the downstream monitor's EDID EEPROM may still need time to become available after resume. Poll the downstream DDC address for passive DP-DVI links before reading and parsing the EDID. Keep the eDP detection optimization without adding a generic EDID retry delay or a deferred connector reprobe. Revert commit 3001d2073d65 ("drm/amd/display: Exit IPS before connector detection on resume") and rely on targeted passive DP-DVI EDID readiness polling instead of the generic pre-detection IPS exit. Fixes: d1d51519bc3b ("drm/amd/display: Skip eDP detection when no sink") Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Karthikeyan B <karthikeyan.b@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 8297e1c724733fc59027b717df73680eaf03dd56) Cc: stable@vger.kernel.org
2026-10-27drm/amd/display: take a runtime PM reference only when a CRTC turns onLuigi Lauro
amdgpu_dm_commit_streams() takes a runtime PM reference for every active CRTC that needs a modeset and has a new stream, but amdgpu_dm_atomic_commit_tail() drops one only for each CRTC that goes from active to inactive. A modeset of a CRTC that is already active (a mode change, or anything else that needs a full modeset) therefore leaks one reference. Once that has happened, the usage count no longer returns to zero with every CRTC off, and the device cannot runtime suspend again until reboot. The two also disagree the other way when a CRTC turns on without a stream ("Failed to create new stream"): no reference is taken, but one is dropped when it turns off. Take the reference in the loop that counts the disabled CRTCs, on the mirror condition: when the CRTC goes from inactive to active, which is what the commit that added it intended ("every time we enable a previously disabled CRTC"). Each active CRTC then holds exactly one reference. Tested on an RX 9070 XT (Navi 48) over OCuLink, with the change backported to 7.2.9: an unplugged connector forced on, then mode A on a CRTC, mode B on the same active CRTC, and the CRTC off, three rounds in a row. The usage count rose by 3 with the stock module, by 0 with this patch, and by 3 again after reloading the stock module. Fixes: 97028037a38a ("drm/amdgpu: Grab/put runtime PM references in atomic_commit_tail()") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5951 Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Luigi Lauro <luigi.lauro@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 59ef9a435499777b8e1c4e0eff52f813c64fb920) Cc: stable@vger.kernel.org
2026-10-20drm/amd/display: don't WARN when removing an unallocated MST payloadMario Limonciello
[Why] On an MST teardown that runs through the reset path (dcn31_reset_hw_ctx_wrap -> link_set_dpms_off -> deallocate_mst_payload), fill_dc_mst_payload_table_from_drm() is asked to remove a payload whose vcpi is not present in link->mst_stream_alloc_table and trips: WARNING: .../amdgpu_dm_helpers.c:275 fill_dc_mst_payload_table_from_drm This is a legitimate case, not an error: deallocate_mst_payload() can be called for a stream whose MST payload was never programmed into DC's HW-maintained table (a new stream created for a modeset whose enable never completed, as already documented in deallocate_mst_payload()). There is simply nothing to remove. [How] Drop the ASSERT and fall through to the fill loop, which rebuilds the allocation table from the remaining entries. The table ends up unchanged, which is correct: the payload being removed was never in it. Note the loop must not early-return here - the caller passes a zeroed proposed_table, so returning early would zero the whole link's table and drop the other MST streams sharing the link. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5875 Reviewed-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Ray Wu <ray.wu@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 88a27f624dc0ebc14a7ab274a84d977ce8513cb6) Cc: stable@vger.kernel.org
2026-10-11Merge tag 'amd-drm-next-7.4-2026-10-08' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/amdgpu/kernel into drm-next amd-drm-next-7.4-2026-10-08: amdgpu: - Fix direct scanout alpha on some DRM_FORMATs - UserQ fixes - Fix for PSR with tearing flips - GPU reset vblank fix - Debugfs register interface fix - Fix mode patching - Expand Mac reserved memory workaround - GC 12.1 fixes - Clean up MES/HWS vmid mask handling - Make runtime pm more fine grained - A+A SPM fixes - SR-IOV fixes - 3D LUT fixes - HDMI fixes - DCN 4.2 fixes - HDMI VRR fixes - DC tracing fixes - UALink fixes amdkfd: - SDMA doorbell fix - Fix dma-buf reference leak in error path Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patch.msgid.link/20261008212310.2508510-1-alexander.deucher@amd.com
2026-10-09BackMerge tag 'v7.3-rc6' into drm-nextDave Airlie
Linux 7.3-rc6 This was requested by Thomas to have a new base to start some branch from Signed-off-by: Dave Airlie <airlied@redhat.com>
2026-10-07drm/amd/display: only clear the hotplug sources the ASIC hasMattia Tadini
amdgpu_dm_hpd_init() clears every hotplug source in the enum before enabling the ones it needs: for (i = DC_IRQ_SOURCE_HPD1; i <= DC_IRQ_SOURCE_HPD6RX; i++) DC fills the unused slots of its interrupt table with dummy handlers that assert when touched, so on an ASIC with fewer than six HPD lines that sweep warns and taints the kernel. DCN 2.0.1 has two: mmHPD0_DC_HPD_INT_CONTROL and mmHPD1_DC_HPD_INT_CONTROL are the only hotplug registers in dcn_2_0_1_offset.h, against five in dcn_2_1_0_offset.h, and irq_service_dcn201.c defines hpd_int_entry(0) and (1) accordingly. On an AMD BC-250, which appears to be the only GPU using DCN 201, every boot produces this for sources 3 to 6: [drm] *ERROR* dal_irq_service_dummy_ack: called for non-implemented irq source, src_id=0, ext_id=0 [drm] dal_irq_service_set: src: 3, st: 0 WARNING: .../display/dc/irq/irq_service.c:129 at dal_irq_service_set.cold+0x2d/0x76 [amdgpu] dal_irq_service_set+0x4c/0x100 [amdgpu] amdgpu_dm_hpd_init.cold+0x15/0x12e [amdgpu] dm_hw_init+0x4c/0x170 [amdgpu] amdgpu_device_init.cold+0x1727/0x1ec0 [amdgpu] and the machine comes up tainted W, which makes every unrelated bug report from it harder to read. Walk the links this ASIC has instead of the whole enum, and skip a link with no hotplug line of its own, which is the same guard the enable loop further down already applies. A source owned by a real link is implemented by definition, so the dummy handlers are no longer reached. Parts with six HPD lines are unaffected. Signed-off-by: Mattia Tadini <info@mtsistemi.it> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: Don't replace a sink mode that shares the native totalsAdrian Betschart
decide_crtc_timing_for_drm_display_mode() copies the native mode's CRTC timing into the requested mode when clock, htotal and vtotal match. That is meant for the modes amdgpu inserts itself: amdgpu_dm_create_common_mode() duplicates the native mode and changes only hdisplay and vdisplay, so those are sent with the native timing and scaled. A sink can also offer a real mode with the same clock and totals as its native mode. CTA-861 VIC 102 (4096x2160@60) and VIC 97 (3840x2160@60) both use 594 MHz and 4400x2250. With 3840x2160@60 as the preferred mode, a 4096x2160@60 request goes out with the 3840x2160 timing and the framebuffer scaled into it (dst 3840x2025 at y=67), while the AVI InfoFrame still carries VIC 102. A JVC projector then reports 3840x2160 and shows a corrupted right edge. 4096x2160@24, whose totals differ, is sent and displayed correctly. Inserted modes keep the native sync positions; a real mode with its own active width does not. Compare those too, so only inserted modes are patched. Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") Signed-off-by: Adrian Betschart <adrian.betschart@cinemaone.ch> Assisted-by: Claude-Code:claude-opus-5-5 Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: copy function name into dcn_optc_lock_unlock_state trace eventMelissa Wen
Userspace trace tools that use libtraceevent to read binary buffer only see a kernel address when printing const char *. Use string macros in dcn_optc_lock_unlock_state to copy the function name into the trace event. Fixes: f1943a51f0f9 ("drm/amd/display: Add events log to trace OPTC lock and unlock") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Melissa Wen <mwen@igalia.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: copy function name into dcn_fpu trace eventMelissa Wen
Userspace trace tools that use libtraceevent to read binary buffer only see a kernel address when printing const char *. Use string macros in dcn_fpu to copy the function name into the trace event. Fixes: 96ee63730fa3 ("drm/amd/display: Add control mechanism for FPU") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: remove redundant cast on amdgpu_dc_reg_template printkMelissa Wen
Commit 0cf5eb76e2b4 ("drm/amd/display: Add tracing to dc") prints and casts uint32_t fields in amdgpu_dc_reg_template to unsigned long unnecessarily. Just print those fields with %08x and remove the redundant cast. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: use right type for amdgpu_dc_performance event entriesMelissa Wen
Some amdgpu_dc_performance trace event params are passed as unsigned long but stored as uint32_t, cutting them off on 64-bit. Use the right type on entry fields and on printk use unsigned format accordingly. Fixes: 0cf5eb76e2b4 ("drm/amd/display: Add tracing to dc") Signed-off-by: Melissa Wen <mwen@igalia.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: declare amdgpu_dm_atomic_state_template as an event classMelissa Wen
Don't create an amdgpu_dm_atomic_state_template event since this is just a template. Declare the template as an event class that will be used by actual event tracers. Fixes: e8a982355f96 ("drm/amd/display: Add tracepoint for amdgpu_dm") Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: fix vready offset assignment in dcn_optc_lock_unlock_stateMelissa Wen
vready_offset is captured by optc_state, but the trace point entry is wrongly assigned to vupdate_offset. Fix vready_offset tracepoint field in dcn_optc_lock_unloack_state to record optc_state->vready_offset. Fixes: f1943a51f0f9 ("drm/amd/display: Add events log to trace OPTC lock and unlock") Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: remove duplicated prev_p_state_change_support assignmentMelissa Wen
The prev_p_state_change_support trace entry is assigned and printed twice, remove the unnecessary duplicates. Fixes: 13b5ca42ca9c ("drm/amd/display: Add tracepoint for capturing clocks state") Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: assign missing trace entry in amdgpu_dm_dc_clocks_stateMelissa Wen
disp_dpp_voltage_level_khz is declared and printed, but never assigned. So when using clock tracepoint the value of this clock is just garbage. Assign clk->disp_dpp_voltage_level_khz since this is stored in dc_clocks as other entries. Fixes: 13b5ca42ca9c ("drm/amd/display: Add tracepoint for capturing clocks state") Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: Send HDMI VRR metadata in VTEM info packet slotIvan Lipski
[Why] Brief blank on HDMI each time VRR engaged and disengaged, with no modeset at either transition. amdgpu_dm_update_freesync_state_on_stream() built the VTEM on top of the buffer holding the AMD FreeSync SPD payload, which becomes stream->vrr_infopacket. DC routes that to HDMI generic slot 3 (SPD) and vtem_infopacket to slot 6 (VTEM), and vtem_infopacket was never populated. So slot 3 carried a VTEM payload the sink parsed as an SPD InfoFrame, no VTEM was sent, and v_total varied with no valid metadata describing it. DP uses the VSC/AS-SDP path and is unaffected. [How] Build the VTEM into a separate vtem_infopacket, gated on the sink not advertising AMD FreeSync. Track it in dm_crtc_state, include it in the freesync_vrr_info_changed comparison and the reset path, and pass it through bundle->stream_update.vtem_infopacket. Reviewed-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Ivan Lipski <ivan.lipski@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: enable shaper when programming 3DLUTHarry Wentland
The plane-XR30-XR30-3dlut_17_12_rgb kms_colorop test fails on DCN 4.x. We need to make sure we set shaper_enable to enable the shaper block, otherwise the 3DLUT block will stay inactive. Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: disable self-refresh on tearing flipsLeo Li
[Why & How] Immediate (tearing) flips breaks self refresh state machine assumptions, so disable PSR/Replay for them. Tested-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-07drm/amd/display: Fix direct scanout alpha on some DRM_FORMATsLeo Li
[Why] DM was declaring it's own list of has_alpha DRM formats to check against for enabling alpha blending, when the format->has_alpha already does that for us. The self-declared list missed some has_alpha formats, causing direct-scanout planes with such formats to appear opaque. [How] Drop the self-declared list, instead use the format->has_alpha field directly. Signed-off-by: Leo Li <sunpeng.li@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-03Merge tag 'drm-misc-next-2026-10-02' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for v7.4: Cross-subsystem Changes: Documentation: - Fix indention in display-related DT bindings Core Changes: - Provide helpers for calculating absolute and relative timeouts clients: - fbdev: Move helpers from drm_kms_helper.ko to drm_client_lib.ko display: - dp/mst: Improve DPCD compliance sched: - fix locking Driver changes: amdxdna: - Support AIE2 rev 9 - Fix UAF access in scheduler fences - Update workqueue interface bridge: - Select DRM_PANEL_BRIDGE for various drivers that require it host1x: - Support partitioning imagination - Clean up firmware interface imx: - Replace simple-display with regular atomic helpers ivpu: - Simplify NULL-pointer handling in cleanup code mxsfb: - Support bus formats plus DT bindings panel: - ebbg-ft8719: Fix MODULE_LICENSE() string; Improve initialization - edp: NV140WU2-M70 - ilitek-ili9882t: Support Ilitek IL79600A plus DT bindings - simple: Support Truly TFT320240-229-E plus DT bindings; Support BOE DV215FHM-R01 plus DT bindings - Refactor struct drm_panel to contain struct drm_bridge plus fallout in various panel drivers panthor: - Validate user-space input against firmware limits renesas: - Support RZ/G3L SoC ssd130x: - ssd132x: Set correct hardware window when clearing screen host1x: - support partitioning panel: - fix fallout from bridge-related changes tegra: - improve syncobj handling on submit Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20261002120720.GA720384@linux.fritz.box
2026-10-02Revert "drm/amd/display: Attach blend mode property for alpha planes"Alex Deucher
This reverts commit 44139872f22350b1e6c45da80e414caca81f11f5. This regresses blend mode handling. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-02Revert "drm/amd/display: replace STATIC_IFN_KUNIT with VISIBLE_IF_KUNIT"Alex Deucher
This reverts commit 7e9fca772695c65f97493272e2e7cd475f202965. This series breaks the build when CONFIG_KUNIT=y and CONFIG_DRM_AMD_DC_KUNIT_TEST=n. When CONFIG_KUNIT=y, the functions are not static, but when CONFIG_DRM_AMD_DC_KUNIT_TEST=n, they should be. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-02Revert "drm/amd/display: replace EXPORT_IF_KUNIT with EXPORT_SYMBOL_IF_KUNIT"Alex Deucher
This reverts commit b6b813e046e475bb3fe209d74f1df70033b5b98e. This series breaks the build when CONFIG_KUNIT=y and CONFIG_DRM_AMD_DC_KUNIT_TEST=n. When CONFIG_KUNIT=y, the functions are not static, but when CONFIG_DRM_AMD_DC_KUNIT_TEST=n, they should be. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-02Revert "drm/amd/display: drop INLINE_IFN_KUNIT"Alex Deucher
This reverts commit 5a98f454a61197761c4c5e8eed948dea2b9f5a69. This series breaks the build when CONFIG_KUNIT=y and CONFIG_DRM_AMD_DC_KUNIT_TEST=n. When CONFIG_KUNIT=y, the functions are not static, but when CONFIG_DRM_AMD_DC_KUNIT_TEST=n, they should be. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01drm/amd/display: guard dc_sink dereferences in MST mode validationHari Mishal
dm_dp_mst_is_port_support_mode() reads aconnector->dc_sink->dsc_caps... for the DSC branch-throughput check, and get_conv_frl_bw()'s HDMI-PCON FRL-bandwidth path reads aconnector->dc_sink->edid_caps.max_frl_rate, both without a NULL check. dc_sink is cleared asynchronously on MST unplug, and both functions run from paths that the driver's own comments document as racing that teardown: the connector probe worker's ->mode_valid callback and a compositor's atomic check, neither of which holds the MST manager lock that the teardown path uses. The former does have an existing dsc_aux NULL check, but dsc_aux isn't reliably cleared in every path that clears dc_sink, so it doesn't cover this. Fail the port-support check and skip the FRL conversion path when the sink is already gone. Fixes: f04d275d94e1 ("drm/amd/display: add mst port output bw check") Fixes: 5c9b8b27a883 ("drm/amd/display: Tie FRL support into amdgpu_dm") Assisted-by: gkh_clanker_t1000 Signed-off-by: Hari Mishal <harimishal1@gmail.com> Reviewed-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 7c3db8da4e039698ae198c870712428644e965c7) Cc: stable@vger.kernel.org
2026-10-01drm/amd/display: Try RGB before YCbCr 4:4:4 in stream validationAdrian Betschart
amdgpu_dm_create_validate_stream_for_sink() walks encoding_order[] and uses the first encoding that validates. YCbCr 4:4:4 is listed before RGB, so an HDMI sink that advertises 4:4:4 gets YCbCr 4:4:4 whenever the "color format" property is left at AUTO, even though RGB fits the same link. That contradicts the documented AUTO behaviour for HDMI in enum drm_connector_color_format (RGB, falling back to YCbCr 4:2:0 only when the bandwidth is not available or the mode is 4:2:0-only), which the amdgpu implementation of the property also describes. It also leaves the "Broadcast RGB" property without effect on such sinks, since the quantization range it selects only applies to RGB output. Try RGB first. The mask still holds every encoding the sink supports, so a mode that cannot carry RGB falls back exactly as before. For reference, v7.2 picked RGB here unless YCbCr 4:4:4 was forced through debugfs, while earlier kernels picked YCbCr 4:4:4 for any HDMI sink that advertised it. Fixes: 0b0ff65d3ca1 ("drm/amd/display: Refactor stream validation") Suggested-by: Adolfo Rodrigues <adolfotregosa@gmail.com> Assisted-by: Claude Code:claude-fable-5-1 Signed-off-by: Adrian Betschart <adrian.betschart@cinemaone.ch> Reviewed-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Adolfo Rodrigues <adolfotregosa@gmail.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 7de432bc753133764dc40d37f9388da56de251e7)
2026-10-01drm/amd/display: map PWM brightness through custom backlight curveRay Wu
[Why/How] On the PWM path, convert the userspace brightness to an input signal and derive the target luminance from the custom backlight curve, then pass the resulting millipercent to the power module. This keeps PWM programming and backlight curve mapping in the power module, aligning the Linux path with the Windows behavior. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5723 Fixes: 3c108046e1d6 ("drm/amd/display: Add power module on Linux") Assisted-by: Cursor:Claude-Opus-4.8 Signed-off-by: Ray Wu <ray.wu@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Reviewed-by: ChiaHsuan (Tom) Chung <chiahsuan.chung@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit bc4e099caa85e8d4c3555851a0feb07058c4a1fe) Cc: stable@vger.kernel.org
2026-10-01drm/amd/display: Default HDMI RGB output to limited range on CTA modesAdrian Betschart
With the Broadcast RGB property at Automatic, amdgpu_dm_get_output_color_space() selects COLOR_SPACE_SRGB for RGB output, so DC neither compresses the pixels nor, without a QS-capable sink, signals full range in the AVI InfoFrame. A sink that follows CTA-861 treats the default quantization of a CTA video format as limited and expands 16-235 to 0-255: everything below 16 is crushed to black, everything above 235 clips. Follow the CTA-861 default for Automatic instead, as the DRM HDMI state helper (hdmi_is_limited_range()) and i915 do: limited range on an HDMI sink for CTA modes other than 640x480, full range elsewhere. Full and Limited keep their explicit meaning. The same rule applies to the BT.2020 RGB branch. With commit 892659399f64 ("drm/amd/display: Propagate HDMI RGB quantization selectability") the AVI InfoFrame then carries the matching Q value on sinks that support selection. Measured on a Radeon RX 7600 (DCN 3.2.1) driving a JVC DLA-RS4100 at 1920x1080p24 RGB 12 bpc: the sink reports the signal as limited range while the picture shows crushed shadows; rendering limited range in the client makes it match a reference source. The KUnit fixtures that reach amdgpu_dm_get_output_color_space() now carry a connector, since Automatic reads its display_info, and five cases cover the new rule. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5796 Reviewed-by: George Zhang <george.zhang@amd.com> Signed-off-by: Adrian Betschart <adrian.betschart@cinemaone.ch> Assisted-by: Claude Code:claude-fable-5-1 Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit d23f735d0eac52c673d91e21d146b09588537efc)
2026-10-01drm/amd/display: check dc_state_create_copy() for NULL in dm_suspendJiangshan Yi
dc_state_create_copy() can return NULL on allocation failure. dm_suspend() only conditionally skips dm_gpureset_toggle_interrupts() and continues execution, returning success. dm_resume() then dereferences the NULL cached_dc_state in link_enc_cfg_copy() and the following dc_state->stream_count loop, crashing during GPU reset recovery. Return -ENOMEM immediately if the copy fails, so the caller aborts suspend instead of leaving a NULL cached state for resume. Fixes: 8092aa3ab8f7 ("drm/amd/display: Add null checker before passing variables") Reviewed-by: George Zhang <george.zhang@amd.com> Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 84b6d7932fdd2857795a257f9f258562a3cddcab) Cc: stable@vger.kernel.org
2026-10-01drm/amd/display: guard dc_sink dereferences in MST mode validationHari Mishal
dm_dp_mst_is_port_support_mode() reads aconnector->dc_sink->dsc_caps... for the DSC branch-throughput check, and get_conv_frl_bw()'s HDMI-PCON FRL-bandwidth path reads aconnector->dc_sink->edid_caps.max_frl_rate, both without a NULL check. dc_sink is cleared asynchronously on MST unplug, and both functions run from paths that the driver's own comments document as racing that teardown: the connector probe worker's ->mode_valid callback and a compositor's atomic check, neither of which holds the MST manager lock that the teardown path uses. The former does have an existing dsc_aux NULL check, but dsc_aux isn't reliably cleared in every path that clears dc_sink, so it doesn't cover this. Fail the port-support check and skip the FRL conversion path when the sink is already gone. Fixes: f04d275d94e1 ("drm/amd/display: add mst port output bw check") Fixes: 5c9b8b27a883 ("drm/amd/display: Tie FRL support into amdgpu_dm") Assisted-by: gkh_clanker_t1000 Signed-off-by: Hari Mishal <harimishal1@gmail.com> Reviewed-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-10-01drm/amd/display: Try RGB before YCbCr 4:4:4 in stream validationAdrian Betschart
amdgpu_dm_create_validate_stream_for_sink() walks encoding_order[] and uses the first encoding that validates. YCbCr 4:4:4 is listed before RGB, so an HDMI sink that advertises 4:4:4 gets YCbCr 4:4:4 whenever the "color format" property is left at AUTO, even though RGB fits the same link. That contradicts the documented AUTO behaviour for HDMI in enum drm_connector_color_format (RGB, falling back to YCbCr 4:2:0 only when the bandwidth is not available or the mode is 4:2:0-only), which the amdgpu implementation of the property also describes. It also leaves the "Broadcast RGB" property without effect on such sinks, since the quantization range it selects only applies to RGB output. Try RGB first. The mask still holds every encoding the sink supports, so a mode that cannot carry RGB falls back exactly as before. For reference, v7.2 picked RGB here unless YCbCr 4:4:4 was forced through debugfs, while earlier kernels picked YCbCr 4:4:4 for any HDMI sink that advertised it. Fixes: 0b0ff65d3ca1 ("drm/amd/display: Refactor stream validation") Suggested-by: Adolfo Rodrigues <adolfotregosa@gmail.com> Assisted-by: Claude Code:claude-fable-5-1 Signed-off-by: Adrian Betschart <adrian.betschart@cinemaone.ch> Reviewed-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Adolfo Rodrigues <adolfotregosa@gmail.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>