]> Gentwo Git Trees - linux/.git/log
linux/.git
2 months agoMerge tag 'drm-xe-next-2025-09-19' of https://gitlab.freedesktop.org/drm/xe/kernel...
Dave Airlie [Sun, 21 Sep 2025 21:42:05 +0000 (07:42 +1000)]
Merge tag 'drm-xe-next-2025-09-19' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next

UAPI Changes:
 - Drop L3 bank mask reporting from the media GT on Xe3 and later. Only
   do that for the primary GT. No userspace needs or uses it for media
   and some platforms may report bogus values.
 - Add SLPC power_profile sysfs interface with support for base and
   power_saving modes (Vinay Belgaumkar, Rodrigo Vivi)
 - Add configfs attributes to add post/mid context-switch commands
   (Lucas De Marchi)

Cross-subsystem Changes:
 - Fix hmm_pfn_to_map_order() usage in gpusvm and refactor APIs to
   align with pieces previous handled by xe_hmm (Matthew Auld)

Core Changes:
 - Add MEI driver for Late Binding Firmware Update/Upload
   (Alexander Usyskin)

Driver Changes:
 - Fix GuC CT teardown wrt TLB invalidation (Satyanarayana)
 - Fix CCS save/restore on VF (Satyanarayana)
 - Increase default GuC crash buffer size (Zhanjun)
 - Allow to clear GT stats in debugfs to aid debugging (Matthew Brost)
 - Add more SVM GT stats to debugfs (Matthew Brost)
 - Fix error handling in VMA attr query (Himal)
 - Move sa_info in debugfs to be per tile (Michal Wajdeczko)
 - Limit number of retries upon receiving NO_RESPONSE_RETRY from GuC to
   avoid endless loop (Michal Wajdeczko)
 - Fix configfs handling for survivability_mode undoing user choice when
   unbinding the module (Michal Wajdeczko)
 - Refactor configfs attribute visibility to future-proof it and stop
   exposing survivability_mode if not applicable (Michal Wajdeczko)
 - Constify some functions (Harish Chegondi, Michal Wajdeczko)
 - Add/extend more HW workarounds for Xe2 and Xe3
   (Harish Chegondi, Tangudu Tilak Tirumalesh)
 - Replace xe_hmm with gpusvm (Matthew Auld)
 - Improve fake pci and WA kunit handling for testing new platforms
   (Michal Wajdeczko)
 - Reduce unnecessary PTE writes when migrating (Sanjay Yadav)
 - Cleanup GuC interface definitions and log message (John Harrison)
 - Small improvements around VF CCS (Michal Wajdeczko)
 - Enable bus mastering for the I2C controller (Raag Jadav)
 - Prefer devm_mutex of hand rolling it (Christophe JAILLET)
 - Drop sysfs and debugfs attributes not available for VF (Michal Wajdeczko)
 - GuC CT devm actions improvements (Michal Wajdeczko)
 - Recommend new GuC versions for PTL and BMG (Julia Filipchuk)
 - Improveme driver handling for exhaustive eviction using new
   xe_validation wrapper around drm_exec (Thomas Hellström)
 - Add and use printk wrappers for tile and device (Michal Wajdeczko)
 - Better document workaround handling in Xe (Lucas De Marchi)
 - Improvements on ARRAY_SIZE  and ERR_CAST usage (Lucas De Marchi,
   Fushuai Wang)
 - Align CSS firmware headers with the GuC APIs (John Harrison)
 - Test GuC to GuC (G2G) communication to aid debug in pre-production
   firmware (John Harrison)
 - Bail out driver probing if GuC fails to load (John Harrison)
 - Allow error injection in xe_pxp_exec_queue_add()
   (Daniele Ceraolo Spurio)
 - Minor refactors in xe_svm (Shuicheng Lin)
 - Fix madvise ioctl error handling (Shuicheng Lin)
 - Use attribute groups to simplify sysfs registration
   (Michal Wajdeczko)
 - Add Late Binding Firmware implementation in Xe to work together with
   the MEI component (Badal Nilawar, Daniele Ceraolo Spurio, Rodrigo
   Vivi)
 - Fix build with CONFIG_MODULES=n (Lucas De Marchi)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/c2et6dnkst2apsgt46dklej4nprqdukjosb55grpaknf3pvcxy@t7gtn3hqtp6n
2 months agodrm/xe: Fix build with CONFIG_MODULES=n
Lucas De Marchi [Fri, 12 Sep 2025 21:54:51 +0000 (14:54 -0700)]
drm/xe: Fix build with CONFIG_MODULES=n

When building with CONFIG_MODULES=n, the __exit functions are dropped.
However our init functions may call them for error handling, so they are
not good candidates for the exit sections.

Fix this error reported by 0day:

ld.lld: error: relocation refers to a symbol in a discarded section: xe_configfs_exit
>>> defined in vmlinux.a(drivers/gpu/drm/xe/xe_configfs.o)
>>> referenced by xe_module.c
>>>               drivers/gpu/drm/xe/xe_module.o:(init_funcs) in archive vmlinux.a

This is the only exit function using __exit. Drop it to fix the build.

Cc: Riana Tauro <riana.tauro@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506092221.1FmUQmI8-lkp@intel.com/
Fixes: 16280ded45fb ("drm/xe: Add configfs to enable survivability mode")
Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Link: https://lore.kernel.org/r/20250912-fix-nomodule-build-v1-1-d11b70a92516@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agoMerge tag 'drm-intel-next-2025-09-12' of https://gitlab.freedesktop.org/drm/i915...
Dave Airlie [Fri, 19 Sep 2025 02:59:29 +0000 (12:59 +1000)]
Merge tag 'drm-intel-next-2025-09-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next

Cross-subsystem Changes:
- Overflow: add range_overflows and range_end_overflows (Jani)

Core Changes:
- Get rid of dev->struct_mutex (Luiz)

Non-display related:
 - GVT: Remove redundant ternary operators (Liao)
 - Various i915_utils clean-ups (Jani)

 Display related:
 - Wait PSR idle before on dsb commit (Jouni)
 - Fix size for for_each_set_bit() in abox iteration (Jani)
 - Abstract figuring out encoder name (Jani)
 - Remove FBC modulo 4 restriction for ADL-P+ (Uma)
 - Panic: refactor framebuffer allocation (Jani)
 - Backlight luminance control improvements (Suraj, Aaron)
 - Add intel_display_device_present (Jani)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/aMxX_lBxm7wd5wmi@intel.com
2 months agoMerge tag 'drm-misc-next-fixes-2025-09-18' of https://gitlab.freedesktop.org/drm...
Dave Airlie [Fri, 19 Sep 2025 02:50:22 +0000 (12:50 +1000)]
Merge tag 'drm-misc-next-fixes-2025-09-18' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next

Short summary of fixes pull:

pixpaper:
- Fix mode_valid function signature

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250918064558.GA10017@linux.fritz.box
2 months agodrm/xe/configfs: Add mid context restore bb
Lucas De Marchi [Tue, 16 Sep 2025 21:15:44 +0000 (14:15 -0700)]
drm/xe/configfs: Add mid context restore bb

Like done for post context restore, allow the user to add commands to
the middle of context restore, at the beginning of engine restore
commands.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250916-wa-bb-cmds-v5-7-306bddbc15da@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/lrc: Allow to add user commands mid context switch
Lucas De Marchi [Tue, 16 Sep 2025 21:15:43 +0000 (14:15 -0700)]
drm/xe/lrc: Allow to add user commands mid context switch

Like done for post-context-restore commands, allow to add commands from
configfs in the middle of context restore. Since currently the indirect
ctx hardcodes the offset to CTX_INDIRECT_CTX_OFFSET_DEFAULT, this is
executed in the very beginning of engine context restore.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250916-wa-bb-cmds-v5-6-306bddbc15da@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/lrc: Allow INDIRECT_CTX for more engine classes
Lucas De Marchi [Tue, 16 Sep 2025 21:15:42 +0000 (14:15 -0700)]
drm/xe/lrc: Allow INDIRECT_CTX for more engine classes

Currently it's only allowed for render and compute. Going forward we
want to enable it for more engine classes. Let the XE_LRC_FLAG_INDIRECT_CTX
flag (and thus gt_engine_needs_indirect_ctx()) be the deciding factor
for its availability.

While at it, add the missing const to rcs_funcs array. Since
CTX_INDIRECT_CTX_OFFSET_DEFAULT already matches the HW default and
gt_engine_needs_indirect_ctx() only ever enables it for rcs/ccs, there
is no change in behavior, it's only preparation for future use case.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250916-wa-bb-cmds-v5-5-306bddbc15da@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/configfs: Add post context restore bb
Lucas De Marchi [Tue, 16 Sep 2025 21:15:41 +0000 (14:15 -0700)]
drm/xe/configfs: Add post context restore bb

Allow the user to specify commands to execute during a context restore.
Currently it's possible to parse 2 types of actions:

- cmd: the instructions are added as is to the bb
- reg: just use the address and value, without worrying about
  encoding the right LRI instruction. This is possibly the most
  useful use case, so added a dedicated action for that.

This also prepares for future BBs: mid context restore and rc6 context
restore that can re-use the same parsing functions.

Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Link: https://lore.kernel.org/r/20250916-wa-bb-cmds-v5-4-306bddbc15da@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/lrc: Allow to add user commands on context switch
Lucas De Marchi [Tue, 16 Sep 2025 21:15:40 +0000 (14:15 -0700)]
drm/xe/lrc: Allow to add user commands on context switch

