]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
2 months agodrm/xe: Fix null pointer dereference in devcoredump cleanup
Zhanjun Dong [Thu, 26 Mar 2026 18:10:17 +0000 (14:10 -0400)] 
drm/xe: Fix null pointer dereference in devcoredump cleanup

In xe_devcoredump_snapshot_free(), ss->gt may be NULL when the snapshot
was never fully populated (e.g., when cleanup is triggered without a
prior capture). Guard the xe_guc_capture_put_matched_nodes() call with
IS_ERR_OR_NULL() to prevent a null dereference.

In xe_devcoredump_free(), the deferred work is only queued when a
coredump is captured, so guard cancel_work_sync() with a check on
coredump->captured.

Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://patch.msgid.link/20260326181017.2060209-1-zhanjun.dong@intel.com
2 months agodrm/xe/pat: Introduce xe_cache_pat_idx() macro helper
Xin Wang [Thu, 16 Apr 2026 04:55:26 +0000 (21:55 -0700)] 
drm/xe/pat: Introduce xe_cache_pat_idx() macro helper

Wrap pat.idx[] reads with xe_cache_pat_idx() so invalid PAT index use
is caught by xe_assert() in debug builds.

Suggested-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Xin Wang <x.wang@intel.com>
Link: https://patch.msgid.link/20260416045526.536497-4-x.wang@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2 months agodrm/xe/pat: Default XE_CACHE_NONE_COMPRESSION to invalid
Xin Wang [Thu, 16 Apr 2026 04:55:25 +0000 (21:55 -0700)] 
drm/xe/pat: Default XE_CACHE_NONE_COMPRESSION to invalid

Initialize XE_CACHE_NONE_COMPRESSION PAT index to XE_PAT_INVALID_IDX by
default, same as XE_CACHE_WB_COMPRESSION. Platforms that support this
cache mode will override it in xe_pat_init_early(). This ensures that
accidental use on unsupported platforms can be detected.

A subsequent patch introduces a helper to assert on invalid PAT index
access at all call sites.

Suggested-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Xin Wang <x.wang@intel.com>
Link: https://patch.msgid.link/20260416045526.536497-3-x.wang@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2 months agodrm/xe: Standardize pat_index to u16 type
Xin Wang [Thu, 16 Apr 2026 04:55:24 +0000 (21:55 -0700)] 
drm/xe: Standardize pat_index to u16 type

Ensure all pat_index definitions consistently use u16 type across
the XE driver. This addresses two remaining instances where pat_index
was incorrectly typed:

- xe_vm_snapshot structure used int for pat_index field
- xe_device pat.idx array used u32 instead of u16

This cleanup improves type consistency and ensures proper alignment
with the PAT subsystem design.

Signed-off-by: Xin Wang <x.wang@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patch.msgid.link/20260416045526.536497-2-x.wang@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2 months agodrm/xe/xelp: Fix Wa_18022495364
Tvrtko Ursulin [Mon, 20 Apr 2026 13:16:03 +0000 (14:16 +0100)] 
drm/xe/xelp: Fix Wa_18022495364

Command parser relative MMIO addressing needs to be enabled when writing
to the register.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: ca33cd271ef9 ("drm/xe/xelp: Add Wa_18022495364")
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patch.msgid.link/20260420131603.70357-1-tvrtko.ursulin@igalia.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2 months agodrm/xe/gsc: Fix BO leak on error in query_compatibility_version()
Shuicheng Lin [Fri, 17 Apr 2026 16:33:08 +0000 (16:33 +0000)] 
drm/xe/gsc: Fix BO leak on error in query_compatibility_version()

When xe_gsc_read_out_header() fails, query_compatibility_version()
returns directly instead of jumping to the out_bo label. This skips
the xe_bo_unpin_map_no_vm() call, leaving the BO pinned and mapped
with no remaining reference to free it.

Fix by using goto out_bo so the error path properly cleans up the BO,
consistent with the other error handling in the same function.

Fixes: 0881cbe04077 ("drm/xe/gsc: Query GSC compatibility version")
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patch.msgid.link/20260417163308.3416147-1-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/hwmon: Enable energy attributes for CRI
Karthik Poosa [Fri, 17 Apr 2026 04:14:56 +0000 (09:44 +0530)] 
drm/xe/hwmon: Enable energy attributes for CRI

Enable HWMON energy attributes for CRI, which are available through MMIO
registers.
Although these attributes can also be accessed via PMT, MMIO is preferred
as it avoids dependency on ocode firmware load in late binding scenario.

v2: Rephrase commit message. (Anshuman)

Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Reviewed-by: Soham Purkait <soham.purkait@intel.com>
Link: https://patch.msgid.link/20260417041456.818668-1-karthik.poosa@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
3 months agodrm/xe/hwmon: Read accepted power limit for CRI
Karthik Poosa [Mon, 23 Mar 2026 11:58:36 +0000 (17:28 +0530)] 
drm/xe/hwmon: Read accepted power limit for CRI

Update xe_hwmon_pcode_read_power_limit() and
xe_hwmon_pcode_rmw_power_limit() to read the accepted power limit for
discrete platforms post CRI.

For platforms before CRI only the last written pcode value was available.
From CRI onwards, pcode exposes a new param2 value 2 that allows reading
the accepted power limit by the hardware.

v2:
 - Read resolved power limit in xe_hwmon_pcode_rmw_power_limit()
   as well. (Badal)
 - Rephrase commit message. (Badal)
 - Add prepare_power_limit_param2() to prepare param2 for mailbox power
   limit read.

Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
Link: https://patch.msgid.link/20260323115836.3737300-1-karthik.poosa@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
3 months agodrm/xe: Drop skip_mtcfg descriptor flag
Matt Roper [Thu, 16 Apr 2026 21:17:09 +0000 (14:17 -0700)] 
drm/xe: Drop skip_mtcfg descriptor flag

The skip_mtcfg descriptor flag is unused and expected to remain that
way.  Drop it.

Single-tile platforms are already identified by a zero/unset value for
max_remote_tiles and don't need/use this flag to avoid trying to read
out multi-tile configuration.  PVC is currently the only multi-tile
platform, and PVC uses MTCFG so this flag is not set.  The current
expectation is that if/when future multi-tile platforms show up, they
will also use the MTCFG register in the same manner as PVC, meaning that
they won't have any need to set 'skip_mtcfg' either.

Even if a future platform does change how multi-tile configuration gets
probed (e.g., using some different register), simply doing an early return
from xe_info_probe_tile_count() would probably not be the correct logic
to handle that anyway.

Bspec: 53146
Reviewed-by: Xin Wang <x.wang@intel.com>
Link: https://patch.msgid.link/20260416-no-skip-mtcfg-v1-1-c8ea26d81530@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
3 months agodrm/xe/pf: Fix VF's scheduling priority reporting
Michal Wajdeczko [Thu, 16 Apr 2026 13:18:31 +0000 (15:18 +0200)] 
drm/xe/pf: Fix VF's scheduling priority reporting

When preparing number of impacted VFs parameter for the reporting
helper function, we wrongly ended with adding +1 (representing PF)
twice, since local variable total_vfs was already adjusted. This
resulted in printing a message that was referring to an invalid VF:

 [] xe ... [drm] PF: Enabled 2 of 24 VFs
 [] xe ... [drm] PF: Tile0: GT0: PF..VF25 provisioned with 0(low) scheduling priority

Fix variable initialization and adjust the loop accordingly.

Fixes: fbbf73a81b84 ("drm/xe/pf: Force new VFs prorities only once")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260416131831.7302-1-michal.wajdeczko@intel.com
3 months agodrm/xe/eustall: Fix drm_dev_put called before stream disable in close
Shuicheng Lin [Wed, 15 Apr 2026 22:54:28 +0000 (22:54 +0000)] 
drm/xe/eustall: Fix drm_dev_put called before stream disable in close

In xe_eu_stall_stream_close(), drm_dev_put() is called before the
stream is disabled and its resources are freed. If this drops the
last reference, the device structures could be freed while the
subsequent cleanup code still accesses them, leading to a
use-after-free.

Fix this by moving drm_dev_put() after all device accesses are
complete. This matches the ordering in xe_oa_release().

Fixes: 9a0b11d4cf3b ("drm/xe/eustall: Add support to init, enable and disable EU stall sampling")
Cc: Harish Chegondi <harish.chegondi@intel.com>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: Harish Chegondi <harish.chegondi@intel.com>
Link: https://patch.msgid.link/20260415225428.3399934-1-shuicheng.lin@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
3 months agodrm/xe/xe3p_lpg: Add Wa_18044193044
Varun Gupta [Thu, 26 Mar 2026 16:16:28 +0000 (21:46 +0530)] 
drm/xe/xe3p_lpg: Add Wa_18044193044

Add engine workaround Wa_18044193044 for graphics version
35.10 stepping A0..B0.

Signed-off-by: Varun Gupta <varun.gupta@intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Link: https://patch.msgid.link/20260326161628.3566067-1-varun.gupta@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
3 months agodrm/xe: Fix type and parameter name mismatches in kernel-doc references
Shuicheng Lin [Tue, 14 Apr 2026 22:54:33 +0000 (22:54 +0000)] 
drm/xe: Fix type and parameter name mismatches in kernel-doc references

Fix kernel-doc references that point to wrong type or parameter names:

- xe_guc_capture_types.h: register_data_type ->
  capture_register_data_type to match actual enum name
- xe_oa_types.h: enum @drm_xe_oa_format_type ->
  enum drm_xe_oa_format_type (spurious '@' before type name)
- xe_pt_walk.h: @sizes -> @shifts to match actual struct member,
  @start -> @addr to match actual parameter name,
  page.table. -> page table. (typo)

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Reviewed-by: Brian Nguyen <brian3.nguyen@intel.com>
Link: https://patch.msgid.link/20260414225457.3687449-5-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Fix kernel-doc comment syntax issues in header files
Shuicheng Lin [Tue, 14 Apr 2026 22:54:32 +0000 (22:54 +0000)] 
drm/xe: Fix kernel-doc comment syntax issues in header files

