]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
2 months agodrm/bridge: waveshare-dsi: support DSI LCD kits with LVDS panels
Dmitry Baryshkov [Sun, 12 Apr 2026 17:32:25 +0000 (20:32 +0300)] 
drm/bridge: waveshare-dsi: support DSI LCD kits with LVDS panels

Several Waveshare DSI LCD kits use LVDS panels and the ICN6202 DSI2LVDS
bridge. Support that setup by handling waveshare,dsi2lvds compatible.
The only difference with the existing waveshare,dsi2dpi is the bridge's
output type (LVDS vs DPI).

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260412-ws-lcd-v3-2-db22c2631828@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodt-bindings: display: waveshare,dsp2dpi: describe DSI2LVDS setup
Dmitry Baryshkov [Sun, 12 Apr 2026 17:32:24 +0000 (20:32 +0300)] 
dt-bindings: display: waveshare,dsp2dpi: describe DSI2LVDS setup

Several the Waveshare DSI LCD panel kits use DSI2LVDS ICN6202 bridge
together with the LVDS panels. Define new compatible for the on-kit
bridge setup (it is not itmized and it uses Waveshare prefix since the
rest of the integration details are not known).

Note: the ICN6202 / ICN6211 bridges are completely handled by the board
itself, they should not be programmed by the host (which otherwise might
override correct params), etc. As such, it doesn't make sense to use
those in the compat strings. I consider those to be an internal detail
of the setup.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260412-ws-lcd-v3-1-db22c2631828@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: add driver for Waveshare 8.8" DSI TOUCH-A panel
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:42 +0000 (17:05 +0300)] 
drm/panel: add driver for Waveshare 8.8" DSI TOUCH-A panel

Add driver for the panel found on Waveshare 8.8" DSI TOUCH-A kit. It
uses ota7290b IC as a controller.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-19-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: add devm_drm_panel_add() helper
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:41 +0000 (17:05 +0300)] 
drm/panel: add devm_drm_panel_add() helper

Add devm_drm_panel_add(), devres-managed version of drm_panel_add().
It's not uncommon for the panel drivers to use devres functions for most
of the resources. Provide corresponding replacement for drm_panel_add().

Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-18-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: jadard-jd9365da-h3: support Waveshare 720p DSI panels
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:39 +0000 (17:05 +0300)] 
drm/panel: jadard-jd9365da-h3: support Waveshare 720p DSI panels

Add configuration for Waveshare 9.0" and 10.1" 720p DSI panels using
JD9365 controller.

Tested-by: Riccardo Mereu <r.mereu@arduino.cc>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-16-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: jadard-jd9365da-h3: support Waveshare WXGA DSI panels
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:38 +0000 (17:05 +0300)] 
drm/panel: jadard-jd9365da-h3: support Waveshare WXGA DSI panels

Add configuration for several Waveshare 8.0" and 10.1" WXGA DSI panels
using JD9365 controller

Tested-by: Riccardo Mereu <r.mereu@arduino.cc>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-15-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: jadard-jd9365da-h3: support Waveshare round DSI panels
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:37 +0000 (17:05 +0300)] 
drm/panel: jadard-jd9365da-h3: support Waveshare round DSI panels

Add configuration for Waveshare 3.4" and 4.0" round DSI panels using
JD9365 controller.

Tested-by: Riccardo Mereu <r.mereu@arduino.cc>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-14-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: jadard-jd9365da-h3: set prepare_prev_first
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:36 +0000 (17:05 +0300)] 
drm/panel: jadard-jd9365da-h3: set prepare_prev_first

Sending DSI commands from the prepare() callback requires DSI link to be
up at that point. For DSI hosts is guaranteed only if the panel driver
sets the .prepare_prev_first flag. Set it to let these panels work with
the DSI hosts which don't power on the link in their .mode_set callback.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Tested-by: Riccardo Mereu <r.mereu@arduino.cc>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-13-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: jadard-jd9365da-h3: support variable DSI configuration
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:35 +0000 (17:05 +0300)] 
drm/panel: jadard-jd9365da-h3: support variable DSI configuration

Several panels support attachment either using 4 DSI lanes or just 2. In
some cases, this requires a different panel mode to fulfill clock
requirements. Extend the driver to handle such cases by letting the
panel description to omit lanes specification and parsing number of
lanes from the DT.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Tested-by: Riccardo Mereu <r.mereu@arduino.cc>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-12-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: jadard-jd9365da-h3: use drm_connector_helper_get_modes_fixed
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:34 +0000 (17:05 +0300)] 
drm/panel: jadard-jd9365da-h3: use drm_connector_helper_get_modes_fixed

Use existing helper instead of manually coding it.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-11-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: himax-hx8394: support Waveshare DSI panels
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:33 +0000 (17:05 +0300)] 
drm/panel: himax-hx8394: support Waveshare DSI panels

Enable support for Waveshare 5.0" and 5.5" DSI TOUCH-A panels.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-10-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: himax-hx8394: simplify hx8394_enable()
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:32 +0000 (17:05 +0300)] 
drm/panel: himax-hx8394: simplify hx8394_enable()

Simplify hx8394_enable() function by using hx8394_disable() instead of
open-coding it and mipi_dsi_msleep() instead of manual checks.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-9-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: himax-hx8394: set prepare_prev_first
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:31 +0000 (17:05 +0300)] 
drm/panel: himax-hx8394: set prepare_prev_first

Sending DSI commands from the prepare() callback requires DSI link to be
up at that point. For DSI hosts is guaranteed only if the panel driver
sets the .prepare_prev_first flag. Set it to let these panels work with
the DSI hosts which don't power on the link in their .mode_set callback.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-8-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/panel: himax-hx83102: support Waveshare 12.3" DSI panel
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:30 +0000 (17:05 +0300)] 
drm/panel: himax-hx83102: support Waveshare 12.3" DSI panel

Add support for the Waveshare 12.3" DSI TOUCH-A panel. According to the
vendor driver, it uses different mode_flags, so let the panel
descriptions override driver-wide defaults.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-7-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodrm/of: add helper to count data-lanes on a remote endpoint
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:29 +0000 (17:05 +0300)] 
drm/of: add helper to count data-lanes on a remote endpoint

If the DSI panel supports versatile lanes configuration, its driver
might require determining the number of DSI data lanes, which is usually
specified on the DSI host side of the OF graph. Add new helper as a
pair to drm_of_get_data_lanes_count_ep() that lets callers determine
number of data-lanes on the remote side of the OF graph.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-6-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodt-bindings: dipslay/panel: describe panels using Focaltech OTA7290B
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:28 +0000 (17:05 +0300)] 
dt-bindings: dipslay/panel: describe panels using Focaltech OTA7290B

Add schema for the panels using Focaltech OTA7290B controller. For now
there is only one such panel, from the Waveshare 8.8 DSI TOUCH-A kit.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-5-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodt-bindings: display/panel: jadard,jd9365da-h3: describe Waveshare panel
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:26 +0000 (17:05 +0300)] 
dt-bindings: display/panel: jadard,jd9365da-h3: describe Waveshare panel

Describe Waveshare DSI panels which use JD9365 as a panel controller.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-3-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodt-bindings: display/panel: himax,hx8394: describe Waveshare panel
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:25 +0000 (17:05 +0300)] 
dt-bindings: display/panel: himax,hx8394: describe Waveshare panel

Describe Waveshare 5" and 5" DSI panels which use HX9365-E as a panel
controller.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-2-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agodt-bindings: display/panel: himax,hx83102: describe Waveshare panel
Dmitry Baryshkov [Mon, 13 Apr 2026 14:05:24 +0000 (17:05 +0300)] 
dt-bindings: display/panel: himax,hx83102: describe Waveshare panel

Describe Waveshare 12.3-DSI-TOUCH-A panel which allegedly uses HX83102
as a panel controller.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260413-waveshare-dsi-touch-v3-1-3aeb53022c32@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2 months agoMerge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Linus Torvalds [Fri, 17 Apr 2026 22:58:22 +0000 (15:58 -0700)] 
Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf

