Skip to contentSkip to conversation

Linux 6.17.5

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Oct 23, 2025 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 6.17.5 kernel.

All users of the 6.17 kernel series must upgrade.

The updated 6.17.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.17.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/arch/arm64/silicon-errata.rst                  |    2 
 Documentation/networking/seg6-sysctl.rst                     |    3 
 Documentation/sphinx/kernel_feat.py                          |    4 
 Documentation/sphinx/kernel_include.py                       |    6 
 Documentation/sphinx/maintainers_include.py                  |    4 
 Makefile                                                     |    2 
 arch/Kconfig                                                 |    1 
 arch/arm64/Kconfig                                           |    1 
 arch/arm64/include/asm/cputype.h                             |    2 
 arch/arm64/include/asm/sysreg.h                              |   11 
 arch/arm64/kernel/cpu_errata.c                               |    1 
 arch/arm64/kernel/entry-common.c                             |    8 
 arch/arm64/kvm/arm.c                                         |    6 
 arch/powerpc/kernel/fadump.c                                 |    3 
 arch/riscv/kernel/probes/kprobes.c                           |   13 
 arch/x86/kernel/cpu/amd.c                                    |   16 
 arch/x86/kernel/cpu/resctrl/monitor.c                        |   44 +
 arch/x86/mm/tlb.c                                            |   24 -
 block/blk-cgroup.c                                           |   13 
 block/blk-mq-sched.c                                         |    2 
 block/blk-mq-tag.c                                           |    5 
 block/blk-mq.c                                               |    2 
 block/blk-mq.h                                               |    3 
 drivers/accel/qaic/qaic.h                                    |    2 
 drivers/accel/qaic/qaic_control.c                            |    2 
 drivers/accel/qaic/qaic_data.c                               |   12 
 drivers/accel/qaic/qaic_debugfs.c                            |    5 
 drivers/accel/qaic/qaic_drv.c                                |    3 
 drivers/ata/libata-core.c                                    |   11 
 drivers/cxl/acpi.c                                           |    2 
 drivers/cxl/core/features.c                                  |    3 
 drivers/cxl/core/region.c                                    |    7 
 drivers/cxl/core/trace.h                                     |    2 
 drivers/dpll/zl3073x/core.c                                  |  228 ++++++----
 drivers/dpll/zl3073x/core.h                                  |    3 
 drivers/dpll/zl3073x/devlink.c                               |   18 
 drivers/dpll/zl3073x/regs.h                                  |    3 
 drivers/gpu/drm/amd/amdgpu/Makefile                          |    3 
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c             |    5 
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c                |   48 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c                      |    2 
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c                    |   54 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c                      |    2 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c                     |    2 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h                     |    2 
 drivers/gpu/drm/amd/amdgpu/cyan_skillfish_reg_init.c         |   56 ++
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c                        |    7 
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c                        |    7 
 drivers/gpu/drm/amd/amdgpu/mes_v12_0.c                       |    7 
 drivers/gpu/drm/amd/amdgpu/nv.h                              |    1 
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c            |   12 
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h            |    7 
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c          |    3 
 drivers/gpu/drm/bridge/lontium-lt9211.c                      |    3 
 drivers/gpu/drm/drm_draw.c                                   |    2 
 drivers/gpu/drm/drm_draw_internal.h                          |    2 
 drivers/gpu/drm/i915/display/intel_fb.c                      |   38 -
 drivers/gpu/drm/i915/display/intel_frontbuffer.c             |   10 
 drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.h       |    2 
 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c                    |    9 
 drivers/gpu/drm/panthor/panthor_fw.c                         |    1 
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c                 |    2 
 drivers/gpu/drm/scheduler/sched_main.c                       |   13 
 drivers/gpu/drm/xe/display/xe_fb_pin.c                       |    5 
 drivers/gpu/drm/xe/display/xe_plane_initial.c                |    3 
 drivers/gpu/drm/xe/regs/xe_gt_regs.h                         |    1 
 drivers/gpu/drm/xe/xe_assert.h                               |    4 
 drivers/gpu/drm/xe/xe_bo.c                                   |    1 
 drivers/gpu/drm/xe/xe_bo.h                                   |    4 
 drivers/gpu/drm/xe/xe_bo_evict.c                             |    8 
 drivers/gpu/drm/xe/xe_bo_types.h                             |    1 
 drivers/gpu/drm/xe/xe_device.c                               |   22 
 drivers/gpu/drm/xe/xe_device_types.h                         |   62 --
 drivers/gpu/drm/xe/xe_gt_idle.c                              |    8 
 drivers/gpu/drm/xe/xe_gt_pagefault.c                         |   13 
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c                   |    3 
 drivers/gpu/drm/xe/xe_guc_submit.c                           |   13 
 drivers/gpu/drm/xe/xe_migrate.c                              |   25 -
 drivers/gpu/drm/xe/xe_pci.c                                  |    8 
 drivers/gpu/drm/xe/xe_query.c                                |    5 
 drivers/gpu/drm/xe/xe_svm.c                                  |   63 +-
 drivers/gpu/drm/xe/xe_tile.c                                 |   58 +-
 drivers/gpu/drm/xe/xe_tile.h                                 |   14 
 drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c                       |   10 
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.c                         |   22 
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.h                         |    3 
 drivers/gpu/drm/xe/xe_vm.c                                   |   32 +
 drivers/gpu/drm/xe/xe_vm_types.h                             |    2 
 drivers/gpu/drm/xe/xe_vram.c                                 |  243 +++++++----
 drivers/gpu/drm/xe/xe_vram.h                                 |   12 
 drivers/gpu/drm/xe/xe_vram_types.h                           |   85 +++
 drivers/hid/hid-input.c                                      |    5 
 drivers/hid/hid-multitouch.c                                 |   28 -
 drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c |    3 
 drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c           |  226 ++++------
 drivers/net/can/m_can/m_can.c                                |   62 +-
 drivers/net/can/m_can/m_can_platform.c                       |    2 
 drivers/net/can/usb/gs_usb.c                                 |   23 -
 drivers/net/ethernet/airoha/airoha_eth.c                     |   16 
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c                     |    1 
 drivers/net/ethernet/amd/xgbe/xgbe-mdio.c                    |    1 
 drivers/net/ethernet/broadcom/tg3.c                          |    5 
 drivers/net/ethernet/dlink/dl2k.c                            |   23 -
 drivers/net/ethernet/google/gve/gve.h                        |    2 
 drivers/net/ethernet/google/gve/gve_desc_dqo.h               |    3 
 drivers/net/ethernet/google/gve/gve_rx_dqo.c                 |   18 
 drivers/net/ethernet/intel/idpf/idpf_ptp.c                   |    3 
 drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c          |    1 
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c                |    3 
 drivers/net/ethernet/intel/ixgbevf/defines.h                 |    1 
 drivers/net/ethernet/intel/ixgbevf/ipsec.c                   |   10 
 drivers/net/ethernet/intel/ixgbevf/ixgbevf.h                 |    7 
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c            |   34 +
 drivers/net/ethernet/intel/ixgbevf/mbx.h                     |    8 
 drivers/net/ethernet/intel/ixgbevf/vf.c                      |  182 ++++++--
 drivers/net/ethernet/intel/ixgbevf/vf.h                      |    1 
 drivers/net/ethernet/marvell/octeontx2/af/cgx.c              |    1 
 drivers/net/ethernet/mediatek/mtk_wed.c                      |    8 
 drivers/net/ethernet/realtek/r8169_main.c                    |    5 
 drivers/net/netdevsim/netdev.c                               |    7 
 drivers/net/phy/broadcom.c                                   |   20 
 drivers/net/phy/realtek/realtek_main.c                       |   23 -
 drivers/net/usb/lan78xx.c                                    |   19 
 drivers/net/usb/r8152.c                                      |    7 
 drivers/net/usb/usbnet.c                                     |    2 
 drivers/nvme/host/auth.c                                     |    6 
 drivers/nvme/host/multipath.c                                |    6 
 drivers/nvme/host/tcp.c                                      |    3 
 drivers/pci/controller/vmd.c                                 |   13 
 drivers/phy/cadence/cdns-dphy.c                              |  131 ++++-
 drivers/usb/gadget/function/f_acm.c                          |   42 -
 drivers/usb/gadget/function/f_ecm.c                          |   48 --
 drivers/usb/gadget/function/f_ncm.c                          |   78 +--
 drivers/usb/gadget/function/f_rndis.c                        |   85 +--
 drivers/usb/gadget/udc/core.c                                |    3 
 fs/btrfs/extent_io.c                                         |    2 
 fs/btrfs/free-space-tree.c                                   |   15 
 fs/btrfs/ioctl.c                                             |    2 
 fs/btrfs/relocation.c                                        |   13 
 fs/btrfs/super.c                                             |    3 
 fs/btrfs/zoned.c                                             |    2 
 fs/coredump.c                                                |    2 
 fs/dax.c                                                     |    2 
 fs/dcache.c                                                  |    2 
 fs/exec.c                                                    |    2 
 fs/ext4/ext4_jbd2.c                                          |   11 
 fs/ext4/inode.c                                              |    8 
 fs/f2fs/data.c                                               |    2 
 fs/file_attr.c                                               |   12 
 fs/fuse/ioctl.c                                              |    4 
 fs/hfsplus/unicode.c                                         |   24 +
 fs/jbd2/transaction.c                                        |   13 
 fs/nfsd/blocklayout.c                                        |   25 -
 fs/nfsd/blocklayoutxdr.c                                     |   86 ++-
 fs/nfsd/blocklayoutxdr.h                                     |    4 
 fs/nfsd/flexfilelayout.c                                     |    8 
 fs/nfsd/flexfilelayoutxdr.c                                  |    3 
 fs/nfsd/nfs4layouts.c                                        |    1 
 fs/nfsd/nfs4proc.c                                           |   36 -
 fs/nfsd/nfs4xdr.c                                            |   25 -
 fs/nfsd/pnfs.h                                               |    1 
 fs/nfsd/xdr4.h                                               |   39 +
 fs/overlayfs/copy_up.c                                       |    2 
 fs/overlayfs/inode.c                                         |    5 
 fs/smb/client/inode.c                                        |    6 
 fs/smb/client/misc.c                                         |   17 
 fs/smb/client/smb2ops.c                                      |    8 
 fs/smb/server/mgmt/user_session.c                            |    7 
 fs/smb/server/smb2pdu.c                                      |    9 
 fs/smb/server/transport_ipc.c                                |   12 
 fs/xfs/libxfs/xfs_log_format.h                               |   30 +
 fs/xfs/libxfs/xfs_ondisk.h                                   |    2 
 fs/xfs/xfs_log.c                                             |    8 
 fs/xfs/xfs_log_priv.h                                        |    4 
 fs/xfs/xfs_log_recover.c                                     |   34 +
 include/linux/brcmphy.h                                      |    1 
 include/linux/libata.h                                       |    6 
 include/linux/suspend.h                                      |    6 
 include/linux/usb/gadget.h                                   |   25 +
 include/net/ip_tunnels.h                                     |   15 
 include/uapi/drm/amdgpu_drm.h                                |   21 
 io_uring/register.c                                          |    1 
 io_uring/rw.c                                                |    2 
 kernel/events/core.c                                         |    8 
 kernel/power/hibernate.c                                     |   11 
 kernel/sched/core.c                                          |    2 
 kernel/sched/deadline.c                                      |    3 
 kernel/sched/fair.c                                          |   26 -
 mm/slub.c                                                    |    9 
 net/can/j1939/main.c                                         |    2 
 net/core/dev.c                                               |   40 +
 net/ipv4/ip_tunnel.c                                         |   14 
 net/ipv4/tcp_output.c                                        |   19 
 net/ipv6/ip6_tunnel.c                                        |    3 
 net/tls/tls_main.c                                           |    7 
 net/tls/tls_sw.c                                             |   31 +
 rust/kernel/cpufreq.rs                                       |    3 
 sound/firewire/amdtp-stream.h                                |    2 
 sound/hda/codecs/realtek/alc269.c                            |    1 
 sound/hda/codecs/side-codecs/cs35l41_hda.c                   |    2 
 sound/hda/codecs/side-codecs/hda_component.c                 |    4 
 sound/hda/controllers/intel.c                                |    1 
 sound/soc/amd/acp/acp-sdw-sof-mach.c                         |    2 
 sound/soc/codecs/idt821034.c                                 |   12 
 sound/soc/codecs/nau8821.c                                   |  111 +++--
 sound/usb/card.c                                             |   10 
 tools/testing/selftests/bpf/prog_tests/arg_parsing.c         |   12 
 tools/testing/selftests/net/rtnetlink.sh                     |    2 
 tools/testing/selftests/net/vlan_bridge_binding.sh           |    2 
 209 files changed, 2368 insertions(+), 1221 deletions(-)

Ada Couprie Diaz (1):
arm64: debug: always unmask interrupts in el0_softstp()

Adrian Hunter (3):
perf/core: Fix address filter match with backing files perf/core: Fix MMAP event path names with backing files perf/core: Fix MMAP2 event device with backing files

Alex Deucher (6):
drm/amdgpu: add ip offset support for cyan skillfish drm/amdgpu: add support for cyan skillfish without IP discovery drm/amdgpu: fix handling of harvesting for ip_discovery firmware drm/amdgpu: handle wrap around in reemit handling drm/amdgpu: set an error on all fences from a bad context drm/amdgpu: drop unused structures in amdgpu_drm.h

Alexey Simakov (1):
tg3: prevent use of uninitialized remote_adv and local_adv variables

Alison Schofield (1):
cxl/trace: Subtract to find an hpa_alias0 in cxl_poison events

Alok Tiwari (1):
drm/rockchip: vop2: use correct destination rectangle height check

Amit Chaudhary (1):
nvme-multipath: Skip nr_active increments in RETRY disposition

Andrey Albershteyn (1):
Revert "fs: make vfs_fileattr_[get|set] return -EOPNOTSUPP"

Andrii Nakryiko (1):
selftests/bpf: make arg_parsing.c more robust to crashes

Babu Moger (2):
x86/resctrl: Refactor resctrl_arch_rmid_read()
x86/resctrl: Fix miscount of bandwidth event when reactivating previously unavailable RMID

Benjamin Tissoires (1):
HID: multitouch: fix sticky fingers

Bhanu Seshu Kumar Valluri (1):
net: usb: lan78xx: Fix lost EEPROM write timeout error(-ETIMEDOUT) in lan78xx_write_raw_eeprom

Boris Burkov (1):
btrfs: fix incorrect readahead expansion length

Breno Leitao (1):
netdevsim: set the carrier when the device goes up

Celeste Liu (2):
can: gs_usb: gs_make_candev(): populate net_device->dev_port
can: gs_usb: increase max interface to U8_MAX

Christian Brauner (1):
coredump: fix core_pattern input validation

Christoph Hellwig (2):
xfs: rename the old_crc variable in xlog_recover_process
xfs: fix log CRC mismatches between i386 and other architectures

Christophe Leroy (1):
ASoC: codecs: Fix gain setting ranges for Renesas IDT821034 codec

Chuck Lever (1):
NFSD: Define a proc_layoutcommit for the FlexFiles layout type

Conor Dooley (1):
rust: cfi: only 64-bit arm and x86 support CFI_CLANG

Cristian Ciocaltea (4):
ASoC: nau8821: Cancel jdet_work before handling jack ejection
ASoC: nau8821: Generalize helper to clear IRQ status
ASoC: nau8821: Consistently clear interrupts before unmasking
ASoC: nau8821: Add DMI quirk to bypass jack debounce circuit

Damien Le Moal (1):
ata: libata-core: relax checks in ata_read_log_directory()

Dan Carpenter (1):
drm/xe: Fix an IS_ERR() vs NULL bug in xe_tile_alloc_vram()

Dave Jiang (3):
cxl/acpi: Fix setup of memory resource in cxl_acpi_set_cache_size() cxl/features: Add check for no entries in cxl_feature_info
cxl: Fix match_region_by_range() to use region_res_match_cxl_range()

Deepanshu Kartikey (1):
ext4: detect invalid INLINE_DATA + EXTENTS flag combination

Denis Arefev (2):
ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_get_acpi_mute_state()
ALSA: hda: Fix missing pointer check in hda_component_manager_init function

Devarsh Thakkar (2):
phy: cadence: cdns-dphy: Fix PLL lock and O_CMN_READY polling
phy: cadence: cdns-dphy: Update calibration wait time for startup state machine

Dmitry Safonov (1):
net/ip6_tunnel: Prevent perpetual tunnel growth

Dmitry Torokhov (1):
HID: hid-input: only ignore 0 battery events for digitizers

Eric Dumazet (1):
tcp: fix tcp_tso_should_defer() vs large RTT