Fix doc comment formatting that does not conform to kernel-doc syntax
rules:

- xe_guc_relay_types.h: Add missing space after '/**' in member doc
  comment (/**@lock -> /** @lock)
- xe_oa_types.h: Fix struct documentation to use proper kernel-doc
  format (/** @xe_oa_buffer: -> /** struct xe_oa_buffer -)
- xe_pagefault_types.h: Use dash instead of colon as separator in
  struct doc (struct xe_pagefault_queue: -> struct xe_pagefault_queue -)
- xe_pt_walk.h: Use dash instead of colon as separator in function
  docs (xe_pt_num_entries: -> xe_pt_num_entries -,
  xe_pt_offset: -> xe_pt_offset -)

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Reviewed-by: Brian Nguyen <brian3.nguyen@intel.com>
Link: https://patch.msgid.link/20260414225457.3687449-4-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Add missing '@' prefix to kernel-doc member tags
Shuicheng Lin [Tue, 14 Apr 2026 22:54:31 +0000 (22:54 +0000)] 
drm/xe: Add missing '@' prefix to kernel-doc member tags

Add the required '@' prefix to member documentation tags that were
missing it. Without the prefix, kernel-doc does not associate the
comment with the struct member.

- xe_guc_ct_types.h: snapshot_ct -> @snapshot_ct,
  snapshot_log -> @snapshot_log
- xe_pagefault_types.h: consumer.reserved -> @consumer.reserved
- xe_pt_types.h: addr -> @addr

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Reviewed-by: Brian Nguyen <brian3.nguyen@intel.com>
Link: https://patch.msgid.link/20260414225457.3687449-3-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Fix stale and mismatched kernel-doc member tags in header files
Shuicheng Lin [Tue, 14 Apr 2026 22:54:30 +0000 (22:54 +0000)] 
drm/xe: Fix stale and mismatched kernel-doc member tags in header files

Fix kernel-doc member tags that do not match the actual struct member
names, which would cause warnings with scripts/kernel-doc or produce
incorrect documentation:

- xe_bo_types.h: @atomic_access -> @attr.atomic_access
- xe_device_types.h: @mem.sys_mgr -> @mem.shrinker,
  @pinned.external -> @pinned.late.external,
  @vram_usefault.list -> @mem_access.vram_userfault.list,
  @usm.asid -> @usm.asid_to_vm,
  @usm.pagemap_shrinker -> @usm.dpagemap_shrinker,
  @vm.xe -> @vm.xa
- xe_exec_queue_types.h: @last_fence -> @tlb_inval.last_fence
- xe_gt_sriov_pf_types.h: Remove stale @migration doc for non-existent
  member
- xe_gt_types.h: @info->engine_mask -> @info.engine_mask,
  @multi_queue_engine_class_mask -> @info.multi_queue_engine_class_mask
- xe_guc_ct_types.h: @ctbs.send -> @ctbs.h2g,
  @ctbs.recv -> @ctbs.g2h
- xe_guc_submit_types.h: @valid -> @multi_queue.valid
- xe_hw_engine_types.h: @sched_props.set_job_timeout ->
  @sched_props.job_timeout_ms
- xe_oa_types.h: duplicate @format -> @bo
- xe_vm_types.h: @read_only -> @invalidate_on_bind,
  add missing @vma_flags doc

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Reviewed-by: Brian Nguyen <brian3.nguyen@intel.com>
Link: https://patch.msgid.link/20260414225457.3687449-2-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Suppress reset log for killed queues
Daniele Ceraolo Spurio [Mon, 13 Apr 2026 23:07:24 +0000 (16:07 -0700)] 
drm/xe: Suppress reset log for killed queues

When an app exits abruptly (for example due to the user hitting ctrl+c),
any of its queues that are still active on the HW are immediately
killed. As part of this process, the driver tells the GuC to preempt
the queues off the HW and to reset them if they don't preempt.
This can cause a reset log to be printed to dmesg, which can be confusing
to users as resets are commonly tied to errors, while any resets performed
in this case are just done to speed up the cleanup. Also, those reset
messages are not useful for debug, because we don't care what happens to
a queue once its app has exited.

The only case where a queue might be killed before the app that owns it
has exited is if the queue uses PXP and a PXP termination occurs. In
such scenario a log might be useful, but rather than a reset log it is
better to have a communication that the queue is being killed.

Therefore, we can silence the reset log for all killed queues and add a
simple debug log to record when a PXP queue is killed to cover that case.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260413230724.714884-2-daniele.ceraolospurio@intel.com
3 months agodrm/xe/xe3p: add gt tuning TileY 2x2 walk pattern
Clint Taylor [Mon, 13 Apr 2026 20:08:25 +0000 (13:08 -0700)] 
drm/xe/xe3p: add gt tuning TileY 2x2 walk pattern

Apply engine tuning for TileY 2x2 walk pattern, starting with IP
Xe3p_LPG.

v2: move to xe tunings (MattR)

Bspec: 72161, 73720
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Link: https://patch.msgid.link/20260413200825.4054940-1-clinton.a.taylor@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
3 months agodrm/xe: Fix error cleanup in xe_exec_queue_create_ioctl()
Shuicheng Lin [Wed, 8 Apr 2026 02:06:47 +0000 (02:06 +0000)] 
drm/xe: Fix error cleanup in xe_exec_queue_create_ioctl()

Two error handling issues exist in xe_exec_queue_create_ioctl():

1. When xe_hw_engine_group_add_exec_queue() fails, the error path jumps
   to put_exec_queue which skips xe_exec_queue_kill(). If the VM is in
   preempt fence mode, xe_vm_add_compute_exec_queue() has already added
   the queue to the VM's compute exec queue list. Skipping the kill
   leaves the queue on that list, leading to a dangling pointer after
   the queue is freed.

2. When xa_alloc() fails after xe_hw_engine_group_add_exec_queue() has
   succeeded, the error path does not call
   xe_hw_engine_group_del_exec_queue() to remove the queue from the hw
   engine group list. The queue is then freed while still linked into
   the hw engine group, causing a use-after-free.

Fix both by:
- Changing the xe_hw_engine_group_add_exec_queue() failure path to jump
  to kill_exec_queue so that xe_exec_queue_kill() properly removes the
  queue from the VM's compute list.
- Adding a del_hw_engine_group label before kill_exec_queue for the
  xa_alloc() failure path, which removes the queue from the hw engine
  group before proceeding with the rest of the cleanup.

Fixes: 7970cb36966c ("'drm/xe/hw_engine_group: Register hw engine group's exec queues")
Cc: Francois Dugast <francois.dugast@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408020647.3397933-1-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Fix dma-buf attachment leak in xe_gem_prime_import()
Shuicheng Lin [Wed, 8 Apr 2026 17:52:55 +0000 (17:52 +0000)] 
drm/xe: Fix dma-buf attachment leak in xe_gem_prime_import()

When xe_dma_buf_init_obj() fails, the attachment from
dma_buf_dynamic_attach() is not detached. Add dma_buf_detach() before
returning the error. Note: we cannot use goto out_err here because
xe_dma_buf_init_obj() already frees bo on failure, and out_err would
double-free it.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Mattheq Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408175255.3402838-5-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Fix bo leak in xe_dma_buf_init_obj() on allocation failure
Shuicheng Lin [Wed, 8 Apr 2026 17:52:54 +0000 (17:52 +0000)] 
drm/xe: Fix bo leak in xe_dma_buf_init_obj() on allocation failure

When drm_gpuvm_resv_object_alloc() fails, the pre-allocated storage bo
is not freed. Add xe_bo_free(storage) before returning the error.

xe_dma_buf_init_obj() calls xe_bo_init_locked(), which frees the bo on
error. Therefore, xe_dma_buf_init_obj() must also free the bo on its own
error paths. Otherwise, since xe_gem_prime_import() cannot distinguish
whether the failure originated from xe_dma_buf_init_obj() or from
xe_bo_init_locked(), it cannot safely decide whether the bo should be
freed.

Add comments documenting the ownership semantics: on success, ownership
of storage is transferred to the returned drm_gem_object; on failure,
storage is freed before returning.

v2: Add comments to explain the free logic.

Fixes: eb289a5f6cc6 ("drm/xe: Convert xe_dma_buf.c for exhaustive eviction")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408175255.3402838-4-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/bo: Fix bo leak on GGTT flag validation in xe_bo_init_locked()
Shuicheng Lin [Wed, 8 Apr 2026 17:52:53 +0000 (17:52 +0000)] 
drm/xe/bo: Fix bo leak on GGTT flag validation in xe_bo_init_locked()

When XE_BO_FLAG_GGTT_ALL is set without XE_BO_FLAG_GGTT, the function
returns an error without freeing a caller-provided bo, violating the
documented contract that bo is freed on failure.

Add xe_bo_free(bo) before returning the error.

Fixes: 5a3b0df25d6a ("drm/xe: Allow bo mapping on multiple ggtts")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408175255.3402838-3-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/bo: Fix bo leak on unaligned size validation in xe_bo_init_locked()
Shuicheng Lin [Wed, 8 Apr 2026 17:52:52 +0000 (17:52 +0000)] 
drm/xe/bo: Fix bo leak on unaligned size validation in xe_bo_init_locked()

When type is ttm_bo_type_device and aligned_size != size, the function
returns an error without freeing a caller-provided bo, violating the
documented contract that bo is freed on failure.

Add xe_bo_free(bo) before returning the error.

Fixes: 4e03b584143e ("drm/xe/uapi: Reject bo creation of unaligned size")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408175255.3402838-2-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Fix potential NULL deref in xe_exec_queue_tlb_inval_last_fence_put_unlocked
Shuicheng Lin [Thu, 9 Apr 2026 00:34:49 +0000 (00:34 +0000)] 
drm/xe: Fix potential NULL deref in xe_exec_queue_tlb_inval_last_fence_put_unlocked

xe_exec_queue_tlb_inval_last_fence_put_unlocked() uses q->vm->xe as the
first argument to xe_assert(). This function is called unconditionally
from xe_exec_queue_destroy() for all queues, including kernel queues
that have q->vm == NULL (e.g., queues created during GT init in
xe_gt_record_default_lrcs() with vm=NULL).

While current compilers optimize away the q->vm->xe dereference (even
in CONFIG_DRM_XE_DEBUG=y builds, the compiler pushes the dereference
into the WARN branch that is only taken when the assert condition is
false), the code is semantically incorrect and constitutes undefined
behavior in the C abstract machine for the NULL pointer case.

Use gt_to_xe(q->gt) instead, which is always valid for any exec queue.
This is consistent with how xe_exec_queue_destroy() itself obtains the
xe_device pointer in its own xe_assert at the top of the function.

Fixes: b2d7ec41f2a3 ("drm/xe: Attach last fence to TLB invalidation job queues")
Assisted-by: Claude:claude-opus-4.6
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260409003449.3405767-1-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/pf: Derive admin-only PF mode from xe_device state
Satyanarayana K V P [Mon, 13 Apr 2026 09:56:38 +0000 (09:56 +0000)] 
drm/xe/pf: Derive admin-only PF mode from xe_device state

Stop tracking admin-only PF mode in a separate `xe->sriov.pf.admin_only`
field and use `xe_device_is_admin_only(xe)` as the single source of
admin mode.

Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patch.msgid.link/20260413095637.2871287-2-satyanarayana.k.v.p@intel.com
3 months agodrm/xe/pf: Restrict device query responses in admin-only PF mode
Satyanarayana K V P [Thu, 9 Apr 2026 15:44:25 +0000 (15:44 +0000)] 
drm/xe/pf: Restrict device query responses in admin-only PF mode

When a PF is configured in admin-only mode, it is intended for management
only and must not expose workload-facing capabilities to userspace.

Limit the exposed ioctl set in admin-only PF mode to XE_DEVICE_QUERY and
XE_OBSERVATION, and suppress capability-bearing query payloads so that
the userspace cannot discover execution-related device details in this
mode.

Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Dunajski Bartosz <bartosz.dunajski@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: dri-devel@lists.freedesktop.org
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patch.msgid.link/20260409154423.2499340-5-satyanarayana.k.v.p@intel.com
3 months agodrm/xe/vf: Use drm mm instead of drm sa for CCS read/write
Satyanarayana K V P [Wed, 8 Apr 2026 11:01:48 +0000 (11:01 +0000)] 
drm/xe/vf: Use drm mm instead of drm sa for CCS read/write

The suballocator algorithm tracks a hole cursor at the last allocation
and tries to allocate after it. This is optimized for fence-ordered
progress, where older allocations are expected to become reusable first.

In fence-enabled mode, that ordering assumption holds. In fence-disabled
mode, allocations may be freed in arbitrary order, so limiting allocation
to the current hole window can miss valid free space and fail allocations
despite sufficient total space.

Use DRM memory manager instead of sub-allocator to get rid of this issue
as CCS read/write operations do not use fences.

Fixes: 864690cf4dd6 ("drm/xe/vf: Attach and detach CCS copy commands with BO")
Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Maarten Lankhorst <dev@lankhorst.se>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408110145.1639937-6-satyanarayana.k.v.p@intel.com
3 months agodrm/xe: Add memory pool with shadow support
Satyanarayana K V P [Wed, 8 Apr 2026 11:01:47 +0000 (11:01 +0000)] 
drm/xe: Add memory pool with shadow support

Add a memory pool to allocate sub-ranges from a BO-backed pool
using drm_mm.

Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Maarten Lankhorst <dev@lankhorst.se>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260408110145.1639937-5-satyanarayana.k.v.p@intel.com
3 months agodrm/xe/debugfs: Correct printing of register whitelist ranges
Matt Roper [Wed, 8 Apr 2026 22:27:44 +0000 (15:27 -0700)] 
drm/xe/debugfs: Correct printing of register whitelist ranges

The register-save-restore debugfs prints whitelist entries as offset
ranges.  E.g.,

        REG[0x39319c-0x39319f]: allow read access

for a single dword-sized register.  However the GENMASK value used to
set the lower bits to '1' for the upper bound of the whitelist range
incorrectly included one more bit than it should have, causing the
whitelist ranges to sometimes appear twice as large as they really were.
For example,

        REG[0x6210-0x6217]: allow rw access

was also intended to be a single dword-sized register whitelist (with a
range 0x6210-0x6213) but was printed incorrectly as a qword-sized range
because one too many bits was flipped on.  Similar 'off by one' logic
was applied when printing 4-dword register ranges and 64-dword register
ranges as well.

Correct the GENMASK logic to print these ranges in debugfs correctly.
No impact outside of correcting the misleading debugfs output.

Fixes: d855d2246ea6 ("drm/xe: Print whitelist while applying")
Reviewed-by: Stuart Summers <stuart.summers@intel.com>
Link: https://patch.msgid.link/20260408-regsr_wl_range-v1-1-e9a28c8b4264@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
3 months agodrm/xe: Mark ROW_CHICKEN5 as a masked register
Matt Roper [Fri, 10 Apr 2026 22:50:30 +0000 (15:50 -0700)] 
drm/xe: Mark ROW_CHICKEN5 as a masked register

ROW_CHICKEN5 is a masked register (i.e., to adjust the value of any of
the lower 16 bits, the corresponding bit in the upper 16 bits must also
be set).  Add the XE_REG_OPTION_MASKED to its definition; failure to do
so will cause workaround updates of this register to not apply properly.

Bspec: 56853
Fixes: 835cd6cbb0d0 ("drm/xe/xe3p_lpg: Add initial workarounds for graphics version 35.10")
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20260410-xe3p_tuning-v1-3-e206a62ee38f@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
3 months agodrm/xe/tuning: Use proper register offset for GAMSTLB_CTRL
Matt Roper [Fri, 10 Apr 2026 22:50:29 +0000 (15:50 -0700)] 
drm/xe/tuning: Use proper register offset for GAMSTLB_CTRL

From Xe2 onward (i.e., all platforms officially supported by the Xe
driver), the GAMSTLB_CTRL register is located at offset 0x477C and
represented by the macro "GAMSTLB_CTRL" in code.  However the register
formerly resided at offset 0xCF4C on Xe1-era platforms, and we also have
macro XEHP_GAMSTLB_CTRL that represents this old offset in the
unofficial/developer-only Xe1 code.  When tuning for the register was
added for Xe3p_LPG, the old Xe1-era macro was accidentally used instead
of the proper macro for Xe2 and beyond, causing the tuning to not be
applied properly.  Use the proper definition so that the correct offset
is written to.

Bspec: 59298
Fixes: 377c89bfaa5d ("drm/xe/xe3p_lpg: Set STLB bank hash mode to 4KB")
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20260410-xe3p_tuning-v1-2-e206a62ee38f@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
3 months agodrm/xe/tuning: Stop applying CCCHKNREG1 tuning from Xe3p onward
Matt Roper [Fri, 10 Apr 2026 22:50:28 +0000 (15:50 -0700)] 
drm/xe/tuning: Stop applying CCCHKNREG1 tuning from Xe3p onward

Whereas the tuning guide gave guidance on adjusting various CCCHKNREG1
on past platforms, starting from Xe3p the guidance is "Leave register at
HW default settings."  Set a version range upper bound of "34.99" so
that the current programming will stop being applied on any Xe3p
platforms that have graphics version 35.

Bspec: 72161
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20260410-xe3p_tuning-v1-1-e206a62ee38f@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
3 months agodrm/xe/pf: Perform fair scheduling auto-provisioning
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:26 +0000 (21:17 +0200)] 
drm/xe/pf: Perform fair scheduling auto-provisioning

Default VF scheduling configuration is the same as for the PF and
includes unlimited execution quantum (EQ) and unlimited preemption
timeout (PT). While this setup gives the most flexibility it does
not protect the PF or VFs from other VF that could constantly submit
workloads without any gaps that would let GuC do a VF-switch.

To avoid that, do some trivial auto-provisioning and configure PF
and all VFs with 16ms EQ and PT. This setup should allow GuC to
perform a full round-robin with up to 63 VFs within 2s, which in
turn should match expectations from most of the VMs using VFs.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> #v1
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-14-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Extract helpers for bulk EQ/PT provisioning
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:25 +0000 (21:17 +0200)] 
drm/xe/pf: Extract helpers for bulk EQ/PT provisioning

We already have functions to bulk provision execution quantum and
preemption timeout, but they are applying changes to all possible
VFs, while in upcoming patch we would like to provision only subset
of available VFs.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-13-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Extract helper to show which VFs are provisioned
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:24 +0000 (21:17 +0200)] 
drm/xe/pf: Extract helper to show which VFs are provisioned

In upcoming patches we will want to show which VFs were already
provisioned with resources other than LMEM(VRAM). Convert code
from the LMEM reporting function into a more generic helper that
can handle both u32 and u64 resources and can report also PF.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-12-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Reprovision scheduling to default when no VFs
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:23 +0000 (21:17 +0200)] 
drm/xe/pf: Reprovision scheduling to default when no VFs

Once we have disabled VFs there is no point in keeping potentially
limited PF scheduling provisioning as we want to complete a cleanup
of the VFs resources and return to the pure native mode, the same
as before VFs were enabled, as soon as possible.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-11-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Allow to change sched_if_idle policy under lock
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:22 +0000 (21:17 +0200)] 
drm/xe/pf: Allow to change sched_if_idle policy under lock

In upcoming patch we will need to update sched_if_idle policy when
we already hold the provisioning mutex. Split existing function
into two variants to allow that.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-10-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Check EQ/PT/PRIO when testing VF config
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:21 +0000 (21:17 +0200)] 
drm/xe/pf: Check EQ/PT/PRIO when testing VF config

In addition to the hard resources (like GGTT, CTXs, DBs) we should
also check if VF was already configured (by sysfs or debugfs) with
optional parameters like execution quantum (EQ), preemption timeout
(PT) or scheduling priority (PRIO) as otherwise we might miss to
send to the GuC updated latest values after a resume or GT reset.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-9-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Encode scheduling priority KLV if needed
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:20 +0000 (21:17 +0200)] 
drm/xe/pf: Encode scheduling priority KLV if needed

After a reset we missed to reprovision VFs scheduling priority config.
But as of today, the GuC firmware allows to change scheduling priority
using config SCHED_PRIORITY KLV only for the PF and configuration of
all VFs relies on the previously applied value of the SCHED_IF_IDLE
policy. Use this policy value to check and decide whether we need to
encode VF priority KLV while reprovisioning this VF.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-8-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Don't reprovision policies if already default
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:19 +0000 (21:17 +0200)] 
drm/xe/pf: Don't reprovision policies if already default

There is no need to send policy updates to the GuC if policies
were not changed from the default settings (usually zero value).

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-7-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Reprovision policy settings after GT reset
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:18 +0000 (21:17 +0200)] 
drm/xe/pf: Reprovision policy settings after GT reset

In addition to the reprovisioning of individual VFs configurations,
we should also reprovision GuC global policy settings. Note that we
already had a draft function for that but we missed to call it once
we started handling GT reset. Reuse it now but don't take extra RPM
as this is now a caller responsibility and drop unused parameter.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-6-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Print applied policy KLVs
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:17 +0000 (21:17 +0200)] 
drm/xe/pf: Print applied policy KLVs

Under CONFIG_DRM_XE_DEBUG_SRIOV print all policy KLVs sent to the
GuC for better diagnostics.  This is similar what we are already
doing with VF configuration KLVs.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-5-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Force new VFs prorities only once
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:16 +0000 (21:17 +0200)] 
drm/xe/pf: Force new VFs prorities only once

We should force change of VFs scheduling priorities only after
initial change of the SCHED_IF_IDLE policy. Doing that also during
any later policy reprovisioning will overwrite changes done on the
individual per-VF scheduling priorities (currently only for PF).

While around also move priority change code to the _config component
to maintain a proper isolation. Also document our expectation about
the GuC version where the new meaning of the policy KLV is present.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-4-michal.wajdeczko@intel.com
3 months agodrm/xe/pf: Fix pf_get_sched_priority() function signature
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:15 +0000 (21:17 +0200)] 
drm/xe/pf: Fix pf_get_sched_priority() function signature

The pf_get_sched_priority() function returns scheduling priority
that we defined as u32 so while it works we shouldn't return int.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-3-michal.wajdeczko@intel.com
3 months agodrm/xe/guc: Update POLICY_SCHED_IF_IDLE documentation
Michal Wajdeczko [Thu, 2 Apr 2026 19:17:14 +0000 (21:17 +0200)] 
drm/xe/guc: Update POLICY_SCHED_IF_IDLE documentation

Starting from the GuC firmware version 70.12.0 the meaning of the
POLICY_SCHED_IF_IDLE has changed, which now acts as a bulk update
of the VF_CFG_SCHED_PRIORITY configurations of all VFs.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-2-michal.wajdeczko@intel.com
3 months agodrm/xe/guc: Add support for NO_RESPONSE_BUSY in CTB
Michal Wajdeczko [Fri, 10 Apr 2026 11:04:57 +0000 (13:04 +0200)] 
drm/xe/guc: Add support for NO_RESPONSE_BUSY in CTB

We only have support for G2H NO_RESPONSE_BUSY messages over MMIO,
but it turned out that GuC also uses that type of messages in CTB.

The following error was recently observed on BMG after adding VGT
policy updates to the GT restart sequence:

 [] xe 0000:03:00.0: [drm] *ERROR* Tile0: GT1: G2H channel broken on read, type=3, reset required
 [] xe 0000:03:00.0: [drm] *ERROR* Tile0: GT1: CT dequeue failed: -95
 ...
 [] xe 0000:03:00.0: [drm] *ERROR* Tile0: GT1: Timed out wait for G2H, fence 21965, action 5502, done no
 [] xe 0000:03:00.0: [drm] PF: Tile0: GT1: Failed to push 1 policy KLV (-ETIME)
 [] xe 0000:03:00.0: [drm] Tile0: GT1: { key 0x8004 : no value } # engine_group_config

where type=3 was this unrecognized NO_RESPONSE_BUSY message.

Note that GuC might send the real RESPONSE message right after
the BUSY message, so we must be prepared to update our g2h_fence
data twice before sender actually wakes up and clears the flags.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patch.msgid.link/20260410110457.573-1-michal.wajdeczko@intel.com
3 months agodrm/xe/xe_sysctrl: Drop redundant endian conversions in mailbox header macros
Anoop Vijay [Wed, 8 Apr 2026 11:07:59 +0000 (04:07 -0700)] 
drm/xe/xe_sysctrl: Drop redundant endian conversions in mailbox header macros

Remove unnecessary le32_to_cpu() conversions from XE_SYSCTRL_APP_HDR_*
macros.

Fixes: 37ace5254a2b ("drm/xe/xe_sysctrl: Add ABI and mailbox interface headers")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604010228.Z20DhK4g-lkp@intel.com/
Signed-off-by: Anoop Vijay <anoop.c.vijay@intel.com>
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Link: https://patch.msgid.link/20260408110759.1407342-2-anoop.c.vijay@intel.com
3 months agoMerge tag 'topic/step-2026-04-09' of https://gitlab.freedesktop.org/drm/i915/kernel...
Rodrigo Vivi [Thu, 9 Apr 2026 13:29:46 +0000 (09:29 -0400)] 
Merge tag 'topic/step-2026-04-09' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-xe-next

topic/step to unify xe and i915 on common steppings header and enum

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patch.msgid.link/cc1ff0a476ff457e88251e22b83c1a45ada11ecc@intel.com
3 months agodrm/i915/display: switch to including common step file directly
Jani Nikula [Mon, 30 Mar 2026 13:02:36 +0000 (16:02 +0300)] 
drm/i915/display: switch to including common step file directly

Instead of using the proxy intel_step.h in display, just include the
common step file directly where needed. This allows us to remove the
compat intel_step.h header.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/83b5f13b7f863b9cbc61499bcff22af5cd822a0b.1774875688.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/xe/step: switch from enum xe_step to intel_step naming
Jani Nikula [Mon, 30 Mar 2026 13:02:35 +0000 (16:02 +0300)] 
drm/xe/step: switch from enum xe_step to intel_step naming

Remove the xe_step macro, and use the enum intel_step name directly.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/87530eaa2052ae4a3c97c7fb87e261d1f73341a7.1774875688.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/xe/step: switch to the shared step definitions with i915
Jani Nikula [Mon, 30 Mar 2026 13:02:34 +0000 (16:02 +0300)] 
drm/xe/step: switch to the shared step definitions with i915

Use the shared stepping enums from include/drm/intel/step.h.

For now, define xe_step as intel_step to avoid mass renames at the same
time. For compat, we can remove the reverse macro.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/8173d9d753b343ba127d86277344248a6b1d0c3f.1774875688.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agoMerge drm/drm-next into drm-xe-next
Rodrigo Vivi [Wed, 8 Apr 2026 19:56:19 +0000 (15:56 -0400)] 
Merge drm/drm-next into drm-xe-next

Sync drm-xe-next with drm-next to unblock some topic branches.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
3 months agodrm/xe/uapi: Fix doc formatting and completeness in xe_drm.h
Shuicheng Lin [Tue, 7 Apr 2026 03:00:46 +0000 (03:00 +0000)] 
drm/xe/uapi: Fix doc formatting and completeness in xe_drm.h

- Fix missing leading space before closing */ in
  comment block
- Add DRM_IOCTL_XE_EXEC_QUEUE_SET_PROPERTY to the
  IOCTL overview list
- Add missing query types to the device query doc list:
  DRM_XE_DEVICE_QUERY_UC_FW_VERSION,
  DRM_XE_DEVICE_QUERY_OA_UNITS,
  DRM_XE_DEVICE_QUERY_EU_STALL
- Fix ioctl's -> ioctls (not possessive, 2 occurrences)
- Remove duplicate parameter docs from
  drm_xe_mem_range_attr overview (already documented
  as inline member comments)
- Fix extra whitespace before /** on 2 lines in
  drm_xe_mem_range_attr
- Add missing blank line before DRM_XE_VM_BIND_FLAG_DECOMPRESS
  bullet to fix RST block quote warning

v3: more fix (item 4 to 7).

Assisted-by: GitHub Copilot:claude-opus-4.6
Cc: Xin Wang <x.wang@intel.com>
Reviewed-by: Xin Wang <x.wang@intel.com>
Link: https://patch.msgid.link/20260407030046.3394004-7-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/uapi: Fix code examples in xe_drm.h documentation
Shuicheng Lin [Tue, 7 Apr 2026 03:00:45 +0000 (03:00 +0000)] 
drm/xe/uapi: Fix code examples in xe_drm.h documentation

Fix incorrect field names and formatting in code examples:
- .num_bb_per_exec -> .width (renamed struct field
  in exec_queue_create examples)
- .num_eng_per_bb -> .num_placements (renamed struct
  field in exec_queue_create examples)
- .atomic_val -> .atomic.val (correct nested struct
  field access in madvise example)
- Remove unnecessary backslash escaping in UUID format
  string (%\08x -> %08x)
- Fix descriptive text trapped inside code-block in
  exec_queue_create doc (split into two code blocks)

v3: one more fix of split code-block in exec_queue_create doc.

Assisted-by: GitHub Copilot:claude-opus-4.6
Cc: Xin Wang <x.wang@intel.com>
Reviewed-by: Xin Wang <x.wang@intel.com>
Link: https://patch.msgid.link/20260407030046.3394004-6-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/uapi: Fix kernel-doc cross-reference syntax in xe_drm.h
Shuicheng Lin [Tue, 7 Apr 2026 03:00:44 +0000 (03:00 +0000)] 
drm/xe/uapi: Fix kernel-doc cross-reference syntax in xe_drm.h

Fix incorrect kernel-doc cross-reference markup syntax
throughout xe_drm.h:
- @struct_name -> &struct name for cross-references to other
  structs (19 occurrences)
- struct @name -> &struct name where struct keyword was
  mixed with @ syntax (8 occurrences)
- enum @name -> &enum name for cross-references to other
  enums (5 occurrences)
- &CONSTANT / @CONSTANT -> %CONSTANT for defines and enum
  values (15 occurrences)
- @field references to members of other structs -> plain text,
  since @ only applies to the current struct's members
  (9 occurrences)

Per kernel-doc conventions (Documentation/doc-guide/kernel-doc.rst):
- '&struct name' creates hyperlinks to struct definitions
- '&enum name' creates hyperlinks to enum definitions
- '%NAME' references constants and defines
- '@name' is only for parameters/members of the current context

Assisted-by: GitHub Copilot:claude-opus-4.6
Suggested-by: Xin Wang <x.wang@intel.com>
Reviewed-by: Xin Wang <x.wang@intel.com>
Link: https://patch.msgid.link/20260407030046.3394004-5-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/uapi: Fix wrong names and references in xe_drm.h
Shuicheng Lin [Tue, 7 Apr 2026 03:00:43 +0000 (03:00 +0000)] 
drm/xe/uapi: Fix wrong names and references in xe_drm.h

Fix incorrect field names, struct names, ioctl names, and
descriptions in doc comments:
- probed_size -> @cpu_visible_size (correct field name)
- @flags description was copy of @placement ->
  fix to reference DRM_XE_GEM_CREATE_FLAG_*
- %XE_PXP_HWDRM_DEFAULT_SESSION ->
  %DRM_XE_PXP_HWDRM_DEFAULT_SESSION (missing DRM_ prefix)
- Remove undefined %DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP
- &DRM_XE_OBSERVATION -> &DRM_IOCTL_XE_OBSERVATION
- id's/struct's -> IDs/structs (fix incorrect possessive forms)
- drm_xe_query_oa_units -> drm_xe_oa_unit
- DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS ->
  DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
- DRM_IOCTL_XE_VM_QUERY_MEM_ATTRIBUTES ->
  DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
- @sizeof_mem_ranges_attr -> @sizeof_mem_range_attr
- @vector_of_vma_mem_attr -> @vector_of_mem_attr

v3: id -> ID. (Xin)
    split cross-reference fix to seperate patch.

Assisted-by: GitHub Copilot:claude-opus-4.6
Cc: Xin Wang <x.wang@intel.com>
Reviewed-by: Xin Wang <x.wang@intel.com>
Link: https://patch.msgid.link/20260407030046.3394004-4-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/uapi: Fix grammar errors in xe_drm.h documentation
Shuicheng Lin [Tue, 7 Apr 2026 03:00:42 +0000 (03:00 +0000)] 
drm/xe/uapi: Fix grammar errors in xe_drm.h documentation

Fix various grammar issues in doc comments:
- flag are only valid -> flag is only valid
- should only ever used -> should only ever be used
- if isn't already -> if it isn't already
- Type of the this -> Type of this
- When sync passed in -> When sync is passed in
- the users responsibility -> the user's responsibility
- must qword aligned -> must be qword aligned
- for a observation -> for an observation
- a memory ranges -> memory ranges
- for each memory ranges -> for each memory range.
- Second ioctl call -> second ioctl call

Assisted-by: GitHub Copilot:claude-opus-4.6
Reviewed-by: Xin Wang <x.wang@intel.com>
Link: https://patch.msgid.link/20260407030046.3394004-3-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/uapi: Fix typos and spelling errors in xe_drm.h documentation
Shuicheng Lin [Tue, 7 Apr 2026 03:00:41 +0000 (03:00 +0000)] 
drm/xe/uapi: Fix typos and spelling errors in xe_drm.h documentation

Fix the following typos and spelling errors in doc comments:
- creaed -> created (drm_xe_query_config)
- mmaping -> mmapping (drm_xe_gem_create)
- 0xdeadbeaf -> 0xdeadbeef (drm_xe_gem_mmap_offset)
- x2 and xe3 platform -> Xe2 and Xe3 platforms
- flat -> flag (drm_xe_wait_user_fence)
- MONOTONIC_CLOCK -> CLOCK_MONOTONIC (correct POSIX name)
- neverending -> never ending (drm_xe_wait_user_fence)

Assisted-by: GitHub Copilot:claude-opus-4.6
Reviewed-by: Xin Wang <x.wang@intel.com>
Link: https://patch.msgid.link/20260407030046.3394004-2-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/tlb: Init range tilemask err to zero
Jonathan Cavitt [Mon, 16 Mar 2026 16:20:04 +0000 (16:20 +0000)] 
drm/xe/tlb: Init range tilemask err to zero

Initialize err = 0 in xe_tlb_inval_range_tilemask_submit to prevent a
possible uninitialized value return in the case where the tile_mask
somehow doesn't match any available tile ids.

This targets a static analysis issue.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patch.msgid.link/20260316162003.64643-2-jonathan.cavitt@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agoUse xe_map_resource_to_region helper instead of direct access
Tejas Upadhyay [Tue, 7 Apr 2026 05:51:08 +0000 (11:21 +0530)] 
Use xe_map_resource_to_region helper instead of direct access

Renaming:
The helper function res_to_mem_region is now xe_map_resource_to_region.

Abstraction:
The patch removes instances where block->private was accessed directly
to obtain VRAM region data allowing VRAM manager to own block->private
for future use cases.

V2(MattB): Add more detail about patch also adjust variable placement

Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260407055107.2782450-2-tejas.upadhyay@intel.com
Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
3 months agottm/pool: track allocated_pages per numa node.
Dave Airlie [Tue, 24 Feb 2026 02:06:23 +0000 (12:06 +1000)] 
ttm/pool: track allocated_pages per numa node.

This gets the memory sizes from the nodes and stores the limit
as 50% of those. I think eventually we should drop the limits
once we have memcg aware shrinking, but this should be more NUMA
friendly, and I think seems like what people would prefer to
happen on NUMA aware systems.

Cc: Christian Koenig <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
3 months agottm/pool: make pool shrinker NUMA aware (v2)
Dave Airlie [Tue, 24 Feb 2026 02:06:22 +0000 (12:06 +1000)] 
ttm/pool: make pool shrinker NUMA aware (v2)

This enable NUMA awareness for the shrinker on the
ttm pools.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
3 months agottm/pool: drop numa specific pools
Dave Airlie [Tue, 24 Feb 2026 02:06:21 +0000 (12:06 +1000)] 
ttm/pool: drop numa specific pools

The list_lru will now handle numa for us, so no need to keep
separate pool types for it. Just consolidate into the global ones.

This adds a debugfs change to avoid dumping non-existant orders due
to this change.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
3 months agottm/pool: port to list_lru. (v2)
Dave Airlie [Tue, 24 Feb 2026 02:06:20 +0000 (12:06 +1000)] 
ttm/pool: port to list_lru. (v2)

This is an initial port of the TTM pools for
write combined and uncached pages to use the list_lru.

This makes the pool's more NUMA aware and avoids
needing separate NUMA pools (later commit enables this).

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
3 months agodrm/ttm: use gpu mm stats to track gpu memory allocations. (v4)
Dave Airlie [Tue, 24 Feb 2026 02:06:19 +0000 (12:06 +1000)] 
drm/ttm: use gpu mm stats to track gpu memory allocations. (v4)

This uses the newly introduced per-node gpu tracking stats,
to track GPU memory allocated via TTM and reclaimable memory in
the TTM page pools.

These stats will be useful later for system information and
later when mem cgroups are integrated.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
3 months agomm: add gpu active/reclaim per-node stat counters (v2)
Dave Airlie [Tue, 24 Feb 2026 02:06:18 +0000 (12:06 +1000)] 
mm: add gpu active/reclaim per-node stat counters (v2)

While discussing memcg intergration with gpu memory allocations,
it was pointed out that there was no numa/system counters for
GPU memory allocations.

With more integrated memory GPU server systems turning up, and
more requirements for memory tracking it seems we should start
closing the gap.

Add two counters to track GPU per-node system memory allocations.

The first is currently allocated to GPU objects, and the second
is for memory that is stored in GPU page pools that can be reclaimed,
by the shrinker.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Zi Yan <ziy@nvidia.com>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
3 months agoMerge v7.0-rc7 into drm-next
Simona Vetter [Tue, 7 Apr 2026 10:27:36 +0000 (12:27 +0200)] 
Merge v7.0-rc7 into drm-next

Thomas Zimmermann needs 2f42c1a61616 ("drm/ast: dp501: Fix
initialization of SCU2C") for drm-misc-next.

Conflicts:
- drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c

Just between e927b36ae18b ("drm/amd/display: Fix NULL pointer
dereference in dcn401_init_hw()") and it's cherry-pick that confused
git.

- drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c

Deleted in 6b0a6116286e ("drm/amd/pm: Unify version check in SMUv11")
but some cherry-picks confused git. Same for v12/v14.

Signed-off-by: Simona Vetter <simona.vetter@ffwll.ch>
3 months agodrm/xe: Normalize double-underscore include guards to single-underscore
Shuicheng Lin [Tue, 17 Mar 2026 21:57:21 +0000 (21:57 +0000)] 
drm/xe: Normalize double-underscore include guards to single-underscore

Six headers use __XE_<NAME>_H__ (double-underscore prefix and suffix)
as their include guards. Normalize them to the single-underscore
_XE_<NAME>_H_ convention used by the rest of the xe codebase.

Files fixed:
  - xe_eu_stall.h:     __XE_EU_STALL_H__     -> _XE_EU_STALL_H_
  - xe_nvm.h:          __XE_NVM_H__          -> _XE_NVM_H_
  - xe_pxp.h:          __XE_PXP_H__          -> _XE_PXP_H_
  - xe_pxp_debugfs.h:  __XE_PXP_DEBUGFS_H__ -> _XE_PXP_DEBUGFS_H_
  - xe_pxp_submit.h:   __XE_PXP_SUBMIT_H__  -> _XE_PXP_SUBMIT_H_
  - xe_pxp_types.h:    __XE_PXP_TYPES_H__   -> _XE_PXP_TYPES_H_

No functional change.

Suggested-by: Nitin Gote <nitin.r.gote@intel.com>
Assisted-by: GitHub Copilot:claude-opus-4.6
Reviewed-by: Nitin Gote <nitin.r.gote@intel.com>
Link: https://patch.msgid.link/20260317215732.2208976-12-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Add missing leading underscore to include guards
Shuicheng Lin [Tue, 17 Mar 2026 21:57:20 +0000 (21:57 +0000)] 
drm/xe: Add missing leading underscore to include guards

Two headers use XE_<NAME>_H_ (no leading underscore) as their include
guard. Normalize them to _XE_<NAME>_H_ to match the convention used
across the xe codebase.

Files fixed:
  - xe_drm_ras.h:  XE_DRM_RAS_H_  -> _XE_DRM_RAS_H_
  - xe_hw_error.h: XE_HW_ERROR_H_ -> _XE_HW_ERROR_H_

No functional change.

Suggested-by: Nitin Gote <nitin.r.gote@intel.com>
Assisted-by: GitHub Copilot:claude-opus-4.6
Reviewed-by: Nitin Gote <nitin.r.gote@intel.com>
Link: https://patch.msgid.link/20260317215732.2208976-11-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Add missing trailing underscore to include guards
Shuicheng Lin [Tue, 17 Mar 2026 21:57:19 +0000 (21:57 +0000)] 
drm/xe: Add missing trailing underscore to include guards

Four headers use _XE_<NAME>_H (no trailing underscore) as their include
guard. Normalize them to _XE_<NAME>_H_ to match the dominant convention
used across the xe codebase.

Files fixed:
  - xe_guc_capture.h:       _XE_GUC_CAPTURE_H       -> _XE_GUC_CAPTURE_H_
  - xe_guc_capture_types.h: _XE_GUC_CAPTURE_TYPES_H -> _XE_GUC_CAPTURE_TYPES_H_
  - xe_guc_fwif.h:          _XE_GUC_FWIF_H          -> _XE_GUC_FWIF_H_
  - xe_uc_fw_abi.h:         _XE_UC_FW_ABI_H         -> _XE_UC_FW_ABI_H_

No functional change.

Suggested-by: Nitin Gote <nitin.r.gote@intel.com>
Assisted-by: GitHub Copilot:claude-opus-4.6
Reviewed-by: Nitin Gote <nitin.r.gote@intel.com>
Link: https://patch.msgid.link/20260317215732.2208976-10-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Add missing _H to include guard suffixes
Shuicheng Lin [Tue, 17 Mar 2026 21:57:18 +0000 (21:57 +0000)] 
drm/xe: Add missing _H to include guard suffixes

Ten headers use _XE_<NAME>_ or __XE_<NAME>__ as their include guard but
omit the _H that the rest of the xe codebase uses. Normalize them to
_XE_<NAME>_H_ to follow the dominant convention (_XE_<BASENAME>_H_) used
by ~232 of ~260 xe headers.

Files fixed:
  - xe_migrate.h:       _XE_MIGRATE_       -> _XE_MIGRATE_H_
  - xe_pt_walk.h:       __XE_PT_WALK__     -> _XE_PT_WALK_H_
  - xe_reg_sr.h:        _XE_REG_SR_        -> _XE_REG_SR_H_
  - xe_reg_sr_types.h:  _XE_REG_SR_TYPES_  -> _XE_REG_SR_TYPES_H_
  - xe_reg_whitelist.h: _XE_REG_WHITELIST_ -> _XE_REG_WHITELIST_H_
  - xe_rtp.h:           _XE_RTP_           -> _XE_RTP_H_
  - xe_rtp_helpers.h:   _XE_RTP_HELPERS_   -> _XE_RTP_HELPERS_H_
  - xe_rtp_types.h:     _XE_RTP_TYPES_     -> _XE_RTP_TYPES_H_
  - xe_tuning.h:        _XE_TUNING_        -> _XE_TUNING_H_
  - xe_wa.h:            _XE_WA_            -> _XE_WA_H_

No functional change.

Suggested-by: Nitin Gote <nitin.r.gote@intel.com>
Assisted-by: GitHub Copilot:claude-opus-4.6
Reviewed-by: Nitin Gote <nitin.r.gote@intel.com>
Link: https://patch.msgid.link/20260317215732.2208976-9-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe: Add missing include guards to unprotected headers
Shuicheng Lin [Tue, 17 Mar 2026 21:57:17 +0000 (21:57 +0000)] 
drm/xe: Add missing include guards to unprotected headers

Two headers lack include guards entirely, which can cause duplicate
definition errors if they are included more than once (directly or
transitively).

Add standard _XE_<NAME>_H_ include guards to:
  - xe_dep_scheduler.h: forward declarations and function prototypes
  - xe_pcode_api.h: PCODE mailbox register definitions

No functional change.

Suggested-by: Nitin Gote <nitin.r.gote@intel.com>
Assisted-by: GitHub Copilot:claude-opus-4.6
Reviewed-by: Nitin Gote <nitin.r.gote@intel.com>
Link: https://patch.msgid.link/20260317215732.2208976-8-shuicheng.lin@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
3 months agodrm/xe/xe3p_lpg: Add missing indirect ring state feature flag
Gustavo Sousa [Wed, 1 Apr 2026 22:10:51 +0000 (19:10 -0300)] 
drm/xe/xe3p_lpg: Add missing indirect ring state feature flag

Even though commit 8fcb7dfb8bbf ("drm/xe/xe3p_lpg: Add support for
graphics IP 35.10") mentions that the support for Indirect Ring State
exists for Xe3p_LPG, it missed actually setting the feature flag in
graphics_xe3p_lpg.  Fix that by adding the missing member.

Fixes: 8fcb7dfb8bbf ("drm/xe/xe3p_lpg: Add support for graphics IP 35.10")
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patch.msgid.link/20260401-xe3p_lpg-indirect-ring-state-v1-1-0e4b5edf6898@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
3 months agoLinux 7.0-rc7 v7.0-rc7
Linus Torvalds [Sun, 5 Apr 2026 22:26:23 +0000 (15:26 -0700)] 
Linux 7.0-rc7

3 months agoMerge tag 'riscv-for-linus-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 5 Apr 2026 21:43:47 +0000 (14:43 -0700)] 
Merge tag 'riscv-for-linus-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:

 - Fix a CONFIG_SPARSEMEM crash on RV32 by avoiding early phys_to_page()

 - Prevent runtime const infrastructure from being used by modules,
   similar to what was done for x86

 - Avoid problems when shutting down ACPI systems with IOMMUs by adding
   a device dependency between IOMMU and devices that use it

 - Fix a bug where the CPU pointer masking state isn't properly reset
   when tagged addresses aren't enabled for a task

 - Fix some incorrect register assignments, and add some missing ones,
   in kgdb support code

 - Fix compilation of non-kernel code that uses the ptrace uapi header
   by replacing BIT() with _BITUL()

 - Fix compilation of the validate_v_ptrace kselftest by working around
   kselftest macro expansion issues

* tag 'riscv-for-linus-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  ACPI: RIMT: Add dependency between iommu and devices
  selftests: riscv: Add braces around EXPECT_EQ()
  riscv: use _BITUL macro rather than BIT() in ptrace uapi and kselftests
  riscv: Reset pmm when PR_TAGGED_ADDR_ENABLE is not set
  riscv: make runtime const not usable by modules
  riscv: patch: Avoid early phys_to_page()
  riscv: kgdb: fix several debug register assignment bugs

3 months agoMerge tag 'x86-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 5 Apr 2026 20:53:07 +0000 (13:53 -0700)] 
Merge tag 'x86-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:

 - Fix kexec crash on KCOV-instrumented kernels (Aleksandr Nogikh)

 - Fix Geode platform driver on-stack property data use-after-return
   bug (Dmitry Torokhov)

* tag 'x86-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/platform/geode: Fix on-stack property data use-after-return bug
  x86/kexec: Disable KCOV instrumentation after load_segments()

3 months agoMerge tag 'sched-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 5 Apr 2026 20:45:37 +0000 (13:45 -0700)] 
Merge tag 'sched-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:

 - Fix zero_vruntime tracking again (Peter Zijlstra)

 - Fix avg_vruntime() usage in sched_debug (Peter Zijlstra)

* tag 'sched-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/debug: Fix avg_vruntime() usage
  sched/fair: Fix zero_vruntime tracking fix

3 months agoMerge tag 'perf-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 5 Apr 2026 20:43:26 +0000 (13:43 -0700)] 
Merge tag 'perf-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fix from Ingo Molnar:

 - Fix potential bad container_of() in intel_pmu_hw_config() (Ian
   Rogers)

* tag 'perf-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86: Fix potential bad container_of in intel_pmu_hw_config

3 months agoMerge tag 'irq-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 5 Apr 2026 20:40:58 +0000 (13:40 -0700)] 
Merge tag 'irq-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fix from Ingo Molnar:

 - Fix RISC-V APLIC irqchip driver setup errors on ACPI systems (Jessica
   Liu)

* tag 'irq-urgent-2026-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/riscv-aplic: Restrict genpd notifier to device tree only

3 months agoi915: don't use a vma that didn't match the context VM
Linus Torvalds [Sun, 5 Apr 2026 19:42:25 +0000 (12:42 -0700)] 
i915: don't use a vma that didn't match the context VM

In eb_lookup_vma(), the code checks that the context vm matches before
incrementing the i915 vma usage count, but for the non-matching case it
didn't clear the non-matching vma pointer, so it would then mistakenly
be returned, causing potential UaF and refcount issues.

Reported-by: Yassine Mounir <sosohero200@gmail.com>
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoMerge tag 'mips-fixes_7.0_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips...
Linus Torvalds [Sun, 5 Apr 2026 18:29:07 +0000 (11:29 -0700)] 
Merge tag 'mips-fixes_7.0_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS fixes from Thomas Bogendoerfer:

 - Fix TLB uniquification for systems with TLB not initialised by
   firmware

 - Fix allocation in TLB uniquification

 - Fix SiByte cache initialisation

 - Check uart parameters from firmware on Loongson64 systems

 - Fix clock id mismatch for Ralink SoCs

 - Fix GCC version check for __mutli3 workaround

* tag 'mips-fixes_7.0_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  mips: mm: Allocate tlb_vpn array atomically
  MIPS: mm: Rewrite TLB uniquification for the hidden bit feature
  MIPS: mm: Suppress TLB uniquification on EHINV hardware
  MIPS: Always record SEGBITS in cpu_data.vmbits
  MIPS: Fix the GCC version check for `__multi3' workaround
  MIPS: SiByte: Bring back cache initialisation
  mips: ralink: update CPU clock index
  MIPS: Loongson64: env: Check UARTs passed by LEFI cautiously

3 months agoMerge tag 'char-misc-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 5 Apr 2026 17:09:33 +0000 (10:09 -0700)] 
Merge tag 'char-misc-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc/iio driver fixes from Greg KH:
 "Here are a relativly large number of small char/misc/iio and other
  driver fixes for 7.0-rc7. There's a bunch, but overall they are all
  small fixes for issues that people have been having that I finally
  caught up with getting merged due to delays on my end.

  The "largest" change overall is just some documentation updates to the
  security-bugs.rst file to hopefully tell the AI tools (and any users
  that actually read the documentation), how to send us better security
  bug reports as the quantity of reports these past few weeks has
  increased dramatically due to tools getting better at "finding"
  things.

  Included in here are:
   - lots of small IIO driver fixes for issues reported in 7.0-rc
   - gpib driver fixes
   - comedi driver fixes
   - interconnect driver fix
   - nvmem driver fixes
   - mei driver fix
   - counter driver fix
   - binder rust driver fixes
   - some other small misc driver fixes

  All of these have been in linux-next this week with no reported issues"

* tag 'char-misc-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (63 commits)
  Documentation: fix two typos in latest update to the security report howto
  Documentation: clarify the mandatory and desirable info for security reports
  Documentation: explain how to find maintainers addresses for security reports
  Documentation: minor updates to the security contacts
  .get_maintainer.ignore: add myself
  nvmem: zynqmp_nvmem: Fix buffer size in DMA and memcpy
  nvmem: imx: assign nvmem_cell_info::raw_len
  misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe
  misc: fastrpc: possible double-free of cctx->remote_heap
  comedi: dt2815: add hardware detection to prevent crash
  comedi: runflags cannot determine whether to reclaim chanlist
  comedi: Reinit dev->spinlock between attachments to low-level drivers
  comedi: me_daq: Fix potential overrun of firmware buffer
  comedi: me4000: Fix potential overrun of firmware buffer
  comedi: ni_atmio16d: Fix invalid clean-up after failed attach
  gpib: fix use-after-free in IO ioctl handlers
  gpib: lpvo_usb: fix memory leak on disconnect
  gpib: Fix fluke driver s390 compile issue
  lis3lv02d: Omit IRQF_ONESHOT if no threaded handler is provided
  lis3lv02d: fix kernel-doc warnings
  ...

3 months agoMerge tag 'tty-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 5 Apr 2026 17:04:28 +0000 (10:04 -0700)] 
Merge tag 'tty-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty fixes from Greg KH:
 "Here are two small tty vt fixes for 7.0-rc7 to resolve some reported
  issues with the resize ability of the alt screen buffer. Both of these
  have been in linux-next all week with no reported issues"

* tag 'tty-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  vt: resize saved unicode buffer on alt screen exit after resize
  vt: discard stale unicode buffer on alt screen exit after resize

3 months agoMerge tag 'usb-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 5 Apr 2026 17:00:26 +0000 (10:00 -0700)] 
Merge tag 'usb-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB/Thunderbolt fixes from Greg KH:
 "Here are a bunch of USB and Thunderbolt fixes (most all are USB) for
  7.0-rc7. More than I normally like this late in the release cycle,
  partly due to my recent travels, and partly due to people banging away
  on the USB gadget interfaces and apis more than normal (big shoutout
  to Android for getting the vendors to actually work upstream on this,
  that's a huge win overall for everyone here)

  Included in here are:
   - Small thunderbolt fix
   - new USB serial driver ids added
   - typec driver fixes
   - gadget driver fixes for some disconnect issues
   - other usb gadget driver fixes for reported problems with binding
     and unbinding devices as happens when a gadget device connects /
     disconnects from a system it is plugged into (or it switches device
     mode at a user's request, these things are complex little
     beasts...)
   - usb offload fixes (where USB audio tunnels through the controller
     while the main CPU is asleep) for when EMP spikes hit the system
     causing disconnects to happen (as often happens with static
     electricity in the winter months). This has been much reported by
     at least one vendor, and resolves the issues they have been seeing
     with this codepath. Can't wait for the "formal methods are the
     answer!" people to try to model that one properly...
   - Other small usb driver fixes for issues reported.

  All of these have been in linux-next this week, and before, with no
  reported issues, and I've personally been stressing these harder than
  normal on my systems here with no problems"

* tag 'usb-7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (39 commits)
  usb: gadget: f_hid: move list and spinlock inits from bind to alloc
  usb: host: xhci-sideband: delegate offload_usage tracking to class drivers
  usb: core: use dedicated spinlock for offload state
  usb: cdns3: gadget: fix state inconsistency on gadget init failure
  usb: dwc3: imx8mp: fix memory leak on probe failure path
  usb: gadget: f_uac1_legacy: validate control request size
  usb: ulpi: fix double free in ulpi_register_interface() error path
  usb: misc: usbio: Fix URB memory leak on submit failure
  USB: core: add NO_LPM quirk for Razer Kiyo Pro webcam
  usb: cdns3: gadget: fix NULL pointer dereference in ep_queue
  usb: core: phy: avoid double use of 'usb3-phy'
  USB: serial: option: add MeiG Smart SRM825WN
  usb: gadget: f_rndis: Fix net_device lifecycle with device_move
  usb: gadget: f_subset: Fix net_device lifecycle with device_move
  usb: gadget: f_eem: Fix net_device lifecycle with device_move
  usb: gadget: f_ecm: Fix net_device lifecycle with device_move
  usb: gadget: u_ncm: Add kernel-doc comments for struct f_ncm_opts
  usb: gadget: f_rndis: Protect RNDIS options with mutex
  usb: gadget: f_subset: Fix unbalanced refcnt in geth_free
  dt-bindings: connector: add pd-disable dependency
  ...

3 months agoACPI: RIMT: Add dependency between iommu and devices
Sunil V L [Tue, 3 Mar 2026 06:16:05 +0000 (11:46 +0530)] 
ACPI: RIMT: Add dependency between iommu and devices

EPROBE_DEFER ensures IOMMU devices are probed before the devices that
depend on them. During shutdown, however, the IOMMU may be removed
first, leading to issues. To avoid this, a device link is added
which enforces the correct removal order.

Fixes: 8f7729552582 ("ACPI: RISC-V: Add support for RIMT")
Signed-off-by: Sunil V L <sunilvl@oss.qualcomm.com>
Link: https://patch.msgid.link/20260303061605.722949-1-sunilvl@oss.qualcomm.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
3 months agoselftests: riscv: Add braces around EXPECT_EQ()
Charlie Jenkins [Tue, 10 Mar 2026 01:52:11 +0000 (18:52 -0700)] 
selftests: riscv: Add braces around EXPECT_EQ()

EXPECT_EQ() expands to multiple lines, breaking up one-line if
statements. This issue was not present in the patch on the mailing list
but was instead introduced by the maintainer when attempting to fix up
checkpatch warnings. Add braces around EXPECT_EQ() to avoid the error
even though checkpatch suggests them to be removed:

validate_v_ptrace.c:626:17: error: ‘else’ without a previous ‘if’

Fixes: 3789d5eecd5a ("selftests: riscv: verify syscalls discard vector context")
Fixes: 30eb191c895b ("selftests: riscv: verify ptrace rejects invalid vector csr inputs")
Fixes: 849f05ae1ea6 ("selftests: riscv: verify ptrace accepts valid vector csr values")
Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com>
Reviewed-and-tested-by: Sergey Matyukevich <geomatsi@gmail.com>
Link: https://patch.msgid.link/20260309-fix_selftests-v2-2-9d5a553a531e@gmail.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
3 months agoriscv: use _BITUL macro rather than BIT() in ptrace uapi and kselftests
Paul Walmsley [Thu, 2 Apr 2026 23:18:03 +0000 (17:18 -0600)] 
riscv: use _BITUL macro rather than BIT() in ptrace uapi and kselftests

Fix the build of non-kernel code that includes the RISC-V ptrace uapi
header, and the RISC-V validate_v_ptrace.c kselftest, by using the
_BITUL() macro rather than BIT().  BIT() is not available outside
the kernel.

Based on patches and comments from Charlie Jenkins, Michael Neuling,
and Andreas Schwab.

Fixes: 30eb191c895b ("selftests: riscv: verify ptrace rejects invalid vector csr inputs")
Fixes: 2af7c9cf021c ("riscv/ptrace: expose riscv CFI status and state via ptrace and in core files")
Cc: Andreas Schwab <schwab@suse.de>
Cc: Michael Neuling <mikey@neuling.org>
Cc: Charlie Jenkins <thecharlesjenkins@gmail.com>
Link: https://patch.msgid.link/20260330024248.449292-1-mikey@neuling.org
Link: https://lore.kernel.org/linux-riscv/20260309-fix_selftests-v2-1-9d5a553a531e@gmail.com/
Link: https://lore.kernel.org/linux-riscv/20260309-fix_selftests-v2-3-9d5a553a531e@gmail.com/
Signed-off-by: Paul Walmsley <pjw@kernel.org>
3 months agoriscv: Reset pmm when PR_TAGGED_ADDR_ENABLE is not set
Zishun Yi [Sun, 22 Mar 2026 16:00:22 +0000 (00:00 +0800)] 
riscv: Reset pmm when PR_TAGGED_ADDR_ENABLE is not set

In set_tagged_addr_ctrl(), when PR_TAGGED_ADDR_ENABLE is not set, pmlen
is correctly set to 0, but it forgets to reset pmm. This results in the
CPU pmm state not corresponding to the software pmlen state.

Fix this by resetting pmm along with pmlen.

Fixes: 2e1743085887 ("riscv: Add support for the tagged address ABI")
Signed-off-by: Zishun Yi <vulab@iscas.ac.cn>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://patch.msgid.link/20260322160022.21908-1-vulab@iscas.ac.cn
Signed-off-by: Paul Walmsley <pjw@kernel.org>
3 months agoriscv: make runtime const not usable by modules
Jisheng Zhang [Sat, 21 Feb 2026 02:37:31 +0000 (10:37 +0800)] 
riscv: make runtime const not usable by modules

Similar as commit 284922f4c563 ("x86: uaccess: don't use runtime-const
rewriting in modules") does, make riscv's runtime const not usable by
modules too, to "make sure this doesn't get forgotten the next time
somebody wants to do runtime constant optimizations". The reason is
well explained in the above commit: "The runtime-const infrastructure
was never designed to handle the modular case, because the constant
fixup is only done at boot time for core kernel code."

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://patch.msgid.link/20260221023731.3476-1-jszhang@kernel.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
3 months agoriscv: patch: Avoid early phys_to_page()
Vivian Wang [Mon, 23 Mar 2026 23:43:47 +0000 (17:43 -0600)] 
riscv: patch: Avoid early phys_to_page()

Similarly to commit 8d09e2d569f6 ("arm64: patching: avoid early
page_to_phys()"), avoid using phys_to_page() for the kernel address case
in patch_map().

Since this is called from apply_boot_alternatives() in setup_arch(), and
commit 4267739cabb8 ("arch, mm: consolidate initialization of SPARSE
memory model") has moved sparse_init() to after setup_arch(),
phys_to_page() is not available there yet, and it panics on boot with
SPARSEMEM on RV32, which does not use SPARSEMEM_VMEMMAP.

Reported-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Closes: https://lore.kernel.org/r/20260223144108-dcace0b9-02e8-4b67-a7ce-f263bed36f26@linutronix.de/
Fixes: 4267739cabb8 ("arch, mm: consolidate initialization of SPARSE memory model")
Suggested-by: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Tested-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20260310-riscv-sparsemem-alternatives-fix-v1-1-659d5dd257e2@iscas.ac.cn
[pjw@kernel.org: fix the subject line to align with the patch description]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
3 months agoriscv: kgdb: fix several debug register assignment bugs
Paul Walmsley [Mon, 23 Mar 2026 23:43:47 +0000 (17:43 -0600)] 
riscv: kgdb: fix several debug register assignment bugs

Fix several bugs in the RISC-V kgdb implementation:

- The element of dbg_reg_def[] that is supposed to pertain to the S1
  register embeds instead the struct pt_regs offset of the A1
  register.  Fix this to use the S1 register offset in struct pt_regs.

- The sleeping_thread_to_gdb_regs() function copies the value of the
  S10 register into the gdb_regs[] array element meant for the S9
  register, and copies the value of the S11 register into the array
  element meant for the S10 register.  It also neglects to copy the
  value of the S11 register.  Fix all of these issues.

Fixes: fe89bd2be8667 ("riscv: Add KGDB support")
Cc: Vincent Chen <vincent.chen@sifive.com>
Link: https://patch.msgid.link/fde376f8-bcfd-bfe4-e467-07d8f7608d05@kernel.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
3 months agoMerge tag 'input-for-v7.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor...
Linus Torvalds [Sat, 4 Apr 2026 15:24:32 +0000 (08:24 -0700)] 
Merge tag 'input-for-v7.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - new IDs for BETOP BTP-KP50B/C and Razer Wolverine V3 Pro added to
   xpad controller driver

 - another quirk for new TUXEDO InfinityBook added to i8042

 - a small fixup for Synaptics RMI4 driver to properly unlock mutex when
   encountering an error in F54

 - an update to bcm5974 touch controller driver to reliably switch into
   wellspring mode

* tag 'input-for-v7.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: xpad - add support for BETOP BTP-KP50B/C controller's wireless mode
  Input: xpad - add support for Razer Wolverine V3 Pro
  Input: synaptics-rmi4 - fix a locking bug in an error path
  Input: i8042 - add TUXEDO InfinityBook Max 16 Gen10 AMD to i8042 quirk table
  Input: bcm5974 - recover from failed mode switch

3 months agoDocumentation: fix two typos in latest update to the security report howto
Willy Tarreau [Sat, 4 Apr 2026 08:20:33 +0000 (10:20 +0200)] 
Documentation: fix two typos in latest update to the security report howto

In previous patch "Documentation: clarify the mandatory and desirable
info for security reports" I left two typos that I didn't detect in local
checks. One is "get_maintainers.pl" (no 's' in the script name), and the
other one is a missing closing quote after "Reported-by", which didn't
have effect here but I don't know if it can break rendering elsewhere
(e.g. on the public HTML page). Better fix it before it gets merged.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Link: https://patch.msgid.link/20260404082033.5160-1-w@1wt.eu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agoInput: xpad - add support for BETOP BTP-KP50B/C controller's wireless mode
Shengyu Qu [Sat, 4 Apr 2026 05:07:28 +0000 (22:07 -0700)] 
Input: xpad - add support for BETOP BTP-KP50B/C controller's wireless mode

BETOP's BTP-KP50B and BTP-KP50C controller's wireless dongles are both
working as standard Xbox 360 controllers. Add USB device IDs for them to
xpad driver.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Link: https://patch.msgid.link/TY4PR01MB14432B4B298EA186E5F86C46B9855A@TY4PR01MB14432.jpnprd01.prod.outlook.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
3 months agoInput: xpad - add support for Razer Wolverine V3 Pro
Zoltan Illes [Sat, 4 Apr 2026 05:03:42 +0000 (22:03 -0700)] 
Input: xpad - add support for Razer Wolverine V3 Pro

Add device IDs for the Razer Wolverine V3 Pro controller in both
wired (0x0a57) and wireless 2.4 GHz dongle (0x0a59) modes.

The controller uses the Xbox 360 protocol (vendor-specific class,
subclass 93, protocol 1) on interface 0 with an identical 20-byte
input report layout, so no additional processing is needed.

Signed-off-by: Zoltan Illes <zoliviragh@gmail.com>
Link: https://patch.msgid.link/20260329220031.1325509-1-137647604+ZlordHUN@users.noreply.github.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
3 months agoMerge tag 'powerpc-7.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sat, 4 Apr 2026 03:08:25 +0000 (20:08 -0700)] 
Merge tag 'powerpc-7.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fix from Madhavan Srinivasan:

 - fix iommu incorrectly bypassing DMA APIs

Thanks to Dan Horak, Gaurav Batra, and Ritesh Harjani (IBM).

* tag 'powerpc-7.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/powernv/iommu: iommu incorrectly bypass DMA APIs

3 months agoMerge tag 's390-7.0-7' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Sat, 4 Apr 2026 00:50:24 +0000 (17:50 -0700)] 
Merge tag 's390-7.0-7' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Vasily Gorbik:

 - Fix a memory leak in the zcrypt driver where the AP message buffer
   for clear key RSA requests was allocated twice, once by the caller
   and again locally, causing the first allocation to never be freed

 - Fix the cpum_sf perf sampling rate overflow adjustment to clamp the
   recalculated rate to the hardware maximum, preventing exceptions on
   heavily loaded systems running with HZ=1000

* tag 's390-7.0-7' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/zcrypt: Fix memory leak with CCA cards used as accelerator
  s390/cpum_sf: Cap sampling rate to prevent lsctl exception

3 months agoMerge tag 'hwmon-for-v7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Sat, 4 Apr 2026 00:13:59 +0000 (17:13 -0700)] 
Merge tag 'hwmon-for-v7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

 - Fix temperature sensor for PRIME X670E-PRO WIFI

 - occ: Add missing newline, and fix potential division by zero

 - pmbus:
    - Fix device ID comparison and printing in tps53676_identify()
    - Add missing MODULE_IMPORT_NS("PMBUS") for ltc4286
    - Check return value of page-select write in pxe1610 probe
    - Fix array access with zero-length block tps53679 read

* tag 'hwmon-for-v7.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (asus-ec-sensors) Fix T_Sensor for PRIME X670E-PRO WIFI
  hwmon: (occ) Fix missing newline in occ_show_extended()
  hwmon: (occ) Fix division by zero in occ_show_power_1()
  hwmon: (tps53679) Fix device ID comparison and printing in tps53676_identify()
  hwmon: (ltc4286) Add missing MODULE_IMPORT_NS("PMBUS")
  hwmon: (pxe1610) Check return value of page-select write in probe
  hwmon: (tps53679) Fix array access with zero-length block read

3 months agodrm/xe: Fix bug in idledly unit conversion
Vinay Belgaumkar [Wed, 1 Apr 2026 01:27:10 +0000 (18:27 -0700)] 
drm/xe: Fix bug in idledly unit conversion

We only need to convert to picosecond units before writing to RING_IDLEDLY.

Fixes: 7c53ff050ba8 ("drm/xe: Apply Wa_16023105232")
Cc: Tangudu Tilak Tirumalesh <tilak.tirumalesh.tangudu@intel.com>
Acked-by: Tangudu Tilak Tirumalesh <tilak.tirumalesh.tangudu@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://patch.msgid.link/20260401012710.4165547-1-vinay.belgaumkar@intel.com
3 months agodrm/xe: Enable Wa_14025515070
Julia Filipchuk [Wed, 4 Mar 2026 00:34:24 +0000 (16:34 -0800)] 
drm/xe: Enable Wa_14025515070

Corrects a failure on context switch. On registration of context with
indirect ring state will correct state of targeted and idle command
streamers.

This Wa requires GuC 70.53+ (uapi 1.26+).  If indirect_ring_state is
enabled and Wa is unavailable, notify and disable indirect_ring_state.

Added additional XE_RTP_PASTE macros for expansion of longer rules.

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Julia Filipchuk <julia.filipchuk@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://patch.msgid.link/20260304003431.758201-4-julia.filipchuk@intel.com