Pull bpf fixes from Alexei Starovoitov:
 "Most of the diff stat comes from Xu Kuohai's fix to emit ENDBR/BTI,
  since all JITs had to be touched to move constant blinding out and
  pass bpf_verifier_env in.

   - Fix use-after-free in arena_vm_close on fork (Alexei Starovoitov)

   - Dissociate struct_ops program with map if map_update fails (Amery
     Hung)

   - Fix out-of-range and off-by-one bugs in arm64 JIT (Daniel Borkmann)

   - Fix precedence bug in convert_bpf_ld_abs alignment check (Daniel
     Borkmann)

   - Fix arg tracking for imprecise/multi-offset in BPF_ST/STX insns
     (Eduard Zingerman)

   - Copy token from main to subprogs to fix missing kallsyms (Eduard
     Zingerman)

   - Prevent double close and leak of btf objects in libbpf (Jiri Olsa)

   - Fix af_unix null-ptr-deref in sockmap (Michal Luczaj)

   - Fix NULL deref in map_kptr_match_type for scalar regs (Mykyta
     Yatsenko)

   - Avoid unnecessary IPIs. Remove redundant bpf_flush_icache() in
     arm64 and riscv JITs (Puranjay Mohan)

   - Fix out of bounds access. Validate node_id in arena_alloc_pages()
     (Puranjay Mohan)

   - Reject BPF-to-BPF calls and callbacks in arm32 JIT (Puranjay Mohan)

   - Refactor all JITs to pass bpf_verifier_env to emit ENDBR/BTI for
     indirect jump targets on x86-64, arm64 JITs (Xu Kuohai)

   - Allow UTF-8 literals in bpf_bprintf_prepare() (Yihan Ding)"

* tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: (32 commits)
  bpf, arm32: Reject BPF-to-BPF calls and callbacks in the JIT
  bpf: Dissociate struct_ops program with map if map_update fails
  bpf: Validate node_id in arena_alloc_pages()
  libbpf: Prevent double close and leak of btf objects
  selftests/bpf: cover UTF-8 trace_printk output
  bpf: allow UTF-8 literals in bpf_bprintf_prepare()
  selftests/bpf: Reject scalar store into kptr slot
  bpf: Fix NULL deref in map_kptr_match_type for scalar regs
  bpf: Fix precedence bug in convert_bpf_ld_abs alignment check
  bpf, arm64: Emit BTI for indirect jump target
  bpf, x86: Emit ENDBR for indirect jump targets
  bpf: Add helper to detect indirect jump targets
  bpf: Pass bpf_verifier_env to JIT
  bpf: Move constants blinding out of arch-specific JITs
  bpf, sockmap: Take state lock for af_unix iter
  bpf, sockmap: Fix af_unix null-ptr-deref in proto update
  selftests/bpf: Extend bpf_iter_unix to attempt deadlocking
  bpf, sockmap: Fix af_unix iter deadlock
  bpf, sockmap: Annotate af_unix sock:: Sk_state data-races
  selftests/bpf: verify kallsyms entries for token-loaded subprograms
  ...

2 months agoMerge tag 'cxl-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
Linus Torvalds [Fri, 17 Apr 2026 22:52:58 +0000 (15:52 -0700)] 
Merge tag 'cxl-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl

Pull CXL (Compute Express Link) updates from Dave Jiang:
 "The significant change of interest is the handling of soft reserved
  memory conflict between CXL and HMEM. In essence CXL will be the first
  to claim the soft reserved memory ranges that belongs to CXL and
  attempt to enumerate them with best effort. If CXL is not able to
  enumerate the ranges it will punt them to HMEM.

  There are also MAINTAINERS email changes from Dan Williams and
  Jonathan Cameron"

* tag 'cxl-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (37 commits)
  MAINTAINERS: Update Jonathan Cameron's email address
  cxl/hdm: Add support for 32 switch decoders
  MAINTAINERS: Update address for Dan Williams
  tools/testing/cxl: Enable replay of user regions as auto regions
  cxl/region: Add a region sysfs interface for region lock status
  tools/testing/cxl: Test dax_hmem takeover of CXL regions
  tools/testing/cxl: Simulate auto-assembly failure
  dax/hmem: Parent dax_hmem devices
  dax/hmem: Fix singleton confusion between dax_hmem_work and hmem devices
  dax/hmem: Reduce visibility of dax_cxl coordination symbols
  cxl/region: Constify cxl_region_resource_contains()
  cxl/region: Limit visibility of cxl_region_contains_resource()
  dax/cxl: Fix HMEM dependencies
  cxl/region: Fix use-after-free from auto assembly failure
  cxl/core: Check existence of cxl_memdev_state in poison test
  cxl/core: use cleanup.h for devm_cxl_add_dax_region
  cxl/core/region: move dax region device logic into region_dax.c
  cxl/core/region: move pmem region driver logic into region_pmem.c
  dax/hmem, cxl: Defer and resolve Soft Reserved ownership
  cxl/region: Add helper to check Soft Reserved containment by CXL regions
  ...

2 months agoMerge tag 'stop-machine.2026.04.16a' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 17 Apr 2026 22:48:36 +0000 (15:48 -0700)] 
Merge tag 'stop-machine.2026.04.16a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu

Pull stop-machine update from Paul McKenney:

 - kernel-doc updates for stop_machine() and stop_machine_cpuslocked()
   functions

* tag 'stop-machine.2026.04.16a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
  stop_machine: Fix the documentation for a NULL cpus argument

2 months agoMerge tag 'integrity-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar...
Linus Torvalds [Fri, 17 Apr 2026 22:42:01 +0000 (15:42 -0700)] 
Merge tag 'integrity-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity

Pull integrity updates from Mimi Zohar:
 "There are two main changes, one feature removal, some code cleanup,
  and a number of bug fixes.

  Main changes:
   - Detecting secure boot mode was limited to IMA. Make detecting
     secure boot mode accessible to EVM and other LSMs
   - IMA sigv3 support was limited to fsverity. Add IMA sigv3 support
     for IMA regular file hashes and EVM portable signatures

  Remove:
   - Remove IMA support for asychronous hash calculation originally
     added for hardware acceleration

  Cleanup:
   - Remove unnecessary Kconfig CONFIG_MODULE_SIG and CONFIG_KEXEC_SIG
     tests
   - Add descriptions of the IMA atomic flags

  Bug fixes:
   - Like IMA, properly limit EVM "fix" mode
   - Define and call evm_fix_hmac() to update security.evm
   - Fallback to using i_version to detect file change for filesystems
     that do not support STATX_CHANGE_COOKIE
   - Address missing kernel support for configured (new) TPM hash
     algorithms
   - Add missing crypto_shash_final() return value"

* tag 'integrity-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
  evm: Enforce signatures version 3 with new EVM policy 'bit 3'
  integrity: Allow sigv3 verification on EVM_XATTR_PORTABLE_DIGSIG
  ima: add support to require IMA sigv3 signatures
  ima: add regular file data hash signature version 3 support
  ima: Define asymmetric_verify_v3() to verify IMA sigv3 signatures
  ima: remove buggy support for asynchronous hashes
  integrity: Eliminate weak definition of arch_get_secureboot()
  ima: Add code comments to explain IMA iint cache atomic_flags
  ima_fs: Correctly create securityfs files for unsupported hash algos
  ima: check return value of crypto_shash_final() in boot aggregate
  ima: Define and use a digest_size field in the ima_algo_desc structure
  powerpc/ima: Drop unnecessary check for CONFIG_MODULE_SIG
  ima: efi: Drop unnecessary check for CONFIG_MODULE_SIG/CONFIG_KEXEC_SIG
  ima: fallback to using i_version to detect file change
  evm: fix security.evm for a file with IMA signature
  s390: Drop unnecessary CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT
  evm: Don't enable fix mode when secure boot is enabled
  integrity: Make arch_ima_get_secureboot integrity-wide