During validation it's useful to allows additional commands to be
executed on context switch. Fetch the commands from configfs (to be
added) and add them to the WA BB.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250916-wa-bb-cmds-v5-3-306bddbc15da@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/configfs: Allow to select by class only
Lucas De Marchi [Tue, 16 Sep 2025 21:15:39 +0000 (14:15 -0700)]
drm/xe/configfs: Allow to select by class only

For a future configfs attribute, it's desirable to select by engine mask
only as the instance doesn't make sense.

Rename the function lookup_engine_mask() to lookup_engine_info() and
make it return the entry. This allows parse_engine() to still return an
item if the caller wants to allow parsing a class-only string like
"rcs", "bcs", "ccs", etc.

Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Link: https://lore.kernel.org/r/20250916-wa-bb-cmds-v5-2-306bddbc15da@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/configfs: Extract function to parse engine
Lucas De Marchi [Tue, 16 Sep 2025 21:15:38 +0000 (14:15 -0700)]
drm/xe/configfs: Extract function to parse engine

Move the part that copies the engine to a local buffer so it can be
shared in future for other configfs attributes parsing an engine.

Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Link: https://lore.kernel.org/r/20250916-wa-bb-cmds-v5-1-306bddbc15da@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/xe_late_bind_fw: Extract and print version info
Badal Nilawar [Fri, 5 Sep 2025 15:49:53 +0000 (21:19 +0530)]
drm/xe/xe_late_bind_fw: Extract and print version info

Extract and print version info of the late binding binary.

v2: Some refinements (Daniele)

Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250905154953.3974335-10-badal.nilawar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/xe_late_bind_fw: Introduce debug fs node to disable late binding
Badal Nilawar [Fri, 5 Sep 2025 15:49:52 +0000 (21:19 +0530)]
drm/xe/xe_late_bind_fw: Introduce debug fs node to disable late binding

Introduce a debug filesystem node to disable late binding fw reload
during the system or runtime resume. This is intended for situations
where the late binding fw needs to be loaded from user mode,
perticularly for validation purpose.
Note that xe kmd doesn't participate in late binding flow from user
space. Binary loaded from the userspace will be lost upon entering to
D3 cold hence user space app need to handle this situation.

v2:
  - s/(uval == 1) ? true : false/!!uval/ (Daniele)
v3:
  - Refine the commit message (Daniele)

Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250905154953.3974335-9-badal.nilawar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/xe_late_bind_fw: Reload late binding fw during system resume
Badal Nilawar [Fri, 5 Sep 2025 15:49:51 +0000 (21:19 +0530)]
drm/xe/xe_late_bind_fw: Reload late binding fw during system resume

Reload late binding fw during resume from system suspend

v2:
  - Unconditionally reload late binding fw (Rodrigo)
  - Flush worker during system suspend

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250905154953.3974335-8-badal.nilawar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/xe_late_bind_fw: Reload late binding fw in rpm resume
Badal Nilawar [Fri, 5 Sep 2025 15:49:50 +0000 (21:19 +0530)]
drm/xe/xe_late_bind_fw: Reload late binding fw in rpm resume

Reload late binding fw during runtime resume.

Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250905154953.3974335-7-badal.nilawar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/xe_late_bind_fw: Load late binding firmware
Badal Nilawar [Fri, 5 Sep 2025 15:49:49 +0000 (21:19 +0530)]
drm/xe/xe_late_bind_fw: Load late binding firmware

Load late binding firmware

v2:
 - s/EAGAIN/EBUSY/
 - Flush worker in suspend and driver unload (Daniele)
v3:
 - Use retry interval of 6s, in steps of 200ms, to allow
   other OS components release MEI CL handle (Sasha)
v4:
 - return -ENODEV if component not added (Daniele)
 - parse and print status returned by csc
v5:
 - Use payload to check firmware valid (Daniele)
 - Obtain the RPM reference before scheduling the worker to
   ensure the device remains awake until the worker completes
   firmware loading (Rodrigo)
v6:
 - In case of error donot re-attempt fw download (Daniele)
v7 (Rodrigo):
 - Rename of mei structs and callback.

Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250905154953.3974335-6-badal.nilawar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/xe_late_bind_fw: Initialize late binding firmware
Badal Nilawar [Fri, 5 Sep 2025 15:49:48 +0000 (21:19 +0530)]
drm/xe/xe_late_bind_fw: Initialize late binding firmware

Search for late binding firmware binaries and populate the meta data of
firmware structures.

v2 (Daniele):
 - drm_err if firmware size is more than max pay load size
 - s/request_firmware/firmware_request_nowarn/ as firmware will
   not be available for all possible cards
v3 (Daniele):
 - init firmware from within xe_late_bind_init, propagate error
 - switch late_bind_fw to array to handle multiple firmware types
v4 (Daniele):
 - Alloc payload dynamically, fix nits
v6 (Daniele)
 - %s/MAX_PAYLOAD_SIZE/XE_LB_MAX_PAYLOAD_SIZE/

Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250905154953.3974335-5-badal.nilawar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/xe_late_bind_fw: Introduce xe_late_bind_fw
Badal Nilawar [Fri, 5 Sep 2025 15:49:47 +0000 (21:19 +0530)]
drm/xe/xe_late_bind_fw: Introduce xe_late_bind_fw

Introduce xe_late_bind_fw to enable firmware loading for the devices,
such as the fan controller, during the driver probe. Typically,
firmware for such devices are part of IFWI flash image but can be
replaced at probe after OEM tuning.
This patch binds mei late binding component to enable firmware loading.

v2:
 - Add devm_add_action_or_reset to remove the component (Daniele)
 - Add INTEL_MEI_GSC check in xe_late_bind_init() (Daniele)
v3:
 - Fail driver probe if late bind initialization fails,
   add has_late_bind flag (Daniele)
v4:
 - %s/I915_COMPONENT_LATE_BIND/INTEL_COMPONENT_LATE_BIND/
v6:
 - rebased
v7:
 - rebased
 - In xe_late_bind_init, use drm_err when returning an error to
   stop the probe (Lucas)
 - Use imperative mode in commit message (Lucas)

Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250905154953.3974335-4-badal.nilawar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agomei: late_bind: add late binding component driver
Alexander Usyskin [Fri, 5 Sep 2025 15:49:46 +0000 (21:19 +0530)]
mei: late_bind: add late binding component driver

Introduce a new MEI client driver to support Late Binding firmware
upload/update for Intel discrete graphics platforms.

Late Binding is a runtime firmware upload/update mechanism that allows
payloads, such as fan control and voltage regulator, to be securely
delivered and applied without requiring SPI flash updates or
system reboots. This driver enables the Xe graphics driver and other
user-space tools to push such firmware blobs to the authentication
firmware via the MEI interface.

The driver handles authentication, versioning, and communication
with the authentication firmware, which in turn coordinates with
the PUnit/PCODE to apply the payload.

This is a foundational component for enabling dynamic, secure,
and re-entrant configuration updates on platforms like Battlemage.

Cc: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250905154953.3974335-3-badal.nilawar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agomei: bus: add mei_cldev_mtu interface
Alexander Usyskin [Fri, 5 Sep 2025 15:49:45 +0000 (21:19 +0530)]
mei: bus: add mei_cldev_mtu interface

Add a new helper function that allows MEI client drivers
to query the maximum transmission unit (MTU) for a connected
MEI client.

This is useful for clients that need to transmit large payloads,
such as firmware blobs, allowing them to determine the maximum
message size that can be safely sent before starting transmission and
size of the buffer to allocate when receiving data.

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250905154953.3974335-2-badal.nilawar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe: Work around clang multiple goto-label error
Thomas Hellström [Thu, 11 Sep 2025 08:03:24 +0000 (10:03 +0200)]
drm/xe: Work around clang multiple goto-label error

When using drm_exec_retry_on_contention(), clang may consider
all labels for which we take addresses in a function as
potential retry goto targets, although strictly only one
is possible. It will then in some situations generate false
positive errors.

In this case, the compiler, for some architectures, consider the

might_lock(&m->job_mutex);

as a potential goto target from drm_exec_retry_on_contention(),
and errors.

Work around that by moving the xe_validate / drm_exec
transaction to a separate function.

v2:
- New commit message based on analysis of Nathan Chancellor

Fixes: 59eabff2a352 ("drm/xe: Convert xe_bo_create_pin_map() for exhaustive eviction")
Cc: Matthew Brost <matthew.brost@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509101853.nDmyxTEM-lkp@intel.com/
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Link: https://lore.kernel.org/r/20250911080324.180307-1-thomas.hellstrom@linux.intel.com
2 months agodrm/xe/sysfs: Simplify sysfs registration
Michal Wajdeczko [Tue, 16 Sep 2025 17:00:29 +0000 (19:00 +0200)]
drm/xe/sysfs: Simplify sysfs registration

Instead of manually maintaining each sysfs file define and use
attribute groups and register them using device managed function.
Then use is_visible() to filter-out unsupported attributes.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250916170029.3313-3-michal.wajdeczko@intel.com
2 months agodrm/xe/vf: Don't expose sysfs attributes not applicable for VFs
Michal Wajdeczko [Tue, 16 Sep 2025 17:00:28 +0000 (19:00 +0200)]
drm/xe/vf: Don't expose sysfs attributes not applicable for VFs

