summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-09-08bnxt_en: Handle buffer allocation failure in bnxt_rx_ring_reset()Joe Damato
bnxt_rx_ring_reset() frees the ring buffers and then reallocates them, ignoring the result. bnxt_alloc_one_rx_ring() can fail in bnxt_alloc_one_tpa_info_data(), which returns -ENOMEM on the first failed allocation and leaves the remaining rxr->rx_tpa[] entries zeroed. The error isn't propagated up, so the loop in bnxt_rx_ring_reset continues and at the end the code re-enables TPA with partially unallocated rx_tpa array. This means that when the agg_id from hardware is mapped to a SW index in rxr->rx_tpa[], an uninitialized slot can be chosen which would hand a zero DMA address to the device. Fix this by falling back to a global reset, which is what the existing code already does when other functions fail, but unlike the other failure cases this particular failure has to return because TPA can't be re-enabled since the allocation failed. Fixes: 8fbf58e17dce ("bnxt_en: Implement RX ring reset in response to buffer errors.") Reported-by: Sashiko <sashiko-bot+sashiko@kernel.org> Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260828190900.1767611-1-joe%40dama.to Cc: stable@vger.kernel.org Signed-off-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/20260902015652.2421609-5-joe@dama.to Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-09-08bnxt_en: Propagate TPA buffer allocation failures in bnxt_queue_mem_alloc()Joe Damato
bnxt_alloc_one_tpa_info_data() returns -ENOMEM as soon as one allocation fails. This leaves the remaining rxr->rx_tpa[] entries zeroed. bnxt_queue_mem_alloc() discards that return value, so the partially initialized ring is installed by bnxt_queue_start(). Since the agg_id is picked by the hardware and bnxt_alloc_agg_idx maps it to a SW index in rxr->rx_tpa[], it is possible that an uninitialized slot can be chosen which would hand a zero DMA address to the device. Fix this by checking the return value of bnxt_alloc_one_tpa_info_data and unwinding, freeing the ring buffers. Fixes: bd649c5cc958 ("bnxt_en: handle tpa_info in queue API implementation") Reported-by: Sashiko <sashiko-bot+sashiko@kernel.org> Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260828190900.1767611-1-joe%40dama.to Cc: stable@vger.kernel.org Signed-off-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/20260902015652.2421609-4-joe@dama.to Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-09-08bnxt_en: Don't free the live ring's TPA state on queue restart failureJoe Damato
bnxt_queue_mem_alloc() shallow copies the live RX ring into the clone: memcpy(clone, rxr, sizeof(*rxr)); the code currently clears pointers that the clone owns (such as rx_agg_bmap), but rx_tpa and rx_tpa_idx_map are left pointing at memory of the live ring that was cloned. If an allocation failure happens later and the err_free_tpa_info label is taken, the live ring's memory can be freed while still in use. Fix this by initializing the clone's pointers to NULL to prevent live ring state from being freed inadvertently. Fixes: bd649c5cc958 ("bnxt_en: handle tpa_info in queue API implementation") Reported-by: Sashiko <sashiko-bot+sashiko@kernel.org> Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260828190900.1767611-1-joe%40dama.to Cc: stable@vger.kernel.org Signed-off-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/20260902015652.2421609-3-joe@dama.to Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-09-08bnxt_en: Only restore LRO if the device supports TPAJoe Damato
With a P5+ device with firmware that reports max_aggs_supported == 0, it is possible to make LRO settable by attaching and detaching an XDP program even though the device does not support TPA. Fix this by testing BNXT_SUPPORTS_TPA before restoring the feature bit. Fixes: f0aa6a37a3db ("eth: bnxt: always recalculate features after XDP clearing, fix null-deref") Reported-by: Sashiko <sashiko-bot+sashiko@kernel.org> Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260828190900.1767611-1-joe%40dama.to Cc: stable@vger.kernel.org Signed-off-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/20260902015652.2421609-2-joe@dama.to Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-09-08fs/ntfs3: use MAX_LFS_FILESIZE for maxbytes with 64-bit clustersKonstantin Komarov
When CONFIG_NTFS3_64BIT_CLUSTER is enabled and the cluster count saturates the 64-bit VCN space, ntfs_init_from_boot() sets sbi->maxbytes to -1, while maxbytes_sparse and s_maxbytes are both set to MAX_LFS_FILESIZE just below. Set maxbytes to MAX_LFS_FILESIZE so all three limits agree. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-09-08fs/ntfs3: convert to non-resident when the new size exceeds the record sizeKonstantin Komarov
attr_set_size_res() only checked whether the attribute still fits when the attribute was growing (dsize > 0), and only against sbi->max_bytes_per_attr. A resident attribute could therefore be resized to a value larger than a single MFT record can hold. Move the check ahead of the memmove() paths and also reject a new size larger than sbi->record_size, falling back to attr_make_nonresident() in both cases. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-09-08fs/ntfs3: document ads, nocase, and delallocKonstantin Komarov
The 'ads', 'nocase', and 'delalloc' mount options are accepted by the parser and reported by ntfs_show_options(), but were never added to the mount option table in the documentation. Document them. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-09-08virtio_vdpa: implement synchronize_cbs()Karl Mehltretter
virtio_vdpa relies on the core's synchronize_rcu() fallback for callback synchronization. That covers IRQ handlers and sections with interrupts, preemption or bottom halves disabled. virtio_vdpa does not enforce any of those contexts when a vDPA driver invokes a callback. Add an SRCU domain per device and enter it around the virtqueue and config callbacks. Implement synchronize_cbs() with synchronize_srcu() so it covers the callbacks regardless of the calling context. SRCU uses per-CPU reader accounting, avoiding a single callback lock shared by all queues. Cover the config callback too, as virtio-pci does for its config vector. Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260908053817.26065-7-kmehltretter@gmail.com>
2026-09-08platform/mellanox: mlxbf-tmfifo: implement synchronize_cbs()Karl Mehltretter
TmFIFO invokes virtqueue callbacks from its FIFO work item under spin_lock_irqsave(). The core's synchronize_rcu() fallback already covers those sections. Implement synchronize_cbs() using the existing per-direction locks instead of waiting for an RCU grace period. fifo->spin_lock[0] covers the transmit callbacks, including the callback from the timeout handler. fifo->spin_lock[1] covers the receive callbacks. Take and release each lock in turn to synchronize with callbacks running under that lock. Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260908053817.26065-6-kmehltretter@gmail.com>
2026-09-08um: virtio_uml: implement synchronize_cbs()Karl Mehltretter
virtio_uml invokes virtqueue callbacks from vu_interrupt() and vu_req_interrupt(), which share vu_dev->irq. The core's synchronize_rcu() fallback already covers these IRQ handlers. Implement synchronize_cbs() with synchronize_irq() to synchronize with that IRQ instead of waiting for an RCU grace period. Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260908053817.26065-5-kmehltretter@gmail.com>
2026-09-08remoteproc: implement synchronize_cbs() for virtio devicesKarl Mehltretter
Platform drivers invoke rproc_vq_interrupt() from hard-IRQ handlers, threaded handlers, and work items. Because rpmsg callbacks may sleep, the virtio core's synchronize_rcu() fallback does not synchronize with callbacks across all these contexts. A device reset can therefore complete while a callback is still running. Add an SRCU domain per rproc. Protect both the queue lookup and vring_interrupt() with it, and synchronize the domain in the new hook. __rproc_virtio_del_vqs() can race with rproc_vq_interrupt() too. Clear all queue pointers and synchronize the SRCU domain before freeing the queues, so callers that already found a queue can finish using it. Read rvring->vq once to avoid a second load after deletion starts. The SRCU domain has the same lifetime as struct rproc. Its cleanup can sleep, so document that rproc_free() and rproc_put() must not drop the last reference from atomic context. Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260908053817.26065-4-kmehltretter@gmail.com>
2026-09-08virtio_ccw: always take irq_lock in the classic interrupt handlerKarl Mehltretter
virtio_ccw_int_handler() takes vcdev->irq_lock around its vring_interrupt() calls only when VIRTIO_HARDEN_NOTIFICATION is enabled. The virtio shutdown path calls synchronize_cbs() even when notification hardening is disabled. virtio_reset_device() now does so after the transport reset too. For classic interrupts, synchronize_cbs() takes vcdev->irq_lock for writing, but the interrupt handler does not take the matching read lock in that configuration. synchronize_cbs() can return while a callback is still running. Take the read lock unconditionally so the write side can synchronize with the callbacks. Fixes: 8bd2fa086a04 ("virtio: break and reset virtio devices on device_shutdown()") Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260908053817.26065-3-kmehltretter@gmail.com>
2026-09-08virtio_ccw: fix synchronize_cbs() after interrupt fallbackKarl Mehltretter
virtio_ccw_synchronize_cbs() assumes the device uses adapter interrupts when vcdev->airq_info is not NULL. If registering adapter indicators fails, virtio_ccw_find_vqs() falls back to classic interrupts but can leave airq_info set. With VIRTIO_HARDEN_NOTIFICATION enabled, virtio_ccw_int_handler() invokes callbacks under vcdev->irq_lock. synchronize_cbs() instead takes the indicator area lock, so it does not synchronize with those callbacks. Use vcdev->is_thinint, which the fallback clears, to select the lock. Keep the airq_info check because is_thinint can be set before the first find_vqs() call, when airq_info is still NULL. Fixes: 3a232277c1ac ("virtio-ccw: implement synchronize_cbs()") Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260908053817.26065-2-kmehltretter@gmail.com>
2026-09-08thunderbolt: Add device links for Apple systems with Ice LakeAtharva Tiwari
Ice Lake Thunderbolt NHI that are on some Macs. The NHI and its associated PCIe Root Ports all sit directly on the Root Complex with no upstream port. Identify the tunneled PCIe Root Ports by their PCI IDs and create device links back to the NHI so that PCIe tunnels can be re-established after sleep. Co-developed-by: Andre Eikmeyer <andre@negmaster.com> Signed-off-by: Andre Eikmeyer <andre@negmaster.com> Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2026-09-08thunderbolt: Add device links for Apple machines with Titan RidgeAtharva Tiwari
Add device links for Apple machines with the Titan Ridge thunderbolt controller. Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2026-09-08thunderbolt: Move tb_apple_add_links() to pci.cAtharva Tiwari
Due to historical reasons the software connection manager in tb.c directly sets up the device link between the tunneled PCIe ports and the NHI. Now as we are starting to support non-PCIe host interfaces as well we are trying to keep the connection manager implementation agnostic of the underlying host interface. For this reason move the device link creation into pci.c and expose it through a new NHI operation that the host interface code calls when it sets up the connection manager. Suggested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2026-09-08vduse: return compat ioctl results directlyLinfeng Sun
The compat handler handles VDUSE_IOTLB_GET_FD and VDUSE_VQ_GET_INFO, but then calls the native handler. Their different command sizes make native dispatch return -ENOIOCTLCMD. For GET_FD, this overwrites receive_fd()'s return value after the descriptor is installed, leaking one fd per call. Return handled compat results directly and use native dispatch only for other commands. Fixes: 455a2a1af926 ("vduse: fix compat handling for VDUSE_IOTLB_GET_FD/VDUSE_VQ_GET_INFO") Signed-off-by: Linfeng Sun <linfeng.sun.dev@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260908-fix-vduse_dev_compat_ioctl-v1-1-62264d9bfb8d@gmail.com>
2026-09-08media: cx231xx: Fix cleanup path on failureAndi Shyti
If cx231xx_init_v4l2() fails the probe currently jumps to err_init, which only unregisters the V4L2 device. The analog devices and I2C resources are left registered while the driver state can be released. A subsequent driver bind attempts to create the same I2C mux channel links and triggers a warning when the existing "channel-0" link is encountered. The remaining devices may also access released driver state. This produces the following warning can't create symlink to channel 0 WARNING: drivers/i2c/i2c-mux.c:403 at i2c_mux_add_adapter+0xcd8/0xeb0 Call Trace: i2c_mux_add_adapter+0xcdc/0xeb0 cx231xx_dev_init+0x2fb/0x1260 cx231xx_usb_probe+0xc48/0x2140 usb_probe_interface+0x657/0xc70 ... Jump to err_video_alt instead, which performs the full device cleanup before unregistering the V4L2 device. Reported-by: Farhad Alemi <farhad.alemi@berkeley.edu> Closes: https://github.com/farhad-alemi/public_bug_reports/tree/main/185-warning-in-i2c-mux-add-adapter/ Fixes: 4d2a7d3509f5 ("[media] cx231xx: move analog init code to a separate function") Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Cc: <stable@vger.kernel.org> # v3.17+ Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-09-08media: cx231xx-audio: drain wq_trigger before audio finiFan Wu
audio_trigger() is deferred work (dev->wq_trigger) armed from snd_cx231xx_capture_trigger() on every PCM START/STOP; it dereferences dev->adev state and may free the URBs via cx231xx_isoc_audio_deinit(). cx231xx_audio_fini() tore down that state without draining wq_trigger, so work armed before or racing fini ran against freed state. Use disable_work_sync() in fini to drain the work and prevent further queueing. Initialize the work, lock and stream_started counter at the top of cx231xx_audio_init(), before any fallible allocation, and clear the partially-built audio state on its error path, so fini is safe even if a later step fails. This issue was found by an in-house static analysis tool. Fixes: 61b04cb24a12 ("[media] cx231xx-audio: fix some locking issues") Cc: stable@vger.kernel.org # v6.10+ Link: https://lore.kernel.org/r/8c7e1294-b906-4636-890c-b64d03b0e1d0@kernel.org Assisted-by: Codex:gpt-5.6 Signed-off-by: Fan Wu <fanwu01@zju.edu.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-09-08media: pci: hws: only init channels the device actually hasLinkai Gong
hws_probe() initializes max_channels (always 4) control handlers, but register/unregister only walk cur_max_video_ch (1 or 2 on smaller chips). The extra handlers are never freed. Initialize the same number of channels that cleanup uses. Fixes: ba07fd2f5742 ("media: pci: add AVMatrix HWS capture driver") Cc: stable@vger.kernel.org Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn> Reviewed-by: Ben Hoff <hoff.benjamin.k@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-09-08media: hws: Wait for IRQ handler before returning buffersHao-Qun Huang
hws_stop_streaming() disables capture and then collects the active and queued buffers straight away. Clearing cap_active and setting stop_requested only stops a VDONE handler that has not checked them yet; one already running on another CPU has passed those checks and cannot be recalled. That handler snapshots v->active into a local pointer and drops irq_lock before it touches the buffer, so stop_streaming can run in between. Without a next_prepared buffer both paths complete the same buffer, and the second vb2_buffer_done() hits the WARN_ON for a buffer that is no longer active. With a next_prepared buffer the snapshot is the only remaining reference to the old active buffer, so stop_streaming returns without it and vb2 reports "stop_streaming operation is leaving buffer %u in active state" before completing it with an error. Either way the driver breaks the vb2 rule that stop_streaming has to give back every buffer it owns before it returns. Wait for the handler once the hardware is disabled and before the buffers are collected. The live mode change and the channel cleanup paths already do this around the same collect helper. Fixes: ba07fd2f5742 ("media: pci: add AVMatrix HWS capture driver") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-5 Signed-off-by: Hao-Qun Huang <alvinhuang0603@gmail.com> Reviewed-by: Ben Hoff <hoff.benjamin.k@gmail.com> Tested-by: Ben Hoff <hoff.benjamin.k@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-09-08media: hws: report measured colorimetryBen Hoff
At 1920x1080, the driver advertises V4L2_COLORSPACE_REC709 with V4L2_YCBCR_ENC_DEFAULT. The default maps to a Rec.709 matrix, but controlled A/B captures using the in-tree and baseline drivers show that both produce YUYV samples using a BT.601 matrix and full-range quantization. The captures differ by at most one code value, whereas a 601-to-709 conversion would move primary luma values by roughly 11 to 33 codes. Set the Y'CbCr encoding explicitly to V4L2_YCBCR_ENC_601 at every resolution. Keep the resolution-based colorspace so HD retains presumed Rec.709 primaries and transfer characteristics while SD continues to use SMPTE 170M. Refresh the colorspace on detected geometry changes so an SD/HD transition does not leave stale metadata. The decoder mode register is undocumented. Stop claiming that value 0x13 selects BT.709; both drivers use that value while producing the measured output. Fixes: ba07fd2f5742 ("media: pci: add AVMatrix HWS capture driver") Cc: stable@vger.kernel.org Assisted-by: Codex:gpt-5.6 Signed-off-by: Ben Hoff <hoff.benjamin.k@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-09-08media: hws: fix device info register field masksBen Hoff
The baseline driver decodes the device version from bits 15:8 and the sub-version from bits 23:16 of HWS_REG_DEVICE_INFO. The current masks decode both fields one byte too low, reading the device version from a byte the baseline driver ignores and the sub-version from the device version field. hws_configure_hardware_capabilities() uses the device version to classify the hardware generation. An incorrect version can classify newer hardware as legacy, select the legacy capture path, and skip HWS_REG_DMA_MAX_SIZE programming. Correct both field masks and update the register layout documentation. Signed-off-by: Ben Hoff <hoff.benjamin.k@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-09-08pinctrl: qcom: Drop marketing name-prefixed duplicate definesKonrad Dybcio
They are identical and of no use. Drop them and use the common MSM prefix. Assisted-by: LLM Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com> Link: https://patch.msgid.link/20260907-topic-tlmm_define_cleanup-v1-1-accdf7859e4b@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-09-08x86/MCE/AMD: Fix inverted interrupt enablement during storm handlingJasjeet Rangi
mce_amd_handle_storm() currently does the opposite of what storm handling needs: it enables thresholding interrupts when a storm is detected and disables them when the storm subsides. Flip the "on" function argument before passing it to threshold_restart_bank() as it should have been done. To clarify: "on" to mce_handle_storm() means, the storm is on now when "on" is true, and off when "on" is false. [ bp: Simplify. ] Fixes: 5c4663ed1eac ("x86/mce: Handle AMD threshold interrupt storms") Signed-off-by: Jasjeet Rangi <jrangi@purestorage.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260812221514.598842-2-jrangi@purestorage.com
2026-09-08x86/amd_node: Fix potential NULL pointer dereferenceJason Andryuk
amd_smn_read/write() are exported functions around __amd_smn_rw(), so they are always available even if amd_smn_init() fails. In that case, 'amd_roots' is NULL and __amd_smn_rw() will access uninitialized memory. Then, commit: 83518453074d ("x86/amd_node: Add SMN offsets to exclusive region access") added the 'smn_exclusive' flag, which indicated the calls to pci_request_config_region_exclusive() succeeded, to prevent concurrent userspace access. Commit: 0a4b61d9c2e4 ("x86/amd_node: Fix AMD root device caching") re-ordered initialization so pci_request_config_region_exclusive() is called earlier and a failure exits amd_smn_init() before allocating 'amd_roots'. The setting of 'smn_exclusive' moved to the end of amd_smn_init(), after 'amd_roots' is allocated. It became redundant and can be removed. Replace 'smn_exclusive' with directly checking 'amd_roots', to fix a potential NULL pointer dereference and to simplify the logic. [ bp: Reorg commit message, touchup comment. ] [ mingo: Rebase & further touchups. ] Fixes: 77466b798d59 ("x86/amd_node: Remove dependency on AMD_NB") Signed-off-by: Jason Andryuk <jason.andryuk@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260825214805.39148-3-jason.andryuk@amd.com
2026-09-08arm64: dts: mediatek: mt6893-pinfunc: Fix pinctrl header pathIgor Belwon
The header resides in the dt-bindings directory and not in the dts/mediatek directory. Fix it as to avoid a build failure. Fixes: c0f1fd9eeb317 ("arm64: dts: mediatek: Add MT6893 pinmux macro header file") Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2026-09-08arm64: dts: mediatek: mt6878-pinfunc: Fix pinctrl header pathIgor Belwon
The header resides in the dt-bindings directory and not in the dts/mediatek directory. Fix it as to avoid a build failure. Fixes: 07a9bd3079e30 ("arm64: dts: mediatek: Add MT6878 pinmux macro header file") Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2026-09-08ALSA: hda/realtek: Add quirk for HP Elite Dragonfly Max G2 speakerRuairi Anthony
The HP Elite Dragonfly Max G2 Notebook PC (SSID 103c:8890) uses an ALC285 codec but is missing from the existing HP quirk table, unlike the related "HP Elite Dragonfly G2" entry (SSID 103c:8716). Without the quirk the right speaker amplifier's GPIO is never initialized, leaving it silent while the left speaker plays normally. Apply the existing ALC285_FIXUP_HP_GPIO_AMP_INIT fixup used by the 103c:8716 entry, which resolves the issue. Verified with speaker-test on both channels and confirmed correct routing to both the downward- firing woofer and upward-firing tweeter on each side via the board's passive crossover. Signed-off-by: Ruairi Anthony <ruairi@ruairi.uk> Link: https://patch.msgid.link/20260907115942.19286-1-ruairi@ruairi.uk Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-09-08arm64: dts: mediatek: mt8173: Replace spaces indentation with tabsKrzysztof Kozlowski
Replace excessive spaces for aligning indentation into tabs. This will be reported by dt-style-check ("[mixed-indent-chars] too many space characters in indent (more than 7)"). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2026-09-08arm64: dts: mediatek: mt7986: correct timer frequencyAndrea Pesaresi
The MT7986 architected timer runs at 12,986,200 Hz rather than 13 MHz. Firmware reports 13 MHz through CNTFRQ_EL0, causing the system clock to run slow by about 1062 ppm. This exceeds the kernel's 500 ppm NTP correction limit and leaves clock discipline saturated. The corrected rate comes from MediaTek's downstream OpenWrt feed, where it is applied to both MT7986A and MT7986B. Since upstream mt7986b.dtsi includes mt7986a.dtsi, add it once to the common timer node so the architected timer driver uses the actual counter rate. Fixes: 50137c150f5f ("arm64: dts: mediatek: add basic mt7986 support") Cc: stable@vger.kernel.org Link: https://github.com/mediatek/mtk-openwrt-feeds/commit/6a4c41c41410cd5042ad10c39da6593ba036283c Link: https://github.com/openwrt/openwrt/issues/24789 Signed-off-by: Andrea Pesaresi <andreapesaresi82@gmail.com> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2026-09-08ALSA: usb-audio: Add quirks for HP Elite x3 Lap DockRong Zhang
The HP Elite x3 Lap Dock is a laptop-like external display device with a FHD screen, a keyboard, and a MT touchpad. It can be connected via USB-C or Miracast. As an e-waste collector, I recently brought one for 69 CNY (10.2 USD). The price already indicates how broken the device's design and compatibility are ;-P When connecting via USB-C, the video source is, of course, DisplayPort Alternate Mode. However, the audio source has nothing to do with the DisplayPort signal and is actually from a builtin UAC device. The builtin UAC device provides three Alternate Settings: - 1:1 - Capture, S16_LE, 8000/32000/44100/48000Hz - 2:1 - Playback, S16_LE, 48000Hz - 2:2 - Playback, S24_3LE, 48000Hz Unfortunately, the last one is broken because: - it doesn't accept SET_CUR(SAMPLE_RATE). QUIRK_FLAG_FIXED_RATE works around it, however... - it constantly produces severe harmonic distortion once the capture stream is also opened. The interface 2 must be closed and reopened to make it recover. IOW, simply closing the capture stream makes no difference. Considering that S24_3LE offers no additional benefit on small speakers compared to S16_LE, and 2:1 is always usable as an alternative, skip 2:2 to get rid of the trouble. Setting chip->setup to any non-default value disables the fixup and reenables 2:2 (in this case QUIRK_FLAG_FIXED_RATE is required). Quirky device sample: usb 7-1.4: new full-speed USB device number 50 using xhci_hcd usb 7-1.4: New USB device found, idVendor=03f0, idProduct=0c56, bcdDevice= 0.00 usb 7-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 7-1.4: Product: HP Elite x3 Lap Dock usb 7-1.4: Manufacturer: HP usb 7-1.4: Found last interface = 0 usb 7-1.4: 1:1: add audio endpoint 0x81 usb 7-1.4: Creating new data endpoint #81 usb 7-1.4: 1:1 Set sample rate 48000, clock 0 usb 7-1.4: 2:1: add audio endpoint 0x1 usb 7-1.4: Creating new data endpoint #1 usb 7-1.4: 2:1 Set sample rate 48000, clock 0 usb 7-1.4: 2:2: add audio endpoint 0x1 usb 7-1.4: 2:2 Set sample rate 48000, clock 0 usb 7-1.4: 2:2: cannot set freq 48000 to ep 0x1 usb 7-1.4: [9] FU [Sidetone Playback Switch] ch = 1, val = 0/1/1 usb 7-1.4: cannot set ctl value: req = 0x4, wValue = 0x200, wIndex = 0x900, type = 4, data = 0x40/0x0 usb 7-1.4: [9] FU [Sidetone Playback Volume] ch = 1, val = -17664/0/128 usb 7-1.4: [2] FU [Headset Playback Switch] ch = 1, val = 0/1/1 usb 7-1.4: [2] FU [Headset Playback Volume] ch = 2, val = -18944/0/1 usb 7-1.4: [6] FU [Headset Capture Switch] ch = 1, val = 0/1/1 usb 7-1.4: [6] FU [Headset Capture Volume] ch = 2, val = -18944/0/1 input: HP HP Elite x3 Lap Dock Consumer Control as /devices/pci0000:00/0000:00:08.3/0000:c9:00.4/usb7/7-1/7-1.4/7-1.4:1.3/0003:03F0:0C56.0033/input/input129 input: HP HP Elite x3 Lap Dock as /devices/pci0000:00/0000:00:08.3/0000:c9:00.4/usb7/7-1/7-1.4/7-1.4:1.3/0003:03F0:0C56.0033/input/input130 hid-generic 0003:03F0:0C56.0033: input,hiddev100,hidraw8: USB HID v1.11 Device [HP HP Elite x3 Lap Dock] on usb-0000:c9:00.4-1.4/input3 Signed-off-by: Rong Zhang <i@rong.moe> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260908-uac-hp-elite-x3-lap-dock-v1-2-e226cfe4038e@rong.moe
2026-09-08ALSA: usb-audio: Convert snd_usb_apply_interface_quirk() into a switch statementRong Zhang
A switch statement is more readable than the current if blocks. Also sort the cases in an ascending order. As an interesting effect, this shrinks the size of quirks.o by 64 bytes (GCC 16 -O2 x86_64): text data bss total filename (before) 15266 12279 0 27545 quirks.o text data bss total filename (before) 15202 12279 0 27481 quirks.o Signed-off-by: Rong Zhang <i@rong.moe> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260908-uac-hp-elite-x3-lap-dock-v1-1-e226cfe4038e@rong.moe
2026-09-08drm/xe/gt: Report GT reset failure using SIGIDArvind Yadav
Route the GT reset failure log through the structured SIGID logging helper. Failure to complete the full graphics reset means GT reset did not finish as expected. Use the GT component, which maps to XE_SIGID_GT_TDR, and pass the reset errno value to the helper. Also update the message to describe the actual failure. The driver does not clear GRDOM_FULL directly. The reset should complete and clear it within the timeout. Cc: Badal Nilawar <badal.nilawar@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Suggested-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Signed-off-by: Arvind Yadav <arvind.yadav@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20260903054610.3640788-5-arvind.yadav@intel.com Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
2026-09-08drm/xe/svm: Report terminal page-fault failures using SIGIDArvind Yadav
Use structured SIGID logging for SVM page-fault errors after retries are exhausted. Report these failures with the PAGEFAULT component, which maps to XE_SIGID_MEM_FAULT. Cc: Badal Nilawar <badal.nilawar@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Suggested-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Signed-off-by: Arvind Yadav <arvind.yadav@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20260903054610.3640788-4-arvind.yadav@intel.com Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
2026-09-08drm/xe/guc: Report reset failure using SIGIDArvind Yadav
Route the GuC submission engine reset failure through the structured SIGID logging helper. Use the GUCSUBMIT component, which maps to XE_SIGID_GT_TDR, and pass -EIO as the errno value. Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Cc: Badal Nilawar <badal.nilawar@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Arvind Yadav <arvind.yadav@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20260903054610.3640788-3-arvind.yadav@intel.com Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
2026-09-08drm/xe/log: Add GUCSUBMIT componentArvind Yadav
The proper SIGID for GuC submission failures is GT_TDR, but using the generic GT component may hide the real source of the report. Add GUCSUBMIT as a DRIVER component and map it to XE_SIGID_GT_TDR. Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Cc: Badal Nilawar <badal.nilawar@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Arvind Yadav <arvind.yadav@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20260903054610.3640788-2-arvind.yadav@intel.com Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
2026-09-08arm64: dts: mediatek: Add #{address,size}-cells to Chromium-based /firmwareBrian Norris
Chromium/Depthcharge bootloaders may dynamically add a few device nodes to a system's DTB under a /firmware node. A typical DT looks something like the following: / { firmware { ranges; coreboot { compatible = "coreboot"; reg = <...>; ...; }; }; }; Notably, the /firmware node has an empty 'ranges', but does not have address/size-cells. Commit 6e5773d52f4a ("of/address: Fix WARN when attempting translating non-translatable addresses") started requiring #address-cells for a device's parent if we want to use the reg resource in a device node. This leads to errors like the following: [ 7.763870] coreboot_table firmware:coreboot: probe with driver coreboot_table failed with error -22 Add appropriate #{address,size}-cells to work around the problem. Note that Google has also patched the Depthcharge bootloader source to add {address,size}-cells [1], but bootloader updates are typically delivered only via Google OS updates. Not all users install Google software updates, and even if they do, Google may not produce updated binaries for all/older devices. [1] https://lore.kernel.org/all/20241209092809.GA3246424@google.com/ https://crrev.com/c/6051580 ("coreboot: Insert #address-cells and #size-cells for firmware node") Closes: https://lore.kernel.org/all/aeKlYzTiL0OB1y3g@google.com/ Fixes: 6e5773d52f4a ("of/address: Fix WARN when attempting translating non-translatable addresses") Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2026-09-08ASoC: ti: omap-hdmi: Fix build error from a merge commitTomi Valkeinen
'ad->card' was removed in commit 9af2c1d4f847 ("ASoC: ti: omap-hdmi: remove unused *card"), but commit 699e5975e2a5 ("drm/omap: Report HDMI hotplug events to the ASoC HDMI codec") moved that code line. These commits were applied to different trees, and the merge was not quite right: assignment to 'ad->card' from the latter commit was left in the file, causing: sound/soc/ti/omap-hdmi.c:408:11: error: ‘struct hdmi_audio_data’ has no member named ‘card’ Fix the issue by removing the line. Reported-by: Mark Brown <broonie@kernel.org> Closes: https://lore.kernel.org/all/apbbvQSfUbzYRFaw@sirena.org.uk/ Fixes: 1ae7fe832c2d ("Merge drm/drm-next into drm-misc-next") Reviewed-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Link: https://patch.msgid.link/20260903-omap-hdmi-fix-v1-1-b0447a1d35d5@ideasonboard.com Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2026-09-07drm/gpusvm: keep an IOVA mapped range dma address inlineHonglei Huang
dma_iova_try_alloc() reserves one contiguous IOVA for the whole range and links each page at the next offset, so the device addresses run contiguously from entry 0 and one entry describes them all. A 2 MiB range of 4 KiB pages then drops the same 8 KiB array as a THP backed one. Fold only when state_offset covers the full range, which proves no device page was mapped in between, and only single page entries, so the order kept is 0 and stays true. Widening it instead would tell a consumer to use a huge page for npages separate CPU pages, which hangs Vega20 on amdgpu. The kept entry no longer bounds the segment, so skip the unmap walk when it has nothing to do, keyed off dpagemap rather than the flags, which are not published yet on the error unwind. Consumers need the same distinction, so drm_gpusvm_pages_first_dma() returns it alongside the array from one read of the flags; xe passes it to xe_res_first_dma(). Suggested-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Honglei Huang <honghuan@amd.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260905133142.3628027-7-honghuan@amd.com
2026-09-07drm/gpusvm: keep a single DMA mapping inline for THPHonglei Huang
drm_gpusvm_get_pages() sizes the dma_addr array for one drm_pagemap_addr per page, but the mapping loop advances by page order, so a range backed by one huge page needs a single entry. For a 2 MiB THP that is an 8 KiB array holding 16 bytes of address. Union that entry with the array pointer, discriminated by a new inline_dma_mapping flag. When drm_gpusvm_dma_map_pages() ends up with one entry it stores it inline and frees the array, after the last error unwind, which still walks the array form. An unchecked dma_addr read is now type confusion rather than a compile error, so reads go through the new drm_gpusvm_pages_first_dma() accessor, including the two xe_pt_stage_bind() paths. Only get_pages() and the free path write the union, never the notifier, and both run under the driver lock that every address reader already holds. The unlocked short circuit in drm_gpusvm_pages_valid_unlocked() goes for the same reason: it cannot resolve the union, and every instance it rejects has to be reset before the allocation loop reuses it. Suggested-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Honglei Huang <honghuan@amd.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260905133142.3628027-6-honghuan@amd.com
2026-09-07drm/gpusvm: make the DMA mapping step in get_pages() optionalHonglei Huang
Some drivers (e.g. AMDXDNA) only need the CPU pages faulted in and tracked by the notifier, no need DMA mapping. Add a drm_gpusvm_ctx::no_dma_map flag. When set, get_pages() does the shared HMM fault and records notifier_seq, but skips svm_pages->drm validation, the dma_addr allocation and drm_gpusvm_dma_map_pages(). With no mapping state to check, the fault is redone on every call. The default (no_dma_map == 0) is unchanged. Suggested-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Honglei Huang <honghuan@amd.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260905133142.3628027-5-honghuan@amd.com
2026-09-07drm/gpusvm: let drm_gpusvm_get_pages() map an array of pagesHonglei Huang
With the N:1 drm_gpusvm_pages layout, one CPU range mirrored on several drm_devices, the caller had to invoke get_pages() once per device and repeat the HMM fault every time. Make get_pages() take a contiguous array of drm_gpusvm_pages plus a count: fault once, then DMA map each instance by drm_gpusvm_dma_map_pages() under a single read_retry gate. xe range and userptr callers are updated. Document the N:1 array usage in the Overview, showing how get_pages() and drm_gpusvm_range_set_unmapped() take the whole array and its count while the unmap and free paths stay per-instance. Suggested-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Honglei Huang <honghuan@amd.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260905133142.3628027-4-honghuan@amd.com
2026-09-07drm/gpusvm: extract drm_gpusvm_dma_map_pages() helperHonglei Huang
Move the per-device DMA mapping loop of drm_gpusvm_get_pages() into a helper drm_gpusvm_dma_map_pages(). The mapping logic is only moved, not changed, so there is no functional change. The helper maps the already-faulted pfns into one drm_gpusvm_pages instance under the notifier lock and unwinds its own partial mapping on error. The HMM fault and the notifier retry loop stay in get_pages() common code rather than being pushed down to drivers, so no driver has to reimplement the subtle fault and retry logic. With the mapping isolated per instance, get_pages() can later fault once and DMA map an array of drm_gpusvm_pages plus a count, one per owning drm_device. Suggested-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Honglei Huang <honghuan@amd.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260905133142.3628027-3-honghuan@amd.com
2026-09-07drm/gpusvm: move dma_addr allocation before the notifier lockHonglei Huang
The dma_addr allocation was in a lazy allocation flow, it needs unlock and goto map_pages. The allocation only needs npages, so just do it before taking the lock. Drop the map_pages label and the relock flow, so the sequence becomes fault, allocate, then lock, validate, map and unlock. No functional change intended. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Honglei Huang <honghuan@amd.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260905133142.3628027-2-honghuan@amd.com
2026-09-07EDAC/altera: Use parent device for devres in altr_portb_setup()Dinh Nguyen
Anchor the devres group and the devm-managed IRQ requests in altr_portb_setup() to the actual parent device (device->edac->dev) instead of the embedded struct device inside the copied per-port altr_edac_device_dev. This keeps devres_open_group(), devm_request_irq(), devres_remove_group() and devres_release_group() all referring to the same long-lived device so the group and the resources allocated inside it are torn down together. Fixes: 911049845d70 ("EDAC, altera: Add Arria10 SD-MMC EDAC support") Closes: https://sashiko.dev/#/patchset/20260503212558.2811480-1-dbgh9129%40gmail.com Assisted-by: LLM Signed-off-by: Dinh Nguyen <dinguyen@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260617164303.585555-1-dinguyen@kernel.org
2026-09-07ipv6: flowlabel: cap duplicate leases per socketZhiling Zou
ipv6_flowlabel_get() allocates an ipv6_fl_socklist entry for every successful GET. The recheck path for a compatible existing flowlabel links another lease without applying any lease admission check. Repeated GET requests for one shareable label can therefore grow a socket's lease list without bound. Reject a new unprivileged lease once the socket already holds FL_MAX_PER_SOCK leases. Check this on the shared recheck path so reuse of a globally interned label, including the fl_intern() collision path, is covered as well. New-label admission remains under the existing mem_check() policy. Use capable(CAP_NET_ADMIN) rather than ns_capable(), matching mem_check(). An unprivileged user must not bypass the cap by creating a user namespace and a netns where they have CAP_NET_ADMIN, which would still consume host memory. Check the capability only when the socket reaches the limit, so successful unprivileged GET requests below the cap do not generate a capability audit. Do the admission check before updating linger and expires so a rejected GET does not refresh the shared label, matching the existing socket-list allocation failure path. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reported-by: Vega <vega@nebusec.ai> Suggested-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Zhiling Zou <zhilinz@nebusec.ai> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/83f8535972ff6e3741548476a1d50dec24c758be.1788415194.git.zhilinz@nebusec.ai Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-08drm/i915/bios: remove VS/PE-O warningMichał Grzelak
There is not much use of warning when port asks to override default VS/PE since it is already logged. Remove drm_WARN() and child_device from print_ddi_port() since drm_WARN() was the only user of it. Signed-off-by: Michał Grzelak <michal.grzelak@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260904123148.2165596-9-michal.grzelak@intel.com
2026-09-08drm/i915: override Combo's VS/PE when requestedMichał Grzelak
Add accessor function for Combo to read requested table from VBT #57. Parse the requested table and transform data into port's buffer. Actual data is fully stored in the lowest byte although each entry is 4 bytes wide. Thus convert u32 into u8 and store the data. For EHL, in cases when eDP encoder uses low vswing, choose 3rd table if encoder supports HBR3. Otherwise use 2nd table for eDP using low vswing. In cases when eDP encoder does not use low vswing, choose 2nd table if encoder supports mode higher or including HBR2. Otherwise use 1st table for eDP not using low vswing. For external DP follow same path and use same indices as in eDP without low vswing case. For JSL, always use 1st table for external DP. For eDPs not using low vswing use 1st table as well. In cases when eDP encoder uses low vswing, choose 1st table if encoder supports HBR3. When encoder supports HBR2 choose 3rd table. When encoder supports modes lower than HBR2 choose 2nd table. There are no changes to intel_ddi_dp_level() since selection of correct row of intel_ddi_buf_trans_entry is same as when no override request has been done. Looking from other OSes, in case when encoder does not support DP we could theoretically use 1st table. However, as of now, use default tables. v11->v12 - don't set vspeo->num_entries per PHY/platform - check for low vswing eDP for EHL (Sashiko) - reverse order of indices for JSL (Sashiko) v10->v11 - initialize local variables at declaration block (Jani) - branch with 'else` instead of initializing twice (Jani) v9->v10 - call dedicated VS/PE-O vfunc - drop deconstifying default tables (Suraj, Jani) - cache `entries` into const field after data is overwritten (Jani) v8->v9 - deconstify intel_ddi_buf_trans_entry v6->v7 - handle VS/PE-O's VBT details in intel_bios_* functions (Jani) - remove vspeo's cast to (void *) (Jani) - call encoder->get_buf_trans() once (Jani) - return NULL from intel_bios_get_* when using default (Jani) - validate VS/PE-O in intel_bios.c (Jani) - check devdata->vspeo if VS/PE-O was requested - inline {jsl,ehl}_combo_get_vspeo_buf_trans() - remove temporarily LT v4->v5 - blend index computation with table parsing - remove enums entirely - add spaces around operators (Suraj) - remove spaces after type casting (Suraj) - remove INTEL_DISPLAY_STATE_WARN (Suraj) Signed-off-by: Michał Grzelak <michal.grzelak@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260907122742.2512901-1-michal.grzelak@intel.com
2026-09-08drm/i915: override Snps's VS/PE when requestedMichał Grzelak
Add accessor functions for Snps to read requested table from VBT #57. Parse the requested table and transform data into port's buffer. Actual data is fully stored in the lowest byte although each entry is 4 bytes wide. Thus convert u32 into u8 and store the data. For C20, use 6th table if encoder supports DP 2.0 or higher. Otherwise use 5th table for DP. For C20, tables 1-4 are not used at all and are most likely to be zeroed. 5th table is used for any mode below DP 2.0 (exclusive). 6th table is used for any mode above DP 2.0 (inclusive). For C10, use 2nd table for external DP if encoder supports any mode beyond or including HBR2. Use 1st table if external DP encoder supports anything lower than HBR2. For eDP, use 4th table if encoder supports HBR3. Otherwise use 3rd table for eDP. For C10, 1st table is used for external DP with modes below HBR2 (exclusive). 2nd table is used for external DP with modes higher than HBR2 (inclusive). 3rd table is used for eDP with modes lower than HBR3 (exclusive). 4th table is used for eDP with modes higher than HBR3 (inclusive). Indices for other tables have not yet been observed to be used as of now. There are no changes to intel_ddi_dp_level() since selection of correct row of intel_ddi_buf_trans_entry is same as when no override request has been done. v11->v12 - don't set vspeo->num_entries per PHY - don't refer to 1st table as fallback for non-DP for C10 (Sashiko) v10->v11 - remove no-longer-relevant check for NULL devdata (Jani) - initialize local variables at declaration block (Jani) - branch with 'else` instead of initializing twice (Jani) - use blank line before 'return` (Jani) v9->v10 - call dedicated VS/PE-O vfunc - drop deconstifying default tables (Suraj, Jani) - cache `entries` into const field after data is overwritten (Jani) v8->v9 - init vspeo before using it - deconstify intel_ddi_buf_trans_entry v7->v8 - remove comments (Suraj) - add check for LT (Suraj) v6->v7 - handle VS/PE-O's VBT details in intel_bios_* functions (Jani) - remove vspeo's cast to (void *) (Jani) - check devdata->vspeo if VS/PE-O was requested - call encoder->get_buf_trans() once (Jani) - return NULL from intel_bios_get_* when using default (Jani) - validate VS/PE-O in intel_bios.c (Jani) - inline mtl_{c10,c20}_get_vspeo_buf_trans() - remove temporarily LT v4->v5 - blend index computation with table parsing - remove enums entirely - change funcs prefix from snps_ to mtl_ (Suraj) - add spaces around operators (Suraj) - remove spaces after type casting (Suraj) - remove INTEL_DISPLAY_STATE_WARN (Suraj) v3->v4 - stick to solely changing VBT data into current structures (Jani) - move iterator declaration to declaration block (Suraj) v2->v3 - remove unnecessary braces from if block (Suraj) - return -EINVAL instead of -1 (Suraj) Signed-off-by: Michał Grzelak <michal.grzelak@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260904123148.2165596-7-michal.grzelak@intel.com