2 months agoMerge tag 'hwlock-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc...
Linus Torvalds [Fri, 17 Apr 2026 21:21:40 +0000 (14:21 -0700)] 
Merge tag 'hwlock-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux

Pull hwspinlock updates from Bjorn Andersson:
 "Remove the unused u8500 hardware spinlock driver, and clean out the
  hwspinlock_pdata struct as this was the last user of the struct"

* tag 'hwlock-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
  hwspinlock: remove now unused pdata from header file
  hwspinlock: u8500: delete driver

2 months agoMerge tag 'rpmsg-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc...
Linus Torvalds [Fri, 17 Apr 2026 21:18:55 +0000 (14:18 -0700)] 
Merge tag 'rpmsg-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux

Pull rpmsg updates from Bjorn Andersson:
 "Mark 'data' argument in rpmsg_send() const, and perculate to related
  drivers. Replace deprecated class_destroy() with class_unregister()"

* tag 'rpmsg-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
  media: platform: mtk-mdp3: Constify buffer passed to mdp_vpu_sendmsg()
  ASoC: qcom: Constify GPR packet being send over GPR interface
  rpmsg: Constify buffer passed to send API
  remoteproc: mtk_scp: Constify buffer passed to scp_send_ipi()
  remoteproc: mtk_scp_ipi: Constify buffer passed to scp_ipi_send()
  drivers: rpmsg: class_destroy() is deprecated

2 months agoMerge tag 'rproc-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc...
Linus Torvalds [Fri, 17 Apr 2026 21:16:15 +0000 (14:16 -0700)] 
Merge tag 'rproc-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux

Pull remoteproc updates from Bjorn Andersson:

 - Move requesting of IRQs in TI Keystone driver to probe time instead
   of remoteproc start, to allow better handling of errors.

 - Introduce support for more than 10 entries in the Qualcomm minidump
   implementation.

 - Add audio DSP remoteproc support for the Qualcomm Eliza platform. Add
   modem remoteproc support for the Qualcomm MDM9607, MSM8917, MSM8937,
   and MSM8940 platforms.

 - Add list of Qualcomm QMI service ids to the QMI header file, in order
   to avoid sprinkling them across the various drivers using them.
   Migrate sysmon to use this constant.

 - Fix several issues related to DeviceTree parsing and mailbox handling
   in the Xilinx R5F remote processor driver.

 - Fix incorrect error checks in reserved memory handling and polish the
   code across i.MX and TI drivers.

* tag 'rproc-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (35 commits)
  remoteproc: qcom: pas: Add Eliza ADSP support
  dt-bindings: remoteproc: qcom,milos-pas: Document Eliza ADSP
  remoteproc: qcom: Add missing space before closing bracket
  dt-bindings: remoteproc: qcom: Drop types for firmware-name
  remoteproc: qcom: Fix minidump out-of-bounds access on subsystems array
  dt-bindings: remoteproc: k3-r5f: Add memory-region-names
  dt-bindings: remoteproc: k3-r5f: Split up memory regions
  remoteproc: use SIZE_MAX in rproc_u64_fit_in_size_t()
  dt-bindings: remoteproc: qcom,sm8550-pas: Add Glymur CDSP
  dt-bindings: remoteproc: qcom,sm8550-pas: Add Glymur ADSP
  remoteproc: xlnx: Release mailbox channels on shutdown
  remoteproc: sysmon: Use the unified QMI service ID instead of defining it locally
  remoteproc: xlnx: Only access buffer information if IPI is buffered
  remoteproc: xlnx: Avoid mailbox setup
  remoteproc: keystone: Request IRQs in probe()
  remoteproc: pru: Remove empty remove callback
  remoteproc: pru: Use rproc_of_parse_firmware() to get firmware name
  remoteproc: da8xx: Reorder resource fetching in probe()
  remoteproc: da8xx: Remove unused local struct data
  remoteproc: da8xx: Use dev_err_probe()
  ...

2 months agoMerge tag 'devicetree-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
Linus Torvalds [Fri, 17 Apr 2026 21:09:02 +0000 (14:09 -0700)] 
Merge tag 'devicetree-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree updates from Rob Herring:
 "DT core:

   - Cleanup of the reserved memory code to keep CMA specifics in CMA
     code

   - Add and convert several users to new of_machine_get_match() helper

   - Validate nul termination in string properties

   - Update dtc to upstream v1.7.2-69-g53373d135579

   - Limit matching reserved memory devices to /reserved-memory nodes

   - Fix some UAF in unittests

   - Remove Baikal SoC bus driver

   - Fix false DT_SPLIT_BINDING_PATCH checkpatch warning

   - Allow fw_devlink device-tree on x86

   - Fix kerneldoc return description for of_property_count_elems_of_size()

  DT bindings:

   - Add fsl,imx25-aips, fsl,imx25-tcq, qcom,eliza-pdc,
     qcom,eliza-spmi-pmic-arb, qcom,hawi-imem, qcom,milos-imem,
     qcom,hawi-pdc, and lg,sw49410 bindings

   - Convert arm,vexpress-scc to DT schema

   - Deprecate Qualcomm generic CPU compatibles. Add Apple M3 CPU cores.

   - Move some dual-link display panels to the dual-link schema

   - Drop mux controller node name constraints

   - Remove Baikal SoC bus bindings

   - Fix a false warning in the thermal trip node binding"

* tag 'devicetree-for-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (39 commits)
  dt-bindings: display: panel: panel-simple: Add lg,sw49410 compatible
  dt-bindings: display: ti, am65x-dss: Fix AM62L DSS reg and clock constraints
  dt-bindings: display: simple: Move Innolux G156HCE-L01 panel to dual-link
  dt-bindings: display: simple: Move AUO 21.5" FHD to dual-link
  dt-bindings: thermal: Fix false warning with 'phandle' in trips nodes
  of: unittest: fix use-after-free in testdrv_probe()
  of: unittest: fix use-after-free in of_unittest_changeset()
  dt-bindings: qcom,pdc: document the Hawi Power Domain Controller
  dt-bindings: ARM: arm,vexpress-scc: convert to DT schema
  drivers/of: fdt: validate flat DT string properties before string use
  drivers/of: fdt: validate stdout-path properties before parsing them
  dt-bindings: sram: Document qcom,hawi-imem compatible
  dt-bindings: sram: Allow multiple-word prefixes to sram subnode
  dt-bindings: sram: Document qcom,milos-imem
  scripts/dtc: Update to upstream version v1.7.2-69-g53373d135579
  of: property: Allow fw_devlink device-tree on x86
  dt-bindings: arm: cpus: Add Apple M3 CPU core compatibles
  dt-bindings: display: lt8912b: Drop redundant endpoint properties
  dt-bindings: opp-v2: Fix example 3 CPU reg value
  dt-bindings: connector: add pd-disable dependency
  ...

2 months agoMerge tag 'for-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen19...
Linus Torvalds [Fri, 17 Apr 2026 20:50:10 +0000 (13:50 -0700)] 
Merge tag 'for-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux

Pull hte updates from Dipen Patel:

 - Add tegra264 HTE driver and dt binding support

 - Remove tegra194 SoC Kconfig dependency

 - Replace use of system_unbound_wq with system_dfl_wq

* tag 'for-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux:
  hte: tegra194: Add Tegra264 GTE support
  dt-bindings: timestamp: Add Tegra264 support
  hte: tegra194: remove Kconfig dependency on Tegra194 SoC
  hte: replace use of system_unbound_wq with system_dfl_wq

2 months agoblock/blk-throttle: Add WQ_PERCPU to alloc_workqueue users
Marco Crivellari [Mon, 23 Feb 2026 09:29:20 +0000 (10:29 +0100)] 
block/blk-throttle: Add WQ_PERCPU to alloc_workqueue users

This continues the effort to refactor workqueue APIs, which began with
the introduction of new workqueues and a new alloc_workqueue flag in:

   commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
   commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")

The refactoring is going to alter the default behavior of
alloc_workqueue() to be unbound by default.