VFs can't read BMG_PCIE_CAP(0x138340) register nor access PCODE
(already guarded by the info.skip_pcode flag) so we shouldn't
expose attributes that require any of them to avoid errors like:

 [] xe 0000:03:00.1: [drm] Tile0: GT0: VF is trying to read an \
                     inaccessible register 0x138340+0x0
 [] RIP: 0010:xe_gt_sriov_vf_read32+0x6c2/0x9a0 [xe]
 [] Call Trace:
 []  xe_mmio_read32+0x110/0x280 [xe]
 []  auto_link_downgrade_capable_show+0x2e/0x70 [xe]
 []  dev_attr_show+0x1a/0x70
 []  sysfs_kf_seq_show+0xaa/0x120
 []  kernfs_seq_show+0x41/0x60

Fixes: 0e414bf7ad01 ("drm/xe: Expose PCIe link downgrade attributes")
Fixes: cdc36b66cd41 ("drm/xe: Expose fan control and voltage regulator version")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250916170029.3313-2-michal.wajdeczko@intel.com
2 months agodrm/xe/madvise: Fix ioctl argument check
Shuicheng Lin [Thu, 11 Sep 2025 17:31:40 +0000 (17:31 +0000)]
drm/xe/madvise: Fix ioctl argument check

It is "preferred_mem_loc" instead of "atomic" for the ATTR_PREFERRED_LOC
path.

Also include 2 minor changes with no functional impact.
1. Remove the redundant "attr.atomic_access" assignment.
2. Replace down_read_interruptible() with
   xe_svm_notifier_lock_interruptible() to pair with
   xe_svm_notifier_unlock().

Fixes: ada7486c5668 ("drm/xe: Implement madvise ioctl for xe")
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://lore.kernel.org/r/20250911173139.1405878-2-shuicheng.lin@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2 months agodrm/xe: Misc refine for svm
Shuicheng Lin [Thu, 11 Sep 2025 03:14:06 +0000 (03:14 +0000)]
drm/xe: Misc refine for svm

These changes should have no functional impact.
1. Correct typo of "operation"in macro range_debug().
2. Combine 2 spin_lock() call in xe_svm_garbage_collector() into 1.
3. Drop redundant preferred_region_is_vram check in
   xe_svm_range_needs_migrate_to_vram().
4. Combine the devmem_possible check in xe_svm_handle_pagefault().
   need_vram includes the IS_DGFX() check, so there is no change for
   .devmem_only.

v2: revert !ctx.devmem_only change (Matt)
v3: rebase code and refine commit message.
v4: rebase code and refine commit message.

Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20250911031405.1371812-2-shuicheng.lin@intel.com
2 months agodrm/xe/tests: Add pre-GMDID IP descriptors to param generators
Michal Wajdeczko [Tue, 16 Sep 2025 17:16:45 +0000 (19:16 +0200)]
drm/xe/tests: Add pre-GMDID IP descriptors to param generators

Recently introduced kunit parameter generators were based on
the existing arrays which have only GDMID-based IPs and didn't
take into account IP definitions from pre-GMDID era.

Add test only arrays with pre-GMDID IPs (as those will not change)
and extend param generators to start iterating over them.

 [ ] =================== xe_pci (2 subtests) ====================
 [ ] ==================== check_graphics_ip  ====================
 [ ] [PASSED] 12.00 Xe_LP
 [ ] [PASSED] 12.10 Xe_LP+
 [ ] [PASSED] 12.55 Xe_HPG
 [ ] [PASSED] 12.60 Xe_HPC
 [ ] [PASSED] 12.70 Xe_LPG
 [ ] [PASSED] 12.71 Xe_LPG
 [ ] [PASSED] 12.74 Xe_LPG+
 [ ] [PASSED] 20.01 Xe2_HPG
 [ ] [PASSED] 20.02 Xe2_HPG
 [ ] [PASSED] 20.04 Xe2_LPG
 [ ] [PASSED] 30.00 Xe3_LPG
 [ ] [PASSED] 30.01 Xe3_LPG
 [ ] [PASSED] 30.03 Xe3_LPG
 [ ] ================ [PASSED] check_graphics_ip ================
 [ ] ===================== check_media_ip  ======================
 [ ] [PASSED] 12.00 Xe_M
 [ ] [PASSED] 12.55 Xe_HPM
 [ ] [PASSED] 13.00 Xe_LPM+
 [ ] [PASSED] 13.01 Xe2_HPM
 [ ] [PASSED] 20.00 Xe2_LPM
 [ ] [PASSED] 30.00 Xe3_LPM
 [ ] [PASSED] 30.02 Xe3_LPM
 [ ] ================= [PASSED] check_media_ip ==================
 [ ] ===================== [PASSED] xe_pci ======================

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250916171645.3335-1-michal.wajdeczko@intel.com
2 months agoMerge tag 'drm-rust-next-2025-09-16' of https://gitlab.freedesktop.org/drm/rust/kerne...
Dave Airlie [Wed, 17 Sep 2025 06:09:24 +0000 (16:09 +1000)]
Merge tag 'drm-rust-next-2025-09-16' of https://gitlab.freedesktop.org/drm/rust/kernel into drm-next

DRM Rust changes for v6.18

Alloc
  - Add BorrowedPage type and AsPageIter trait
  - Implement Vmalloc::to_page() and VmallocPageIter
  - Implement AsPageIter for VBox and VVec

DMA & Scatterlist
  - Add dma::DataDirection and type alias for dma_addr_t
  - Abstraction for struct scatterlist and struct sg_table

DRM
  - In the DRM GEM module, simplify overall use of generics, add
    DriverFile type alias and drop Object::SIZE.

Nova (Core)
  - Various register!() macro improvements (paving the way for lifting
    it to common driver infrastructure)
  - Minor VBios fixes and refactoring
  - Minor firmware request refactoring
  - Advance firmware boot stages; process Booter and patch its
    signature, process GSP and GSP bootloader
  - Switch development fimrware version to r570.144
  - Add basic firmware bindings for r570.144
  - Move GSP boot code to its own module
  - Clean up and take advantage of pin-init features to store most of
    the driver's private data within a single allocation
  - Update ARef import from sync::aref
  - Add website to MAINTAINERS entry

Nova (DRM)
  - Update ARef import from sync::aref
  - Add website to MAINTAINERS entry

Pin-Init
  - Merge pin-init PR from Benno
    - `#[pin_data]` now generates a `*Projection` struct similar to the
      `pin-project` crate.

    - Add initializer code blocks to `[try_][pin_]init!` macros: make
      initializer macros accept any number of `_: {/* arbitrary code
      */},` & make them run the code at that point.

    - Make the `[try_][pin_]init!` macros expose initialized fields via
      a `let` binding as `&mut T` or `Pin<&mut T>` for later fields.

Rust
  - Various methods for AsBytes and FromBytes traits

Tyr
  - Initial Rust driver skeleton for ARM Mali GPUs.
    - It can power up the GPU, query for GPU metatdata through MMIO and
      provide the metadata to userspace via DRM device IOCTL (struct
      drm_panthor_dev_query).

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: "Danilo Krummrich" <dakr@kernel.org>
Link: https://lore.kernel.org/r/DCUC4SY6SRBD.1ZLHAIQZOC6KG@kernel.org
2 months agodrm/xe: Allow error injection for xe_pxp_exec_queue_add
Daniele Ceraolo Spurio [Tue, 9 Sep 2025 22:12:41 +0000 (15:12 -0700)]
drm/xe: Allow error injection for xe_pxp_exec_queue_add

This will allow us to simulate this function returning an error like
we do for other functions called in the exec_queue_create path.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://lore.kernel.org/r/20250909221240.3711023-4-daniele.ceraolospurio@intel.com
2 months agodrm/xe: Fix error handling if PXP fails to start
Daniele Ceraolo Spurio [Tue, 9 Sep 2025 22:12:40 +0000 (15:12 -0700)]
drm/xe: Fix error handling if PXP fails to start

Since the PXP start comes after __xe_exec_queue_init() has completed,
we need to cleanup what was done in that function in case of a PXP
start error.
__xe_exec_queue_init calls the submission backend init() function,
so we need to introduce an opposite for that. Unfortunately, while
we already have a fini() function pointer, it performs other
operations in addition to cleaning up what was done by the init().
Therefore, for clarity, the existing fini() has been renamed to
destroy(), while a new fini() has been added to only clean up what was
done by the init(), with the latter being called by the former (via
xe_exec_queue_fini).

Fixes: 72d479601d67 ("drm/xe/pxp/uapi: Add userspace and LRC support for PXP-using queues")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://lore.kernel.org/r/20250909221240.3711023-3-daniele.ceraolospurio@intel.com
2 months agodrm/xe: Remove duplicate header files
Yang Li [Tue, 16 Sep 2025 02:10:39 +0000 (10:10 +0800)]
drm/xe: Remove duplicate header files

Fix some duplicate includes in xe:
./drivers/gpu/drm/xe/xe_tlb_inval.c: xe_tlb_inval.h is included more than once.
./drivers/gpu/drm/xe/xe_pt.c: xe_tlb_inval_job.h is included more than once.

While at it, also sort the include lines alphabetically.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=24705
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=24706
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
[Reword commit message]
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250916021039.1632766-1-yang.lee@linux.alibaba.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agodrm/xe/guc: Return an error code if the GuC load fails
John Harrison [Tue, 9 Sep 2025 22:41:31 +0000 (15:41 -0700)]
drm/xe/guc: Return an error code if the GuC load fails

Due to multiple explosion issues in the early days of the Xe driver,
the GuC load was hacked to never return a failure. That prevented
kernel panics and such initially, but now all it achieves is creating
more confusing errors when the driver tries to submit commands to a
GuC it already knows is not there. So fix that up.