Eugene Korenevsky (1):
cifs: parse_dfs_referrals: prevent oob on malformed input

Even Xu (1):
HID: intel-thc-hid: Intel-quickspi: switch first interrupt from level to edge detection

Fabian Vogt (1):
riscv: kprobes: Fix probe address validation

Filipe Manana (2):
btrfs: fix clearing of BTRFS_FS_RELOC_RUNNING if relocation already running
btrfs: do not assert we found block group item when creating free space tree

Florian Westphal (1):
net: core: fix lockdep splat on device unregister

Francesco Valla (1):
drm/draw: fix color truncation in drm_draw_fill24

Greg Kroah-Hartman (1):

      Linux 6.17.5

Gui-Dong Han (1):
drm/amdgpu: use atomic functions with memory barriers for vm fault info

Guoniu Zhou (1):
media: nxp: imx8-isi: m2m: Fix streaming cleanup on release

Hao Ge (1):

      slab: reset slab->obj_ext when freeing and it is OBJEXTS_ALLOC_FAIL

Harshit Mogalapalli (1):
Octeontx2-af: Fix missing error code in cgx_probe()

I Viswanath (1):

      net: usb: lan78xx: fix use of improperly initialized dev->chipid in lan78xx_reset

Ingo Molnar (1):
x86/mm: Fix SMP ordering in switch_mm_irqs_off()

Inochi Amaoto (1):
PCI: vmd: Override irq_startup()/irq_shutdown() in vmd_init_dev_msi_info()

Ivan Vecera (2):
dpll: zl3073x: Refactor DPLL initialization
dpll: zl3073x: Handle missing or corrupted flash configuration

Jaegeuk Kim (1):
f2fs: fix wrong block mapping for multi-devices

Jan Kara (1):
vfs: Don't leak disconnected dentries on umount

Jedrzej Jagielski (2):
ixgbevf: fix getting link speed data for E610 devices
ixgbevf: fix mailbox API compatibility by negotiating supported features

Jeff Hugo (1):
accel/qaic: Fix bootlog initialization ordering

Jens Axboe (1):
Revert "io_uring/rw: drop -EOPNOTSUPP check in __io_complete_rw_common()"

Jiaming Zhang (1):
ALSA: usb-audio: Fix NULL pointer deference in try_to_register_card

Jonathan Corbet (1):
docs: kdoc: handle the obsolescensce of docutils.ErrorString()

Jonathan Kim (1):
drm/amdgpu: fix gfx12 mes packet status return check

Kamil Horák - 2N (1):
net: phy: bcm54811: Fix GMII/MII/MII-Lite selection

Kenneth Graunke (1):
drm/xe: Increase global invalidation timeout to 1000us

Ketil Johnsen (1):
drm/panthor: Ensure MCU is disabled on suspend

Koichiro Den (1):
ixgbe: fix too early devlink_free() in ixgbe_remove()

Kuen-Han Tsai (6):
usb: gadget: Store endpoint pointer in usb_request
usb: gadget: Introduce free_usb_request helper
usb: gadget: f_rndis: Refactor bind path to use __free()
usb: gadget: f_acm: Refactor bind path to use __free()
usb: gadget: f_ecm: Refactor bind path to use __free()
usb: gadget: f_ncm: Refactor bind path to use __free()

Li Qiang (1):
ASoC: amd/sdw_utils: avoid NULL deref when devm_kasprintf() fails

Linmao Li (1):
r8169: fix packet truncation after S4 resume on RTL8168H/RTL8111H

Lorenzo Bianconi (1):
net: airoha: Take into account out-of-order tx completions in airoha_dev_xmit()

Lorenzo Pieralisi (1):
arm64/sysreg: Fix GIC CDEOI instruction encoding

Lucas De Marchi (1):
drm/xe: Move rebar to be done earlier

Marc Kleine-Budde (4):
can: m_can: m_can_plat_remove(): add missing pm_runtime_disable()
can: m_can: m_can_handle_state_errors(): fix CAN state transition to Error Active
can: m_can: m_can_chip_config(): bring up interface in correct state
can: m_can: fix CAN state in system PM

Marek Vasut (2):
net: phy: realtek: Avoid PHYCR2 access if PHYCR2 not present drm/bridge: lt9211: Drop check for last nibble of version register

Mario Limonciello (1):
drm/amd: Check whether secure display TA loaded successfully

Mario Limonciello (AMD) (2):
PM: hibernate: Add pm_hibernation_mode_is_suspend() drm/amd: Fix hybrid sleep

Marios Makassikis (1):
ksmbd: fix recursive locking in RPC handle list access

Mark Rutland (2):
arm64: cputype: Add Neoverse-V3AE definitions
arm64: errata: Apply workarounds for Neoverse-V3AE

Martin George (1):
nvme-auth: update sc_c in host response

Matthew Auld (1):
drm/xe/evict: drop bogus assert

Matthew Brost (1):
drm/xe: Don't allow evicting of BOs in same VM in array of VM binds

Matthew Schwartz (1):
Revert "drm/amd/display: Only restore backlight after amdgpu_dm_init or dm_resume"

Miguel Ojeda (1):
rust: cpufreq: fix formatting

Milena Olech (1):
idpf: cleanup remaining SKBs in PTP flows

Ming Lei (1):
block: Remove elevator_lock usage from blkg_conf frozen operations

Miquel Sabaté Solà (2):
btrfs: fix memory leak on duplicated memory in the qgroup assign ioctl
btrfs: fix memory leaks when rejecting a non SINGLE data profile without an RST

Nicolas Dichtel (1):
doc: fix seg6_flowlabel path

Oliver Upton (1):
KVM: arm64: Prevent access to vCPU events before init

Pavel Begunkov (1):
io_uring: protect mem region deregistration

Peter Zijlstra (Intel) (1):
sched/deadline: Stop dl_server before CPU goes offline

Piotr Piórkowski (4):
drm/xe: Use devm_ioremap_wc for VRAM mapping and drop manual unmap drm/xe: Use dynamic allocation for tile and device VRAM region structures drm/xe: Move struct xe_vram_region to a dedicated header drm/xe: Unify the initialization of VRAM regions

Pranjal Ramajor Asha Kanojiya (1):
accel/qaic: Synchronize access to DBC request queue head & tail pointer

Qu Wenruo (1):
btrfs: only set the device specific options after devices are opened

Rafael J. Wysocki (1):
PM: hibernate: Fix pm_hibernation_mode_is_suspend() build breakage

Raju Rangoju (1):
amd-xgbe: Avoid spurious link down messages during interface toggle

Randy Dunlap (1):
ALSA: firewire: amdtp-stream: fix enum kernel-doc warnings

Rex Lu (1):
net: mtk: wed: add dma mask limitation and GFP_DMA32 for device with more than 4GB DRAM

Rong Zhang (1):
x86/CPU/AMD: Prevent reset reasons from being retained across reboot

Sabrina Dubroca (5):
tls: trim encrypted message to match the plaintext on short splice
tls: wait for async encrypt in case of error during latter iterations of sendmsg
tls: always set record_type in tls_process_cmsg
tls: wait for pending async decryptions if tls_strp_msg_hold fails
tls: don't rely on tx_work during send()

Sergey Bashirov (4):
NFSD: Rework encoding and decoding of nfsd4_deviceid
NFSD: Minor cleanup in layoutcommit processing
NFSD: Implement large extent array support in pNFS
NFSD: Fix last write offset handling in layoutcommit

Shuhao Fu (1):
smb: client: Fix refcount leak for cifs_sb_tlink

Shuicheng Lin (1):
drm/xe/guc: Check GuC running state before deregistering exec queue

Sourabh Jain (1):
powerpc/fadump: skip parameter area allocation when fadump is disabled

Stuart Hayhurst (1):
ALSA: hda/intel: Add MSI X870E Tomahawk to denylist

Takashi Iwai (1):
ALSA: hda/realtek: Add quirk entry for HP ZBook 17 G6

Tetsuo Handa (1):
can: j1939: add missing calls in NETDEV_UNREGISTER notification handler

Thadeu Lima de Souza Cascardo (1):
HID: multitouch: fix name of Stylus input devices

Tim Hostetler (1):
gve: Check valid ts bit on RX descriptor before hw timestamping

Timur Kristóf (1):
drm/amd/powerplay: Fix CIK shutdown temperature

Tomi Valkeinen (1):
phy: cdns-dphy: Store hs_clk_rate and return it

Tvrtko Ursulin (1):
drm/sched: Fix potential double free in drm_sched_job_add_resv_dependencies

Viacheslav Dubeyko (1):
hfsplus: fix slab-out-of-bounds read in hfsplus_strcasecmp()

Ville Syrjälä (2):
drm/i915/frontbuffer: Move bo refcounting intel_frontbuffer_{get,release}() drm/i915/fb: Fix the set_tiling vs. addfb race, again

Vinay Belgaumkar (1):
drm/xe: Enable media sampler power gating

Vincent Guittot (1):
sched/fair: Fix pelt lost idle time detection

Wang Liang (1):
selftests: net: check jq command is supported

Wilfred Mallawa (1):
nvme/tcp: handle tls partially sent records in write_space()

Xing Guo (1):
selftests: arg_parsing: Ensure data is flushed to disk before reading.

Yeounsu Moon (1):
net: dlink: handle dma_map_single() failure properly

Yi Cong (1):
r8152: add error handling in rtl8152_driver_init

Youssef Samir (1):

      accel/qaic: Treat remaining == 0 as error in find_and_map_user_pages()

Yu Kuai (1):
blk-mq: fix stale tag depth for shared sched tags in blk_mq_update_nr_requests()

Yuezhang Mo (1):
dax: skip read lock assertion for read-only filesystems

Zhang Yi (2):
jbd2: ensure that all ongoing I/O complete before freeing blocks
ext4: wait for ongoing I/O to complete before freeing blocks

Zhanjun Dong (1):
drm/i915/guc: Skip communication warning on reset in progress

Zqiang (1):
usbnet: Fix using smp_processor_id() in preemptible code warnings

author maintainer
#1 lore raw
Documentation/arch/arm64/silicon-errata.rst +2 -0
index b18ef4064bc0..a7ec57060f64 100644
@@ -200,6 +200,8 @@ stable kernels.
 +----------------+-----------------+-----------------+-----------------------------+
 | ARM            | Neoverse-V3     | #3312417        | ARM64_ERRATUM_3194386       |
 +----------------+-----------------+-----------------+-----------------------------+
+| ARM            | Neoverse-V3AE   | #3312417        | ARM64_ERRATUM_3194386       |
++----------------+-----------------+-----------------+-----------------------------+
 | ARM            | MMU-500         | #841119,826419  | ARM_SMMU_MMU_500_CPRE_ERRATA|
 |                |                 | #562869,1047329 |                             |
 +----------------+-----------------+-----------------+-----------------------------+
Documentation/networking/seg6-sysctl.rst +3 -0
index 07c20e470baf..1b6af4779be1 100644
@@ -25,6 +25,9 @@ seg6_require_hmac - INTEGER
 
 	Default is 0.
 
+/proc/sys/net/ipv6/seg6_* variables:
+====================================
+
 seg6_flowlabel - INTEGER
 	Controls the behaviour of computing the flowlabel of outer
 	IPv6 header in case of SR T.encaps
Documentation/sphinx/kernel_feat.py +3 -1
index e3a51867f27b..aaac76892ceb 100644
@@ -40,9 +40,11 @@ import sys
 from docutils import nodes, statemachine
 from docutils.statemachine import ViewList
 from docutils.parsers.rst import directives, Directive
-from docutils.utils.error_reporting import ErrorString
 from sphinx.util.docutils import switch_source_input
 
+def ErrorString(exc):  # Shamelessly stolen from docutils
+    return f'{exc.__class__.__name}: {exc}'
+
 __version__  = '1.0'
 
 def setup(app):
Documentation/sphinx/kernel_include.py +4 -2
index 1e566e87ebcd..641e81c58a8c 100755
@@ -35,13 +35,15 @@
 import os.path
 
 from docutils import io, nodes, statemachine
-from docutils.utils.error_reporting import SafeString, ErrorString
 from docutils.parsers.rst import directives
 from docutils.parsers.rst.directives.body import CodeBlock, NumberLines
 from docutils.parsers.rst.directives.misc import Include
 
 __version__  = '1.0'
 
+def ErrorString(exc):  # Shamelessly stolen from docutils
+    return f'{exc.__class__.__name}: {exc}'
+
 # ==============================================================================
 def setup(app):
 # ==============================================================================
@@ -112,7 +114,7 @@ class KernelInclude(Include):
             raise self.severe('Problems with "%s" directive path:\n'
                               'Cannot encode input file path "%s" '
                               '(wrong locale?).' %
-                              (self.name, SafeString(path)))
+                              (self.name, path))
         except IOError as error:
             raise self.severe('Problems with "%s" directive path:\n%s.' %
                       (self.name, ErrorString(error)))
Documentation/sphinx/maintainers_include.py +3 -1
index d31cff867436..519ad18685b2 100755
@@ -22,10 +22,12 @@ import re
 import os.path
 
 from docutils import statemachine
-from docutils.utils.error_reporting import ErrorString
 from docutils.parsers.rst import Directive
 from docutils.parsers.rst.directives.misc import Include
 
+def ErrorString(exc):  # Shamelessly stolen from docutils
+    return f'{exc.__class__.__name}: {exc}'
+
 __version__  = '1.0'
 
 def setup(app):
Makefile +1 -1
index 4c3092dae03c..072a3be62551 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 6
 PATCHLEVEL = 17
-SUBLEVEL = 4
+SUBLEVEL = 5
 EXTRAVERSION =
 NAME = Baby Opossum Posse
 
arch/Kconfig +1 -0
index d1b4ffd6e085..880cddff5eda 100644
@@ -917,6 +917,7 @@ config HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
 	def_bool y
 	depends on HAVE_CFI_ICALL_NORMALIZE_INTEGERS_CLANG
 	depends on RUSTC_VERSION >= 107900
+	depends on ARM64 || X86_64
 	# With GCOV/KASAN we need this fix: https://github.com/rust-lang/rust/pull/129373
 	depends on (RUSTC_LLVM_VERSION >= 190103 && RUSTC_VERSION >= 108200) || \
 		(!GCOV_KERNEL && !KASAN_GENERIC && !KASAN_SW_TAGS)
arch/arm64/Kconfig +1 -0
index e9bbfacc35a6..93f391e67af1 100644
@@ -1138,6 +1138,7 @@ config ARM64_ERRATUM_3194386
 	  * ARM Neoverse-V1 erratum 3324341
 	  * ARM Neoverse V2 erratum 3324336
 	  * ARM Neoverse-V3 erratum 3312417
+	  * ARM Neoverse-V3AE erratum 3312417
 
 	  On affected cores "MSR SSBS, #0" instructions may not affect
 	  subsequent speculative instructions, which may permit unexepected
arch/arm64/include/asm/cputype.h +2 -0
index 661735616787..eaec55dd3dbe 100644
@@ -93,6 +93,7 @@
 #define ARM_CPU_PART_NEOVERSE_V2	0xD4F
 #define ARM_CPU_PART_CORTEX_A720	0xD81
 #define ARM_CPU_PART_CORTEX_X4		0xD82
+#define ARM_CPU_PART_NEOVERSE_V3AE	0xD83
 #define ARM_CPU_PART_NEOVERSE_V3	0xD84
 #define ARM_CPU_PART_CORTEX_X925	0xD85
 #define ARM_CPU_PART_CORTEX_A725	0xD87
@@ -182,6 +183,7 @@
 #define MIDR_NEOVERSE_V2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V2)
 #define MIDR_CORTEX_A720 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A720)
 #define MIDR_CORTEX_X4 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X4)
+#define MIDR_NEOVERSE_V3AE	MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V3AE)
 #define MIDR_NEOVERSE_V3 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V3)
 #define MIDR_CORTEX_X925 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X925)
 #define MIDR_CORTEX_A725 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A725)
arch/arm64/include/asm/sysreg.h +10 -1
index 6604fd6f33f4..9effb4b68208 100644
@@ -1231,10 +1231,19 @@
 	__val;								\
 })
 
+/*
+ * The "Z" constraint combined with the "%x0" template should be enough
+ * to force XZR generation if (v) is a constant 0 value but LLVM does not
+ * yet understand that modifier/constraint combo so a conditional is required
+ * to nudge the compiler into using XZR as a source for a 0 constant value.
+ */
 #define write_sysreg_s(v, r) do {					\
 	u64 __val = (u64)(v);						\
 	u32 __maybe_unused __check_r = (u32)(r);			\