With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND),
any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND
must now use WQ_PERCPU. For more details see the Link tag below.

In order to keep alloc_workqueue() behavior identical, explicitly request
WQ_PERCPU.

Cc: Josef Bacik <josef@toxicpanda.com>
Cc: cgroups@vger.kernel.org
Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://patch.msgid.link/20260223092920.60424-3-marco.crivellari@suse.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2 months agoblock: Add WQ_PERCPU to alloc_workqueue users
Marco Crivellari [Mon, 23 Feb 2026 09:29:19 +0000 (10:29 +0100)] 
block: Add WQ_PERCPU to alloc_workqueue users

This continues the effort to refactor workqueue APIs, which began with
the introduction of new workqueues and a new alloc_workqueue flag in:

   commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")
   commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")

The refactoring is going to alter the default behavior of
alloc_workqueue() to be unbound by default.

With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND),
any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND
must now use WQ_PERCPU. For more details see the Link tag below.

In order to keep alloc_workqueue() behavior identical, explicitly request
WQ_PERCPU.

Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://patch.msgid.link/20260223092920.60424-2-marco.crivellari@suse.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2 months agoblock: relax pgmap check in bio_add_page for compatible zone device pages
Naman Jain [Fri, 10 Apr 2026 15:34:14 +0000 (15:34 +0000)] 
block: relax pgmap check in bio_add_page for compatible zone device pages

bio_add_page() and bio_integrity_add_page() reject pages from different
dev_pagemaps entirely, returning 0 even when those pages have compatible
DMA mapping requirements. This forces callers to start a new bio when
buffers span pgmap boundaries, even though the pages could safely coexist
as separate bvec entries.

This matters for guests where memory is registered through
devm_memremap_pages() with MEMORY_DEVICE_GENERIC in multiple calls,
creating separate dev_pagemaps for each chunk. When a direct I/O buffer
spans two such chunks, bio_add_page() rejects the second page, forcing an
unnecessary bio split or I/O failure.

Introduce zone_device_pages_compatible() in blk.h to check whether two
pages can coexist in the same bio as separate bvec entries. The block DMA
iterator (blk_dma_map_iter_start) caches the P2PDMA mapping state from the
first segment and applies it to all others, so P2PDMA pages from different
pgmaps must not be mixed, and neither must P2PDMA and non-P2PDMA pages.
All other combinations (MEMORY_DEVICE_GENERIC pages from different pgmaps,
or MEMORY_DEVICE_GENERIC with normal RAM) use the same dma_map_phys path
and are safe.

Replace the blanket zone_device_pages_have_same_pgmap() rejection with
zone_device_pages_compatible(), while keeping
zone_device_pages_have_same_pgmap() as a merge guard.
Pages from different pgmaps can be added as separate bvec entries but
must not be coalesced into the same segment, as that would make
it impossible to recover the correct pgmap via page_pgmap().

Fixes: 49580e690755 ("block: add check when merging zone device pages")
Cc: stable@vger.kernel.org
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260410153414.4159050-3-namjain@linux.microsoft.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2 months agoblock: add pgmap check to biovec_phys_mergeable
Naman Jain [Fri, 10 Apr 2026 15:34:13 +0000 (15:34 +0000)] 
block: add pgmap check to biovec_phys_mergeable

biovec_phys_mergeable() is used by the request merge, DMA mapping,
and integrity merge paths to decide if two physically contiguous
bvec segments can be coalesced into one. It currently has no check
for whether the segments belong to different dev_pagemaps.

When zone device memory is registered in multiple chunks, each chunk
gets its own dev_pagemap. A single bio can legitimately contain
bvecs from different pgmaps -- iov_iter_extract_bvecs() breaks at
pgmap boundaries but the outer loop in bio_iov_iter_get_pages()
continues filling the same bio. If such bvecs are physically
contiguous, biovec_phys_mergeable() will coalesce them, making it
impossible to recover the correct pgmap for the merged segment
via page_pgmap().

Add a zone_device_pages_have_same_pgmap() check to prevent merging
bvec segments that span different pgmaps.

Fixes: 49580e690755 ("block: add check when merging zone device pages")
Cc: stable@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Link: https://patch.msgid.link/20260410153414.4159050-2-namjain@linux.microsoft.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2 months agofloppy: fix reference leak on platform_device_register() failure
Guangshuo Li [Wed, 15 Apr 2026 14:57:08 +0000 (22:57 +0800)] 
floppy: fix reference leak on platform_device_register() failure

When platform_device_register() fails in do_floppy_init(), the embedded
struct device in floppy_device[drive] has already been initialized by
device_initialize(), but the failure path jumps to out_remove_drives
without dropping the device reference for the current drive.

Previously registered floppy devices are cleaned up in out_remove_drives,
but the device for the drive that fails registration is not, leading to
a reference leak.

The issue was identified by a static analysis tool I developed and
confirmed by manual review. Fix this by calling put_device() for the
current floppy device before jumping to the common cleanup path.

Fixes: 94fd0db7bfb4a ("[PATCH] Floppy: Add cmos attribute to floppy driver")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Link: https://patch.msgid.link/20260415145708.3331818-1-lgs201920130244@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2 months agoublk: use unchecked copy helpers for bio page data
Ming Lei [Wed, 15 Apr 2026 23:02:46 +0000 (07:02 +0800)] 
ublk: use unchecked copy helpers for bio page data

Bio pages may originate from slab caches that lack a usercopy region
(e.g. jbd2 frozen metadata buffers allocated via jbd2_alloc()).
When CONFIG_HARDENED_USERCOPY is enabled, copy_to_iter() calls
check_copy_size() which rejects these slab pages, triggering a
kernel BUG in usercopy_abort().

This is a false positive: the data is ordinary block I/O content —
the same data the loop driver writes to its backing file via
vfs_iter_write().  The bvec length is always trusted, so the size
check in check_copy_size() is not needed either.

Switch to _copy_to_iter()/_copy_from_iter() which skip the
check_copy_size() wrapper while the underlying copy_to_user()
remains unchanged.

Acked-by: Caleb Sander Mateos <csander@purestorage.com>
Fixes: 2299ceec364e ("ublk: use copy_{to,from}_iter() for user copy")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://patch.msgid.link/20260415230246.808176-1-tom.leiming@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2 months agot10-pi: reduce ref tag code duplication
Caleb Sander Mateos [Wed, 15 Apr 2026 21:08:47 +0000 (15:08 -0600)] 
t10-pi: reduce ref tag code duplication

t10_pi_ref_tag() and ext_pi_ref_tag() are identical except for the final
truncation of the ref tag to 32 or 48 bits. Factor out a helper
full_pi_ref_tag() to return the untruncated ref tag and use it in
t10_pi_ref_tag() and ext_pi_ref_tag().

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260415210847.1730016-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2 months agoMerge tag 'nand/for-7.1' into mtd/next
Miquel Raynal [Fri, 17 Apr 2026 19:51:05 +0000 (21:51 +0200)] 
Merge tag 'nand/for-7.1' into mtd/next

The main changes happened in the SunXi driver in order to
support new versions of the Allwinner NAND controller.

There are also some DT-binding improvements and cleanups.

Finally a couple of actual fixes (Realtek ECC and Winbond SPI NAND),
aside with the usual load of misc changes.

2 months agoMerge tag 'spi-nor/for-7.1' into mtd/next
Miquel Raynal [Fri, 17 Apr 2026 19:50:54 +0000 (21:50 +0200)] 
Merge tag 'spi-nor/for-7.1' into mtd/next

SPI NOR changes for 7.1

There is only a collection of bugfixes this time around, with no notable
changes to the core. Some of the more noteworthy bugfixes listed below.