As a stop-gap and to help with debug of load failures due to invalid
GuC init params, a wedge call had been added to the inner GuC load
function. The reason being that it leaves the GuC log accessible via
debugfs. However, for an end user, simply aborting the module load is
much cleaner than wedging and trying to continue. The wedge blocks
user submissions but it seems that various bits of the driver itself
still try to submit to a dead GuC and lots of subsequent errors occur.
And with regards to developers debugging why their particular code
change is being rejected by the GuC, it is trivial to either add the
wedge back in and hack the return code to zero again or to just do a
GuC log dump to dmesg.

v2: Add support for error injection testing and drop the now redundant
wedge call.

CC: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com>
Link: https://lore.kernel.org/r/20250909224132.536320-1-John.C.Harrison@Intel.com
2 months agodrm/xe/sysfs: Add cleanup action in xe_device_sysfs_init
Zongyao Bai [Mon, 15 Sep 2025 21:47:15 +0000 (05:47 +0800)]
drm/xe/sysfs: Add cleanup action in xe_device_sysfs_init

On partial failure, some sysfs files created before the failure might
not be removed. Add common cleanup step to remove them all immediately,
as is should be harmless to attempt to remove non-existing files.

Fixes: 0e414bf7ad01 ("drm/xe: Expose PCIe link downgrade attributes")
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Stuart Summers <stuart.summers@intel.com>
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Zongyao Bai <zongyao.bai@intel.com>
Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250915214716.1327379-2-zongyao.bai@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2 months agoMerge tag 'exynos-drm-next-for-v6.18' of git://git.kernel.org/pub/scm/linux/kernel...
Dave Airlie [Tue, 16 Sep 2025 00:35:41 +0000 (10:35 +1000)]
Merge tag 'exynos-drm-next-for-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

New feature
- Add glue layer support for Exynos7870 DSIM in Exynos DSI driver
  . Introduces Exynos7870 DSIM bridge integration at Exynos DRM DSI layer.

Bug fixups for exynos7_drm_decon.c module
- Remove redundant ctx->suspended state handling
  . Cleans up unused state check logic as call flow is now correctly managed.
  . Fixes an issue where decon_commit() was blocked from decon_atomic_enable() due to incorrect state setting.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Inki Dae <inki.dae@samsung.com>
Link: https://lore.kernel.org/r/20250915113543.51294-1-inki.dae@samsung.com
2 months agoMerge tag 'exynos-drm-misc-next-for-v6.18' of git://git.kernel.org/pub/scm/linux...
Dave Airlie [Tue, 16 Sep 2025 00:31:32 +0000 (10:31 +1000)]
Merge tag 'exynos-drm-misc-next-for-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

New feature
- Add DSIM bridge driver support for Exynos7870
  . Introduces Exynos7870 DSIM IP block support in the samsung-dsim bridge driver.
- Document Exynos7870 DSIM compatible in dt-bindings
  . Adds exynos7870 compatible string and required clocks in device tree schema.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Inki Dae <inki.dae@samsung.com>
Link: https://lore.kernel.org/r/20250915111802.28177-1-inki.dae@samsung.com
2 months agoMerge tag 'drm-msm-next-2025-09-12' of https://gitlab.freedesktop.org/drm/msm into...
Dave Airlie [Tue, 16 Sep 2025 00:21:37 +0000 (10:21 +1000)]
Merge tag 'drm-msm-next-2025-09-12' of https://gitlab.freedesktop.org/drm/msm into drm-next

Changes for v6.18

GPU and Core:
- in DT bindings describe clocks per GPU type
- GMU bandwidth voting for x1-85
- a663 speedbins
- a623 speedbins
- cleanup some remaining no-iommu leftovers after VM_BIND conversion
- fix GEM obj 32b size truncation
- add missing VM_BIND param validation
- various fixes
- IFPC for x1-85 and a750
- register xml and gen_header.py sync from mesa

Display:
- add missing bindings for display on SC8180X
- added DisplayPort MST bindings
- conversion from round_rate() to determine_rate()
- DSI PHY fixes, correcting programming glitches
- misc small fixes

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Rob Clark <rob.clark@oss.qualcomm.com>
Link: https://lore.kernel.org/r/CACSVV01FgXN+fD6U1Hi6Tj4WCf=V-+NO8BXi+80iS4qOZwpaGg@mail.gmail.com
3 months agodrm/xe/guc: Add test for G2G communications
John Harrison [Wed, 10 Sep 2025 21:02:35 +0000 (14:02 -0700)]
drm/xe/guc: Add test for G2G communications

Add a test for sending messages from every GuC to every other GuC to
test G2G communications.

Note that, being a debug only feature, the test interface only exists
in pre-production builds of the GuC firmware.

v2: Fix 'default' case to actually use the driver's registration code
as well as allocation. Add comments explaining the different test
types. Fix (C) date and an assert. Review feedback from Daniele.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://lore.kernel.org/r/20250910210237.603576-5-John.C.Harrison@Intel.com
3 months agodrm/xe: Allow freeing of a managed bo
John Harrison [Wed, 10 Sep 2025 21:02:34 +0000 (14:02 -0700)]
drm/xe: Allow freeing of a managed bo

If a bo is created via xe_managed_bo_create_pin_map() then it cannot be
freed by the driver using xe_bo_unpin_map_no_vm(), or indeed any other
existing function. The DRM layer will still have a pointer stashed
away for later freeing, causing a invalid memory access on driver
unload. So add a helper for releasing the DRM action as well.

v2: Drop 'xe' parameter (review feedbak from Michal W)

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://lore.kernel.org/r/20250910210237.603576-4-John.C.Harrison@Intel.com
3 months agodrm/xe/guc: Add firmware build type to available info
John Harrison [Wed, 10 Sep 2025 21:02:33 +0000 (14:02 -0700)]
drm/xe/guc: Add firmware build type to available info

Some test features are not available in production builds of the GuC
firmware. So add the build type field to the available information
that tests can inspect to decide if they should skip or run.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://lore.kernel.org/r/20250910210237.603576-3-John.C.Harrison@Intel.com
3 months agodrm/xe/guc: Update CSS header structures
John Harrison [Wed, 10 Sep 2025 21:02:32 +0000 (14:02 -0700)]
drm/xe/guc: Update CSS header structures

Rework the CSS header structure according to recent updates to the GuC
API spec. Also include more field definitions.

v2: Also pass the new GuC specific structure to a GuC specific
function instead of the higher level, generic structure (review
feedback from Daniele).
Also correct naming of CSS_TIME_* fields.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://lore.kernel.org/r/20250910210237.603576-2-John.C.Harrison@Intel.com
3 months agodrm/xe: Use ERR_CAST instead of ERR_PTR(PTR_ERR(...))
Fushuai Wang [Sun, 14 Sep 2025 10:16:30 +0000 (18:16 +0800)]
drm/xe: Use ERR_CAST instead of ERR_PTR(PTR_ERR(...))

Use ERR_CAST inline function instead of ERR_PTR(PTR_ERR(...)).

Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250914101630.17719-1-wangfushuai@baidu.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
3 months agodrm/xe: Use ARRAY_SIZE in guc_waklv_init()
Lucas De Marchi [Fri, 12 Sep 2025 22:05:34 +0000 (15:05 -0700)]
drm/xe: Use ARRAY_SIZE in guc_waklv_init()

Prefer using ARRAY_SIZE where needed and just passing 1 instead of
calculating the size of one element.

Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508130158.eogeBZQT-lkp@intel.com/
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://lore.kernel.org/r/20250912-guc-ads-array-size-v1-1-a6555392a1f8@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
3 months agodrm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue()
Dan Carpenter [Thu, 7 Aug 2025 15:53:41 +0000 (18:53 +0300)]
drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue()

The xe_preempt_fence_create() function returns error pointers.  It
never returns NULL.  Update the error checking to match.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/aJTMBdX97cof_009@stanley.mountain
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
3 months agodrm/exynos: dsi: add support for exynos7870
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:47 +0000 (23:55 +0530)]
drm/exynos: dsi: add support for exynos7870

Add glue layer support for Exynos7870's DSIM IP bridge driver.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/exynos: exynos7_drm_decon: remove ctx->suspended
Kaustabh Chakraborty [Sun, 6 Jul 2025 17:29:46 +0000 (22:59 +0530)]
drm/exynos: exynos7_drm_decon: remove ctx->suspended

Condition guards are found to be redundant, as the call flow is properly
managed now, as also observed in the Exynos5433 DECON driver. Since
state checking is no longer necessary, remove it.

This also fixes an issue which prevented decon_commit() from
decon_atomic_enable() due to an incorrect state change setting.

Fixes: 96976c3d9aff ("drm/exynos: Add DECON driver")
Cc: stable@vger.kernel.org
Suggested-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and...
Kaustabh Chakraborty [Sun, 6 Jul 2025 17:29:45 +0000 (22:59 +0530)]
dt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and ports

Similar to FIMD and Exynos5433's DECON, the Exynos7 DECON hardware:
- May optionally require an IOMMU to initialize a display region.
- Outputs image data to another block, say an MIC or a DSI master.

If an IOMMU is present, it may also require to access the reserved
framebuffer region.

Document these bindings in the devicetree schema.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/bridge: samsung-dsim: add driver support for exynos7870 DSIM bridge
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:46 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: add driver support for exynos7870 DSIM bridge

Add support for Exynos7870's DSIM IP block in the bridge driver.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodt-bindings: samsung,mipi-dsim: document exynos7870 DSIM compatible
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:45 +0000 (23:55 +0530)]
dt-bindings: samsung,mipi-dsim: document exynos7870 DSIM compatible