-	asm volatile(__msr_s(r, "%x0") : : "rZ" (__val));		\
+	if (__builtin_constant_p(__val) && __val == 0)			\
+		asm volatile(__msr_s(r, "xzr"));			\
+	else								\
+		asm volatile(__msr_s(r, "%x0") : : "r" (__val));	\
 } while (0)
 
 /*
arch/arm64/kernel/cpu_errata.c +1 -0
index 59d723c9ab8f..21f86c160aab 100644
@@ -545,6 +545,7 @@ static const struct midr_range erratum_spec_ssbs_list[] = {
 	MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V1),
 	MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2),
 	MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3),
+	MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3AE),
 	{}
 };
 #endif
arch/arm64/kernel/entry-common.c +5 -3
index 2b0c5925502e..db116a62ac95 100644
@@ -832,6 +832,8 @@ static void noinstr el0_breakpt(struct pt_regs *regs, unsigned long esr)
 
 static void noinstr el0_softstp(struct pt_regs *regs, unsigned long esr)
 {
+	bool step_done;
+
 	if (!is_ttbr0_addr(regs->pc))
 		arm64_apply_bp_hardening();
 
@@ -842,10 +844,10 @@ static void noinstr el0_softstp(struct pt_regs *regs, unsigned long esr)
 	 * If we are stepping a suspended breakpoint there's nothing more to do:
 	 * the single-step is complete.
 	 */
-	if (!try_step_suspended_breakpoints(regs)) {
-		local_daif_restore(DAIF_PROCCTX);
+	step_done = try_step_suspended_breakpoints(regs);
+	local_daif_restore(DAIF_PROCCTX);
+	if (!step_done)
 		do_el0_softstep(esr, regs);
-	}
 	exit_to_user_mode(regs);
 }
 