- Enable die erase on MT35XU02GCBA. We knew this flash needed this fixup
since 7f77c561e227 ("mtd: spi-nor: micron-st: add TODO for fixing
mt35xu02gcba") but did not add it due to lack of hardware to test on.

- Fix locking on some Winbond w25q series flashes.

- Fix Auto Address Increment (AAI) writes on SST that flashes that start
  on odd address. The write enable latch needs to be set again after the
  single byte program.

2 months agodrm/radeon: fix memory leak in radeon_ring_restore() on lock failure
Yuho Choi [Thu, 16 Apr 2026 19:55:37 +0000 (15:55 -0400)] 
drm/radeon: fix memory leak in radeon_ring_restore() on lock failure

radeon_ring_restore() takes ownership of the data buffer allocated by
radeon_ring_backup(). The caller (radeon_gpu_reset()) only frees it in
the non-restore branch; in the restore branch it relies on
radeon_ring_restore() to free it.

If radeon_ring_lock() fails, the function returned early without calling
kvfree(data), leaking the ring backup buffer on every GPU reset that
fails at the lock stage. During repeated GPU resets this causes
cumulative kernel memory exhaustion.

Free data before returning the error.

Fixes: 55d7c22192be ("drm/radeon: implement ring saving on reset v4")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/radeon: fix integer overflow in radeon_align_pitch()
Werner Kasselman [Wed, 15 Apr 2026 22:13:52 +0000 (22:13 +0000)] 
drm/radeon: fix integer overflow in radeon_align_pitch()

radeon_align_pitch() has the same kind of overflow issue as the old
amdgpu helper: both the alignment round-up add and the final
'aligned * cpp' calculation can overflow signed int.

If that wraps, radeon_mode_dumb_create() can end up returning an
invalid pitch or creating a zero-sized dumb buffer.

Fix this by using check_add_overflow() for the alignment round-up and
check_mul_overflow() for the final pitch calculation, returning 0 on
overflow. Also reject zero pitch and size in
radeon_mode_dumb_create().

Found via AST-based call-graph analysis using sqry.

Fixes: ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon (v3)")
Signed-off-by: Werner Kasselman <werner@verivus.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Promote DC to 3.2.379
Taimur Hassan [Fri, 10 Apr 2026 23:09:25 +0000 (18:09 -0500)] 
drm/amd/display: Promote DC to 3.2.379

This version brings along the following updates:

 - Add allow_clock_gating to dcn42 dccg.
 - Bypass post csc for additional color spaces in dcn42.
 - Remove unused dml2_project.
 - Unset Replay desync error verification by default.
 - Align HWSS fast commit path with legacy path.
 - Fix implicit narrowing conversion warnings.
 - Fix double free.
 - Introduce power module on Linux.
 - Add power module on Linux.
 - Fix fpu guard warning.
 - Add Replay/PSR active check in link loss status check.
 - Remove SYMCLK F and G values from link encoder and MANUAL_FLOW_CONTROL from optc.
 - Add minimum vfp requirement.
 - Fix narrowing boundaries and eDP parser assignment.
 - Fix dml2_0 narrowing boundaries.
 - Add README.md file to DML2_0 repository.
 - Fix DPMS using partially updated pipe context.
 - Move dml2_destroy to non-FPU compilation unit.

Signed-off-by: Taimur Hassan <Syed.Hassan@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Acked-by: Tom Chung <ChiaHsuan.Chung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Fix DPMS using partially updated pipe context
Dominik Kaszewski [Thu, 2 Apr 2026 12:46:05 +0000 (14:46 +0200)] 
drm/amd/display: Fix DPMS using partially updated pipe context

[Why & How]
DPMS functions should not use partially updated pipe context passed
as argument of commit_planes_do_stream_update, and instead use the
one in current_state, which is guaranteed to be the most recently
programmed HW config.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Dominik Kaszewski <dominik.kaszewski@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Add README.md file to DML2_0 repository
Samson Tam [Fri, 10 Apr 2026 19:27:00 +0000 (15:27 -0400)] 
drm/amd/display: Add README.md file to DML2_0 repository

[Why/How]
Add README.md file to repository
Use it to categorize directories for tracking purposes

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Samson Tam <samson.tam@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Fix dml2_0 narrowing boundaries
Gaghik Khachatrian [Thu, 9 Apr 2026 14:50:11 +0000 (10:50 -0400)] 
drm/amd/display: Fix dml2_0 narrowing boundaries

[Why] drm/amd/display dml2_0 code had implicit narrowing conversions reported by
a warning in timing, watermark, and translation paths.

[How] Apply explicit boundary casts for intentional narrowing, preserve wider
intermediate math, and use wider timing intermediates where required for safe
range handling.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Gaghik Khachatrian <gaghik.khachatrian@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Fix narrowing boundaries and eDP parser assignment
Gaghik Khachatrian [Thu, 9 Apr 2026 03:02:51 +0000 (23:02 -0400)] 
drm/amd/display: Fix narrowing boundaries and eDP parser assignment

[Why] drm/amd/display had implicit integer narrowing at protocol/storage boundaries
and an incomplete eDP assignment in integrated info parsing.

[How] Apply explicit boundary casts for intentional narrowing, keep intermediate math
in wider types, and restore explicit eDP field mapping in v2.2 parser.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Gaghik Khachatrian <gaghik.khachatrian@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Add minimum vfp requirement
Dillon Varone [Thu, 9 Apr 2026 20:45:51 +0000 (16:45 -0400)] 
drm/amd/display: Add minimum vfp requirement

[WHY&HOW]
Vertical front porch (vfp) must be greater than 1, and must be patched
if it isn't.  This must be done pre-DML so the DLG programming remains
consistent with the OTG programming.

Reviewed-by: Austin Zheng <austin.zheng@amd.com>
Signed-off-by: Dillon Varone <Dillon.Varone@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Remove SYMCLK F and G values from link encoder and MANUAL_FLOW_CONTR...
Andrew Lichmanov [Thu, 9 Apr 2026 14:23:58 +0000 (10:23 -0400)] 
drm/amd/display: Remove SYMCLK F and G values from link encoder and MANUAL_FLOW_CONTROL from optc

[WHY]
Definitions were removed by HW from new headers.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Signed-off-by: Andrew Lichmanov <Andrew.Lichmanov@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Add Replay/PSR active check in link loss status check
Allen Li [Tue, 10 Mar 2026 08:49:08 +0000 (16:49 +0800)] 
drm/amd/display: Add Replay/PSR active check in link loss status check

[Why&How]
To avoid unnecessary link retraining when the panel is in Replay/PSR mode,
we need to check if it's in active state and ESD information before we
decide to retrain the link.

Reviewed-by: ChunTao Tso <chuntao.tso@amd.com>
Signed-off-by: Allen Li <allen.li@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Add power module on Linux
Ray Wu [Tue, 30 Dec 2025 01:56:28 +0000 (09:56 +0800)] 
drm/amd/display: Add power module on Linux

[Why & How]
Refactors dm to utilize the power module for managing
replay, PSR, and backlight control functionalities.

Key changes:
- Introduced replay / PSR events to enable / disable replay / PSR.
- Implemented replay rate control and power option
- Refactored backlight control by using the power module.
- Enhanced handling of VRR within replay and PSR logic.

Reviewed-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Introduce power module on Linux
Ray Wu [Fri, 27 Feb 2026 21:09:19 +0000 (16:09 -0500)] 
drm/amd/display: Introduce power module on Linux

[Why]

Other OS supported by DC uses the power module to manage panel power
features such as backlight and self-refresh. It contains enhancements
on top what amdgpu_dm is doing today that can benefit power.

[How]

Introduce the power module. It's currently not being used anywhere, a
future change will incorporate it into amdgpu_dm.

Reviewed-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Fix double free
Ilya Bakoulin [Tue, 7 Apr 2026 19:01:00 +0000 (15:01 -0400)] 
drm/amd/display: Fix double free

[Why/How]
Reset pointer/address to avoid double free.

Reviewed-by: Sridevi Arvindekar <sridevi.arvindekar@amd.com>
Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Fix implicit narrowing conversion warnings
Gaghik Khachatrian [Tue, 31 Mar 2026 23:14:31 +0000 (19:14 -0400)] 
drm/amd/display: Fix implicit narrowing conversion warnings

[Why]
Multiple display source files contain implicit narrowing
conversions when assigning wider integer types (int, uint32_t)
to narrower fields (uint8_t, uint16_t) at hardware register,
protocol, and storage boundaries. These conversions are
intentional but undocumented, and accompanying runtime assertions
add noise without providing compile-time safety.

[How]
Add explicit casts at all intentional narrowing boundaries across
display source files. Use narrower loop variable types where loop
bounds guarantee safe range. Remove runtime assertions paired
with narrowing casts, inline single-use intermediate variables,
and revert block scopes and braces introduced solely to contain
those assertions.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Gaghik Khachatrian <gaghik.khachatrian@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Align HWSS fast commit path with legacy path
Rafal Ostrowski [Fri, 13 Mar 2026 10:39:10 +0000 (11:39 +0100)] 
drm/amd/display: Align HWSS fast commit path with legacy path

Add missing operations to commit_planes_for_stream_fast and
hwss_build_fast_sequence to match the legacy commit_planes_for_stream
behavior for UPDATE_TYPE_FAST updates.

- Add stream-level fast update flags (cursor_attr, cursor_pos,
  periodic_interrupt, info_frame, dmdata, dither) to dc_stream.h
- Add stream-level fields to dc_fast_update struct for fast/full
  update classification in populate_fast_updates/fast_updates_exist
- Add HWSS_SETUP_PERIODIC_INTERRUPT block sequence entry, delegating
  to dc->hwss.setup_periodic_interrupt instead of calling dcn10
  directly
- Add HUBP_ENABLE_3DLUT_FL block for 3DLUT FL with
  should_update_pipe_for_stream/plane guards
- Add DPP_SET_CURSOR_MATRIX block with new cursor_csc_change flag
- Widen DPP_PROGRAM_GAMUT_REMAP to also trigger on stream gamut_remap
- Add info frame, dmdata, dither, and cursor blocks to
  hwss_build_fast_sequence
- Reclassify cursor_position/cursor_attributes as UPDATE_TYPE_FAST
- Extract dc_dmdata_types.h to resolve circular include between
  hw_sequencer.h and dc_stream.h
- Remove dcn10_hwseq.h include from dc_hw_sequencer.c

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Rafal Ostrowski <rafal.ostrowski@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Unset Replay desync error verification by default
Allen Li [Mon, 16 Mar 2026 11:32:19 +0000 (19:32 +0800)] 
drm/amd/display: Unset Replay desync error verification by default

[Why & How]
There will be an unexpected desync error while doing PSR -> Replay transit,
so we want to disable the replay desync error detection by default.

Reviewed-by: Robin Chen <robin.chen@amd.com>
Signed-off-by: Allen Li <allen.li@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Remove unused dml2_project
Roman Li [Mon, 13 Apr 2026 22:23:10 +0000 (18:23 -0400)] 
drm/amd/display: Remove unused dml2_project

Remove all references to dml2_project_dcn40 from dml2.
The project is not used.

Signed-off-by: Roman Li <roman.li@amd.com>
Acked-by: Chenyu Chen <chen-yu.chen@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: bypass post csc for additional color spaces in dcn42
Roman Li [Mon, 13 Apr 2026 21:32:55 +0000 (17:32 -0400)] 
drm/amd/display: bypass post csc for additional color spaces in dcn42

[Why]
This aligns dcn42 with:
"drm/amd/display: bypass post csc for additional color spaces in dal"

[How]
Apply the same post csc bypass logic to dcn42 dpp using the
helper function.

Signed-off-by: Roman Li <roman.li@amd.com>
Acked-by: Chenyu Chen <chen-yu.chen@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/display: Add allow_clock_gating to dcn42 dccg
Roman Li [Mon, 13 Apr 2026 21:32:34 +0000 (17:32 -0400)] 
drm/amd/display: Add allow_clock_gating to dcn42 dccg

[Why]
The allow_clock_gating function is present in all other DCN versions
and is required to properly migrate DCCG registers access from hwseq
to the dccg component, resolving register conflicts.

[How]
Add the missing .allow_clock_gating function pointer to the
dccg42_funcs struct.

Signed-off-by: Roman Li <roman.li@amd.com>
Acked-by: Chenyu Chen <chen-yu.chen@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: Add gc v12_1_0 ip headers v6
Bing Ma [Wed, 15 Apr 2026 19:44:04 +0000 (12:44 -0700)] 
drm/amdgpu: Add gc v12_1_0 ip headers v6

Add header files for gc v12_1_0 register offsets
and shift masks
v2: Update gc v12_1_0 ip headers
v3: Update gc v12_1_0 ip headers
v4, v5: Clean up registers (Alex)
v6: Update gc v12_1_0 ip headers

Signed-off-by: Bing Ma <Bing.Ma@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: Add gc v12_1_1 ip headers v3
Bing Ma [Wed, 15 Apr 2026 20:08:53 +0000 (13:08 -0700)] 
drm/amdgpu: Add gc v12_1_1 ip headers v3

Add header files for gc v12_1_1 register offsets
and shift masks
v2: Update gc v12_1_1 ip headers
v3: Update gc v12_1_1 ip headers

Signed-off-by: Bing Ma <Bing.Ma@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: Update mes 12.1's suspend/resume
Amber Lin [Mon, 23 Mar 2026 20:46:06 +0000 (16:46 -0400)] 
drm/amdgpu: Update mes 12.1's suspend/resume

Update mes_v12_1_suspend and mes_v12_1_resume to line up with mes_v12_0.

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: Create hqd info structure
Amber Lin [Fri, 13 Mar 2026 09:53:46 +0000 (05:53 -0400)] 
drm/amdgpu: Create hqd info structure

Create hung_queue_hqd_info structure and fill in hung queses information
passed by MES, including queue type, pipe id, and queue id.

Suggested-by: Jonathan Kim <jonathan.kim@amd.com>
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: Fixup detect and reset
Amber Lin [Fri, 13 Mar 2026 09:35:55 +0000 (05:35 -0400)] 
drm/amdgpu: Fixup detect and reset

Identify hung queues by comparing doorbells shown in hqd_info from MES
with doorbells stored in the driver to find matching queues.

Suggested-by: Jonathan Kim <jonathan.kim@amd.com>
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: Fixup boost mes detect hang array size
Amber Lin [Fri, 13 Mar 2026 09:27:22 +0000 (05:27 -0400)] 
drm/amdgpu: Fixup boost mes detect hang array size

When allocate the hung queues memory, we need to take the number of
queues into account for the worst hang case.

Suggested-by: Jonathan Kim <jonathan.kim@amd.com>
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdkfd: fix redundant MQD iterations in GFX v12.1
Alex Sierra [Tue, 7 Apr 2026 22:22:44 +0000 (17:22 -0500)] 
drm/amdkfd: fix redundant MQD iterations in GFX v12.1

The init_mqd_v12_1 function and its sub-call update_mqd_v12_1 both independently
iterate over XCC-specific MQDs. This nested iteration is redundant and can cause
MQDs in different queues to be overwritten. This patch removes the duplicate
loop logic to prevent queue corruption.

Fixes: 01bbc4a4b947 ("drm/amdkfd: Add MQD manager for GFX 12.1.0")
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: make driver manages local vram allocations for for gmc v12.1 A+A
Le Ma [Wed, 25 Mar 2026 03:46:23 +0000 (11:46 +0800)] 
drm/amdgpu: make driver manages local vram allocations for for gmc v12.1 A+A

Limit mc_vram_size to node_segment_size to prevent allocations
to prevent allocations on remote HBM.

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: Place psp pri_fw bo to VRAM on A+A
Feifei Xu [Fri, 20 Mar 2026 10:21:15 +0000 (18:21 +0800)] 
drm/amdgpu: Place psp pri_fw bo to VRAM on A+A

On A+A, psp requires firmware bo be placed on VRAM.

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: Move get mes version info to the end of set_hw_resource
Shaoyun Liu [Thu, 26 Mar 2026 16:14:32 +0000 (12:14 -0400)] 
drm/amdgpu: Move get mes version info to the end of set_hw_resource

After init mes queue, it require some time for mes to execute init
code including setup version info in CP_MES_GP3 register. Put it after
first MES call(set_hw_resource package).

Signed-off-by: Shaoyun Liu <shaoyun.liu@amd.com>
Reviewed-by: Michael Chen <michael.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/amdgpu : Distribute inv_tlbs on individual XCC
Shaoyun Liu [Thu, 5 Mar 2026 01:30:16 +0000 (20:30 -0500)] 
drm/amd/amdgpu : Distribute inv_tlbs on individual XCC

From MES version 0x74 and above, pipe 1(kiq) support use the
shared command buffer to distribute the tasks among the xccs
within the same partition. It's more efficient for tlb invalidation
been done individually on the each XCC at the same time compare
to let master xcc loop all xccs.

This requires the coop_mode been set before kiq set_hw_resource.

Signed-off-by: Shaoyun Liu <shaoyun.liu@amd.com>
Reviewed-by: Michael Chen <michael.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: support toc_1 fw load for mp0 v15_0_8
Likun Gao [Mon, 9 Mar 2026 04:19:44 +0000 (12:19 +0800)] 
drm/amdgpu: support toc_1 fw load for mp0 v15_0_8

Support for TOC fw load for psp v15_0_8 rev id 0.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: support rlc_1 fw load for gc 12_1
Likun Gao [Mon, 9 Mar 2026 02:35:25 +0000 (10:35 +0800)] 
drm/amdgpu: support rlc_1 fw load for gc 12_1

Add support to load rlc firmware for rev_id 0 of gfx v12_1.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/pm: Add thermal alert logging to smu15.0.8
Lijo Lazar [Mon, 9 Mar 2026 08:49:05 +0000 (14:19 +0530)] 
drm/amd/pm: Add thermal alert logging to smu15.0.8

Add logging for thermal events in SMUv15.0.8 SOCs

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/pm: Add mem temp to gpu metrics for smu_v15_0_8
Asad Kamal [Wed, 11 Mar 2026 10:38:30 +0000 (18:38 +0800)] 
drm/amd/pm: Add mem temp to gpu metrics for smu_v15_0_8

Add mem temp to gpu metrics as maximum hbm stack temperature
for smu_v15_0_8

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/pm: Add partition metrics support
Asad Kamal [Fri, 26 Dec 2025 09:58:03 +0000 (17:58 +0800)] 
drm/amd/pm: Add partition metrics support

Add partition metrics support for smu_v15_0_8

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/pm: Enable thermal alert on SMUv15.0.8
Lijo Lazar [Thu, 5 Mar 2026 11:16:14 +0000 (16:46 +0530)] 
drm/amd/pm: Enable thermal alert on SMUv15.0.8

Enable thermal alert interrupts on SMUv15.0.8

v2: squash in cleanups

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/gfx12_1: Increase reserved memory size to 150M
Alex Sierra [Fri, 20 Feb 2026 21:57:13 +0000 (15:57 -0600)] 
drm/amdgpu/gfx12_1: Increase reserved memory size to 150M

Increase reserved memory to 150 MB.

v2: squash in fixes (Alex)

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: Rename CPER Fatal severity macro
Xiang Liu [Tue, 2 Dec 2025 07:43:36 +0000 (15:43 +0800)] 
drm/amdgpu: Rename CPER Fatal severity macro

Rename CPER severity macro to avoid conflicting with UEFI definition.

Signed-off-by: Xiang Liu <xiang.liu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: update cp cmd pkt for gfx v12_1 v2
Likun Gao [Thu, 19 Mar 2026 05:28:15 +0000 (13:28 +0800)] 
drm/amdgpu: update cp cmd pkt for gfx v12_1 v2

Update CP command package for gfx v12.1.
1. Update to common command pkg format for PACKET3_ACQUIRE_MEM.
2. Update to definition PACKET3_PRED_EXEC command pkt.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: Fix gfx_hqd_mask in mes 12.1
Amber Lin [Fri, 13 Mar 2026 10:49:44 +0000 (06:49 -0400)] 
drm/amdgpu: Fix gfx_hqd_mask in mes 12.1

Same as compute and sdma, gfx_hqd_mask has been initialized properly in
amdgpu_mes_init. set_hw_res should use those initialization accordingly.
Hardcoding it causes the mismatch between driver and MES.

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: fix integer overflow in amdgpu_gem_align_pitch()
Werner Kasselman [Tue, 14 Apr 2026 05:08:42 +0000 (05:08 +0000)] 
drm/amdgpu: fix integer overflow in amdgpu_gem_align_pitch()

amdgpu_gem_align_pitch() is passed u32 width and cpp from dumb buffer
creation but uses signed int internally.  The round-up add and the
aligned * cpp multiplication can overflow, returning zero or a negative
pitch.  A zero pitch propagates to a zero-sized GEM object allocation
that reaches userspace via DRM_IOCTL_MODE_CREATE_DUMB.

Switch the helper to unsigned int and use check_add_overflow() /
check_mul_overflow() so wraparound returns zero.  Reject a zero pitch
or size in amdgpu_mode_dumb_create() rather than allocating a zero-
byte BO.

Fixes: 8e911ab770f7 ("drm: amdgpu: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()")
Signed-off-by: Werner Kasselman <werner@verivus.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/jpeg: Fix sprintf buffer overflow warning in jpeg_v2_5
Michal Simek [Tue, 14 Apr 2026 06:02:31 +0000 (08:02 +0200)] 
drm/amdgpu/jpeg: Fix sprintf buffer overflow warning in jpeg_v2_5

Replace sprintf() with snprintf() to fix the -Werror=format-overflow
warning when building with allmodconfig:

  drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c:152:47: error: '%d' directive
  writing between 1 and 11 bytes into a region of size 7
  [-Werror=format-overflow=]
    152 |                 sprintf(ring->name, "jpeg_dec_%d", i);

The ring->name buffer is 16 bytes. Using snprintf() with sizeof()
ensures the buffer cannot overflow regardless of the integer value.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/radeon: replace nested min calls with min3
Thorsten Blum [Tue, 7 Apr 2026 18:14:08 +0000 (20:14 +0200)] 
drm/radeon: replace nested min calls with min3

In dce6_available_bandwidth() and dce8_available_bandwidth(), replace
nested min() calls with min3().

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amd/pm: Align PPTable fill with non-Q10 static metrics
Asad Kamal [Wed, 8 Apr 2026 13:40:22 +0000 (21:40 +0800)] 
drm/amd/pm: Align PPTable fill with non-Q10 static metrics

Remove Q10 rounding when applying smu_v15_0_8 static metrics
to the driver PPTable as the firmware now provide raw data

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: use DRM_SCHED_PRIORITY_KERNEL for all ttm entities
Pierre-Eric Pelloux-Prayer [Wed, 8 Apr 2026 08:42:27 +0000 (10:42 +0200)] 
drm/amdgpu: use DRM_SCHED_PRIORITY_KERNEL for all ttm entities

ttm jobs must have higher priority than any userspace jobs.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: split amdgpu_ttm_set_buffer_funcs_status in 2 funcs
Pierre-Eric Pelloux-Prayer [Thu, 8 Jan 2026 16:55:45 +0000 (17:55 +0100)] 
drm/amdgpu: split amdgpu_ttm_set_buffer_funcs_status in 2 funcs

Makes a code slightly clearer and reduces indentation.

---
v5: use amdgpu_in_reset in amdgpu_ttm_disable_buffer_funcs
---

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: rename amdgpu_fill_buffer as amdgpu_ttm_clear_buffer
Pierre-Eric Pelloux-Prayer [Fri, 5 Sep 2025 08:22:22 +0000 (10:22 +0200)] 
drm/amdgpu: rename amdgpu_fill_buffer as amdgpu_ttm_clear_buffer

This is the only use case for this function.

---
v2: amdgpu_ttm_clear_buffer instead of amdgpu_clear_buffer
---

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: get rid of amdgpu_ttm_clear_buffer
Pierre-Eric Pelloux-Prayer [Tue, 18 Nov 2025 14:48:39 +0000 (15:48 +0100)] 
drm/amdgpu: get rid of amdgpu_ttm_clear_buffer

It's doing the same thing as amdgpu_fill_buffer(src_data=0), so drop it.

The only caveat is that amdgpu_res_cleared() return value is only valid
right after allocation.

---
v2: introduce new "bool consider_clear_status" arg
v6: dont pass a NULL resv when calling amdgpu_fill_buffer from
    amdgpu_bo_create
---

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: drop userq fence driver refs out of fence process()
Prike Liang [Wed, 8 Apr 2026 06:00:04 +0000 (14:00 +0800)] 
drm/amdgpu: drop userq fence driver refs out of fence process()

amdgpu_userq_wait_ioctl() takes extra references on waited-on fence
drivers and stores them in waitq->fence_drv_xa. When a new userq fence is
created, those references are transferred into userq_fence->fence_drv_array
so they can be released when the fence completes.

However, those inherited references are currently only dropped from
amdgpu_userq_fence_driver_process(). If a fence never reaches that path,
such as it is already signaled when created, so we need to explicitly release
those fences in that case.

v2: use a list(list_cut_before) for managing the signal userq driver fences.(Christian)
Link: https://patchwork.freedesktop.org/patch/718078/?series=164763&rev=2
v3: Doesn't cache the userq first unsignaled fence and use the cut before list
    head directly.(Christian)

Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: give ttm entities access to all the sdma scheds
Pierre-Eric Pelloux-Prayer [Wed, 11 Jun 2025 07:02:54 +0000 (09:02 +0200)] 
drm/amdgpu: give ttm entities access to all the sdma scheds

With this change we now have as many clear and move entities as we
have sdma engines (limited to TTM_NUM_MOVE_FENCES).

To enable load-balancing this patch gives access to all sdma
schedulers to all entities, except default_entity which has no
use for multiple schedulers.

---
v6: add comment
---

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/userq: unpin and unref doorbell and wptr outside mutex
Sunil Khatri [Mon, 13 Apr 2026 12:53:06 +0000 (18:23 +0530)] 
drm/amdgpu/userq: unpin and unref doorbell and wptr outside mutex

In amdgpu_userq_destroy once unmap_helpder is called within mutex
there is no need to hold mutex.

This helps in avoiding a deadlock between doorbell and wptr ww mutex
and we could unpin and unref these bos outside mutex safely.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: create multiple clear/move ttm entities
Pierre-Eric Pelloux-Prayer [Thu, 8 Jan 2026 16:11:22 +0000 (17:11 +0100)] 
drm/amdgpu: create multiple clear/move ttm entities

This enables parallelism of operations.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/userq: use pm_runtime_resume_and_get and fix err handling
Sunil Khatri [Sat, 11 Apr 2026 08:11:06 +0000 (13:41 +0530)] 
drm/amdgpu/userq: use pm_runtime_resume_and_get and fix err handling

Use pm_runtime_resume_and_get instead of pm_runtime_get_sync as it
return error but put the reference in the function itself.

In goto statements we need to drop the pm reference too.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: only use working sdma schedulers for ttm
Pierre-Eric Pelloux-Prayer [Thu, 8 Jan 2026 16:03:30 +0000 (17:03 +0100)] 
drm/amdgpu: only use working sdma schedulers for ttm

It's possible that some sdma instances aren't working so we shouldn't try
to use them from TTM. To achieve this, delay the call to
amdgpu_sdma_set_buffer_funcs_scheds after the rings have been tested, and
then use the 'ready' property to decide if a sched should be used or not.

Note that currently it's not doing much, because if the ring helper fails
for any ring, the whole sdma block init fails.

---
v5: check buffer_funcs_enabled from amdgpu_ttm_access_memory_sdma
---

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/userq: unmap_helper dont return the queue state
Sunil Khatri [Mon, 13 Apr 2026 06:16:47 +0000 (11:46 +0530)] 
drm/amdgpu/userq: unmap_helper dont return the queue state

We check for return value of amdgpu_userq_unmap_helper and
compare it against the queue->state which is logically
wrong and we should just check for failure and do the needfull.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu: pass all the sdma scheds to amdgpu_mman
Pierre-Eric Pelloux-Prayer [Tue, 18 Nov 2025 14:47:37 +0000 (15:47 +0100)] 
drm/amdgpu: pass all the sdma scheds to amdgpu_mman

This will allow the use of all of them for clear/fill buffer
operations.
Since drm_sched_entity_init requires a scheduler array, we
store schedulers rather than rings. For the few places that need
access to a ring, we can get it from the sched using container_of.

Since the code is the same for all sdma versions, add a new
helper amdgpu_sdma_set_buffer_funcs_scheds to set buffer_funcs_scheds
based on the number of sdma instances.

Note: the new sched array is identical to the amdgpu_vm_manager one.
These 2 could be merged.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/userq: unmap is to be called before freeing doorbell/wptr bo
Sunil Khatri [Mon, 13 Apr 2026 06:08:46 +0000 (11:38 +0530)] 
drm/amdgpu/userq: unmap is to be called before freeing doorbell/wptr bo

Unmap the queue after freeing doorbell and wptr memory is completely
wrong. Any operation on the queue needs the doorbell and wptr to be
valid and hence fixing the ordering.

Also since we are using amdgpu_bo_reserve in non interruptrable mode
so there is no need to check for its return values.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/userq: hold root bo lock in caller of input_va_validate
Sunil Khatri [Wed, 8 Apr 2026 16:04:27 +0000 (21:34 +0530)] 
drm/amdgpu/userq: hold root bo lock in caller of input_va_validate

Caller should hold the reservation lock for root.bo in func
amdgpu_userq_input_va_validate.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/userq: caller to take reserv lock for vas_list_cleanup
Sunil Khatri [Wed, 8 Apr 2026 12:26:23 +0000 (17:56 +0530)] 
drm/amdgpu/userq: caller to take reserv lock for vas_list_cleanup

In function amdgpu_userq_buffer_vas_list_cleanup, remove the
reservation lock for vm and caller should make sure it's taken
before locking userq_mutex.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/userq: create_mqd does not need userq_mutex
Sunil Khatri [Thu, 9 Apr 2026 07:29:33 +0000 (12:59 +0530)] 
drm/amdgpu/userq: create_mqd does not need userq_mutex

Reshuffle the code to run create_mqd outside the mutex.
code here is mostly setting up software structure init
before actually registering the userqueue in the xa and
to the driver.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/userq: dont lock root bo with userq_mutex held
Sunil Khatri [Wed, 8 Apr 2026 11:46:24 +0000 (17:16 +0530)] 
drm/amdgpu/userq: dont lock root bo with userq_mutex held

Do not hold reservation lock for root bo if userq_mutex
is already held in the call flow this cause a lock
issue with ttm_bo_delayed_delete.

Its better to lock the vm->root.bo first and then go ahead
with userq_mutex so userq_mutex threads dont get stuck until
the reservation lock is held.

In this case it helps in the function amdgpu_userq_buffer_vas_mapped
for each queue during restore_all.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/userq: fix kerneldoc for amdgpu_userq_ensure_ev_fence
Sunil Khatri [Wed, 8 Apr 2026 09:41:05 +0000 (15:11 +0530)] 
drm/amdgpu/userq: fix kerneldoc for amdgpu_userq_ensure_ev_fence

Move the comment for the caller to the definition for
amdgpu_userq_ensure_ev_fence in kerneldoc format.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2 months agodrm/amdgpu/userq: clean the VA mapping list for failed queue creation
Sunil Khatri [Wed, 8 Apr 2026 05:05:05 +0000 (10:35 +0530)] 
drm/amdgpu/userq: clean the VA mapping list for failed queue creation

If the queue creation failed during mapping of the important VA's
like queue_va, rptr_va and wptr_va. These needs to be cleaned
as queue destroy will not be called for such queues as user never
get call to creation failure.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>