Add compatible string for Exynos7870 DSIM bridge controller. The
device requires four clock sources, in schema they're named as "bus",
"pll", "byte", and "esc".

Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/bridge: samsung-dsim: add ability to define clock names for every variant
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:44 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: add ability to define clock names for every variant

Presently, all devices refer to clock names from a single array. The
only controlling parameter is the number of clocks (num_clks field of
samsung_dsim_driver_data) which uses the first n clocks of that array.
As new devices are added, this approach turns out to be cumbersome.

Separate the clock names in individual arrays required by each variant,
in a struct clk_bulk_data. Add a pointer field to the driver data struct
which points to their respective clock names, and rework the clock usage
code to use the clk_bulk_* API instead.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/bridge: samsung-dsim: increase timeout value for PLL_STABLE
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:43 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: increase timeout value for PLL_STABLE

Exynos7870's DSIM requires more time to stabilize its PLL. The current
timeout value, 1000, doesn't suffice. Increase the value to 3000, which
is just about enough as observed experimentally.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/bridge: samsung-dsim: allow configuring the PLL_STABLE bit
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:42 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: allow configuring the PLL_STABLE bit

The PLL_STABLE bit of DSIM_DPHY_STATUS is hardcoded to BIT(31), but
Exynos7870's DSIM has it in BIT(24) as per downstream kernel sources.

In order to support both, move this bit value to the driver data struct
and define it for every driver compatible. Reference the value from
there instead, in functions wherever required.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/bridge: samsung-dsim: allow configuring PLL_M and PLL_S offsets
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:41 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: allow configuring PLL_M and PLL_S offsets

Currently, PLL_P offset of DSIM_PLLCTRL is configurable in the driver
data, while PLL_M and PLL_S offsets are hardcoded as 4-bit and 1-bit
offsets respectively, but Exynos7870's DSIM have them at 3-bit and 0-bit
offsets as per downstream kernel sources.

In order to support both, move both offset values to the driver data
struct and define it for every driver compatible. Reference the values
from there instead, in functions wherever required.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/bridge: samsung-dsim: allow configuring the VIDEO_MODE bit
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:40 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: allow configuring the VIDEO_MODE bit

The VIDEO_MODE bit of DSIM_CONFIG is hardcoded to BIT(25), but
Exynos7870's DSIM has it in BIT(18) as per downstream kernel sources.

In order to support both, move this bit value to the driver data struct
and define it for every driver compatible. Reference the value from
there instead, in functions wherever required.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/bridge: samsung-dsim: allow configuring the MAIN_VSA offset
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:39 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: allow configuring the MAIN_VSA offset

The MAIN_VSA offset of DSIM_MSYNC is hardcoded to a 22-bit offset, but
Exynos7870's DSIM has it in a 16-bit offset as per the downstream kernel
sources.

In order to support both, move this offset value to the driver data
struct and define it for every driver compatible. Reference the value
from there instead, in functions wherever required.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/bridge: samsung-dsim: allow configuring bits and offsets of CLKCTRL register
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:38 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: allow configuring bits and offsets of CLKCTRL register

DSIM_CLKCTRL bit and offset values hardcoded in the driver:

name                      | bit/offset value
--------------------------+-----------------
DSIM_LANE_ESC_CLK_EN_CLK  | 19
DSIM_LANE_ESC_CLK_EN_DATA | 20
DSIM_BYTE_CLKEN           | 24
DSIM_ESC_CLKEN            | 28
DSIM_TX_REQUEST_HSCLK     | 31

DSIM_CLKCTRL bit and offset values in Exynos7870 DSIM as per downstream
kernel sources:

name                      | bit/offset value
--------------------------+-----------------
DSIM_LANE_ESC_CLK_EN_CLK  | 8
DSIM_LANE_ESC_CLK_EN_DATA | 9
DSIM_BYTE_CLKEN           | 17
DSIM_ESC_CLKEN            | 16
DSIM_TX_REQUEST_HSCLK     | 20

In order to support both, move all values to the driver data struct and
define it for every driver compatible. Reference the values from there
instead, in functions wherever required.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/bridge: samsung-dsim: add flag to control header FIFO wait
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:37 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: add flag to control header FIFO wait

Exynos7870's DSIM device doesn't require waiting for the header FIFO
during a MIPI DSI transfer. Add a flag in the driver data in order to
control said behavior.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com
3 months agodrm/bridge: samsung-dsim: add SFRCTRL register
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:36 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: add SFRCTRL register

On Exynos7870 devices, enabling the display requires disabling
standby by writing to the SFRCTRL register. Add the register and related
bit values. Since this behavior isn't available on other SoCs, implement
a flag in the driver data struct indicating the availability of this
feature.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/bridge: samsung-dsim: support separate LINK and DPHY status registers
Kaustabh Chakraborty [Sun, 6 Jul 2025 18:25:35 +0000 (23:55 +0530)]
drm/bridge: samsung-dsim: support separate LINK and DPHY status registers

Exynos7870's DSIM has separate registers for LINK and DPHY status. This
is in contrast to older variants in the driver which use a single
register for both.

Add a driver data flag which indicates that the device variant supports
the legacy status register. Change the register read calls
appropriately.

Suggested-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
3 months agodrm/pixpaper: Fix return type of pixpaper_mode_valid()
Nathan Chancellor [Mon, 8 Sep 2025 20:24:59 +0000 (13:24 -0700)]
drm/pixpaper: Fix return type of pixpaper_mode_valid()

When building with -Wincompatible-function-pointer-types-strict, a
warning designed to catch kernel control flow integrity (kCFI) issues at
build time, there is an instance in the new tiny DRM pixpaper driver:

  drivers/gpu/drm/tiny/pixpaper.c:982:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_crtc *, const struct drm_display_mode *)' with an expression of type 'int (struct drm_crtc *, const struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict]
    982 |         .mode_valid = pixpaper_mode_valid,
        |                       ^~~~~~~~~~~~~~~~~~~

While 'int' and 'enum drm_mode_status' are ABI compatible, hence no
regular warning from -Wincompatible-function-pointer-types, the mismatch
will trigger a kCFI violation when pixpaper_mode_valid() is called
indirectly.

Update the return type of pixpaper_mode_valid() to be
'enum drm_mode_status' to clear up the warning and kCFI violation.

Fixes: c9e70639f591 ("drm: tiny: Add support for Mayqueen Pixpaper e-ink panel")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250908-drm-pixpaper-fix-mode_valid-return-type-v1-1-705ceaf03757@kernel.org
3 months agoMerge drm/drm-next into drm-misc-next-fixes
Thomas Zimmermann [Mon, 15 Sep 2025 08:23:28 +0000 (10:23 +0200)]
Merge drm/drm-next into drm-misc-next-fixes

Backmerging to drm-misc-next-fixes to get features and fixes from
v6.17-rc6.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
3 months agoMerge tag 'v6.17-rc6' into drm-next
Dave Airlie [Mon, 15 Sep 2025 07:51:07 +0000 (17:51 +1000)]
Merge tag 'v6.17-rc6' into drm-next

This is a backmerge of Linux 6.17-rc6, needed for msm,
also requested by misc.

Signed-off-by: Dave Airlie <airlied@redhat.com>
3 months agoMerge tag 'drm-intel-gt-next-2025-09-12' of https://gitlab.freedesktop.org/drm/i915...
Dave Airlie [Mon, 15 Sep 2025 03:16:53 +0000 (13:16 +1000)]
Merge tag 'drm-intel-gt-next-2025-09-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next

Driver Changes:

- Include the GuC registers in the error state (Daniele)
- Use memdup_user() (Thorsten)
- Selftest improvements (Jonathan)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://lore.kernel.org/r/aMPCfRObHMg6DZAs@jlahtine-mobl
3 months agoLinux 6.17-rc6 v6.17-rc6
Linus Torvalds [Sun, 14 Sep 2025 21:21:14 +0000 (14:21 -0700)]
Linux 6.17-rc6

3 months agoMerge tag 'phy-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
Linus Torvalds [Sun, 14 Sep 2025 20:17:30 +0000 (13:17 -0700)]
Merge tag 'phy-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy

Pull generic phy driver fixes from Vinod Koul:

 - Qualcomm repeater override properties, qmp pcie bindings fix for
   clocks and initialization sequence for firmware power down case

 - Marvell comphy bindings clock and child node constraints

 - Tegra xusb device reference leaks fix

 - TI omap usb device ref leak on unbind and RGMII IS settings fix

* tag 'phy-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
  phy: qcom: qmp-pcie: Fix PHY initialization when powered down by firmware
  phy: ti: gmii-sel: Always write the RGMII ID setting
  dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings
  phy: ti-pipe3: fix device leak at unbind
  phy: ti: omap-usb2: fix device leak at unbind
  phy: tegra: xusb: fix device and OF node leak at probe
  dt-bindings: phy: marvell,comphy-cp110: Fix clock and child node constraints
  phy: qualcomm: phy-qcom-eusb2-repeater: fix override properties

3 months agoMerge tag 'dmaengine-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
Linus Torvalds [Sun, 14 Sep 2025 20:06:06 +0000 (13:06 -0700)]
Merge tag 'dmaengine-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine fixes from Vinod Koul:

 - Intel idxd fixes for idxd_free() handling, refcount underflow on
   module unload, double free in idxd_setup_wqs()

 - Qualcomm bam dma missing properties and handing for channels with ees

 - dw device reference leak in rzn1_dmamux_route_allocate()