arch/arm64/kvm/arm.c +6 -0
index bd6b6a620a09..3036df0cc201 100644
@@ -1789,6 +1789,9 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
 	case KVM_GET_VCPU_EVENTS: {
 		struct kvm_vcpu_events events;
 
+		if (!kvm_vcpu_initialized(vcpu))
+			return -ENOEXEC;
+
 		if (kvm_arm_vcpu_get_events(vcpu, &events))
 			return -EINVAL;
 
@@ -1800,6 +1803,9 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
 	case KVM_SET_VCPU_EVENTS: {
 		struct kvm_vcpu_events events;
 
+		if (!kvm_vcpu_initialized(vcpu))
+			return -ENOEXEC;
+
 		if (copy_from_user(&events, argp, sizeof(events)))
 			return -EFAULT;
 
arch/powerpc/kernel/fadump.c +3 -0
index 5782e743fd27..4ebc333dd786 100644
@@ -1747,6 +1747,9 @@ void __init fadump_setup_param_area(void)
 {
 	phys_addr_t range_start, range_end;
 
+	if (!fw_dump.fadump_enabled)
+		return;
+
 	if (!fw_dump.param_area_supported || fw_dump.dump_active)
 		return;
 
arch/riscv/kernel/probes/kprobes.c +9 -4
index c0738d6c6498..8723390c7cad 100644
@@ -49,10 +49,15 @@ static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs)
 	post_kprobe_handler(p, kcb, regs);
 }
 
-static bool __kprobes arch_check_kprobe(struct kprobe *p)
+static bool __kprobes arch_check_kprobe(unsigned long addr)
 {
-	unsigned long tmp  = (unsigned long)p->addr - p->offset;
-	unsigned long addr = (unsigned long)p->addr;
+	unsigned long tmp, offset;
+
+	/* start iterating at the closest preceding symbol */
+	if (!kallsyms_lookup_size_offset(addr, NULL, &offset))
+		return false;
+
+	tmp = addr - offset;
 
 	while (tmp <= addr) {
 		if (tmp == addr)
@@ -71,7 +76,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
 	if ((unsigned long)insn & 0x1)
 		return -EILSEQ;
 
-	if (!arch_check_kprobe(p))
+	if (!arch_check_kprobe((unsigned long)p->addr))
 		return -EILSEQ;
 
 	/* copy instruction */
arch/x86/kernel/cpu/amd.c +14 -2
index a6f88ca1a6b4..a11e17f3b4b1 100644
@@ -1338,11 +1338,23 @@ static __init int print_s5_reset_status_mmio(void)
 		return 0;
 
 	value = ioread32(addr);
-	iounmap(addr);
 
 	/* Value with "all bits set" is an error response and should be ignored. */
-	if (value == U32_MAX)
+	if (value == U32_MAX) {
+		iounmap(addr);
 		return 0;
+	}
+
+	/*
+	 * Clear all reason bits so they won't be retained if the next reset
+	 * does not update the register. Besides, some bits are never cleared by
+	 * hardware so it's software's responsibility to clear them.
+	 *
+	 * Writing the value back effectively clears all reason bits as they are
+	 * write-1-to-clear.
+	 */
+	iowrite32(value, addr);
+	iounmap(addr);
 
 	for (i = 0; i < ARRAY_SIZE(s5_reset_reason_txt); i++) {
 		if (!(value & BIT(i)))
arch/x86/kernel/cpu/resctrl/monitor.c +29 -15

66 lines not on this page · raw message

arch/x86/mm/tlb.c +22 -2
index 39f80111e6f1..5d221709353e 100644
@@ -911,11 +911,31 @@ void switch_mm_irqs_off(struct mm_struct *unused, struct mm_struct *next,
 		 * CR3 and cpu_tlbstate.loaded_mm are not all in sync.
 		 */
 		this_cpu_write(cpu_tlbstate.loaded_mm, LOADED_MM_SWITCHING);
-		barrier();
 
-		/* Start receiving IPIs and then read tlb_gen (and LAM below) */
+		/*
+		 * Make sure this CPU is set in mm_cpumask() such that we'll
+		 * receive invalidation IPIs.
+		 *
+		 * Rely on the smp_mb() implied by cpumask_set_cpu()'s atomic
+		 * operation, or explicitly provide one. Such that:
+		 *
+		 * switch_mm_irqs_off()				flush_tlb_mm_range()
+		 *   smp_store_release(loaded_mm, SWITCHING);     atomic64_inc_return(tlb_gen)
+		 *   smp_mb(); // here                            // smp_mb() implied
+		 *   atomic64_read(tlb_gen);                      this_cpu_read(loaded_mm);
+		 *
+		 * we properly order against flush_tlb_mm_range(), where the
+		 * loaded_mm load can happen in mative_flush_tlb_multi() ->
+		 * should_flush_tlb().
+		 *
+		 * This way switch_mm() must see the new tlb_gen or
+		 * flush_tlb_mm_range() must see the new loaded_mm, or both.
+		 */
 		if (next != &init_mm && !cpumask_test_cpu(cpu, mm_cpumask(next)))
 			cpumask_set_cpu(cpu, mm_cpumask(next));
+		else
+			smp_mb();
+
 		next_tlb_gen = atomic64_read(&next->context.tlb_gen);
 
 		ns = choose_new_asid(next, next_tlb_gen);
block/blk-cgroup.c +4 -9
index 7246fc256315..091e9623bc29 100644
@@ -812,8 +812,7 @@ int blkg_conf_open_bdev(struct blkg_conf_ctx *ctx)
 }
 /*
  * Similar to blkg_conf_open_bdev, but additionally freezes the queue,
- * acquires q->elevator_lock, and ensures the correct locking order
- * between q->elevator_lock and q->rq_qos_mutex.
+ * ensures the correct locking order between freeze queue and q->rq_qos_mutex.
  *
  * This function returns negative error on failure. On success it returns
  * memflags which must be saved and later passed to blkg_conf_exit_frozen
@@ -834,13 +833,11 @@ unsigned long __must_check blkg_conf_open_bdev_frozen(struct blkg_conf_ctx *ctx)
 	 * At this point, we haven’t started protecting anything related to QoS,
 	 * so we release q->rq_qos_mutex here, which was first acquired in blkg_
 	 * conf_open_bdev. Later, we re-acquire q->rq_qos_mutex after freezing
-	 * the queue and acquiring q->elevator_lock to maintain the correct
-	 * locking order.
+	 * the queue to maintain the correct locking order.
 	 */
 	mutex_unlock(&ctx->bdev->bd_queue->rq_qos_mutex);
 
 	memflags = blk_mq_freeze_queue(ctx->bdev->bd_queue);
-	mutex_lock(&ctx->bdev->bd_queue->elevator_lock);
 	mutex_lock(&ctx->bdev->bd_queue->rq_qos_mutex);
 
 	return memflags;
@@ -1002,9 +999,8 @@ void blkg_conf_exit(struct blkg_conf_ctx *ctx)
 EXPORT_SYMBOL_GPL(blkg_conf_exit);
 
 /*
- * Similar to blkg_conf_exit, but also unfreezes the queue and releases
- * q->elevator_lock. Should be used when blkg_conf_open_bdev_frozen
- * is used to open the bdev.
+ * Similar to blkg_conf_exit, but also unfreezes the queue. Should be used
+ * when blkg_conf_open_bdev_frozen is used to open the bdev.
  */
 void blkg_conf_exit_frozen(struct blkg_conf_ctx *ctx, unsigned long memflags)
 {
@@ -1012,7 +1008,6 @@ void blkg_conf_exit_frozen(struct blkg_conf_ctx *ctx, unsigned long memflags)
 		struct request_queue *q = ctx->bdev->bd_queue;
 
 		blkg_conf_exit(ctx);
-		mutex_unlock(&q->elevator_lock);
 		blk_mq_unfreeze_queue(q, memflags);
 	}
 }
block/blk-mq-sched.c +1 -1
index d06bb137a743..e0bed16485c3 100644
@@ -557,7 +557,7 @@ int blk_mq_init_sched(struct request_queue *q, struct elevator_type *e,
 	if (blk_mq_is_shared_tags(flags)) {
 		/* Shared tags are stored at index 0 in @et->tags. */
 		q->sched_shared_tags = et->tags[0];
-		blk_mq_tag_update_sched_shared_tags(q);
+		blk_mq_tag_update_sched_shared_tags(q, et->nr_requests);
 	}
 
 	queue_for_each_hw_ctx(q, hctx, i) {
block/blk-mq-tag.c +3 -2
index aed84c5d5c2b..12f48e7a0f77 100644
@@ -622,10 +622,11 @@ void blk_mq_tag_resize_shared_tags(struct blk_mq_tag_set *set, unsigned int size
 	sbitmap_queue_resize(&tags->bitmap_tags, size - set->reserved_tags);
 }
 
-void blk_mq_tag_update_sched_shared_tags(struct request_queue *q)
+void blk_mq_tag_update_sched_shared_tags(struct request_queue *q,
+					 unsigned int nr)
 {
 	sbitmap_queue_resize(&q->sched_shared_tags->bitmap_tags,
-			     q->nr_requests - q->tag_set->reserved_tags);
+			     nr - q->tag_set->reserved_tags);
 }
 
 /**
block/blk-mq.c +1 -1
index f8a8a23b9040..19f62b070ca9 100644
@@ -4942,7 +4942,7 @@ struct elevator_tags *blk_mq_update_nr_requests(struct request_queue *q,
 		 * tags can't grow, see blk_mq_alloc_sched_tags().
 		 */
 		if (q->elevator)
-			blk_mq_tag_update_sched_shared_tags(q);
+			blk_mq_tag_update_sched_shared_tags(q, nr);
 		else
 			blk_mq_tag_resize_shared_tags(set, nr);
 	} else if (!q->elevator) {
block/blk-mq.h +2 -1
index 6c9d03625ba1..2fdc8eeb4004 100644
@@ -188,7 +188,8 @@ int blk_mq_tag_update_depth(struct blk_mq_hw_ctx *hctx,
 		struct blk_mq_tags **tags, unsigned int depth);
 void blk_mq_tag_resize_shared_tags(struct blk_mq_tag_set *set,
 		unsigned int size);
-void blk_mq_tag_update_sched_shared_tags(struct request_queue *q);
+void blk_mq_tag_update_sched_shared_tags(struct request_queue *q,
+					 unsigned int nr);
 
 void blk_mq_tag_wakeup_all(struct blk_mq_tags *tags, bool);
 void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_tag_iter_fn *fn,
drivers/accel/qaic/qaic.h +2 -0
index c31081e42cee..820d133236dd 100644
@@ -97,6 +97,8 @@ struct dma_bridge_chan {
 	 * response queue's head and tail pointer of this DBC.
 	 */
 	void __iomem		*dbc_base;
+	/* Synchronizes access to Request queue's head and tail pointer */
+	struct mutex		req_lock;
 	/* Head of list where each node is a memory handle queued in request queue */
 	struct list_head	xfer_list;
 	/* Synchronizes DBC readers during cleanup */
drivers/accel/qaic/qaic_control.c +1 -1
index d8bdab69f800..b86a8e48e731 100644
@@ -407,7 +407,7 @@ static int find_and_map_user_pages(struct qaic_device *qdev,
 		return -EINVAL;
 	remaining = in_trans->size - resources->xferred_dma_size;
 	if (remaining == 0)
-		return 0;
+		return -EINVAL;
 
 	if (check_add_overflow(xfer_start_addr, remaining, &end))
 		return -EINVAL;
drivers/accel/qaic/qaic_data.c +10 -2
index 797289e9d780..c4f117edb266 100644
@@ -1356,13 +1356,17 @@ static int __qaic_execute_bo_ioctl(struct drm_device *dev, void *data, struct dr
 		goto release_ch_rcu;
 	}
 
+	ret = mutex_lock_interruptible(&dbc->req_lock);
+	if (ret)
+		goto release_ch_rcu;
+
 	head = readl(dbc->dbc_base + REQHP_OFF);
 	tail = readl(dbc->dbc_base + REQTP_OFF);
 
 	if (head == U32_MAX || tail == U32_MAX) {
 		/* PCI link error */
 		ret = -ENODEV;
-		goto release_ch_rcu;
+		goto unlock_req_lock;
 	}
 
 	queue_level = head <= tail ? tail - head : dbc->nelem - (head - tail);
@@ -1370,11 +1374,12 @@ static int __qaic_execute_bo_ioctl(struct drm_device *dev, void *data, struct dr
 	ret = send_bo_list_to_device(qdev, file_priv, exec, args->hdr.count, is_partial, dbc,
 				     head, &tail);
 	if (ret)
-		goto release_ch_rcu;
+		goto unlock_req_lock;
 
 	/* Finalize commit to hardware */
 	submit_ts = ktime_get_ns();
 	writel(tail, dbc->dbc_base + REQTP_OFF);
+	mutex_unlock(&dbc->req_lock);
 
 	update_profiling_data(file_priv, exec, args->hdr.count, is_partial, received_ts,
 			      submit_ts, queue_level);
@@ -1382,6 +1387,9 @@ static int __qaic_execute_bo_ioctl(struct drm_device *dev, void *data, struct dr
 	if (datapath_polling)
 		schedule_work(&dbc->poll_work);
 
+unlock_req_lock:
+	if (ret)
+		mutex_unlock(&dbc->req_lock);
 release_ch_rcu:
 	srcu_read_unlock(&dbc->ch_lock, rcu_id);
 unlock_dev_srcu:
drivers/accel/qaic/qaic_debugfs.c +3 -2
index a991b8198dc4..8dc4fe5bb560 100644
@@ -218,6 +218,9 @@ static int qaic_bootlog_mhi_probe(struct mhi_device *mhi_dev, const struct mhi_d
 	if (ret)
 		goto destroy_workqueue;
 
+	dev_set_drvdata(&mhi_dev->dev, qdev);
+	qdev->bootlog_ch = mhi_dev;
+
 	for (i = 0; i < BOOTLOG_POOL_SIZE; i++) {
 		msg = devm_kzalloc(&qdev->pdev->dev, sizeof(*msg), GFP_KERNEL);
 		if (!msg) {
@@ -233,8 +236,6 @@ static int qaic_bootlog_mhi_probe(struct mhi_device *mhi_dev, const struct mhi_d
 			goto mhi_unprepare;
 	}
 
-	dev_set_drvdata(&mhi_dev->dev, qdev);
-	qdev->bootlog_ch = mhi_dev;
 	return 0;
 
 mhi_unprepare:
drivers/accel/qaic/qaic_drv.c +3 -0
index e31bcb0ecfc9..e162f4b8a262 100644
@@ -454,6 +454,9 @@ static struct qaic_device *create_qdev(struct pci_dev *pdev,
 			return NULL;
 		init_waitqueue_head(&qdev->dbc[i].dbc_release);
 		INIT_LIST_HEAD(&qdev->dbc[i].bo_lists);
+		ret = drmm_mutex_init(drm, &qdev->dbc[i].req_lock);
+		if (ret)
+			return NULL;
 	}
 
 	return qdev;
drivers/ata/libata-core.c +4 -7
index ff53f5f029b4..2a210719c4ce 100644
@@ -2174,13 +2174,10 @@ static int ata_read_log_directory(struct ata_device *dev)
 	}
 
 	version = get_unaligned_le16(&dev->gp_log_dir[0]);
-	if (version != 0x0001) {
-		ata_dev_err(dev, "Invalid log directory version 0x%04x\n",
-			    version);
-		ata_clear_log_directory(dev);
-		dev->quirks |= ATA_QUIRK_NO_LOG_DIR;
-		return -EINVAL;
-	}
+	if (version != 0x0001)
+		ata_dev_warn_once(dev,
+				  "Invalid log directory version 0x%04x\n",
+				  version);
 
 	return 0;
 }
drivers/cxl/acpi.c +1 -1
index 712624cba2b6..87f0ed3f3f51 100644
@@ -345,7 +345,7 @@ static int cxl_acpi_set_cache_size(struct cxl_root_decoder *cxlrd)
 	struct resource res;
 	int nid, rc;
 
-	res = DEFINE_RES(start, size, 0);
+	res = DEFINE_RES_MEM(start, size);
 	nid = phys_to_target_node(start);
 
 	rc = hmat_get_extended_linear_cache_size(&res, nid, &cache_size);
drivers/cxl/core/features.c +3 -0
index 7c750599ea69..4bc484b46f43 100644
@@ -371,6 +371,9 @@ cxl_feature_info(struct cxl_features_state *cxlfs,
 {
 	struct cxl_feat_entry *feat;
 
+	if (!cxlfs || !cxlfs->entries)
+		return ERR_PTR(-EOPNOTSUPP);
+
 	for (int i = 0; i < cxlfs->entries->num_features; i++) {
 		feat = &cxlfs->entries->ent[i];
 		if (uuid_equal(uuid, &feat->uuid))
drivers/cxl/core/region.c +2 -5
index 71cc42d05248..be4521184328 100644
@@ -831,7 +831,7 @@ static int match_free_decoder(struct device *dev, const void *data)
 }
 
 static bool region_res_match_cxl_range(const struct cxl_region_params *p,
-				       struct range *range)
+				       const struct range *range)
 {
 	if (!p->res)
 		return false;
@@ -3287,10 +3287,7 @@ static int match_region_by_range(struct device *dev, const void *data)
 	p = &cxlr->params;
 
 	guard(rwsem_read)(&cxl_rwsem.region);
-	if (p->res && p->res->start == r->start && p->res->end == r->end)
-		return 1;
-
-	return 0;
+	return region_res_match_cxl_range(p, r);
 }
 
 static int cxl_extended_linear_cache_resize(struct cxl_region *cxlr,
drivers/cxl/core/trace.h +1 -1
index a53ec4798b12..a972e4ef1936 100644
@@ -1068,7 +1068,7 @@ TRACE_EVENT(cxl_poison,
 			__entry->hpa = cxl_dpa_to_hpa(cxlr, cxlmd,
 						      __entry->dpa);
 			if (__entry->hpa != ULLONG_MAX && cxlr->params.cache_size)
-				__entry->hpa_alias0 = __entry->hpa +
+				__entry->hpa_alias0 = __entry->hpa -
 						      cxlr->params.cache_size;
 			else
 				__entry->hpa_alias0 = ULLONG_MAX;
drivers/dpll/zl3073x/core.c +154 -74

279 lines not on this page · raw message

drivers/dpll/zl3073x/core.h +3 -0
index 71af2c800110..84e52d5521a3 100644
@@ -111,6 +111,9 @@ struct zl3073x_dev *zl3073x_devm_alloc(struct device *dev);
 int zl3073x_dev_probe(struct zl3073x_dev *zldev,
 		      const struct zl3073x_chip_info *chip_info);
 
+int zl3073x_dev_start(struct zl3073x_dev *zldev, bool full);
+void zl3073x_dev_stop(struct zl3073x_dev *zldev);
+
 /**********************
  * Registers operations
  **********************/
drivers/dpll/zl3073x/devlink.c +6 -12
index 7e7fe726ee37..c2e9f7aca3c8 100644
@@ -86,14 +86,12 @@ zl3073x_devlink_reload_down(struct devlink *devlink, bool netns_change,
 			    struct netlink_ext_ack *extack)
 {
 	struct zl3073x_dev *zldev = devlink_priv(devlink);
-	struct zl3073x_dpll *zldpll;
 
 	if (action != DEVLINK_RELOAD_ACTION_DRIVER_REINIT)
 		return -EOPNOTSUPP;
 
-	/* Unregister all DPLLs */
-	list_for_each_entry(zldpll, &zldev->dplls, list)
-		zl3073x_dpll_unregister(zldpll);
+	/* Stop normal operation */
+	zl3073x_dev_stop(zldev);
 
 	return 0;
 }
@@ -107,7 +105,6 @@ zl3073x_devlink_reload_up(struct devlink *devlink,
 {
 	struct zl3073x_dev *zldev = devlink_priv(devlink);
 	union devlink_param_value val;
-	struct zl3073x_dpll *zldpll;
 	int rc;
 
 	if (action != DEVLINK_RELOAD_ACTION_DRIVER_REINIT)
@@ -125,13 +122,10 @@ zl3073x_devlink_reload_up(struct devlink *devlink,
 		zldev->clock_id = val.vu64;
 	}
 
-	/* Re-register all DPLLs */
-	list_for_each_entry(zldpll, &zldev->dplls, list) {
-		rc = zl3073x_dpll_register(zldpll);
-		if (rc)
-			dev_warn(zldev->dev,
-				 "Failed to re-register DPLL%u\n", zldpll->id);
-	}
+	/* Restart normal operation */
+	rc = zl3073x_dev_start(zldev, false);
+	if (rc)
+		dev_warn(zldev->dev, "Failed to re-start normal operation\n");
 
 	*actions_performed = BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT);
 
drivers/dpll/zl3073x/regs.h +3 -0
index 614e33128a5c..bb9965b8e8c7 100644
@@ -67,6 +67,9 @@
  * Register Page 0, General
  **************************/
 
+#define ZL_REG_INFO				ZL_REG(0, 0x00, 1)
+#define ZL_INFO_READY				BIT(7)
+
 #define ZL_REG_ID				ZL_REG(0, 0x01, 2)
 #define ZL_REG_REVISION				ZL_REG(0, 0x03, 2)
 #define ZL_REG_FW_VER				ZL_REG(0, 0x05, 2)
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
index 930de203d533..2d0fea87af79 100644
@@ -84,7 +84,8 @@ amdgpu-y += \
 	vega20_reg_init.o nbio_v7_4.o nbio_v2_3.o nv.o arct_reg_init.o mxgpu_nv.o \
 	nbio_v7_2.o hdp_v4_0.o hdp_v5_0.o aldebaran_reg_init.o aldebaran.o soc21.o soc24.o \
 	sienna_cichlid.o smu_v13_0_10.o nbio_v4_3.o hdp_v6_0.o nbio_v7_7.o hdp_v5_2.o lsdma_v6_0.o \
-	nbio_v7_9.o aqua_vanjaram.o nbio_v7_11.o lsdma_v7_0.o hdp_v7_0.o nbif_v6_3_1.o
+	nbio_v7_9.o aqua_vanjaram.o nbio_v7_11.o lsdma_v7_0.o hdp_v7_0.o nbif_v6_3_1.o \
+	cyan_skillfish_reg_init.o
 
 # add DF block
 amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +2 -3
index d5f9d48bf884..902eac2c685f 100644
@@ -2325,10 +2325,9 @@ void amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel(struct kgd_mem *mem)
 int amdgpu_amdkfd_gpuvm_get_vm_fault_info(struct amdgpu_device *adev,
 					  struct kfd_vm_fault_info *mem)
 {
-	if (atomic_read(&adev->gmc.vm_fault_info_updated) == 1) {
+	if (atomic_read_acquire(&adev->gmc.vm_fault_info_updated) == 1) {
 		*mem = *adev->gmc.vm_fault_info;
-		mb(); /* make sure read happened */
-		atomic_set(&adev->gmc.vm_fault_info_updated, 0);
+		atomic_set_release(&adev->gmc.vm_fault_info_updated, 0);
 	}
 	return 0;
 }
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +47 -1

105 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
index dbbb3407fa13..65f4a76490ea 100644
@@ -2665,7 +2665,7 @@ static int amdgpu_pmops_thaw(struct device *dev)
 	struct drm_device *drm_dev = dev_get_drvdata(dev);
 
 	/* do not resume device if it's normal hibernation */
-	if (!pm_hibernate_is_recovering())
+	if (!pm_hibernate_is_recovering() && !pm_hibernation_mode_is_suspend())
 		return 0;
 
 	return amdgpu_device_resume(drm_dev, true);
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +45 -9

77 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -1
index 693357caa9a8..d9d7fc4c33cb 100644
@@ -2350,7 +2350,7 @@ static int psp_securedisplay_initialize(struct psp_context *psp)
 	}
 
 	ret = psp_ta_load(psp, &psp->securedisplay_context.context);
-	if (!ret) {
+	if (!ret && !psp->securedisplay_context.context.resp_status) {
 		psp->securedisplay_context.context.initialized = true;
 		mutex_init(&psp->securedisplay_context.mutex);
 	} else
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1 -1
index 8f6ce948c684..5ec5c3ff22bb 100644
@@ -811,7 +811,7 @@ int amdgpu_ring_reset_helper_end(struct amdgpu_ring *ring,
 	if (r)
 		return r;
 
-	/* signal the fence of the bad job */
+	/* signal the guilty fence and set an error on all fences from the context */
 	if (guilty_fence)
 		amdgpu_fence_driver_guilty_force_completion(guilty_fence);
 	/* Re-emit the non-guilty commands */
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1 -1
index 12783ea3ba0f..869b486168f3 100644
@@ -155,7 +155,7 @@ extern const struct drm_sched_backend_ops amdgpu_sched_ops;
 void amdgpu_fence_driver_clear_job_fences(struct amdgpu_ring *ring);
 void amdgpu_fence_driver_set_error(struct amdgpu_ring *ring, int error);
 void amdgpu_fence_driver_force_completion(struct amdgpu_ring *ring);
-void amdgpu_fence_driver_guilty_force_completion(struct amdgpu_fence *fence);
+void amdgpu_fence_driver_guilty_force_completion(struct amdgpu_fence *af);
 void amdgpu_fence_save_wptr(struct dma_fence *fence);
 
 int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring);
drivers/gpu/drm/amd/amdgpu/cyan_skillfish_reg_init.c new file +56 -0

56 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +3 -4
index a8d5795084fc..cf30d3332050 100644
@@ -1066,7 +1066,7 @@ static int gmc_v7_0_sw_init(struct amdgpu_ip_block *ip_block)
 					GFP_KERNEL);
 	if (!adev->gmc.vm_fault_info)
 		return -ENOMEM;
-	atomic_set(&adev->gmc.vm_fault_info_updated, 0);
+	atomic_set_release(&adev->gmc.vm_fault_info_updated, 0);
 
 	return 0;
 }
@@ -1288,7 +1288,7 @@ static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev,
 	vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
 			     VMID);
 	if (amdgpu_amdkfd_is_kfd_vmid(adev, vmid)
-		&& !atomic_read(&adev->gmc.vm_fault_info_updated)) {
+		&& !atomic_read_acquire(&adev->gmc.vm_fault_info_updated)) {
 		struct kfd_vm_fault_info *info = adev->gmc.vm_fault_info;
 		u32 protections = REG_GET_FIELD(status,
 					VM_CONTEXT1_PROTECTION_FAULT_STATUS,
@@ -1304,8 +1304,7 @@ static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev,
 		info->prot_read = protections & 0x8 ? true : false;
 		info->prot_write = protections & 0x10 ? true : false;
 		info->prot_exec = protections & 0x20 ? true : false;
-		mb();
-		atomic_set(&adev->gmc.vm_fault_info_updated, 1);
+		atomic_set_release(&adev->gmc.vm_fault_info_updated, 1);
 	}
 
 	return 0;
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +3 -4
index b45fa0cea9d2..0d4c93ff6f74 100644
@@ -1179,7 +1179,7 @@ static int gmc_v8_0_sw_init(struct amdgpu_ip_block *ip_block)
 					GFP_KERNEL);
 	if (!adev->gmc.vm_fault_info)
 		return -ENOMEM;
-	atomic_set(&adev->gmc.vm_fault_info_updated, 0);
+	atomic_set_release(&adev->gmc.vm_fault_info_updated, 0);
 
 	return 0;
 }
@@ -1474,7 +1474,7 @@ static int gmc_v8_0_process_interrupt(struct amdgpu_device *adev,
 	vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
 			     VMID);
 	if (amdgpu_amdkfd_is_kfd_vmid(adev, vmid)
-		&& !atomic_read(&adev->gmc.vm_fault_info_updated)) {
+		&& !atomic_read_acquire(&adev->gmc.vm_fault_info_updated)) {
 		struct kfd_vm_fault_info *info = adev->gmc.vm_fault_info;
 		u32 protections = REG_GET_FIELD(status,
 					VM_CONTEXT1_PROTECTION_FAULT_STATUS,
@@ -1490,8 +1490,7 @@ static int gmc_v8_0_process_interrupt(struct amdgpu_device *adev,
 		info->prot_read = protections & 0x8 ? true : false;
 		info->prot_write = protections & 0x10 ? true : false;
 		info->prot_exec = protections & 0x20 ? true : false;
-		mb();
-		atomic_set(&adev->gmc.vm_fault_info_updated, 1);
+		atomic_set_release(&adev->gmc.vm_fault_info_updated, 1);
 	}
 
 	return 0;
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +6 -1
index 39caac14d5fe..1622b1cd6f2e 100644
@@ -225,7 +225,12 @@ static int mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
 			pipe, x_pkt->header.opcode);
 
 	r = amdgpu_fence_wait_polling(ring, seq, timeout);
-	if (r < 1 || !*status_ptr) {
+
+	/*
+	 * status_ptr[31:0] == 0 (fail) or status_ptr[63:0] == 1 (success).
+	 * If status_ptr[31:0] == 0 then status_ptr[63:32] will have debug error information.
+	 */
+	if (r < 1 || !(lower_32_bits(*status_ptr))) {
 
 		if (misc_op_str)
 			dev_err(adev->dev, "MES(%d) failed to respond to msg=%s (%s)\n",
drivers/gpu/drm/amd/amdgpu/nv.h +1 -0
index 83e9782aef39..8f4817404f10 100644
@@ -31,5 +31,6 @@ extern const struct amdgpu_ip_block_version nv_common_ip_block;
 void nv_grbm_select(struct amdgpu_device *adev,
 		    u32 me, u32 pipe, u32 queue, u32 vmid);
 void nv_set_virt_ops(struct amdgpu_device *adev);
+int cyan_skillfish_reg_base_init(struct amdgpu_device *adev);
 
 #endif
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -8
index 58c4e57abc9e..163780030eb1 100644
@@ -2041,8 +2041,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
 	dc_hardware_init(adev->dm.dc);
 
-	adev->dm.restore_backlight = true;
-
 	adev->dm.hpd_rx_offload_wq = hpd_rx_irq_create_workqueue(adev);
 	if (!adev->dm.hpd_rx_offload_wq) {
 		drm_err(adev_to_drm(adev), "failed to create hpd rx offload workqueue.\n");
@@ -3405,7 +3403,6 @@ static int dm_resume(struct amdgpu_ip_block *ip_block)
 		dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D0);
 
 		dc_resume(dm->dc);
-		adev->dm.restore_backlight = true;
 
 		amdgpu_dm_irq_resume_early(adev);
 
@@ -9836,6 +9833,7 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_state *state,
 	bool mode_set_reset_required = false;
 	u32 i;
 	struct dc_commit_streams_params params = {dc_state->streams, dc_state->stream_count};
+	bool set_backlight_level = false;
 
 	/* Disable writeback */
 	for_each_old_connector_in_state(state, connector, old_con_state, i) {
@@ -9955,6 +9953,7 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_state *state,
 			acrtc->hw_mode = new_crtc_state->mode;
 			crtc->hwmode = new_crtc_state->mode;
 			mode_set_reset_required = true;
+			set_backlight_level = true;
 		} else if (modereset_required(new_crtc_state)) {
 			drm_dbg_atomic(dev,
 				       "Atomic commit: RESET. crtc id %d:[%p]\n",
@@ -10011,16 +10010,13 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_state *state,
 	 * to fix a flicker issue.
 	 * It will cause the dm->actual_brightness is not the current panel brightness
 	 * level. (the dm->brightness is the correct panel level)
-	 * So we set the backlight level with dm->brightness value after initial
-	 * set mode. Use restore_backlight flag to avoid setting backlight level
-	 * for every subsequent mode set.
+	 * So we set the backlight level with dm->brightness value after set mode
 	 */
-	if (dm->restore_backlight) {
+	if (set_backlight_level) {
 		for (i = 0; i < dm->num_of_edps; i++) {
 			if (dm->backlight_dev[i])
 				amdgpu_dm_backlight_set_level(dm, i, dm->brightness[i]);
 		}
-		dm->restore_backlight = false;
 	}
 }
 
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +0 -7
index 6aae51c1beb3..b937da0a4e4a 100644
@@ -610,13 +610,6 @@ struct amdgpu_display_manager {
 	 */
 	u32 actual_brightness[AMDGPU_DM_MAX_NUM_EDP];
 
-	/**
-	 * @restore_backlight:
-	 *
-	 * Flag to indicate whether to restore backlight after modeset.
-	 */
-	bool restore_backlight;
-
 	/**
 	 * @aux_hpd_discon_quirk:
 	 *
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c +1 -2
index 8da882c51856..9b28c0728269 100644
@@ -5444,8 +5444,7 @@ static int smu7_get_thermal_temperature_range(struct pp_hwmgr *hwmgr,
 		thermal_data->max = table_info->cac_dtp_table->usSoftwareShutdownTemp *
 			PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
 	else if (hwmgr->pp_table_version == PP_TABLE_V0)
-		thermal_data->max = data->thermal_temp_setting.temperature_shutdown *
-			PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
+		thermal_data->max = data->thermal_temp_setting.temperature_shutdown;
 
 	thermal_data->sw_ctf_threshold = thermal_data->max;
 
drivers/gpu/drm/bridge/lontium-lt9211.c +1 -2
index 399fa7eebd49..03fc8fd10f20 100644
@@ -121,8 +121,7 @@ static int lt9211_read_chipid(struct lt9211 *ctx)
 	}
 
 	/* Test for known Chip ID. */
-	if (chipid[0] != REG_CHIPID0_VALUE || chipid[1] != REG_CHIPID1_VALUE ||
-	    chipid[2] != REG_CHIPID2_VALUE) {
+	if (chipid[0] != REG_CHIPID0_VALUE || chipid[1] != REG_CHIPID1_VALUE) {
 		dev_err(ctx->dev, "Unknown Chip ID: 0x%02x 0x%02x 0x%02x\n",
 			chipid[0], chipid[1], chipid[2]);
 		return -EINVAL;
drivers/gpu/drm/drm_draw.c +1 -1
index 9dc0408fbbea..5b956229c82f 100644
@@ -127,7 +127,7 @@ EXPORT_SYMBOL(drm_draw_fill16);
 
 void drm_draw_fill24(struct iosys_map *dmap, unsigned int dpitch,
 		     unsigned int height, unsigned int width,
-		     u16 color)
+		     u32 color)
 {
 	unsigned int y, x;
 
drivers/gpu/drm/drm_draw_internal.h +1 -1
index f121ee7339dc..20cb404e23ea 100644
@@ -47,7 +47,7 @@ void drm_draw_fill16(struct iosys_map *dmap, unsigned int dpitch,
 
 void drm_draw_fill24(struct iosys_map *dmap, unsigned int dpitch,
 		     unsigned int height, unsigned int width,
-		     u16 color);
+		     u32 color);
 
 void drm_draw_fill32(struct iosys_map *dmap, unsigned int dpitch,
 		     unsigned int height, unsigned int width,
drivers/gpu/drm/i915/display/intel_fb.c +20 -18
index 0da842bd2f2f..974e5b547d88 100644
@@ -2111,10 +2111,10 @@ static void intel_user_framebuffer_destroy(struct drm_framebuffer *fb)
 	if (intel_fb_uses_dpt(fb))
 		intel_dpt_destroy(intel_fb->dpt_vm);
 
-	intel_frontbuffer_put(intel_fb->frontbuffer);
-
 	intel_fb_bo_framebuffer_fini(intel_fb_bo(fb));
 
+	intel_frontbuffer_put(intel_fb->frontbuffer);
+
 	kfree(intel_fb);
 }
 
@@ -2216,15 +2216,17 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 	int ret = -EINVAL;
 	int i;
 
+	/*
+	 * intel_frontbuffer_get() must be done before
+	 * intel_fb_bo_framebuffer_init() to avoid set_tiling vs. addfb race.
+	 */
+	intel_fb->frontbuffer = intel_frontbuffer_get(obj);
+	if (!intel_fb->frontbuffer)
+		return -ENOMEM;
+
 	ret = intel_fb_bo_framebuffer_init(fb, obj, mode_cmd);
 	if (ret)
-		return ret;
-
-	intel_fb->frontbuffer = intel_frontbuffer_get(obj);
-	if (!intel_fb->frontbuffer) {
-		ret = -ENOMEM;
-		goto err;
-	}
+		goto err_frontbuffer_put;
 
 	ret = -EINVAL;
 	if (!drm_any_plane_has_format(display->drm,
@@ -2233,7 +2235,7 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 		drm_dbg_kms(display->drm,
 			    "unsupported pixel format %p4cc / modifier 0x%llx\n",
 			    &mode_cmd->pixel_format, mode_cmd->modifier[0]);
-		goto err_frontbuffer_put;
+		goto err_bo_framebuffer_fini;
 	}
 
 	max_stride = intel_fb_max_stride(display, mode_cmd->pixel_format,
@@ -2244,7 +2246,7 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 			    mode_cmd->modifier[0] != DRM_FORMAT_MOD_LINEAR ?
 			    "tiled" : "linear",
 			    mode_cmd->pitches[0], max_stride);
-		goto err_frontbuffer_put;
+		goto err_bo_framebuffer_fini;
 	}
 
 	/* FIXME need to adjust LINOFF/TILEOFF accordingly. */
@@ -2252,7 +2254,7 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 		drm_dbg_kms(display->drm,
 			    "plane 0 offset (0x%08x) must be 0\n",
 			    mode_cmd->offsets[0]);
-		goto err_frontbuffer_put;
+		goto err_bo_framebuffer_fini;
 	}
 
 	drm_helper_mode_fill_fb_struct(display->drm, fb, info, mode_cmd);
@@ -2262,7 +2264,7 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 
 		if (mode_cmd->handles[i] != mode_cmd->handles[0]) {
 			drm_dbg_kms(display->drm, "bad plane %d handle\n", i);
-			goto err_frontbuffer_put;
+			goto err_bo_framebuffer_fini;
 		}
 
 		stride_alignment = intel_fb_stride_alignment(fb, i);
@@ -2270,7 +2272,7 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 			drm_dbg_kms(display->drm,
 				    "plane %d pitch (%d) must be at least %u byte aligned\n",
 				    i, fb->pitches[i], stride_alignment);
-			goto err_frontbuffer_put;
+			goto err_bo_framebuffer_fini;
 		}
 
 		if (intel_fb_is_gen12_ccs_aux_plane(fb, i)) {
@@ -2280,7 +2282,7 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 				drm_dbg_kms(display->drm,
 					    "ccs aux plane %d pitch (%d) must be %d\n",
 					    i, fb->pitches[i], ccs_aux_stride);
-				goto err_frontbuffer_put;
+				goto err_bo_framebuffer_fini;
 			}
 		}
 
@@ -2289,7 +2291,7 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 
 	ret = intel_fill_fb_info(display, intel_fb);
 	if (ret)
-		goto err_frontbuffer_put;
+		goto err_bo_framebuffer_fini;
 
 	if (intel_fb_uses_dpt(fb)) {
 		struct i915_address_space *vm;
@@ -2315,10 +2317,10 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 err_free_dpt:
 	if (intel_fb_uses_dpt(fb))
 		intel_dpt_destroy(intel_fb->dpt_vm);
+err_bo_framebuffer_fini:
+	intel_fb_bo_framebuffer_fini(obj);
 err_frontbuffer_put:
 	intel_frontbuffer_put(intel_fb->frontbuffer);
-err:
-	intel_fb_bo_framebuffer_fini(obj);
 	return ret;
 }
 
drivers/gpu/drm/i915/display/intel_frontbuffer.c +9 -1
index 43be5377ddc1..73ed28ac9573 100644
@@ -270,6 +270,8 @@ static void frontbuffer_release(struct kref *ref)
 	spin_unlock(&display->fb_tracking.lock);
 
 	i915_active_fini(&front->write);
+
+	drm_gem_object_put(obj);
 	kfree_rcu(front, rcu);
 }
 
@@ -287,6 +289,8 @@ intel_frontbuffer_get(struct drm_gem_object *obj)
 	if (!front)
 		return NULL;
 
+	drm_gem_object_get(obj);
+
 	front->obj = obj;
 	kref_init(&front->ref);
 	atomic_set(&front->bits, 0);
@@ -299,8 +303,12 @@ intel_frontbuffer_get(struct drm_gem_object *obj)
 	spin_lock(&display->fb_tracking.lock);
 	cur = intel_bo_set_frontbuffer(obj, front);
 	spin_unlock(&display->fb_tracking.lock);
-	if (cur != front)
+
+	if (cur != front) {
+		drm_gem_object_put(obj);
 		kfree(front);
+	}
+
 	return cur;
 }
 
drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.h +0 -2
index b6dc3d1b9bb1..b682969e3a29 100644
@@ -89,12 +89,10 @@ i915_gem_object_set_frontbuffer(struct drm_i915_gem_object *obj,
 
 	if (!front) {
 		RCU_INIT_POINTER(obj->frontbuffer, NULL);
-		drm_gem_object_put(intel_bo_to_drm_bo(obj));
 	} else if (rcu_access_pointer(obj->frontbuffer)) {
 		cur = rcu_dereference_protected(obj->frontbuffer, true);
 		kref_get(&cur->ref);
 	} else {
-		drm_gem_object_get(intel_bo_to_drm_bo(obj));
 		rcu_assign_pointer(obj->frontbuffer, front);
 	}
 
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c +8 -1
index 0d5197c0824a..5cf3a516ccfb 100644
@@ -1324,9 +1324,16 @@ static int ct_receive(struct intel_guc_ct *ct)
 
 static void ct_try_receive_message(struct intel_guc_ct *ct)
 {
+	struct intel_guc *guc = ct_to_guc(ct);
 	int ret;
 
-	if (GEM_WARN_ON(!ct->enabled))
+	if (!ct->enabled) {
+		GEM_WARN_ON(!guc_to_gt(guc)->uc.reset_in_progress);
+		return;
+	}
+
+	/* When interrupt disabled, message handling is not expected */
+	if (!guc->interrupts.enabled)
 		return;
 
 	ret = ct_receive(ct);
drivers/gpu/drm/panthor/panthor_fw.c +1 -0
index 36f1034839c2..44a995835188 100644
@@ -1099,6 +1099,7 @@ void panthor_fw_pre_reset(struct panthor_device *ptdev, bool on_hang)
 	}
 
 	panthor_job_irq_suspend(&ptdev->fw->irq);
+	panthor_fw_stop(ptdev);
 }
 
 /**
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +1 -1
index b50927a824b4..7ec7bea5e38e 100644
@@ -1031,7 +1031,7 @@ static int vop2_plane_atomic_check(struct drm_plane *plane,
 		return format;
 
 	if (drm_rect_width(src) >> 16 < 4 || drm_rect_height(src) >> 16 < 4 ||
-	    drm_rect_width(dest) < 4 || drm_rect_width(dest) < 4) {
+	    drm_rect_width(dest) < 4 || drm_rect_height(dest) < 4) {
 		drm_err(vop2->drm, "Invalid size: %dx%d->%dx%d, min size is 4x4\n",
 			drm_rect_width(src) >> 16, drm_rect_height(src) >> 16,
 			drm_rect_width(dest), drm_rect_height(dest));
drivers/gpu/drm/scheduler/sched_main.c +7 -6
index e2cda28a1af4..5193be67b28e 100644
@@ -986,13 +986,14 @@ int drm_sched_job_add_resv_dependencies(struct drm_sched_job *job,
 	dma_resv_assert_held(resv);
 
 	dma_resv_for_each_fence(&cursor, resv, usage, fence) {
-		/* Make sure to grab an additional ref on the added fence */
-		dma_fence_get(fence);
-		ret = drm_sched_job_add_dependency(job, fence);
-		if (ret) {
-			dma_fence_put(fence);
+		/*
+		 * As drm_sched_job_add_dependency always consumes the fence
+		 * reference (even when it fails), and dma_resv_for_each_fence
+		 * is not obtaining one, we need to grab one before calling.
+		 */
+		ret = drm_sched_job_add_dependency(job, dma_fence_get(fence));
+		if (ret)
 			return ret;
-		}
 	}
 	return 0;
 }
drivers/gpu/drm/xe/display/xe_fb_pin.c +3 -2
index c38fba18effe..f2cfba674899 100644
@@ -16,6 +16,7 @@
 #include "xe_device.h"
 #include "xe_ggtt.h"
 #include "xe_pm.h"
+#include "xe_vram_types.h"
 
 static void
 write_dpt_rotated(struct xe_bo *bo, struct iosys_map *map, u32 *dpt_ofs, u32 bo_ofs,
@@ -289,7 +290,7 @@ static struct i915_vma *__xe_pin_fb_vma(const struct intel_framebuffer *fb,
 	if (IS_DGFX(to_xe_device(bo->ttm.base.dev)) &&
 	    intel_fb_rc_ccs_cc_plane(&fb->base) >= 0 &&
 	    !(bo->flags & XE_BO_FLAG_NEEDS_CPU_ACCESS)) {
-		struct xe_tile *tile = xe_device_get_root_tile(xe);
+		struct xe_vram_region *vram = xe_device_get_root_tile(xe)->mem.vram;
 
 		/*
 		 * If we need to able to access the clear-color value stored in
@@ -297,7 +298,7 @@ static struct i915_vma *__xe_pin_fb_vma(const struct intel_framebuffer *fb,
 		 * accessible.  This is important on small-bar systems where
 		 * only some subset of VRAM is CPU accessible.
 		 */
-		if (tile->mem.vram.io_size < tile->mem.vram.usable_size) {
+		if (xe_vram_region_io_size(vram) < xe_vram_region_usable_size(vram)) {
 			ret = -EINVAL;
 			goto err;
 		}
drivers/gpu/drm/xe/display/xe_plane_initial.c +2 -1
index dcbc4b2d3fd9..b2d27458def5 100644
@@ -21,6 +21,7 @@
 #include "intel_plane.h"
 #include "intel_plane_initial.h"
 #include "xe_bo.h"
+#include "xe_vram_types.h"
 #include "xe_wa.h"
 
 #include <generated/xe_wa_oob.h>
@@ -103,7 +104,7 @@ initial_plane_bo(struct xe_device *xe,
 		 * We don't currently expect this to ever be placed in the
 		 * stolen portion.
 		 */
-		if (phys_base >= tile0->mem.vram.usable_size) {
+		if (phys_base >= xe_vram_region_usable_size(tile0->mem.vram)) {
 			drm_err(&xe->drm,
 				"Initial plane programming using invalid range, phys_base=%pa\n",
 				&phys_base);
drivers/gpu/drm/xe/regs/xe_gt_regs.h +1 -0
index 5cd5ab8529c5..9994887fc73f 100644
@@ -342,6 +342,7 @@
 #define POWERGATE_ENABLE			XE_REG(0xa210)
 #define   RENDER_POWERGATE_ENABLE		REG_BIT(0)
 #define   MEDIA_POWERGATE_ENABLE		REG_BIT(1)
+#define   MEDIA_SAMPLERS_POWERGATE_ENABLE	REG_BIT(2)
 #define   VDN_HCP_POWERGATE_ENABLE(n)		REG_BIT(3 + 2 * (n))
 #define   VDN_MFXVDENC_POWERGATE_ENABLE(n)	REG_BIT(4 + 2 * (n))
 
drivers/gpu/drm/xe/xe_assert.h +3 -1
index 68fe70ce2be3..a818eaa05b7d 100644
@@ -12,6 +12,7 @@
 
 #include "xe_gt_types.h"
 #include "xe_step.h"
+#include "xe_vram.h"
 
 /**
  * DOC: Xe Asserts
@@ -145,7 +146,8 @@
 	const struct xe_tile *__tile = (tile);							\
 	char __buf[10] __maybe_unused;								\
 	xe_assert_msg(tile_to_xe(__tile), condition, "tile: %u VRAM %s\n" msg,			\
-		      __tile->id, ({ string_get_size(__tile->mem.vram.actual_physical_size, 1,	\
+		      __tile->id, ({ string_get_size(						\
+				     xe_vram_region_actual_physical_size(__tile->mem.vram), 1,	\
 				     STRING_UNITS_2, __buf, sizeof(__buf)); __buf; }), ## arg);	\
 })
 
drivers/gpu/drm/xe/xe_bo.c +1 -0
index bae7ff2e5927..50c79049ccea 100644
@@ -36,6 +36,7 @@
 #include "xe_trace_bo.h"
 #include "xe_ttm_stolen_mgr.h"
 #include "xe_vm.h"
+#include "xe_vram_types.h"
 
 const char *const xe_mem_type_to_name[TTM_NUM_MEM_TYPES]  = {
 	[XE_PL_SYSTEM] = "system",
drivers/gpu/drm/xe/xe_bo.h +3 -1
index 9ce94d252015..cfb1ec266a6d 100644
@@ -12,6 +12,7 @@
 #include "xe_macros.h"
 #include "xe_vm_types.h"
 #include "xe_vm.h"
+#include "xe_vram_types.h"
 
 #define XE_DEFAULT_GTT_SIZE_MB          3072ULL /* 3GB by default */
 
@@ -23,8 +24,9 @@
 #define XE_BO_FLAG_VRAM_MASK		(XE_BO_FLAG_VRAM0 | XE_BO_FLAG_VRAM1)
 /* -- */
 #define XE_BO_FLAG_STOLEN		BIT(4)
+#define XE_BO_FLAG_VRAM(vram)		(XE_BO_FLAG_VRAM0 << ((vram)->id))
 #define XE_BO_FLAG_VRAM_IF_DGFX(tile)	(IS_DGFX(tile_to_xe(tile)) ? \
-					 XE_BO_FLAG_VRAM0 << (tile)->id : \
+					 XE_BO_FLAG_VRAM((tile)->mem.vram) : \
 					 XE_BO_FLAG_SYSTEM)
 #define XE_BO_FLAG_GGTT			BIT(5)
 #define XE_BO_FLAG_IGNORE_MIN_PAGE_SIZE BIT(6)
drivers/gpu/drm/xe/xe_bo_evict.c +0 -8
index d5dbc51e8612..bc5b4c5fab81 100644
@@ -182,7 +182,6 @@ int xe_bo_evict_all(struct xe_device *xe)
 
 static int xe_bo_restore_and_map_ggtt(struct xe_bo *bo)
 {
-	struct xe_device *xe = xe_bo_device(bo);
 	int ret;
 
 	ret = xe_bo_restore_pinned(bo);
@@ -201,13 +200,6 @@ static int xe_bo_restore_and_map_ggtt(struct xe_bo *bo)
 		}
 	}
 
-	/*
-	 * We expect validate to trigger a move VRAM and our move code
-	 * should setup the iosys map.
-	 */
-	xe_assert(xe, !(bo->flags & XE_BO_FLAG_PINNED_LATE_RESTORE) ||
-		  !iosys_map_is_null(&bo->vmap));
-
 	return 0;
 }
 
drivers/gpu/drm/xe/xe_bo_types.h +1 -0
index ff560d82496f..57d34698139e 100644
@@ -9,6 +9,7 @@
 #include <linux/iosys-map.h>
 
 #include <drm/drm_gpusvm.h>
+#include <drm/drm_pagemap.h>
 #include <drm/ttm/ttm_bo.h>
 #include <drm/ttm/ttm_device.h>
 #include <drm/ttm/ttm_placement.h>
drivers/gpu/drm/xe/xe_device.c +21 -1
index 6ece4defa9df..1c9907b8a4e9 100644
@@ -64,6 +64,7 @@
 #include "xe_ttm_sys_mgr.h"
 #include "xe_vm.h"
 #include "xe_vram.h"
+#include "xe_vram_types.h"
 #include "xe_vsec.h"
 #include "xe_wait_user_fence.h"
 #include "xe_wa.h"
@@ -688,6 +689,21 @@ static void sriov_update_device_info(struct xe_device *xe)
 	}
 }
 
+static int xe_device_vram_alloc(struct xe_device *xe)
+{
+	struct xe_vram_region *vram;
+
+	if (!IS_DGFX(xe))
+		return 0;
+
+	vram = drmm_kzalloc(&xe->drm, sizeof(*vram), GFP_KERNEL);
+	if (!vram)
+		return -ENOMEM;
+
+	xe->mem.vram = vram;
+	return 0;
+}
+
 /**
  * xe_device_probe_early: Device early probe
  * @xe: xe device instance
@@ -735,6 +751,10 @@ int xe_device_probe_early(struct xe_device *xe)
 
 	xe->wedged.mode = xe_modparam.wedged_mode;
 
+	err = xe_device_vram_alloc(xe);
+	if (err)
+		return err;
+
 	return 0;
 }
 ALLOW_ERROR_INJECTION(xe_device_probe_early, ERRNO); /* See xe_pci_probe() */
@@ -1029,7 +1049,7 @@ void xe_device_l2_flush(struct xe_device *xe)
 	spin_lock(&gt->global_invl_lock);
 
 	xe_mmio_write32(&gt->mmio, XE2_GLOBAL_INVAL, 0x1);
-	if (xe_mmio_wait32(&gt->mmio, XE2_GLOBAL_INVAL, 0x1, 0x0, 500, NULL, true))
+	if (xe_mmio_wait32(&gt->mmio, XE2_GLOBAL_INVAL, 0x1, 0x0, 1000, NULL, true))
 		xe_gt_err_once(gt, "Global invalidation timeout\n");
 
 	spin_unlock(&gt->global_invl_lock);
drivers/gpu/drm/xe/xe_device_types.h +3 -59

98 lines not on this page · raw message

drivers/gpu/drm/xe/xe_gt_idle.c +8 -0
index ffb210216aa9..9bd197da6027 100644
@@ -124,6 +124,9 @@ void xe_gt_idle_enable_pg(struct xe_gt *gt)
 	if (xe_gt_is_main_type(gt))
 		gtidle->powergate_enable |= RENDER_POWERGATE_ENABLE;
 
+	if (MEDIA_VERx100(xe) >= 1100 && MEDIA_VERx100(xe) < 1255)
+		gtidle->powergate_enable |= MEDIA_SAMPLERS_POWERGATE_ENABLE;
+
 	if (xe->info.platform != XE_DG1) {
 		for (i = XE_HW_ENGINE_VCS0, j = 0; i <= XE_HW_ENGINE_VCS7; ++i, ++j) {
 			if ((gt->info.engine_mask & BIT(i)))
@@ -246,6 +249,11 @@ int xe_gt_idle_pg_print(struct xe_gt *gt, struct drm_printer *p)
 				drm_printf(p, "Media Slice%d Power Gate Status: %s\n", n,
 					   str_up_down(pg_status & media_slices[n].status_bit));
 	}
+
+	if (MEDIA_VERx100(xe) >= 1100 && MEDIA_VERx100(xe) < 1255)
+		drm_printf(p, "Media Samplers Power Gating Enabled: %s\n",
+			   str_yes_no(pg_enabled & MEDIA_SAMPLERS_POWERGATE_ENABLE));
+
 	return 0;
 }
 
drivers/gpu/drm/xe/xe_gt_pagefault.c +8 -5
index 5a75d56d8558..ab43dec52776 100644
@@ -23,6 +23,7 @@
 #include "xe_svm.h"
 #include "xe_trace_bo.h"
 #include "xe_vm.h"
+#include "xe_vram_types.h"
 
 struct pagefault {
 	u64 page_addr;
@@ -74,7 +75,7 @@ static bool vma_is_valid(struct xe_tile *tile, struct xe_vma *vma)
 }
 
 static int xe_pf_begin(struct drm_exec *exec, struct xe_vma *vma,
-		       bool atomic, unsigned int id)
+		       bool atomic, struct xe_vram_region *vram)
 {
 	struct xe_bo *bo = xe_vma_bo(vma);
 	struct xe_vm *vm = xe_vma_vm(vma);
@@ -84,14 +85,16 @@ static int xe_pf_begin(struct drm_exec *exec, struct xe_vma *vma,
 	if (err)
 		return err;
 
-	if (atomic && IS_DGFX(vm->xe)) {
+	if (atomic && vram) {
+		xe_assert(vm->xe, IS_DGFX(vm->xe));
+
 		if (xe_vma_is_userptr(vma)) {
 			err = -EACCES;
 			return err;
 		}
 
 		/* Migrate to VRAM, move should invalidate the VMA first */
-		err = xe_bo_migrate(bo, XE_PL_VRAM0 + id);
+		err = xe_bo_migrate(bo, vram->placement);
 		if (err)
 			return err;
 	} else if (bo) {
@@ -138,7 +141,7 @@ static int handle_vma_pagefault(struct xe_gt *gt, struct xe_vma *vma,
 	/* Lock VM and BOs dma-resv */
 	drm_exec_init(&exec, 0, 0);
 	drm_exec_until_all_locked(&exec) {
-		err = xe_pf_begin(&exec, vma, atomic, tile->id);
+		err = xe_pf_begin(&exec, vma, atomic, tile->mem.vram);
 		drm_exec_retry_on_contention(&exec);
 		if (xe_vm_validate_should_retry(&exec, err, &end))
 			err = -EAGAIN;
@@ -573,7 +576,7 @@ static int handle_acc(struct xe_gt *gt, struct acc *acc)
 	/* Lock VM and BOs dma-resv */
 	drm_exec_init(&exec, 0, 0);
 	drm_exec_until_all_locked(&exec) {
-		ret = xe_pf_begin(&exec, vma, true, tile->id);
+		ret = xe_pf_begin(&exec, vma, true, tile->mem.vram);
 		drm_exec_retry_on_contention(&exec);
 		if (ret)
 			break;
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +2 -1
index d84831a03610..61a357946fe1 100644
@@ -33,6 +33,7 @@
 #include "xe_migrate.h"
 #include "xe_sriov.h"
 #include "xe_ttm_vram_mgr.h"
+#include "xe_vram_types.h"
 #include "xe_wopcm.h"
 
 #define make_u64_from_u32(hi, lo) ((u64)((u64)(u32)(hi) << 32 | (u32)(lo)))
@@ -1604,7 +1605,7 @@ static u64 pf_query_free_lmem(struct xe_gt *gt)
 {
 	struct xe_tile *tile = gt->tile;
 
-	return xe_ttm_vram_get_avail(&tile->mem.vram.ttm.manager);
+	return xe_ttm_vram_get_avail(&tile->mem.vram->ttm.manager);
 }
 
 static u64 pf_query_max_lmem(struct xe_gt *gt)
drivers/gpu/drm/xe/xe_guc_submit.c +12 -1
index 0104afbc941c..439725fc4fe6 100644
@@ -44,6 +44,7 @@
 #include "xe_ring_ops_types.h"
 #include "xe_sched_job.h"
 #include "xe_trace.h"
+#include "xe_uc_fw.h"
 #include "xe_vm.h"
 
 static struct xe_guc *
@@ -1413,7 +1414,17 @@ static void __guc_exec_queue_process_msg_cleanup(struct xe_sched_msg *msg)
 	xe_gt_assert(guc_to_gt(guc), !(q->flags & EXEC_QUEUE_FLAG_PERMANENT));
 	trace_xe_exec_queue_cleanup_entity(q);
 
-	if (exec_queue_registered(q))
+	/*
+	 * Expected state transitions for cleanup:
+	 * - If the exec queue is registered and GuC firmware is running, we must first
+	 *   disable scheduling and deregister the queue to ensure proper teardown and
+	 *   resource release in the GuC, then destroy the exec queue on driver side.
+	 * - If the GuC is already stopped (e.g., during driver unload or GPU reset),
+	 *   we cannot expect a response for the deregister request. In this case,
+	 *   it is safe to directly destroy the exec queue on driver side, as the GuC
+	 *   will not process further requests and all resources must be cleaned up locally.
+	 */
+	if (exec_queue_registered(q) && xe_uc_fw_is_running(&guc->fw))
 		disable_scheduling_deregister(guc, q);
 	else
 		__guc_exec_queue_destroy(guc, q);
drivers/gpu/drm/xe/xe_migrate.c +14 -11
index 84f412fd3c5d..13e287e03709 100644
@@ -34,6 +34,7 @@
 #include "xe_sync.h"
 #include "xe_trace_bo.h"
 #include "xe_vm.h"
+#include "xe_vram.h"
 
 /**
  * struct xe_migrate - migrate context.
@@ -130,34 +131,36 @@ static u64 xe_migrate_vram_ofs(struct xe_device *xe, u64 addr, bool is_comp_pte)
 	u64 identity_offset = IDENTITY_OFFSET;
 
 	if (GRAPHICS_VER(xe) >= 20 && is_comp_pte)
-		identity_offset += DIV_ROUND_UP_ULL(xe->mem.vram.actual_physical_size, SZ_1G);
+		identity_offset += DIV_ROUND_UP_ULL(xe_vram_region_actual_physical_size
+							(xe->mem.vram), SZ_1G);
 
-	addr -= xe->mem.vram.dpa_base;
+	addr -= xe_vram_region_dpa_base(xe->mem.vram);
 	return addr + (identity_offset << xe_pt_shift(2));
 }
 
 static void xe_migrate_program_identity(struct xe_device *xe, struct xe_vm *vm, struct xe_bo *bo,
 					u64 map_ofs, u64 vram_offset, u16 pat_index, u64 pt_2m_ofs)
 {
+	struct xe_vram_region *vram = xe->mem.vram;
+	resource_size_t dpa_base = xe_vram_region_dpa_base(vram);
 	u64 pos, ofs, flags;
 	u64 entry;
 	/* XXX: Unclear if this should be usable_size? */
-	u64 vram_limit =  xe->mem.vram.actual_physical_size +
-		xe->mem.vram.dpa_base;
+	u64 vram_limit = xe_vram_region_actual_physical_size(vram) + dpa_base;
 	u32 level = 2;
 
 	ofs = map_ofs + XE_PAGE_SIZE * level + vram_offset * 8;
 	flags = vm->pt_ops->pte_encode_addr(xe, 0, pat_index, level,
 					    true, 0);
 
-	xe_assert(xe, IS_ALIGNED(xe->mem.vram.usable_size, SZ_2M));
+	xe_assert(xe, IS_ALIGNED(xe_vram_region_usable_size(vram), SZ_2M));
 
 	/*
 	 * Use 1GB pages when possible, last chunk always use 2M
 	 * pages as mixing reserved memory (stolen, WOCPM) with a single
 	 * mapping is not allowed on certain platforms.
 	 */
-	for (pos = xe->mem.vram.dpa_base; pos < vram_limit;
+	for (pos = dpa_base; pos < vram_limit;
 	     pos += SZ_1G, ofs += 8) {
 		if (pos + SZ_1G >= vram_limit) {
 			entry = vm->pt_ops->pde_encode_bo(bo, pt_2m_ofs,
@@ -307,11 +310,11 @@ static int xe_migrate_prepare_vm(struct xe_tile *tile, struct xe_migrate *m,
 	/* Identity map the entire vram at 256GiB offset */
 	if (IS_DGFX(xe)) {
 		u64 pt30_ofs = xe_bo_size(bo) - 2 * XE_PAGE_SIZE;
+		resource_size_t actual_phy_size = xe_vram_region_actual_physical_size(xe->mem.vram);
 
 		xe_migrate_program_identity(xe, vm, bo, map_ofs, IDENTITY_OFFSET,
 					    pat_index, pt30_ofs);
-		xe_assert(xe, xe->mem.vram.actual_physical_size <=
-					(MAX_NUM_PTE - IDENTITY_OFFSET) * SZ_1G);
+		xe_assert(xe, actual_phy_size <= (MAX_NUM_PTE - IDENTITY_OFFSET) * SZ_1G);
 
 		/*
 		 * Identity map the entire vram for compressed pat_index for xe2+
@@ -320,11 +323,11 @@ static int xe_migrate_prepare_vm(struct xe_tile *tile, struct xe_migrate *m,
 		if (GRAPHICS_VER(xe) >= 20 && xe_device_has_flat_ccs(xe)) {
 			u16 comp_pat_index = xe->pat.idx[XE_CACHE_NONE_COMPRESSION];
 			u64 vram_offset = IDENTITY_OFFSET +
-				DIV_ROUND_UP_ULL(xe->mem.vram.actual_physical_size, SZ_1G);
+				DIV_ROUND_UP_ULL(actual_phy_size, SZ_1G);
 			u64 pt31_ofs = xe_bo_size(bo) - XE_PAGE_SIZE;
 
-			xe_assert(xe, xe->mem.vram.actual_physical_size <= (MAX_NUM_PTE -
-						IDENTITY_OFFSET - IDENTITY_OFFSET / 2) * SZ_1G);
+			xe_assert(xe, actual_phy_size <= (MAX_NUM_PTE - IDENTITY_OFFSET -
+							  IDENTITY_OFFSET / 2) * SZ_1G);
 			xe_migrate_program_identity(xe, vm, bo, map_ofs, vram_offset,
 						    comp_pat_index, pt31_ofs);
 		}
drivers/gpu/drm/xe/xe_pci.c +8 -0
index 3c40ef426f0c..6c2637fc8f1a 100644
@@ -687,6 +687,8 @@ static int xe_info_init(struct xe_device *xe,
 	 * All of these together determine the overall GT count.
 	 */
 	for_each_tile(tile, xe, id) {
+		int err;
+
 		gt = tile->primary_gt;
 		gt->info.type = XE_GT_TYPE_MAIN;
 		gt->info.id = tile->id * xe->info.max_gt_per_tile;
@@ -694,6 +696,10 @@ static int xe_info_init(struct xe_device *xe,
 		gt->info.engine_mask = graphics_desc->hw_engine_mask;
 		xe->info.gt_count++;
 
+		err = xe_tile_alloc_vram(tile);
+		if (err)
+			return err;
+
 		if (MEDIA_VER(xe) < 13 && media_desc)
 			gt->info.engine_mask |= media_desc->hw_engine_mask;
 
@@ -799,6 +805,8 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (err)
 		return err;
 
+	xe_vram_resize_bar(xe);
+
 	err = xe_device_probe_early(xe);
 	/*
 	 * In Boot Survivability mode, no drm card is exposed and driver
drivers/gpu/drm/xe/xe_query.c +3 -2
index 83fe77ce62f7..f2a3d4ced068 100644
@@ -27,6 +27,7 @@
 #include "xe_oa.h"
 #include "xe_pxp.h"
 #include "xe_ttm_vram_mgr.h"
+#include "xe_vram_types.h"
 #include "xe_wa.h"
 
 static const u16 xe_to_user_engine_class[] = {
@@ -334,7 +335,7 @@ static int query_config(struct xe_device *xe, struct drm_xe_device_query *query)
 	config->num_params = num_params;
 	config->info[DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID] =
 		xe->info.devid | (xe->info.revid << 16);
-	if (xe_device_get_root_tile(xe)->mem.vram.usable_size)
+	if (xe->mem.vram)
 		config->info[DRM_XE_QUERY_CONFIG_FLAGS] |=
 			DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM;
 	if (xe->info.has_usm && IS_ENABLED(CONFIG_DRM_XE_GPUSVM))
@@ -407,7 +408,7 @@ static int query_gt_list(struct xe_device *xe, struct drm_xe_device_query *query
 			gt_list->gt_list[iter].near_mem_regions = 0x1;
 		else
 			gt_list->gt_list[iter].near_mem_regions =
-				BIT(gt_to_tile(gt)->id) << 1;
+				BIT(gt_to_tile(gt)->mem.vram->id) << 1;
 		gt_list->gt_list[iter].far_mem_regions = xe->info.mem_region_mask ^
 			gt_list->gt_list[iter].near_mem_regions;
 
drivers/gpu/drm/xe/xe_svm.c +27 -36

171 lines not on this page · raw message

drivers/gpu/drm/xe/xe_tile.c +37 -21

92 lines not on this page · raw message

drivers/gpu/drm/xe/xe_tile.h +2 -12
index cc33e8733983..dceb6297aa01 100644
@@ -14,19 +14,9 @@ int xe_tile_init_early(struct xe_tile *tile, struct xe_device *xe, u8 id);
 int xe_tile_init_noalloc(struct xe_tile *tile);
 int xe_tile_init(struct xe_tile *tile);
 
-void xe_tile_migrate_wait(struct xe_tile *tile);
+int xe_tile_alloc_vram(struct xe_tile *tile);
 
-#if IS_ENABLED(CONFIG_DRM_XE_PAGEMAP)
-static inline struct drm_pagemap *xe_tile_local_pagemap(struct xe_tile *tile)
-{
-	return &tile->mem.vram.dpagemap;
-}
-#else
-static inline struct drm_pagemap *xe_tile_local_pagemap(struct xe_tile *tile)
-{
-	return NULL;
-}
-#endif
+void xe_tile_migrate_wait(struct xe_tile *tile);
 
 static inline bool xe_tile_is_root(struct xe_tile *tile)
 {
drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c +6 -4
index d9c9d2547aad..9a9733447230 100644
@@ -25,6 +25,7 @@
 #include "xe_ttm_stolen_mgr.h"
 #include "xe_ttm_vram_mgr.h"
 #include "xe_wa.h"
+#include "xe_vram.h"
 
 struct xe_ttm_stolen_mgr {
 	struct xe_ttm_vram_mgr base;
@@ -82,15 +83,16 @@ static u32 get_wopcm_size(struct xe_device *xe)
 
 static s64 detect_bar2_dgfx(struct xe_device *xe, struct xe_ttm_stolen_mgr *mgr)
 {
-	struct xe_tile *tile = xe_device_get_root_tile(xe);
+	struct xe_vram_region *tile_vram = xe_device_get_root_tile(xe)->mem.vram;
+	resource_size_t tile_io_start = xe_vram_region_io_start(tile_vram);
 	struct xe_mmio *mmio = xe_root_tile_mmio(xe);
 	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
 	u64 stolen_size, wopcm_size;
 	u64 tile_offset;
 	u64 tile_size;
 
-	tile_offset = tile->mem.vram.io_start - xe->mem.vram.io_start;
-	tile_size = tile->mem.vram.actual_physical_size;
+	tile_offset = tile_io_start - xe_vram_region_io_start(xe->mem.vram);
+	tile_size = xe_vram_region_actual_physical_size(tile_vram);
 
 	/* Use DSM base address instead for stolen memory */
 	mgr->stolen_base = (xe_mmio_read64_2x32(mmio, DSMBASE) & BDSM_MASK) - tile_offset;
@@ -107,7 +109,7 @@ static s64 detect_bar2_dgfx(struct xe_device *xe, struct xe_ttm_stolen_mgr *mgr)
 
 	/* Verify usage fits in the actual resource available */
 	if (mgr->stolen_base + stolen_size <= pci_resource_len(pdev, LMEM_BAR))
-		mgr->io_base = tile->mem.vram.io_start + mgr->stolen_base;
+		mgr->io_base = tile_io_start + mgr->stolen_base;
 
 	/*
 	 * There may be few KB of platform dependent reserved memory at the end
drivers/gpu/drm/xe/xe_ttm_vram_mgr.c +15 -7
index 9e375a40aee9..9175b4a2214b 100644
@@ -15,6 +15,7 @@
 #include "xe_gt.h"
 #include "xe_res_cursor.h"
 #include "xe_ttm_vram_mgr.h"
+#include "xe_vram_types.h"
 
 static inline struct drm_buddy_block *
 xe_ttm_vram_mgr_first_block(struct list_head *list)
@@ -337,13 +338,20 @@ int __xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_ttm_vram_mgr *mgr,
 	return drmm_add_action_or_reset(&xe->drm, ttm_vram_mgr_fini, mgr);
 }
 
-int xe_ttm_vram_mgr_init(struct xe_tile *tile, struct xe_ttm_vram_mgr *mgr)
+/**
+ * xe_ttm_vram_mgr_init - initialize TTM VRAM region
+ * @xe: pointer to Xe device
+ * @vram: pointer to xe_vram_region that contains the memory region attributes
+ *
+ * Initialize the Xe TTM for given @vram region using the given parameters.
+ *
+ * Returns 0 for success, negative error code otherwise.
+ */
+int xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_vram_region *vram)
 {
-	struct xe_device *xe = tile_to_xe(tile);
-	struct xe_vram_region *vram = &tile->mem.vram;
-
-	return __xe_ttm_vram_mgr_init(xe, mgr, XE_PL_VRAM0 + tile->id,
-				      vram->usable_size, vram->io_size,
+	return __xe_ttm_vram_mgr_init(xe, &vram->ttm, vram->placement,
+				      xe_vram_region_usable_size(vram),
+				      xe_vram_region_io_size(vram),
 				      PAGE_SIZE);
 }
 
@@ -392,7 +400,7 @@ int xe_ttm_vram_mgr_alloc_sgt(struct xe_device *xe,
 	 */
 	xe_res_first(res, offset, length, &cursor);
 	for_each_sgtable_sg((*sgt), sg, i) {
-		phys_addr_t phys = cursor.start + tile->mem.vram.io_start;
+		phys_addr_t phys = cursor.start + xe_vram_region_io_start(tile->mem.vram);
 		size_t size = min_t(u64, cursor.size, SZ_2G);
 		dma_addr_t addr;
 
drivers/gpu/drm/xe/xe_ttm_vram_mgr.h +2 -1
index cc76050e376d..87b7fae5edba 100644
@@ -11,11 +11,12 @@
 enum dma_data_direction;
 struct xe_device;
 struct xe_tile;
+struct xe_vram_region;
 
 int __xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_ttm_vram_mgr *mgr,
 			   u32 mem_type, u64 size, u64 io_size,
 			   u64 default_page_size);
-int xe_ttm_vram_mgr_init(struct xe_tile *tile, struct xe_ttm_vram_mgr *mgr);
+int xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_vram_region *vram);
 int xe_ttm_vram_mgr_alloc_sgt(struct xe_device *xe,
 			      struct ttm_resource *res,
 			      u64 offset, u64 length,
drivers/gpu/drm/xe/xe_vm.c +23 -9
index 5146999d27fa..bf44cd5bf49c 100644
@@ -2894,7 +2894,7 @@ static void vm_bind_ioctl_ops_unwind(struct xe_vm *vm,
 }
 
 static int vma_lock_and_validate(struct drm_exec *exec, struct xe_vma *vma,
-				 bool validate)
+				 bool res_evict, bool validate)
 {
 	struct xe_bo *bo = xe_vma_bo(vma);
 	struct xe_vm *vm = xe_vma_vm(vma);
@@ -2905,7 +2905,8 @@ static int vma_lock_and_validate(struct drm_exec *exec, struct xe_vma *vma,
 			err = drm_exec_lock_obj(exec, &bo->ttm.base);
 		if (!err && validate)
 			err = xe_bo_validate(bo, vm,
-					     !xe_vm_in_preempt_fence_mode(vm));
+					     !xe_vm_in_preempt_fence_mode(vm) &&
+					     res_evict);
 	}
 
 	return err;
@@ -2978,14 +2979,23 @@ static int prefetch_ranges(struct xe_vm *vm, struct xe_vma_op *op)
 }
 
 static int op_lock_and_prep(struct drm_exec *exec, struct xe_vm *vm,
-			    struct xe_vma_op *op)
+			    struct xe_vma_ops *vops, struct xe_vma_op *op)
 {
 	int err = 0;
+	bool res_evict;
+
+	/*
+	 * We only allow evicting a BO within the VM if it is not part of an
+	 * array of binds, as an array of binds can evict another BO within the
+	 * bind.
+	 */
+	res_evict = !(vops->flags & XE_VMA_OPS_ARRAY_OF_BINDS);
 
 	switch (op->base.op) {
 	case DRM_GPUVA_OP_MAP:
 		if (!op->map.invalidate_on_bind)
 			err = vma_lock_and_validate(exec, op->map.vma,
+						    res_evict,
 						    !xe_vm_in_fault_mode(vm) ||
 						    op->map.immediate);
 		break;
@@ -2996,11 +3006,13 @@ static int op_lock_and_prep(struct drm_exec *exec, struct xe_vm *vm,
 
 		err = vma_lock_and_validate(exec,
 					    gpuva_to_vma(op->base.remap.unmap->va),
-					    false);
+					    res_evict, false);
 		if (!err && op->remap.prev)
-			err = vma_lock_and_validate(exec, op->remap.prev, true);
+			err = vma_lock_and_validate(exec, op->remap.prev,
+						    res_evict, true);
 		if (!err && op->remap.next)
-			err = vma_lock_and_validate(exec, op->remap.next, true);
+			err = vma_lock_and_validate(exec, op->remap.next,
+						    res_evict, true);
 		break;
 	case DRM_GPUVA_OP_UNMAP:
 		err = check_ufence(gpuva_to_vma(op->base.unmap.va));
@@ -3009,7 +3021,7 @@ static int op_lock_and_prep(struct drm_exec *exec, struct xe_vm *vm,
 
 		err = vma_lock_and_validate(exec,
 					    gpuva_to_vma(op->base.unmap.va),
-					    false);
+					    res_evict, false);
 		break;
 	case DRM_GPUVA_OP_PREFETCH:
 	{
@@ -3025,7 +3037,7 @@ static int op_lock_and_prep(struct drm_exec *exec, struct xe_vm *vm,
 
 		err = vma_lock_and_validate(exec,
 					    gpuva_to_vma(op->base.prefetch.va),
-					    false);
+					    res_evict, false);
 		if (!err && !xe_vma_has_no_bo(vma))
 			err = xe_bo_migrate(xe_vma_bo(vma),
 					    region_to_mem_type[region]);
@@ -3069,7 +3081,7 @@ static int vm_bind_ioctl_ops_lock_and_prep(struct drm_exec *exec,
 		return err;
 
 	list_for_each_entry(op, &vops->list, link) {
-		err = op_lock_and_prep(exec, vm, op);
+		err = op_lock_and_prep(exec, vm, vops, op);
 		if (err)
 			return err;
 	}
@@ -3698,6 +3710,8 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
 	}
 
 	xe_vma_ops_init(&vops, vm, q, syncs, num_syncs);
+	if (args->num_binds > 1)
+		vops.flags |= XE_VMA_OPS_ARRAY_OF_BINDS;
 	for (i = 0; i < args->num_binds; ++i) {
 		u64 range = bind_ops[i].range;
 		u64 addr = bind_ops[i].addr;
drivers/gpu/drm/xe/xe_vm_types.h +2 -0
index 6058cf739388..f6616d595999 100644
@@ -467,6 +467,8 @@ struct xe_vma_ops {
 	struct xe_vm_pgtable_update_ops pt_update_ops[XE_MAX_TILES_PER_DEVICE];
 	/** @flag: signify the properties within xe_vma_ops*/
 #define XE_VMA_OPS_FLAG_HAS_SVM_PREFETCH BIT(0)
+#define XE_VMA_OPS_FLAG_MADVISE          BIT(1)
+#define XE_VMA_OPS_ARRAY_OF_BINDS	 BIT(2)
 	u32 flags;
 #ifdef TEST_VM_OPS_ERROR
 	/** @inject_error: inject error to test error handling */
drivers/gpu/drm/xe/xe_vram.c +176 -67

331 lines not on this page · raw message

drivers/gpu/drm/xe/xe_vram.h +12 -0
index e31cc04ec0db..13505cfb184d 100644
@@ -6,8 +6,20 @@
 #ifndef _XE_VRAM_H_
 #define _XE_VRAM_H_
 
+#include <linux/types.h>
+
 struct xe_device;
+struct xe_vram_region;
 
+void xe_vram_resize_bar(struct xe_device *xe);
 int xe_vram_probe(struct xe_device *xe);
 
+struct xe_vram_region *xe_vram_region_alloc(struct xe_device *xe, u8 id, u32 placement);
+
+resource_size_t xe_vram_region_io_start(const struct xe_vram_region *vram);
+resource_size_t xe_vram_region_io_size(const struct xe_vram_region *vram);
+resource_size_t xe_vram_region_dpa_base(const struct xe_vram_region *vram);
+resource_size_t xe_vram_region_usable_size(const struct xe_vram_region *vram);
+resource_size_t xe_vram_region_actual_physical_size(const struct xe_vram_region *vram);
+
 #endif
drivers/gpu/drm/xe/xe_vram_types.h new file +85 -0

85 lines not on this page · raw message

drivers/hid/hid-input.c +4 -1
index f45f856a127f..2c743e35c1d3 100644
@@ -622,7 +622,10 @@ static void hidinput_update_battery(struct hid_device *dev, unsigned int usage,
 		return;
 	}
 
-	if (value == 0 || value < dev->battery_min || value > dev->battery_max)
+	if ((usage & HID_USAGE_PAGE) == HID_UP_DIGITIZER && value == 0)
+		return;
+
+	if (value < dev->battery_min || value > dev->battery_max)
 		return;
 
 	capacity = hidinput_scale_battery_capacity(dev, value);
drivers/hid/hid-multitouch.c +15 -13
index 22c6314a8843..a9ff84f0bd9b 100644
@@ -92,9 +92,8 @@ enum report_mode {
 	TOUCHPAD_REPORT_ALL = TOUCHPAD_REPORT_BUTTONS | TOUCHPAD_REPORT_CONTACTS,
 };
 
-#define MT_IO_FLAGS_RUNNING		0
-#define MT_IO_FLAGS_ACTIVE_SLOTS	1
-#define MT_IO_FLAGS_PENDING_SLOTS	2
+#define MT_IO_SLOTS_MASK		GENMASK(7, 0) /* reserve first 8 bits for slot tracking */
+#define MT_IO_FLAGS_RUNNING		32
 
 static const bool mtrue = true;		/* default for true */
 static const bool mfalse;		/* default for false */
@@ -169,7 +168,11 @@ struct mt_device {
 	struct mt_class mtclass;	/* our mt device class */
 	struct timer_list release_timer;	/* to release sticky fingers */
 	struct hid_device *hdev;	/* hid_device we're attached to */
-	unsigned long mt_io_flags;	/* mt flags (MT_IO_FLAGS_*) */
+	unsigned long mt_io_flags;	/* mt flags (MT_IO_FLAGS_RUNNING)
+					 * first 8 bits are reserved for keeping the slot
+					 * states, this is fine because we only support up
+					 * to 250 slots (MT_MAX_MAXCONTACT)
+					 */
 	__u8 inputmode_value;	/* InputMode HID feature value */
 	__u8 maxcontacts;
 	bool is_buttonpad;	/* is this device a button pad? */
@@ -977,6 +980,7 @@ static void mt_release_pending_palms(struct mt_device *td,
 
 	for_each_set_bit(slotnum, app->pending_palm_slots, td->maxcontacts) {
 		clear_bit(slotnum, app->pending_palm_slots);
+		clear_bit(slotnum, &td->mt_io_flags);
 
 		input_mt_slot(input, slotnum);
 		input_mt_report_slot_inactive(input);
@@ -1008,12 +1012,6 @@ static void mt_sync_frame(struct mt_device *td, struct mt_application *app,
 
 	app->num_received = 0;
 	app->left_button_state = 0;
-
-	if (test_bit(MT_IO_FLAGS_ACTIVE_SLOTS, &td->mt_io_flags))
-		set_bit(MT_IO_FLAGS_PENDING_SLOTS, &td->mt_io_flags);
-	else
-		clear_bit(MT_IO_FLAGS_PENDING_SLOTS, &td->mt_io_flags);
-	clear_bit(MT_IO_FLAGS_ACTIVE_SLOTS, &td->mt_io_flags);
 }
 
 static int mt_compute_timestamp(struct mt_application *app, __s32 value)
@@ -1188,7 +1186,9 @@ static int mt_process_slot(struct mt_device *td, struct input_dev *input,
 		input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, major);
 		input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR, minor);
 
-		set_bit(MT_IO_FLAGS_ACTIVE_SLOTS, &td->mt_io_flags);
+		set_bit(slotnum, &td->mt_io_flags);
+	} else {
+		clear_bit(slotnum, &td->mt_io_flags);
 	}
 
 	return 0;
@@ -1323,7 +1323,7 @@ static void mt_touch_report(struct hid_device *hid,
 	 * defect.
 	 */
 	if (app->quirks & MT_QUIRK_STICKY_FINGERS) {
-		if (test_bit(MT_IO_FLAGS_PENDING_SLOTS, &td->mt_io_flags))
+		if (td->mt_io_flags & MT_IO_SLOTS_MASK)
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c +1 -2
index e6ba2ddcc9cb..16f780bc879b 100644

Lines of this file are not shown. View the raw message.

drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c +93 -133

226 lines not on this page · raw message

drivers/net/can/m_can/m_can.c +36 -26

62 lines not on this page · raw message

drivers/net/can/m_can/m_can_platform.c +1 -1
index b832566efda0..057eaa7b8b4b 100644

Lines of this file are not shown. View the raw message.

drivers/net/can/usb/gs_usb.c +11 -12
index c9482d6e947b..69b8d6da651b 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/airoha/airoha_eth.c +15 -1
index 6d23c5c049b9..ffb10c758c29 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/amd/xgbe/xgbe-drv.c +0 -1
index 2e9b95a94f89..2ad672c17eec 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +1 -0
index 1a37ec45e650..7675bb98f029 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/broadcom/tg3.c +1 -4
index b4dc93a48718..8b64e4667c21 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/dlink/dl2k.c +16 -7
index 1996d2e4e3e2..7077d705e471 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/google/gve/gve.h +2 -0
index bceaf9b05cb4..4cc6dcbfd367 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/google/gve/gve_desc_dqo.h +2 -1
index d17da841b5a0..f7786b03c744 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/google/gve/gve_rx_dqo.c +12 -6
index 7380c2b7a2d8..02e25be8a50d 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/idpf/idpf_ptp.c +3 -0
index ee21f2ff0cad..63a41e688733 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c +1 -0
index 4f1fb0cefe51..688a6f4e0acc 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -1
index 6218bdb7f941..86b9caece104 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/ixgbevf/defines.h +1 -0
index a9bc96f6399d..e177d1d58696 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/ixgbevf/ipsec.c +10 -0
index 65580b9cb06f..fce35924ff8b 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/ixgbevf/ixgbevf.h +7 -0
index 3a379e6a3a2a..039187607e98 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +33 -1
index 535d0f71f521..1ecfbbb95210 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/ixgbevf/mbx.h +8 -0
index 835bbcc5cc8e..a8ed23ee66aa 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/intel/ixgbevf/vf.c +150 -32

182 lines not on this page · raw message

drivers/net/ethernet/intel/ixgbevf/vf.h +1 -0
index 2d791bc26ae4..4f19b8900c29 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/marvell/octeontx2/af/cgx.c +1 -0
index 69324ae09397..31310018c3ca 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/mediatek/mtk_wed.c +6 -2
index 0a80d8f8cff7..16aa7e4138d3 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/realtek/r8169_main.c +3 -2
index 9c601f271c02..4b0ac73565ea 100644

Lines of this file are not shown. View the raw message.

drivers/net/netdevsim/netdev.c +7 -0
index 0178219f0db5..d7938e11f24d 100644

Lines of this file are not shown. View the raw message.

drivers/net/phy/broadcom.c +19 -1
index a60e58ef90c4..6884eaccc3e1 100644

Lines of this file are not shown. View the raw message.

drivers/net/phy/realtek/realtek_main.c +11 -12
index dd0d675149ad..64af3b96f028 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/lan78xx.c +11 -8
index d75502ebbc0d..e0c425779e67 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/r8152.c +6 -1
index 44cba7acfe7d..a22d4bb2cf3b 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/usbnet.c +2 -0
index 511c4154cf74..bf01f2728531 100644

Lines of this file are not shown. View the raw message.

drivers/nvme/host/auth.c +5 -1
index 012fcfc79a73..a01178caf15b 100644

Lines of this file are not shown. View the raw message.

drivers/nvme/host/multipath.c +4 -2
index 3da980dc60d9..543e17aead12 100644

Lines of this file are not shown. View the raw message.

drivers/nvme/host/tcp.c +3 -0
index 1413788ca7d5..9a96df1a511c 100644

Lines of this file are not shown. View the raw message.

drivers/pci/controller/vmd.c +13 -0
index 1bd5bf4a6097..b4b62b9ccc45 100644

Lines of this file are not shown. View the raw message.

drivers/phy/cadence/cdns-dphy.c +99 -32

131 lines not on this page · raw message

drivers/usb/gadget/function/f_acm.c +19 -23

42 lines not on this page · raw message

drivers/usb/gadget/function/f_ecm.c +20 -28

48 lines not on this page · raw message

drivers/usb/gadget/function/f_ncm.c +33 -45

78 lines not on this page · raw message

drivers/usb/gadget/function/f_rndis.c +35 -50

85 lines not on this page · raw message

drivers/usb/gadget/udc/core.c +3 -0
index d709e24c1fd4..e3d63b8fa0f4 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/extent_io.c +1 -1
index e6d2557ac37b..a1566df45be9 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/free-space-tree.c +8 -7
index eba7f22ae49c..a29c2ac60aef 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/ioctl.c +1 -1
index 7e13de2bdcbf..155e11d2faa8 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/relocation.c +7 -6
index 7256f6748c8f..63baae5383e1 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/super.c +1 -2
index b06b8f325537..fcc7ecbb4945 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/zoned.c +1 -1
index f426276e2b6b..87c5dd3ad016 100644

Lines of this file are not shown. View the raw message.

fs/coredump.c +1 -1
index 60bc9685e149..c5e9a855502d 100644

Lines of this file are not shown. View the raw message.

fs/dax.c +1 -1
index 20ecf652c129..260e063e3bc2 100644

Lines of this file are not shown. View the raw message.

fs/dcache.c +2 -0
index 60046ae23d51..c11d87810fba 100644

Lines of this file are not shown. View the raw message.

fs/exec.c +1 -1
index e861a4b7ffda..a69a2673f631 100644

Lines of this file are not shown. View the raw message.

fs/ext4/ext4_jbd2.c +9 -2
index b3e9b7bd7978..a0e66bc10093 100644

Lines of this file are not shown. View the raw message.

fs/ext4/inode.c +8 -0
index f9e4ac87211e..e99306a8f47c 100644

Lines of this file are not shown. View the raw message.

fs/f2fs/data.c +1 -1
index 50c90bd03923..7b891b8f0a8d 100644

Lines of this file are not shown. View the raw message.

fs/file_attr.c +2 -10
index 12424d4945d0..460b2dd21a85 100644

Lines of this file are not shown. View the raw message.

fs/fuse/ioctl.c +0 -4
index 57032eadca6c..fdc175e93f74 100644

Lines of this file are not shown. View the raw message.

fs/hfsplus/unicode.c +24 -0
index 862ba27f1628..11e08a4a18b2 100644

Lines of this file are not shown. View the raw message.

fs/jbd2/transaction.c +9 -4
index c7867139af69..3e510564de6e 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/blocklayout.c +14 -11
index 19078a043e85..0822d8a119c6 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/blocklayoutxdr.c +56 -30

86 lines not on this page · raw message

fs/nfsd/blocklayoutxdr.h +2 -2
index 15b3569f3d9a..7d25ef689671 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/flexfilelayout.c +8 -0
index 3ca5304440ff..3c4419da5e24 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/flexfilelayoutxdr.c +1 -2
index aeb71c10ff1b..f9f7e38cba13 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4layouts.c +0 -1
index aea905fcaf87..683bd1130afe 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4proc.c +15 -21
index 75abdd7c6ef8..7ae8e885d753 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4xdr.c +6 -19
index a00300b28775..89cc970effbc 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/pnfs.h +1 -0
index 925817f66917..dfd411d1f363 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/xdr4.h +36 -3
index a23bc56051ca..d4b48602b2b0 100644

Lines of this file are not shown. View the raw message.

fs/overlayfs/copy_up.c +1 -1
index 27396fe63f6d..20c92ea58093 100644

Lines of this file are not shown. View the raw message.

fs/overlayfs/inode.c +4 -1
index ecb9f2019395..d4722e1b83bc 100644

Lines of this file are not shown. View the raw message.

fs/smb/client/inode.c +4 -2
index 0f0d2dae6283..6b41360631f9 100644

Lines of this file are not shown. View the raw message.

fs/smb/client/misc.c +17 -0
index dda6dece802a..e10123d8cd7d 100644

Lines of this file are not shown. View the raw message.

fs/smb/client/smb2ops.c +4 -4
index 328fdeecae29..7e86d0ef4b35 100644

Lines of this file are not shown. View the raw message.

fs/smb/server/mgmt/user_session.c +2 -5
index b36d0676dbe5..00805aed0b07 100644

Lines of this file are not shown. View the raw message.

fs/smb/server/smb2pdu.c +8 -1
index a1db006ab6e9..287200d7c076 100644

Lines of this file are not shown. View the raw message.

fs/smb/server/transport_ipc.c +12 -0
index 2aa1b29bea08..46f87fd1ce1c 100644

Lines of this file are not shown. View the raw message.

fs/xfs/libxfs/xfs_log_format.h +29 -1
index 0d637c276db0..942c490f23e4 100644

Lines of this file are not shown. View the raw message.

fs/xfs/libxfs/xfs_ondisk.h +2 -0
index 5ed44fdf7491..7bfa3242e2c5 100644

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_log.c +4 -4
index c8a57e21a1d3..69703dc3ef94 100644

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_log_priv.h +2 -2
index a9a7a271c15b..0cfc654d8e87 100644

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_log_recover.c +24 -10
index e6ed9e09c027..549d60959aee 100644

Lines of this file are not shown. View the raw message.

include/linux/brcmphy.h +1 -0
index 15c35655f482..115a964f3006 100644

Lines of this file are not shown. View the raw message.

include/linux/libata.h +6 -0
index 0620dd67369f..87a0d956f0db 100644

Lines of this file are not shown. View the raw message.

include/linux/suspend.h +6 -0
index 317ae31e89b3..b02876f1ae38 100644

Lines of this file are not shown. View the raw message.

include/linux/usb/gadget.h +25 -0
index 0f28c5512fcb..3aaf19e77558 100644

Lines of this file are not shown. View the raw message.

include/net/ip_tunnels.h +15 -0
index 8cf1380f3656..63154c8faecc 100644

Lines of this file are not shown. View the raw message.

include/uapi/drm/amdgpu_drm.h +0 -21
index bdedbaccf776..0b3827cd6f4a 100644

Lines of this file are not shown. View the raw message.

io_uring/register.c +1 -0
index a59589249fce..b1772a470bf6 100644

Lines of this file are not shown. View the raw message.

io_uring/rw.c +1 -1
index af5a54b5db12..b998d945410b 100644

Lines of this file are not shown. View the raw message.

kernel/events/core.c +4 -4
index 820127536e62..6e9427c4aaff 100644

Lines of this file are not shown. View the raw message.

kernel/power/hibernate.c +11 -0
index 26e0e662e8f2..728328c51b64 100644

Lines of this file are not shown. View the raw message.

kernel/sched/core.c +2 -0
index ccba6fc3c3fe..8575d67cbf73 100644

Lines of this file are not shown. View the raw message.

kernel/sched/deadline.c +3 -0
index 615411a0a881..7b7671060bf9 100644

Lines of this file are not shown. View the raw message.

kernel/sched/fair.c +13 -13
index 8ce56a8d507f..8f0b1acace0a 100644

Lines of this file are not shown. View the raw message.

mm/slub.c +8 -1
index 9bdadf9909e0..16b5e221c94d 100644

Lines of this file are not shown. View the raw message.

net/can/j1939/main.c +2 -0
index 3706a872ecaf..a93af55df5fd 100644

Lines of this file are not shown. View the raw message.

net/core/dev.c +35 -5
index 8d49b2198d07..5194b70769cc 100644

Lines of this file are not shown. View the raw message.

net/ipv4/ip_tunnel.c +0 -14
index aaeb5d16f0c9..158a30ae7c5f 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp_output.c +15 -4
index caf11920a878..16251d8e1b59 100644

Lines of this file are not shown. View the raw message.

net/ipv6/ip6_tunnel.c +1 -2
index 3262e81223df..6405072050e0 100644

Lines of this file are not shown. View the raw message.

net/tls/tls_main.c +2 -5
index a3ccb3135e51..39a2ab47fe72 100644

Lines of this file are not shown. View the raw message.

net/tls/tls_sw.c +25 -6
index daac9fd4be7e..d17135369980 100644

Lines of this file are not shown. View the raw message.

rust/kernel/cpufreq.rs +1 -2
index b762ecdc22b0..cb15f612028e 100644

Lines of this file are not shown. View the raw message.

sound/firewire/amdtp-stream.h +1 -1
index 775db3fc4959..ec10270c2cce 100644

Lines of this file are not shown. View the raw message.

sound/hda/codecs/realtek/alc269.c +1 -0
index 07ea76efa5de..8fb1a5c6ff6d 100644

Lines of this file are not shown. View the raw message.

sound/hda/codecs/side-codecs/cs35l41_hda.c +2 -0
index 37f2cdc8ce82..0ef77fae0402 100644

Lines of this file are not shown. View the raw message.

sound/hda/codecs/side-codecs/hda_component.c +4 -0
index 71860e2d6377..dd96994b1cf8 100644

Lines of this file are not shown. View the raw message.

sound/hda/controllers/intel.c +1 -0
index 1bb3ff55b115..9e37586e3e0a 100644

Lines of this file are not shown. View the raw message.

sound/soc/amd/acp/acp-sdw-sof-mach.c +1 -1
index 91d72d4bb9a2..d055582a3bf1 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/idt821034.c +6 -6
index a03d4e5e7d14..cab2f2eecdfb 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/nau8821.c +70 -41

111 lines not on this page · raw message

sound/usb/card.c +8 -2
index 10d9b7285597..557f53d10ecf 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/bpf/prog_tests/arg_parsing.c +9 -3
index bb143de68875..e27d66b75fb1 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/net/rtnetlink.sh +2 -0
index d6c00efeb664..281758e40788 100755

Lines of this file are not shown. View the raw message.

tools/testing/selftests/net/vlan_bridge_binding.sh +2 -0
index e7cb8c678bde..fe5472d84424 100755

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.