* tag 'dmaengine-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
  dmaengine: dw: dmamux: Fix device reference leak in rzn1_dmamux_route_allocate
  dmaengine: ti: edma: Fix memory allocation size for queue_priority_map
  dmaengine: idxd: Fix double free in idxd_setup_wqs()
  dmaengine: idxd: Fix refcount underflow on module unload
  dmaengine: idxd: Remove improper idxd_free
  dmaengine: qcom: bam_dma: Fix DT error handling for num-channels/ees
  dt-bindings: dma: qcom: bam-dma: Add missing required properties

3 months agoMerge tag 'tty-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 14 Sep 2025 17:54:54 +0000 (10:54 -0700)]
Merge tag 'tty-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are some small tty and serial driver fixes for 6.17-rc6 that
  resolve some reported problems. Included in here are:

   - 8250 driver dt bindings fixes

   - broadcom serial driver binding fixes

   - hvc_console bugfix

   - xilinx serial driver bugfix

   - sc16is7xx serial driver bugfix

  All of these have been in linux-next for the past week with no
  reported issues"

* tag 'tty-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: xilinx_uartps: read reg size from DTS
  tty: hvc_console: Call hvc_kick in hvc_write unconditionally
  dt-bindings: serial: 8250: allow "main" and "uart" as clock names
  dt-bindings: serial: 8250: move a constraint
  dt-bindings: serial: brcm,bcm7271-uart: Constrain clocks
  serial: sc16is7xx: fix bug in flow control levels init

3 months agoMerge tag 'usb-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 14 Sep 2025 17:28:15 +0000 (10:28 -0700)]
Merge tag 'usb-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some small USB driver fixes and new device ids for 6.17-rc6.
  Included in here are:

   - new usb-serial driver device ids

   - dummy-hcd locking bugfix for rt-enabled systems (which is crazy,
     but people have odd testing requirements at times...)

   - xhci driver bugfixes for reported issues

   - typec driver bugfix

   - midi2 gadget driver bugfixes

   - usb core sysfs file regression fix from -rc1

  All of these, except for the last usb sysfs file fix, have been in
  linux-next with no reported issues. The sysfs fix was added to the
  tree on Friday, and is "obviously correct" and should not have any
  problems either, it just didn't have any time for linux-next to pick
  up (0-day had no problems with it)"

* tag 'usb-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: core: remove the move buf action
  usb: gadget: midi2: Fix MIDI2 IN EP max packet size
  usb: gadget: midi2: Fix missing UMP group attributes initialization
  usb: typec: tcpm: properly deliver cable vdms to altmode drivers
  USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels
  xhci: fix memory leak regression when freeing xhci vdev devices depth first
  xhci: dbc: Fix full DbC transfer ring after several reconnects
  xhci: dbc: decouple endpoint allocation from initialization
  USB: serial: option: add Telit Cinterion LE910C4-WWX new compositions
  USB: serial: option: add Telit Cinterion FN990A w/audio compositions

3 months agoMerge tag 'x86-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 14 Sep 2025 15:39:48 +0000 (08:39 -0700)]
Merge tag 'x86-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Fix a CPU topology parsing bug on AMD guests, and address
  a lockdep warning in the resctrl filesystem"

* tag 'x86-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  fs/resctrl: Eliminate false positive lockdep warning when reading SNC counters
  x86/cpu/topology: Always try cpu_parse_topology_ext() on AMD/Hygon

3 months agoMerge tag 'timers-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Sep 2025 15:38:05 +0000 (08:38 -0700)]
Merge tag 'timers-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "Fix a lost-timeout CPU hotplug bug in the hrtimer code, which can
  trigger with certain hardware configs and regular HZ"

* tag 'timers-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  hrtimers: Unconditionally update target CPU base after offline timer migration

3 months agoMerge tag 'input-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 14 Sep 2025 15:09:37 +0000 (08:09 -0700)]
Merge tag 'input-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - a quirk to i8042 for yet another TUXEDO laptop

 - a fix to mtk-pmic-keys driver to properly handle MT6359

 - a fix to iqs7222 driver to only enable proximity interrupt
   if it is mapped to a key or a switch event

 - an update to xpad controller driver to recognize Flydigi Apex 5
   controller

 - an update to maintainers file to drop bounding entry for Melfas
   touch controller

* tag 'input-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  MAINTAINERS: Input: Drop melfas-mip4 section
  Input: mtk-pmic-keys - MT6359 has a specific release irq
  Input: i8042 - add TUXEDO InfinityBook Pro Gen10 AMD to i8042 quirk table
  Input: iqs7222 - avoid enabling unused interrupts
  Input: xpad - add support for Flydigi Apex 5

3 months agoMAINTAINERS: Input: Drop melfas-mip4 section
Krzysztof Kozlowski [Wed, 10 Sep 2025 14:25:27 +0000 (16:25 +0200)]
MAINTAINERS: Input: Drop melfas-mip4 section

Emails to the sole melfas-mip4 driver maintainer bounce:

  550 <jeesw@melfas.com> No such user here (connected from melfas.com)

so clearly this is not a supported driver anymore.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250910142526.105286-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
3 months agoMerge tag 'erofs-for-6.17-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Sep 2025 00:16:52 +0000 (17:16 -0700)]
Merge tag 'erofs-for-6.17-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fixes from Gao Xiang:

 - Fix invalid algorithm dereference in encoded extents

 - Add missing dax_break_layout_final(), since recent FSDAX fixes
   didn't cover EROFS

 - Arrange long xattr name prefixes more properly

* tag 'erofs-for-6.17-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
  erofs: fix long xattr name prefix placement
  erofs: fix runtime warning on truncate_folio_batch_exceptionals()
  erofs: fix invalid algorithm for encoded extents

3 months agoMerge tag 'ceph-for-6.17-rc6' of https://github.com/ceph/ceph-client
Linus Torvalds [Sat, 13 Sep 2025 17:45:11 +0000 (10:45 -0700)]
Merge tag 'ceph-for-6.17-rc6' of https://github.com/ceph/ceph-client

Pull ceph fixes from Ilya Dryomov:
 "A fix for a race condition around r_parent tracking that took a long
  time to track down from Alex and some fixes for potential crashes on
  accessing invalid memory from Max and myself.

  All marked for stable"

* tag 'ceph-for-6.17-rc6' of https://github.com/ceph/ceph-client:
  libceph: fix invalid accesses to ceph_connection_v1_info
  ceph: fix crash after fscrypt_encrypt_pagecache_blocks() error
  ceph: always call ceph_shift_unused_folios_left()
  ceph: fix race condition where r_parent becomes stale before sending message
  ceph: fix race condition validating r_parent before applying state

3 months agoMerge tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 13 Sep 2025 17:40:50 +0000 (10:40 -0700)]
Merge tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "One fix for sy7636a which got confused about which device to use to
  manage the lifecycle of the power good GPIO because it's looked up
  from the parent device due to the way DT bindings work"

* tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: sy7636a: fix lifecycle of power good gpio

3 months agoMerge tag 'driver-core-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 13 Sep 2025 17:36:06 +0000 (10:36 -0700)]
Merge tag 'driver-core-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core fixes from Danilo Krummrich:

 - Fix UAF in cgroup pressure polling by using kernfs_get_active_of()
   to prevent operations on released file descriptors

 - Fix unresolved intra-doc link in the documentation of struct Device
   when CONFIG_DRM != y

 - Update the DMA Rust MAINTAINERS entry

* tag 'driver-core-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
  MAINTAINERS: Update the DMA Rust entry
  kernfs: Fix UAF in polling when open file is released
  rust: device: fix unresolved link to drm::Device

3 months agogpu: nova-core: Add base files for r570.144 firmware bindings
Alistair Popple [Sat, 13 Sep 2025 14:12:23 +0000 (23:12 +0900)]
gpu: nova-core: Add base files for r570.144 firmware bindings

Interacting with the GSP currently requires using definitions from C
header files. Rust definitions for the types needed for Nova core will
be generated using the Rust bindgen tool. This patch adds the base
module to allow inclusion of the generated bindings. The generated
bindings themselves are added by subsequent patches when they are first
used.

Currently we only intend to support a single firmware version, 570.144,
with these bindings. Longer term we intend to move to a more stable GSP
interface that isn't tied to specific firmware versions.

Signed-off-by: Alistair Popple <apopple@nvidia.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
[acourbot@nvidia.com: adapt the bindings module comment a bit]
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-10-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
3 months agogpu: nova-core: firmware: use 570.144 firmware
Alexandre Courbot [Sat, 13 Sep 2025 14:12:22 +0000 (23:12 +0900)]
gpu: nova-core: firmware: use 570.144 firmware

570.144 is the latest available into linux-firmware as of this commit,
and the one we will use to start development of nova-core. It should
eventually be dropped for a newer version before the driver becomes able
to do anything useful. The newer firmware is expected to iron out some
of the inelegances of 570.144, notably related to packaging.

Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-9-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
3 months agogpu: nova-core: firmware: process the GSP bootloader
Alexandre Courbot [Sat, 13 Sep 2025 14:12:21 +0000 (23:12 +0900)]
gpu: nova-core: firmware: process the GSP bootloader

The GSP bootloader is a small RISC-V firmware that is loaded by Booter
onto the GSP core and is in charge of loading, validating, and starting
the actual GSP firmware.

It is a regular binary firmware file containing a specific header.
Create a type holding the DMA-mapped firmware as well as useful
information extracted from the header, and hook it into our firmware
structure for later use.

The GSP bootloader is stored into the `GspFirmware` structure, since it
is part of the GSP firmware package. This makes the `Firmware` structure
empty, so remove it.

Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-8-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
3 months agogpu: nova-core: firmware: process and prepare the GSP firmware
Alexandre Courbot [Sat, 13 Sep 2025 14:12:20 +0000 (23:12 +0900)]
gpu: nova-core: firmware: process and prepare the GSP firmware

The GSP firmware is a binary blob that is verified, loaded, and run by
the GSP bootloader. Its presentation is a bit peculiar as the GSP
bootloader expects to be given a DMA address to a 3-levels page table
mapping the GSP firmware at address 0 of its own address space.

Prepare such a structure containing the DMA-mapped firmware as well as
the DMA-mapped page tables, and a way to obtain the DMA handle of the
level 0 page table.

Then, move the GSP firmware instance from the `Firmware` struct to the
`start_gsp` method since it doesn't need to be kept after the GSP is
booted.

As we are performing the required ELF section parsing and radix3 page
table building, remove these items from the TODO file.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-7-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
3 months agogpu: nova-core: firmware: process Booter and patch its signature
Alexandre Courbot [Sat, 13 Sep 2025 14:12:19 +0000 (23:12 +0900)]
gpu: nova-core: firmware: process Booter and patch its signature

The Booter signed firmware is an essential part of bringing up the GSP
on Turing and Ampere. It is loaded on the sec2 falcon core and is
responsible for loading and running the RISC-V GSP bootloader into the
GSP core.

Add support for parsing the Booter firmware loaded from userspace, patch
its signatures, and store it into a form that is ready to be loaded and
executed on the sec2 falcon.

Then, move the Booter instance from the `Firmware` struct to the
`start_gsp` method since it doesn't need to be kept after the GSP is
booted.

We do not run Booter yet, as its own payload (the GSP bootloader and
firmware image) still need to be prepared.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-6-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
3 months agogpu: nova-core: firmware: add support for common firmware header
Alexandre Courbot [Sat, 13 Sep 2025 14:12:18 +0000 (23:12 +0900)]
gpu: nova-core: firmware: add support for common firmware header

Several firmware files loaded from userspace feature a common header
that describes their payload. Add basic support for it so subsequent
patches can leverage it.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-5-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
3 months agogpu: nova-core: firmware: move firmware request code into a function
Alexandre Courbot [Sat, 13 Sep 2025 14:12:17 +0000 (23:12 +0900)]
gpu: nova-core: firmware: move firmware request code into a function

When all the firmware files are loaded from `Firmware::new`, it makes
sense to have the firmware request code as a closure. However, since we
eventually want each individual firmware constructor to request its own
file (and get rid of `Firmware` altogether), move this code into a
dedicated function that can be called by individual firmware types.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-4-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
3 months agogpu: nova-core: add Chipset::name() method
Alexandre Courbot [Sat, 13 Sep 2025 14:12:16 +0000 (23:12 +0900)]
gpu: nova-core: add Chipset::name() method

There are a few cases where we need the lowercase name of a given
chipset, notably to resolve firmware files paths for dynamic loading or
to build the module information.

So far, we relied on a static `NAMES` array for the latter, and some
CString hackery for the former.

Replace both with a new `name` const method that returns the lowercase
name of a chipset instance. We can generate it using the `paste!` macro.

Using this method removes the need to create a `CString` when loading
firmware, and lets us remove a couple of utility functions that now have
no user.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-3-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
3 months agogpu: nova-core: move GSP boot code to its own module
Alexandre Courbot [Sat, 13 Sep 2025 14:12:15 +0000 (23:12 +0900)]
gpu: nova-core: move GSP boot code to its own module

Right now the GSP boot code is very incomplete and limited to running
FRTS, so having it in `Gpu::new` is not a big constraint.

However, this will change as we add more steps of the GSP boot process,
and not all GPU families follow the same procedure, so having these
steps in a dedicated method is the logical construct.

There is also the fact the GSP will require its own runtime data, and
while it won't immediately need to be pinned, we want to be ready for
the time where it will - most likely when it starts using mutexes.

Thus, add an empty `Gsp` type that is pinned inside `Gpu` and
initialized using a pin initializer. This sets the constraint we need to
observe from the start, and could spare us some costly refactoring down
the road.

Then, move the code related to GSP boot to the `gsp::boot` module, as
part of the `Gsp` implementation.

Doing so allows us to make `Gpu::new` return a fallible `impl PinInit`
instead of a `Result.` This is more idiomatic when working with pinned
objects, and sets up the pinned initialization pattern we want to
preserve as the code grows more complex.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-2-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
3 months agogpu: nova-core: require `Send` on `FalconEngine` and `FalconHal`
Alexandre Courbot [Sat, 13 Sep 2025 14:12:14 +0000 (23:12 +0900)]
gpu: nova-core: require `Send` on `FalconEngine` and `FalconHal`

We want to store the GSP and SEC2 falcon instances inside the `Gpu`
structure, but doing so require these types to implement `Send` for
`pci::Driver` to remain implementable on `NovaCore`, which embeds `Gpu`.

All implementors of `FalconEngine` and `FalconHal` satisfy the
requirements of `Send`, and these traits also already required `Sync`,
so this a minor tweak.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-1-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
3 months agodrm/xe: defer free of NVM auxiliary container to device release callback
Nitin Gote [Thu, 11 Sep 2025 05:28:23 +0000 (10:58 +0530)]
drm/xe: defer free of NVM auxiliary container to device release callback

Do not kfree the intel_dg_nvm_dev in xe_nvm_fini() right after
auxiliary_device_delete/uninit. The auxiliary_device embeds the
device/kobject (and its name); freeing it too early can race
with asynchronous device_del/udev processing and cause a use-after-free.

Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
Fixes: c28bfb107dac ("drm/xe/nvm: add on-die non-volatile memory device")
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250911052823.226696-1-nitin.r.gote@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
3 months agoMerge tag 'pin-init-v6.18' of https://github.com/Rust-for-Linux/linux into drm-rust...
Danilo Krummrich [Fri, 12 Sep 2025 18:06:56 +0000 (20:06 +0200)]
Merge tag 'pin-init-v6.18' of https://github.com/Rust-for-Linux/linux into drm-rust-next

pin-init changes for v6.18

Changed:

- `#[pin_data]` now generates a `*Projection` struct similar to the
  `pin-project` crate.

- Add initializer code blocks to `[try_][pin_]init!` macros: make
  initializer macros accept any number of `_: {/* arbitrary code */},` &
  make them run the code at that point.

- Make the `[try_][pin_]init!` macros expose initialized fields via a
  `let` binding as `&mut T` or `Pin<&mut T>` for later fields.

Upstream dev news:

- Released v0.0.10 before the changes included in this tag.

- Inform users of the impending rename from `pinned-init` to `pin-init`
  (in the kernel the rename already happened).

- More CI improvements.

Signed-off-by: Danilo Krummrich <dakr@kernel.org>
From: Benno Lossin <lossin@kernel.org>
Link: https://lore.kernel.org/r/20250912174148.373530-1-lossin@kernel.org
3 months agoMerge tag 'pci-v6.17-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Linus Torvalds [Fri, 12 Sep 2025 17:46:10 +0000 (10:46 -0700)]
Merge tag 'pci-v6.17-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull pci fix from Bjorn Helgaas:

 - Fix mvebu PCI enumeration regression caused by converting to
   for_each_of_range() iterator (Klaus Kudielka)

* tag 'pci-v6.17-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
  PCI: mvebu: Fix use of for_each_of_range() iterator

3 months agodrm/xe/configfs: Fix documentation warning
Lucas De Marchi [Thu, 11 Sep 2025 19:36:26 +0000 (12:36 -0700)]
drm/xe/configfs: Fix documentation warning

Fix this warning while building the documentation:

Documentation/gpu/xe/xe_configfs:9: drivers/gpu/drm/xe/xe_configfs.c:138:
WARNING: Definition list ends without a blank line; unexpected unindent.

That also makes it better formatted in the output.

While at it, also fix the underline length in "Overview".

Fixes: e2b33fce5eb0 ("drm/xe/configfs: Improve documentation steps")
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Link: https://lore.kernel.org/r/20250911-wa-bb-cmds-v4-2-c8f7e48f7eae@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
3 months agodrm/xe: Update workaround documentation
Lucas De Marchi [Thu, 11 Sep 2025 19:36:25 +0000 (12:36 -0700)]
drm/xe: Update workaround documentation

Bring it up to reality, better documenting the existing batch buffers,
OOB rules and fixing some typos.

Bspec: 60122
Reviewed-by: Stuart Summers <stuart.summers@intel.com>
Link: https://lore.kernel.org/r/20250911-wa-bb-cmds-v4-1-c8f7e48f7eae@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
3 months agoMerge tag 'drm-fixes-2025-09-12' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Fri, 12 Sep 2025 16:29:59 +0000 (09:29 -0700)]
Merge tag 'drm-fixes-2025-09-12' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly pull fixes for drm, mostly amdgpu and xe, with a revert for
  nouveau and some maintainers updates, and misc bits, doesn't seem too
  out of the normal.

  MAINTAINERS:
   - add rust tree to MAINTAINERS
   - fix X entries for nova/nouveau

  nova:
   - depend on 64-bit

  i915:
   - Fix size for for_each_set_bit() in abox iteration

  xe:
   - Don't touch survivability_mode on fini
   - Fixes around eviction and suspend
   - Extend Wa_13011645652 to PTL-H, WCL

  amdgpu:
   - PSP 11.x fix
   - DPCD quirk handing fix
   - DCN 3.5 PG fix
   - Audio suspend fix
   - OEM i2c clean up fix
   - Module unload memory leak fix
   - DC delay fix
   - ISP firmware fix
   - VCN fixes

  amdkfd:
   - P2P topology fix
   - APU mem limit calculation fix

  mediatek:
   - fix potential OF node use-after-free

  panthor:
   - out-of-bounds check

  nouveau:
   - revert waitqueue removal for sched teardown

* tag 'drm-fixes-2025-09-12' of https://gitlab.freedesktop.org/drm/kernel: (25 commits)
  MAINTAINERS: drm-misc: fix X: entries for nova/nouveau
  drm/mediatek: clean up driver data initialisation
  drm/mediatek: fix potential OF node use-after-free
  drm/amdgpu/vcn: Allow limiting ctx to instance 0 for AV1 at any time
  drm/amdgpu/vcn4: Fix IB parsing with multiple engine info packages
  drm/amd/amdgpu: Declare isp firmware binary file
  drm/amd/display: use udelay rather than fsleep
  drm/amdgpu: fix a memory leak in fence cleanup when unloading
  drm/xe: Extend Wa_13011645652 to PTL-H, WCL
  drm/xe: Block exec and rebind worker while evicting for suspend / hibernate
  drm/xe: Allow the pm notifier to continue on failure
  drm/xe: Attempt to bring bos back to VRAM after eviction
  drm/xe/configfs: Don't touch survivability_mode on fini
  amd/amdkfd: correct mem limit calculation for small APUs
  drm/amdkfd: fix p2p links bug in topology
  drm/amd/display: remove oem i2c adapter on finish
  drm/amd/display: Drop dm_prepare_suspend() and dm_complete()
  drm/amd/display: Correct sequences and delays for DCN35 PG & RCG
  drm/amd/display: Disable DPCD Probe Quirk
  drm/i915/power: fix size for for_each_set_bit() in abox iteration
  ...

3 months agoMerge tag 'v6.17-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 12 Sep 2025 16:03:01 +0000 (09:03 -0700)]
Merge tag 'v6.17-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:
 "Two smb3 client fixes, both for stable:

   - Fix encryption problem with multiple compounded ops

   - Fix rename error cases that could lead to data corruption"

* tag 'v6.17-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: fix data loss due to broken rename(2)
  smb: client: fix compound alignment with encryption

3 months agodrm/xe/hwmon: Remove type casting
Mallesh Koujalagi [Fri, 12 Sep 2025 11:34:58 +0000 (17:04 +0530)]
drm/xe/hwmon: Remove type casting

Refactor: eliminate type casts by using proper u32
declarations.

v2:
- Address review comments. (Karthik)

v3:
- Use the proper u32 type and drop cast. (Lucas De Marchi)
- Modify variable when actually using u64 value.
- Change r value to reg_value with u32 type.

v4:
- Remove newline between trailer and Signed-off-by. (Lucas De Marchi)
- Change reg_val to val for more user-friendly logging.
- Use mul_u32_u32 function since both values are u32.

v5:
- mul_u32_u32 function with shift. (Lucas De Marchi)

Fixes: 7596d839f6228 ("drm/xe/hwmon: Add support to manage power limits though mailbox")
Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250912113458.2815172-1-mallesh.koujalagi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
3 months agodrm/xe/guc: Fix spelling mistake "sheduling" -> "scheduling"
Colin Ian King [Fri, 12 Sep 2025 07:43:30 +0000 (08:43 +0100)]
drm/xe/guc: Fix spelling mistake "sheduling" -> "scheduling"

There is a spelling mistake in a xe_gt_err error message. Fix it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://lore.kernel.org/r/20250912074330.1275279-1-colin.i.king@gmail.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
3 months agodrm/xe/xe3: Extend Wa_18041344222 to graphics IP versions 30.00 and 30.01
Harish Chegondi [Thu, 11 Sep 2025 01:27:41 +0000 (18:27 -0700)]
drm/xe/xe3: Extend Wa_18041344222 to graphics IP versions 30.00 and 30.01

Apply WA 18041344222 to Xe3 LPG graphics IP versions 30.00 and 30.01 too.

Bspec: 56024
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Matt Atwood <matthew.s.atwood@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/7368f8059013424ac94f4a01c23f9c98a37b06dc.1757552915.git.harish.chegondi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
3 months agodrm/xe: Fix circular locking dependency
Rodrigo Vivi [Thu, 11 Sep 2025 21:20:25 +0000 (17:20 -0400)]
drm/xe: Fix circular locking dependency

Fix this:

 ======================================================
 WARNING: possible circular locking dependency detected
 6.17.0-rc4-lgci-xe-xe-pw-153723v2+ #1 Tainted: G S   U
 ------------------------------------------------------
 xe_pm/11324 is trying to acquire lock:
 ffff8881085f22a0 (&pc->freq_lock){+.+.}-{3:3}, at:
    xe_guc_pc_start+0x39f/0xf70 [xe]

but task is already holding lock:

 ffffffffa1020420 (xe_rpm_nod3cold_map){+.+.}-{0:0}, at:
    xe_rpm_lockmap_acquire+0x1a/0x70 [xe]

which lock already depends on the new lock.

Possible unsafe locking scenario:
      CPU0                    CPU1
      ----                    ----
 lock(xe_rpm_nod3cold_map);
                              lock(&pc->freq_lock);
                              lock(xe_rpm_nod3cold_map);
 lock(&pc->freq_lock);

Reported-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6122
Fixes: 60d2b7899142 ("drm/xe/guc: Add SLPC power profile interface")
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Tested-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://lore.kernel.org/r/20250911212024.966757-2-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
3 months agoUSB: core: remove the move buf action
Edward Adam Davis [Wed, 10 Sep 2025 07:58:47 +0000 (15:58 +0800)]
USB: core: remove the move buf action

The buffer size of sysfs is fixed at PAGE_SIZE, and the page offset
of the buf parameter of sysfs_emit_at() must be 0, there is no need
to manually manage the buf pointer offset.

Fixes: 711d41ab4a0e ("usb: core: Use sysfs_emit_at() when showing dynamic IDs")
Reported-by: syzbot+b6445765657b5855e869@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=b6445765657b5855e869
Tested-by: syzbot+b6445765657b5855e869@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Link: https://lore.kernel.org/r/tencent_B32D6D8C9450EBFEEE5ACC2C7B0E6C402D0A@qq.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 months agodrm/xe: Use tile-oriented messages in GGTT code
Michal Wajdeczko [Tue, 9 Sep 2025 16:59:39 +0000 (18:59 +0200)]
drm/xe: Use tile-oriented messages in GGTT code

Use recently added macros to print tile-oriented messages.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250909165941.31730-6-michal.wajdeczko@intel.com
3 months agodrm/xe: Add dedicated printk macros for tile and device
Michal Wajdeczko [Tue, 9 Sep 2025 16:59:38 +0000 (18:59 +0200)]
drm/xe: Add dedicated printk macros for tile and device

We already have dedicated helper macros for printing GT-oriented
messages but we don't have any to print messages that are tile
oriented and we wrongly try to use plain drm or GT-oriented ones.

Add tile-oriented printk messages and to provide similar coverage
as we have with xe_assert() macros. Also add set of simple macros
for the top level xe_device, which we could easily tweak to include
extra device specific info if needed.

Typical output of our printk macros will look like:

 [drm] this is xe_WARN()
 [drm] *ERROR* this is xe_err()
 [drm] *ERROR* this is xe_err_printer()
 [drm] this is xe_info()
 [drm] this is xe_info_printer()
 [drm:printk_demo.cold] this is xe_dbg()
 [drm:printk_demo.cold] this is xe_dbg_printer()

 [drm] Tile0: this is xe_tile_WARN()
 [drm] *ERROR* Tile0: this is xe_tile_err()
 [drm] *ERROR* Tile0: this is xe_tile_err_printer()
 [drm] Tile0: this is xe_tile_info()
 [drm] Tile0: this is xe_tile_info_printer()
 [drm:printk_demo.cold] Tile0: this is xe_tile_dbg()
 [drm:printk_demo.cold] Tile0: this is xe_tile_dbg_printer()

 [drm] Tile0: GT0: this is xe_gt_WARN()
 [drm] *ERROR* Tile0: GT0: this is xe_gt_err()
 [drm] *ERROR* Tile0: GT0: this is xe_gt_err_printer()
 [drm] Tile0: GT0: this is xe_gt_info()
 [drm] Tile0: GT0: this is xe_gt_info_printer()
 [drm:printk_demo.cold] Tile0: GT0: this is xe_gt_dbg()
 [drm:printk_demo.cold] Tile0: GT0: this is xe_gt_dbg_printer()

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250909165941.31730-5-michal.wajdeczko@intel.com
3 months agodrm/xe: Prepare format for GT-oriented messages in one place
Michal Wajdeczko [Tue, 9 Sep 2025 16:59:37 +0000 (18:59 +0200)]
drm/xe: Prepare format for GT-oriented messages in one place

To avoid code duplication (and thus potential mistakes) and to
allow easier changes (if needed) of the prefix format of the
GT-oriented messages, prepare that prefix in dedicated macro.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250909165941.31730-4-michal.wajdeczko@intel.com
3 months agodrm/xe: Drop "gt_" prefix from xe_gt_WARN() macros
Michal Wajdeczko [Tue, 9 Sep 2025 16:59:36 +0000 (18:59 +0200)]
drm/xe: Drop "gt_" prefix from xe_gt_WARN() macros

Those WARN messages will already include GT-specific "GT%u:" prefix
so there is no point to include additional "gt_" prefix.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250909165941.31730-3-michal.wajdeczko@intel.com