aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2026-06-16drm/xe/drm_ras: Make counter allocation drm managedRaag Jadav1-2/+1
cleanup_node_param() is not registered for previous node in case of counter allocation failure, which results in stale memory of previous node that isn't cleaned up on unwind. Fix this using drm managed allocation, which is guaranteed to be cleaned up on unwind. Fixes: b40db12b542f ("drm/xe/xe_drm_ras: Add support for XE DRM RAS") Signed-off-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Riana Tauro <riana.tauro@intel.com> Link: https://patch.msgid.link/20260602044919.702209-3-raag.jadav@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com> (cherry picked from commit 58d77c77ea0c5cb2b755ebe23e973c8272acd896) Signed-off-by: Matthew Brost <matthew.brost@intel.com>
2026-06-16drm/xe/multi_queue: skip submit when primary queue is suspendedNiranjana Vishwanathapura1-1/+4
Return early in submit path when the multi-queue primary exec queue is suspended to avoid submitting while suspended. v2: Remove idle_skip_suspend fix as that feature is being reverted here https://patchwork.freedesktop.org/series/167262/ Fixes: bc5775c59258 ("drm/xe/multi_queue: Add GuC interface for multi queue support") Cc: stable@vger.kernel.org # v7.0+ Assisted-by: GitHub-Copilot:claude-sonnet-4.6 Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Link: https://patch.msgid.link/20260603233946.863663-2-niranjana.vishwanathapura@intel.com (cherry picked from commit b7fb55cc3364ca128cfff9d50649ffd4327cd01e) Signed-off-by: Matthew Brost <matthew.brost@intel.com>
2026-06-16drm/xe: Clear pending_disable before signaling suspend fenceTangudu Tilak Tirumalesh1-1/+1
In the schedule-disable done path for suspend, we signal the suspend fence before clearing pending_disable. That wakeup can let suspend_wait complete and resume be queued immediately. The resume path may then reach enable_scheduling() while pending_disable is still set and hit the !exec_queue_pending_disable(q) assertion. Fix this by clearing pending_disable before signaling the suspend fence, so any resumed transition observes a consistent state. Fixes: 87651f31ae4e ("drm/xe/guc_submit: fix race around suspend_pending") Cc: stable@vger.kernel.org # v7.0+ Signed-off-by: Tangudu Tilak Tirumalesh <tilak.tirumalesh.tangudu@intel.com> Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patch.msgid.link/20260603065217.3131066-3-tilak.tirumalesh.tangudu@intel.com (cherry picked from commit 4b1ae138b0e103d753773956a84eebc2edbf62c4) Signed-off-by: Matthew Brost <matthew.brost@intel.com>
2026-06-16Revert "drm/xe: Skip exec queue schedule toggle if queue is idle during suspend"Tangudu Tilak Tirumalesh3-77/+5
This reverts commit 8533051ce92015e9cc6f75e0d52119b9d91610b6. The idle-skip optimization bypasses GuC suspend, so the GPU may not perform the context switch that flushes TLB entries for invalidated userptr VMAs. In LR/preempt-fence VM mode, this can lead to missed TLB invalidation and page faults during userptr invalidation tests. Restore unconditional schedule toggling on suspend so the context-switch TLB flush is always performed. This optimization will be reintroduced with a fix that does not skip suspend in LR/preempt-fence VM mode. Fixes: 8533051ce920 ("drm/xe: Skip exec queue schedule toggle if queue is idle during suspend") Cc: stable@vger.kernel.org # v7.0+ Suggested-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com> Signed-off-by: Tangudu Tilak Tirumalesh <tilak.tirumalesh.tangudu@intel.com> Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patch.msgid.link/20260603065217.3131066-2-tilak.tirumalesh.tangudu@intel.com (cherry picked from commit 6a1e7934d9a6cf46aecae00a99c2603d1295e170) Signed-off-by: Matthew Brost <matthew.brost@intel.com>
2026-06-16Revert "drm/xe/nvls: Define GuC firmware for NVL-S"Daniele Ceraolo Spurio1-1/+0
This reverts commit 4e88de313ff4d1c67b644b1f39f9fb4089711b71. The early GuC FW definition meant for our CI branch was accidentally merged to the drm-xe-next branch instead. This GuC FW will never be released to linux-firmware, so we do not want the definition to be available in the mainline Linux codebase. Fixes: 4e88de313ff4 ("drm/xe/nvls: Define GuC firmware for NVL-S") Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Julia Filipchuk <julia.filipchuk@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: stable@vger.kernel.org # v7.0+ Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260529193558.185436-11-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (cherry picked from commit 65b8e0ac86e48cfc9128c04dfc53ea3395d030dd) Signed-off-by: Matthew Brost <matthew.brost@intel.com>
2026-06-16drm/i915/mtl+: Enable PPS before PLLImre Deak1-3/+8
Enabling PPS after a display port's PLL is enabled leads to PLL / DDI BUF timeouts during system resuming after a long (> 45 mins) suspended state, at least on some ARL and MTL laptops, either all or some of them also containing an Nvidia GPU. Enabling PPS first and then the PLL fixes the problem for all the reporters. A similar issue is seen when enabling an external DP output on PHY B (vs. PHY A in the above eDP cases), where this change will not have any effect (since no PPS is used in that case). There isn't any direct connection between PPS and PLL, so the fix for eDP works by some side-effect only. However Bspec does seem to require enabling PPS first, so let's do that. Further investigation continues on the actual root cause and a cure for external panels. Fixes: 1a7fad2aea74 ("drm/i915/cx0: Enable dpll framework for MTL+") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16098 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16064 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16042 Cc: Mika Kahola <mika.kahola@intel.com> Cc: stable@vger.kernel.org # v7.0+ Tested-by: Jouni Högander <jouni.hogander@intel.com> Tested-by: Marco Nenciarini <mnencia@kcore.it> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20260612172617.3427027-1-imre.deak@intel.com (cherry picked from commit 28783a274e886dd6da61419be6020bd9d0384e9f) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-06-16drm/i915: clear CRTC color blob pointers after dropping refsGuangshuo Li1-0/+6
intel_crtc_put_color_blobs() drops the CRTC color blob references, but leaves the corresponding pointers unchanged. This can matter in intel_crtc_prepare_cleared_state(), which frees the old CRTC hw state before calling intel_dp_tunnel_atomic_clear_stream_bw(). The latter can fail while looking up the DP tunnel group state, for example with -EDEADLK. If that happens, the function returns without completing the cleared state preparation. The failed atomic state will then be cleared by the atomic core and intel_crtc_free_hw_state() can be called again for the same state, dropping the same blob references again. Clear the blob pointers after dropping the references so repeated cleanup of the same CRTC hw state is safe. Fixes: 77fcf58df15e ("drm/i915/dp_tunnel: Fix error handling when clearing stream BW in atomic state") Suggested-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20260612035310.3013066-1-lgs201920130244@gmail.com (cherry picked from commit d5005addb5f68e8a0edce249506757bdc9e3d8c8) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-06-16drm/i915/mst: Call intel_pfit_compute_config() for sharpness filterVille Syrjälä1-0/+4
The sharpness filter property is on the CRTC (as opposed to the connector) so the expectation is that it's usable on all output types. Since the sharpness filter is now fully integrateds into the normal pfit code intel_pfit_compute_config() must be called from the encoder .compute_config() on all relevant output types. Sharpness filter is supported on LNL+ so only HDMI and DP SST/MST outputs are actually relevant. I already took care of HDMI and DP SST, but (as usual) forgot about DP MST. Add the missing intel_pfit_compute_config() call to make the sharpness filter operational on DP MST as well. Cc: Nemesa Garg <nemesa.garg@intel.com> Fixes: d4686f34bbeb ("drm/i915/pfit: Call intel_pfit_compute_config() unconditionally on (e)DP/HDMI") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260409100841.1907-1-ville.syrjala@linux.intel.com Reviewed-by: Nemesa Garg <nemesa.garg@intel.com> (cherry picked from commit ca97f5546f191bf460b3f4b59ade3ea5e7378796) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-06-16drm/xe: Add compact-PT and addr mask handling for page reclaimBrian Nguyen2-55/+82
Current implementation of generate_reclaim_entry() overlooks some differences between the different page implementations: address masking and compact 64K page handling. Address masking of each leaf varies depending on the leaf entry size. generate_reclaim_entry() is using XE_PTE_ADDR_MASK [51:12] for all leaf entries. For 2MB PTEs, bit 12 (PAT) is part of the flags so the old mask corrupts the physical address extraction. 64K pages can be represented as PS64 and a compact PT, which the latter was not handled. Compact pages aren't walked by the unbind walker, so we separately walk through the compact PT to ensure none of the leaf 64K PTEs are dropped. Previously, compact PT were causing an abort since it was considered covered and not descended into. v2: - Update 64K entry/unbind walker for 64K compact PT handling. (Matthew) - Rework calculations of reclamation and address mask size. - Add new func abstracting the error handling before generating the reclaim entry. v3: - Report finer addr granularity in abort debug print for compact. (Zongyao) - Add comments for ADDR_MASK usage. (Zongyao) - Drop existing phys_addr asserts, the new XE_PAGE_ADDR_MASK clears bits checked, so redundant asserts. (Sashiko) - WARN_ON to verify compact pt and edge pt won't be possible. Fixes: b912138df299 ("drm/xe: Create page reclaim list on unbind") Assisted-by: Sashiko-Review:gemini-3.1-pro-preview Cc: stable@vger.kernel.org Cc: Matthew Auld <matthew.auld@intel.com> Suggested-by: Zongyao Bai <zongyao.bai@intel.com> Signed-off-by: Brian Nguyen <brian3.nguyen@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Zongyao Bai <zongyao.bai@intel.com> Link: https://patch.msgid.link/20260605224257.2194194-2-brian3.nguyen@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2026-06-16drm/i915/cmtg: Add CMTG interrupt handlingAnimesh Manna4-1/+46
Add support for the CMTG vblank interrupt, which is delivered through the DE port interrupt block. Enable/disable the interrupt via the DE port IMR around CMTG enable/disable, and dispatch the CMTG_VBLANK_{A,B} bits to the corresponding pipe vblank handler in the gen8 DE IRQ handler. Wired up for DISPLAY_VER 35. The CMTG interrupt is not enabled via IER today because CMTG is brought up together with the eDP transcoder; this can be revisited later. v2: - Use consistent DC3co check as used in earlier patches. [Uma] - Use else-if instead of separate if block. [Uma] - Merge mask and unmask function as it is similar. [Uma] - Modify DISPLAY_VER() check. [Uma] v3: - Enable only vblank interrupt. [Dibin] v4: - Keep irq related code to intel_display_irq.c. [Jani, Uma] Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/20260615200339.885190-23-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Restore CMTG after DC6 exitAnimesh Manna3-4/+42
Restore CMTG registers after DC6 exit, as they lose their values in the low-power state. v2: Introduce intel_cmtg_restore() instead of calling multiple cmtg functions. [Uma] Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/20260615200339.885190-22-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Add trigger to enable/disable cmtgAnimesh Manna3-15/+41
Enable CMTG with fixed refresh rate mode and with dynamic dc state enabled. Disable CMTG with transcoder disable or if there is a transition to vrr mode from fixed refresh rate mode. v2: - Move the enabled flag update to avoid issue in the disable timeout path. [Uma] v3: - Introduce intel_cmtg_program() rather calling multiple cmtg functions. [Dibin] - Set clock select before cmtg disable as can lost during dc6 entry. [Dibin] - Disable cmtg interrupt in crtc-disable(). [Dibin] - Got R-b from Uma. v4: - Simplify the code further by moving for_each_new_intel_crtc_in_state inside intel_cmtg.c. Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/20260615200339.885190-21-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Add CMTG scan line programmingDibin Moolakadan Subrahmanian2-0/+8
Enable the hardware based guardband calculations which allows DC3co to remain enabled when timings are changing from one fixed refresh rate to another fixed refresh rate. Bspec: 75253 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-20-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Add CMTG HWGB programmingDibin Moolakadan Subrahmanian3-0/+41
Program CMTG guardband to generate the Lower/Upper and early entry guardband indicators to the DMC for DC3co control. v2: - Specify the unit for DC3CO entry/exit latency. [Uma] - Add code comment for default line_time_us. [Uma] Bspec: 75253 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-19-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Modify existing hook to disable CMTGDibin Moolakadan Subrahmanian3-3/+45
Earlier cmtg_disable() used to disable all instances of CMTG which cannot handle individual request for specific CMTG instance. Introduce cmtg_disable_all() which will disable all cmtg instances and cmtg_disable() only disable specific instance. v2: - Use intel_de_rmw to simplify. [Uma] v3: - Add a code comment describing when cpu_transcoder should be used instead of cmtg_transcoder. [Uma] Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/20260615200339.885190-18-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Add a hook to make eDP transcoder secondaryAnimesh Manna3-0/+19
Program DDI_FUNC_CTL2 to configure the eDP transcoder as secondary to the CMTG transcoder. v2: - Update commit header to be more clear. [Uma] Bspec: 68915 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-17-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Add hook to enable CMTG with sync to portAnimesh Manna3-6/+29
Add a hook to enable CMTG by programming CMTG CTL with Sync to Port. When CMTG starts running, the Sync to Port bit will be cleared. Add a wait to check its running status and trigger WARN_ON() on timeout. Bspec: 69088 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-16-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Set link M/N for CMTG transcoderAnimesh Manna3-1/+18
Program CMTG link M/N. Not much to reuse so add a separate function for CMTG. Bspec: 68989 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-15-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Program VRR control register for CMTG transcoderAnimesh Manna3-0/+23
Add intel_cmtg_set_vrr_ctl() to program TRANS_VRR_CTL for the CMTG transcoder. Purposefully avoid using the existing VRR enable path, as many of its operations are not needed for CMTG. v2: Use sw state instead of reading from hardware. [Jani] v3: Program cmtg vrr control register along with vrr transcoder registers. [R-b from Uma] v4: Split out from vrr timing registers programming. Bspec: 68989 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-14-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Program VRR fixed-rate timings for CMTG transcoderAnimesh Manna4-0/+15
Program the VRR registers of CMTG, as the VRR timing generator will always be enabled for NVL. Add intel_cmtg_set_vrr_timings() which mirrors the per-transcoder VRR VMIN/VMAX/FLIPLINE programming on the CMTG transcoder paired with the pipe's cpu_transcoder. Invoke it from intel_vrr_set_transcoder_timings() and from the LRR fastset path, right after the existing intel_vrr_set_fixed_rr_timings() calls, so the CMTG VRR timing registers stay in sync with the cpu_transcoder's. v2: Use sw state instead of reading from hardware. [Jani] v3: Program cmtg vrr timing registers along with vrr transcoder registers. v4: Reuse vrr timing programming helper. Bspec: 68989 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-13-animesh.manna@intel.com
2026-06-16drm/i915/display: Rename cpu_transcoder parameter to transcoder in VRR fixed-rr pathAnimesh Manna2-5/+5
intel_vrr_set_fixed_rr_timings() now takes the target transcoder as an explicit argument rather than implicitly using crtc_state->cpu_transcoder, so the parameter name 'cpu_transcoder' is misleading. Rename it to plain 'transcoder' to reflect that any transcoder may be programmed. No functional change. Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/20260615200339.885190-12-animesh.manna@intel.com
2026-06-16Merge tag 'linux_kselftest-kunit-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftestLinus Torvalds1-6/+40
Pull kunit updates from Shuah Khan: "Fixes to tool and kunit core and new features to both to support JUnit XML (primitive) and backtrace suppression API: - Core support for suppressing warning backtraces - Parse and print the reason tests are skipped - Add (primitive) support for outputting JUnit XML - Don't write to stdout when it should be disabled - Add backtrace suppression self-tests - Suppress intentional warning backtraces in scaling unit tests - Add documentation for warning backtrace suppression API - Fix spelling mistakes in comments and messages - gen_compile_commands: Ignore libgcc.a - qemu_configs: Add or1k / openrisc configuration" * tag 'linux_kselftest-kunit-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit:tool: Don't write to stdout when it should be disabled kunit: tool: Add (primitive) support for outputting JUnit XML kunit: tool: Parse and print the reason tests are skipped kunit: Add documentation for warning backtrace suppression API drm: Suppress intentional warning backtraces in scaling unit tests kunit: Add backtrace suppression self-tests bug/kunit: Core support for suppressing warning backtraces kunit: Fix spelling mistakes in comments and messages kunit: qemu_configs: Add or1k / openrisc configuration gen_compile_commands: Ignore libgcc.a
2026-06-16drm/i915/vrr: Pass transcoder to intel_vrr_set_fixed_rr_timings()Animesh Manna3-6/+9
Take the target transcoder as an explicit parameter so the helper can program VRR VMIN/VMAX/FLIPLINE registers for transcoders other than the crtc_state->cpu_transcoder (e.g. the CMTG transcoder). No functional change: all existing callers pass crtc_state->cpu_transcoder. v2: - Add separate patch for renaming the cpu_transcoder variable. [Ville] Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-11-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Set timings for CMTG by using transcoder timing helpersAnimesh Manna4-6/+45
Expose intel_set_transcoder_timings() & intel_set_transcoder_timings_lrr() so that they can program timings on any transcoder, and use them from a new intel_cmtg_set_timings() helper instead of duplicating the timing register write sequence for CMTG. intel_cmtg_set_timings() maps the CPU transcoder to the corresponding CMTG transcoder (TRANSCODER_A->TRANSCODER_CMTG0, TRANSCODER_B-> TRANSCODER_CMTG1) and calls the shared helper, gated by intel_cmtg_is_allowed(). It is invoked from hsw_configure_cpu_transcoder() for the full modeset path and from intel_pipe_fastset() for the LRR update path. v2: - Use sw state instead of reading directly from hardware. [Jani] - Move set_timing later after encoder enable. [Dibin] v3: - Replace id with trans. [Jani] - Program cmtg set_timing() along with primary transcoder timing. v4: - Use _MMIO_TRANS() for cmtg registers instead of direct multiplication. [Jani] v5: - Modify register definition approach and match existing transcoder definition. [Ville] v6: - Reuse transcoder timing helpers. [Ville] v7: - Introduce enum for set_timing_type. [Uma] - Add check for INVALID_TRANSCODER. [Uma] Bspec: 68989 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-10-animesh.manna@intel.com
2026-06-16drm/i915/display: Rename cpu_transcoder parameter to transcoder in LRR pathAnimesh Manna1-6/+6
intel_set_transcoder_timings_lrr() now takes the target transcoder as an explicit argument rather than implicitly using crtc_state->cpu_transcoder, so the parameter name 'cpu_transcoder' is misleading. Rename it to plain 'transcoder' to reflect that any transcoder may be programmed. No functional change. Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/20260615200339.885190-9-animesh.manna@intel.com
2026-06-16drm/i915/display: Pass transcoder to intel_set_transcoder_timings_lrr()Animesh Manna1-7/+7
Make intel_set_transcoder_timings_lrr() take the target transcoder as an explicit parameter instead of always using crtc_state->cpu_transcoder. This allows the LRR timing programming sequence to be reused for other transcoders (e.g. CMTG). Move the intel_vrr_set_fixed_rr_timings() and intel_vrr_transcoder_enable() calls out of intel_set_transcoder_timings_lrr() and into its only caller intel_pipe_fastset(), so the helper now strictly programs the LRR timing registers for the given transcoder. No functional change intended. v2: - Add separate patch for renaming the cpu_transcoder variable. [Ville] Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-8-animesh.manna@intel.com
2026-06-16drm/i915/display: Skip DP_MIN_HBLANK_CTL programming for CMTG transcodersAnimesh Manna1-1/+3
DP_MIN_HBLANK_CTL is a CPU transcoder register and must not be written for the CMTG transcoders. Skip the programming when the target transcoder is TRANSCODER_CMTG0 or TRANSCODER_CMTG1. Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-7-animesh.manna@intel.com
2026-06-16drm/i915/display: Rename cpu_transcoder parameter to transcoderAnimesh Manna1-13/+13
intel_set_transcoder_timings() now takes the target transcoder as an explicit argument rather than implicitly using crtc_state->cpu_transcoder, so the parameter name 'cpu_transcoder' is misleading. Rename it to plain 'transcoder' to reflect that any transcoder may be programmed. No functional change. Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/20260615200339.885190-6-animesh.manna@intel.com
2026-06-16drm/i915/display: Pass target transcoder to intel_set_transcoder_timings()Animesh Manna1-6/+7
Let intel_set_transcoder_timings() take the target transcoder as an explicit argument instead of always using crtc_state->cpu_transcoder. This makes the helper reusable for callers that need to program timings for a transcoder other than the CRTC's CPU transcoder. Update all existing callers to pass crtc_state->cpu_transcoder so there is no functional change. Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-5-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Add CMTG transcoder offset in struct _device_infoAnimesh Manna3-1/+17
As all cmtg registers offset from base cmtg register is similar to normal transcoder register, so follow existing way of defining transcoder register for cmtg as well. Add base CMTG offset in struct _display_device_info which will be used to derive the actual register address for platform supporting CMTG. Bspec: 68989 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-4-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Set CMTG clock selectAnimesh Manna4-0/+36
Program the CMTG Clock Select register based on the transcoder used. v2: - Correct mask for PHY B. [Jani] - Use REG_FIELD_PREP() for enable value. [Dibin] - Extend cmtg clock select for xe3plpd. [Dibin] v3: - CMTG support removed for old platform. v4: - Optimize further with else-if. [Uma] - Correct CMTG_CLK_SEL_B_MASK. [Uma] v5: - Add transcoder-port compatibility check. [Dibin] Bspec: 69103 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Link: https://patch.msgid.link/20260615200339.885190-3-animesh.manna@intel.com
2026-06-16drm/i915/cmtg: Add intel_cmtg_is_allowed() for CMTGAnimesh Manna2-1/+17
CMTG is supported on transcoder A and transcoder B with EDP, so add a separate helper intel_cmtg_is_allowed() to check the prerequisites for enabling CMTG. CMTG will be enabled only in specific use cases such as PSR2, PR-ALPM, and LOBF, and will be used in conjunction with the DC3CO feature. DC3co will be enabled in a separate patch. Note: Use-case-specific checks and transcoder-port compatibility validation will be handled part of DC3co feature implementation. v2: - Remove separate flag for DC3co from crtc_state. [Uma, Dibin] v3: - Do not access power domain members directly. [Jani] v4: - Remove check for DC3co state now. if needed add Dc3co allow check later once Dc3co patches are merged. [Uma] Bspec: 68915 Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260615200339.885190-2-animesh.manna@intel.com
2026-06-16drm/solomon: use ssd130x_run_cmd_seq() in ssd133x_init()Alberto Ruiz1-106/+30
Replace individual ssd130x_write_cmd() calls and per-command error checks with a flat command array dispatched through ssd130x_run_cmd_seq(). Signed-off-by: Alberto Ruiz <aruiz@redhat.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260612-ssd-batchcmd-v1-4-c61e5f7c24bc@redhat.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2026-06-16drm/solomon: use ssd130x_run_cmd_seq() in ssd132x_init()Alberto Ruiz1-85/+26
Replace individual ssd130x_write_cmd() calls and per-command error checks with a flat command array dispatched through ssd130x_run_cmd_seq(). Signed-off-by: Alberto Ruiz <aruiz@redhat.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260612-ssd-batchcmd-v1-3-c61e5f7c24bc@redhat.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2026-06-16drm/solomon: use ssd130x_run_cmd_seq() in ssd130x_init()Alberto Ruiz1-37/+19
Replace individual ssd130x_write_cmd() calls and per-command error checks with flat command arrays dispatched through ssd130x_run_cmd_seq(). Signed-off-by: Alberto Ruiz <aruiz@redhat.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260612-ssd-batchcmd-v1-2-c61e5f7c24bc@redhat.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2026-06-16drm/solomon: add ssd130x_run_cmd_seq() for batch command executionAlberto Ruiz1-0/+43
Introduce ssd130x_run_cmd_seq() that interprets a flat byte array of length-prefixed command entries terminated by a zero byte, removing the need for per-command error checking at each call site. Signed-off-by: Alberto Ruiz <aruiz@redhat.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260612-ssd-batchcmd-v1-1-c61e5f7c24bc@redhat.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2026-06-16Merge tag 'slab-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slabLinus Torvalds2-12/+14
Pull slab updates from Vlastimil Babka: - Support for "allocation tokens" (currently available in Clang 22+) for smarter partitioning of kmalloc caches based on the allocated object type, which can be enabled instead of the "random" per-caller-address-hash partitioning. It should be able to deterministically separate types containing a pointer from those that do not (Marco Elver) - Improvements and simplification of the kmem_cache_alloc_bulk() and mempool_alloc_bulk() API. This includes adaptation of callers (Christoph Hellwig) - Performance improvements and cleanups related mostly to sheaves refill (Hao Li, Shengming Hu, Vlastimil Babka) - Several fixups for the slabinfo tool (Xuewen Wang) * tag 'slab-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm/slab: do not limit zeroing to orig_size when only red zoning is enabled mm/slub: preserve original size in _kmalloc_nolock_noprof retry path mm: simplify the mempool_alloc_bulk API mm/slab: improve kmem_cache_alloc_bulk mm/slub: detach and reattach partial slabs in batch mm/slub: introduce helpers for node partial slab state mm/slub: use empty sheaf helpers for oversized sheaves tools/mm/slabinfo: remove redundant slab->partial assignment tools/mm/slabinfo: remove dead assignment in get_obj_and_str() tools/mm/slabinfo: Fix trace disable logic inversion MAINTAINERS: add slab-related scripts and tools to SLAB ALLOCATOR mm/slub: fix typo in sheaves comment mm, slab: simplify returning slab in __refill_objects_node() mm, slab: add an optimistic __slab_try_return_freelist() slab: fix kernel-docs for mm-api slab: improve KMALLOC_PARTITION_RANDOM randomness slab: support for compiler-assisted type-based slab cache partitioning mm/slub: defer freelist construction until after bulk allocation from a new slab
2026-06-16Merge tag 'fbdev-for-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdevLinus Torvalds2-4/+4
Pull fbdev updates from Helge Deller: "Beside the removal of the Hercules monochrome ISA graphics driver and the corresponding text console driver, there is just the typical maintanance with smaller driver fixes and cleanups: Removal of drivers: - Hercules monochrome ISA graphics adapter driver (Ethan Nelson-Moore) - Hercules mdacon console driver (Ethan Nelson-Moore) Changes affecting many drivers at once: - possible memory leak fixes in various drivers (Abdun Nihaal) - many conversions to use strscpy() (David Laight) - Use named initializers in drivers (Uwe Kleine-König) Code fixes: - fbcon: don't suspend/resume when vc is graphics mode (Lu Yao) - modedb: fix a possible UAF in fb_find_mode() (Tuo Li) - modedb: Fix entry for 1920x1080-60 mode (Steffen Persvold) - arm: Export acorndata_8x8 font symbol for bootloader (Helge Deller) - omap2: fix use-after-free in omapfb_mmap (Hongling Zeng) Cleanups: - pxa168fb: use devm_ioremap_resource() (Alberto Arostegui) - provice helpers for fb_set_var() and fb_blank() and fbcon updates (Thomas Zimmermann) - fbcon: Use correct type for vc_resize() return value (Jiacheng Yu) - chipsfb: add missing MODULE_DESCRIPTION() macro (Rahman Mahmutović) - sunxvr2500: replace printk with device-aware logging functions (Rahman Mahmutović) - sm712: Fix operator precedence in big_swap macro (Li RongQing) - imxfb: Use of_device_get_match_data() (Rosen Penev) - atmel_lcdfb: Use of_device_get_match_data() (Rosen Penev) Documentation fixes: - grvga: Fix CLUT register address offset in comment (Eduardo Silva) - omap/dss: Fix stale modedb.c path (Costa Shulyupin) - correct CONFIG_FB_TILEBLITTING macro name in #endif comment (Ethan Nelson-Moore)" * tag 'fbdev-for-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (43 commits) fbdev: modedb: Fix misaligned fields in the 1920x1080-60 mode fbdev: modedb: fix a possible UAF in fb_find_mode() fbdev: s3fb: Use strscpy() to copy strings into arrays fbdev: sm501fb: Fix buffer errors in OF binding code fbcon: correct CONFIG_FB_TILEBLITTING macro name in #endif comment fbdev/arm: Export acorndata_8x8 font symbol for bootloader fbdev: mmpfb: Use strscpy() to copy device name fbdev: sisfb: Replace strlen() strcpy() pair with strscpy() fbdev: rivafb: Use strscpy() to copy device name fbdev: cyber2000fb: Use strscpy() to copy device name fbdev: atmel_lcdfb: Use strscpy() to copy device name fbdev: Do not export fbcon from fbdev fbdev: Wrap fbcon updates from vga-switcheroo in helper fbdev: Wrap user-invoked calls to fb_blank() in helper fbdev: Wrap user-invoked calls to fb_set_var() in helper fbdev: omap2: fix use-after-free in omapfb_mmap docs: omap/dss: Fix stale modedb.c path fbdev: pxa168fb: use devm_ioremap_resource() for MMIO fbdev: grvga: Fix CLUT register address offset in comment fbdev: sunxvr2500: replace printk with device-aware logging functions ...
2026-06-15drm: writeback: Document behaviour for framebuffer size mismatchDerek Foreman1-0/+6
Currently we have not explicitly defined the behaviour when the width and height of the writeback framebuffer do not match the width and height of the attached CRTC. Allow the driver to perform a scale operation to fit the content, so systems with scaling blocks in the writeback path can easily expose them. A partially filled buffer should never be returned, so failure remains an option for all the systems that don't have a scaler, or when scaler limits are exceeded. Cropping would make less sense, as the region to crop is underspecified without some other properties to define an origin. Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Link: https://patch.msgid.link/20260602191754.79047-1-derek.foreman@collabora.com Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2026-06-15drm/xe/guc: Fix buffer overflow in steered register list allocationTejas Upadhyay1-2/+8
The size calculation for the steered register extarray uses only the geometry DSS mask (g_dss_mask) to determine the number of entries to allocate: total = bitmap_weight(gt->fuse_topo.g_dss_mask, ...) * steer_reg_num; However, the filling loop uses for_each_dss_steering(), which iterates over for_each_dss(), defined as the union of g_dss_mask and c_dss_mask (geometry + compute DSS). On platforms with compute-only DSS bits, the loop writes past the allocated buffer, corrupting adjacent slab objects. This manifests as list_del corruption and SLUB redzone overwrites during drm_managed_release on device unbind, since the overflow corrupts the drmres list_head of neighboring allocations. Fix by computing the allocation size using the union of both DSS masks, matching the iteration pattern of for_each_dss_steering(). -- v2: - use bitmap_weighted_or() (Zhanjun) Fixes: b170d696c1e2 ("drm/xe/guc: Add XE_LP steered register lists") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/8049 Cc: Zhanjun Dong <zhanjun.dong@intel.com> Cc: stable@vger.kernel.org Assisted-by: GitHub-Copilot:claude-opus-4.6 Reviewed-by: Zhanjun Dong <zhanjun.dong@intel.com> Link: https://patch.msgid.link/20260612070401.543305-2-tejas.upadhyay@intel.com Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
2026-06-15drm/i915/mtl+: Enable PPS before PLLImre Deak1-3/+8
Enabling PPS after a display port's PLL is enabled leads to PLL / DDI BUF timeouts during system resuming after a long (> 45 mins) suspended state, at least on some ARL and MTL laptops, either all or some of them also containing an Nvidia GPU. Enabling PPS first and then the PLL fixes the problem for all the reporters. A similar issue is seen when enabling an external DP output on PHY B (vs. PHY A in the above eDP cases), where this change will not have any effect (since no PPS is used in that case). There isn't any direct connection between PPS and PLL, so the fix for eDP works by some side-effect only. However Bspec does seem to require enabling PPS first, so let's do that. Further investigation continues on the actual root cause and a cure for external panels. Fixes: 1a7fad2aea74 ("drm/i915/cx0: Enable dpll framework for MTL+") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16098 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16064 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16042 Cc: Mika Kahola <mika.kahola@intel.com> Cc: stable@vger.kernel.org # v7.0+ Tested-by: Jouni Högander <jouni.hogander@intel.com> Tested-by: Marco Nenciarini <mnencia@kcore.it> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20260612172617.3427027-1-imre.deak@intel.com
2026-06-15drm/i915: clear CRTC color blob pointers after dropping refsGuangshuo Li1-0/+6
intel_crtc_put_color_blobs() drops the CRTC color blob references, but leaves the corresponding pointers unchanged. This can matter in intel_crtc_prepare_cleared_state(), which frees the old CRTC hw state before calling intel_dp_tunnel_atomic_clear_stream_bw(). The latter can fail while looking up the DP tunnel group state, for example with -EDEADLK. If that happens, the function returns without completing the cleared state preparation. The failed atomic state will then be cleared by the atomic core and intel_crtc_free_hw_state() can be called again for the same state, dropping the same blob references again. Clear the blob pointers after dropping the references so repeated cleanup of the same CRTC hw state is safe. Fixes: fb69d0076e68 ("drm/i915/dp_tunnel: Fix error handling when clearing stream BW in atomic state") Suggested-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20260612035310.3013066-1-lgs201920130244@gmail.com
2026-06-15drm/displayid: fix Tiled Display Topology ID sizeJani Nikula2-7/+7
The Tiled Display Topology ID of a DisplayID Tiled Display Topology Data Block consists of three fields: - Tiled Display Manufacturer/Vendor ID Field (3 bytes) - Tiled Display Product ID Code Field (2 bytes) - Tiled Display Serial Number Field (4 bytes) i.e. a total of 9 bytes, not 8. The DisplayID Tiled Display Topology ID is used as the tile group identifier. Update both struct displayid_tiled_block topology_id member and struct drm_tile_group group_data member to full 9 bytes. The group data was missing the last byte of the serial number. I don't know whether there are known bug reports that might be linked to this, but it's plausible the last byte could be the differentiating part for the tile groups, and fewer tile groups might have been created than intended. Fixes: b49b55bd4fba ("drm/displayid: add displayid defines and edid extension (v2)") Fixes: 138f9ebb9755 ("drm: add tile_group support. (v3)") Cc: Dave Airlie <airlied@redhat.com> Cc: stable@vger.kernel.org # v3.19+ Reviewed-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260610141549.555605-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2026-06-15Merge tag 'x86-cpu-2026-06-14' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-0/+2
Pull x86 cpuid updates from Ingo Molnar: - CPUID API updates (Ahmed S. Darwish): - Introduce a centralized CPUID parser - Introduce a centralized CPUID data model - Introduce <asm/cpuid/leaf_types.h> - Rename cpuid_leaf()/cpuid_subleaf() APIs - treewide: Explicitly include the x86 CPUID headers - Update to x86-cpuid-db v3.1 (Maciej Wieczor-Retman) - Continued removal of pre-i586 support and related simplifications (Ingo Molnar) - Add Intel CPU model number for rugged Panther Lake (Tony Luck) - Misc fixes, updates and cleanups by Arnd Bergmann, Chao Gao, Lukas Bulwahn, Sohil Mehta, Maciej Wieczor-Retman. * tag 'x86-cpu-2026-06-14' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip: (25 commits) x86/cpu: Make CONFIG_X86_CX8 unconditional x86/cpu: Remove unused !CONFIG_X86_TSC code x86/cpuid: Update bitfields to x86-cpuid-db v3.1 tools/x86/kcpuid: Update bitfields to x86-cpuid-db v3.1 x86/cpu: Make CONFIG_X86_TSC unconditional MAINTAINERS: Drop obsolete FPU EMULATOR section x86/cpu: Fix a F00F bug warning and clean up surrounding code x86/cpu: Add Intel CPU model number for rugged Panther Lake x86/cpuid: Introduce a centralized CPUID parser x86/cpu: Introduce a centralized CPUID data model x86/cpuid: Introduce <asm/cpuid/leaf_types.h> x86/cpuid: Rename cpuid_leaf()/cpuid_subleaf() APIs x86/cpu: Do not include the CPUID API header in asm/processor.h Documentation: core-api/cpu_hotplug: Remove stale cpu0_hotplug docs x86/cpu, cpufreq: Remove AMD ELAN support x86/fpu: Remove the math-emu/ FPU emulation library x86/fpu: Remove the 'no387' boot option x86/fpu: Remove MATH_EMULATION and related glue code treewide: Explicitly include the x86 CPUID headers x86/cpu: Remove the CONFIG_X86_INVD_BUG quirk ...
2026-06-15drm/tests: Move test EDID data to separate .c fileNicolas Frattaroli3-977/+1006
Having the test EDID arrays defined in the .h directly will duplicate them across every user of the EDID arrays. This works fine as long as there's only one user, but may produce build warnings/errors when there are multiple users and not all of them use all definitions. Move the array definitions to a new .c file, and mark the declarations in the header as "extern" to avoid the linker throwing a fit, and give them an explicit size (either 128 or 256, depending on EDID) to avoid the compiler inferring that they must be size 1. Reported-by: Jani Nikula <jani.nikula@linux.intel.com> Closes: https://lore.kernel.org/r/04ff70850213ae0f75486b1a27a7edb6fb4e71c3@intel.com/ Fixes: ce1d0139adac ("drm/tests: bridge: Add test for HDMI output bus formats helper") Fixes: 082fbc179c01 ("drm/tests: bridge: Add KUnit tests for bridge chain format selection") Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patch.msgid.link/20260610-test-edid-array-definition-fix-v3-1-8ba947c1c453@collabora.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2026-06-15Merge tag 'driver-core-7.2-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git/driver-core/driver-coreLinus Torvalds5-24/+37
Pull driver core updates from Danilo Krummrich: "Deferred probe: - Fix race where deferred probe timeout work could be permanently canceled by using mod_delayed_work() - Fix missing jiffies conversion in deferred_probe_extend_timeout() - Guard timeout extension with delayed_work_pending() to prevent premature firing - Use system_percpu_wq instead of the deprecated system_wq - Update deferred_probe_timeout documentation device: - Replace direct struct device bitfield access (can_match, dma_iommu, dma_skip_sync, dma_ops_bypass, state_synced, dma_coherent, of_node_reused, offline, offline_disabled) with flag-based accessors using bit operations - Reject devices with unregistered buses - Delete unused DEVICE_ATTR_PREALLOC() - Add low-level device attribute macros with const show/store callbacks, allowing device attributes to reside in read-only memory - Move core device attributes to read-only memory - Constify group array pointers in driver_add_groups() / driver_remove_groups(), struct bus_type, and struct device_driver device property: - Fix fwnode reference leak in fwnode_graph_get_endpoint_by_id() - Initialize all fields of fwnode_handle in fwnode_init() - Provide swnode_get()/swnode_put() wrappers around kobject_get/put() - Allow passing struct software_node_ref_args pointers directly to PROPERTY_ENTRY_REF() driver_override: - Migrate amba, cdx, vmbus, and rpmsg to the generic driver_override infrastructure, fixing a UAF from unsynchronized access to driver_override in bus match() callbacks - Remove the now-unused driver_set_override() firmware loader: - Fix recursive lock deadlock in device_cache_fw_images() when async work falls back to synchronous execution - Fix device reference leak in firmware_upload_register() platform: - Pass KBUILD_MODNAME through the platform driver registration macro to create module symlinks in sysfs for built-in drivers; move module_kset initialization to a pure_initcall and tegra cbb registration to core_initcall to ensure correct ordering - Pass THIS_MODULE implicitly through a coresight_init_driver() macro sysfs: - Upgrade OOB write detection in sysfs_kf_seq_show() from printk to WARN - Add return value clamping to sysfs_kf_read() Rust: - ACPI: Fix missing match data for PRP0001 by exporting acpi_of_match_device() - Auxiliary: Replace drvdata() with dedicated registration data on auxiliary_device. drvdata() exposed the driver's bus device private data beyond the driver's own scope, creating ordering constraints and forcing the data to outlive all registrations that access it. Registration data is instead scoped structurally to the Registration object, making lifecycle ordering enforced by construction rather than convention. - Rust-native device driver lifetimes (HRT): Allow Rust device drivers to carry a lifetime parameter on their bus device private data, tied to the device binding scope -- the interval during which a bus device is bound to a driver. Device resources like pci::Bar<'a> and IoMem<'a> can be stored directly in the driver's bus device private data with a lifetime bounded by the binding scope, so the compiler enforces at build time that they do not outlive the binding. This removes Devres indirection from every access site and eliminates try_access() failure paths in destructors. Bus driver traits use a Generic Associated Type (GAT) Data<'bound> to introduce the lifetime on the private data, rather than parameterizing the Driver trait itself. Auxiliary registration data, where the lifetime is not introduced by a trait callback but must be threaded through Registration, uses the ForLt trait (a type-level abstraction for types generic over a lifetime). Misc: - Fix DT overlayed devices not probing by reverting the broken treewide overlay fix and re-running fw_devlink consumer pickup when an overlay is applied to a bound device - Use root_device_register() for faux bus root device; add sanity check for failed bus init - Fix dev_has_sync_state() data race with READ_ONCE() and move it to base.h - Avoid spurious device_links warning when removing a device while its supplier is unbinding - Switch ISA bus to dynamic root device - Fix suspicious RCU usage in kernfs_put() - Remove devcoredump exit callback - Constify devfreq_event_class" * tag 'driver-core-7.2-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git/driver-core/driver-core: (81 commits) software node: allow passing reference args to PROPERTY_ENTRY_REF() driver core: platform: set mod_name in driver registration coresight: pass THIS_MODULE implicitly through a macro kernel: param: initialize module_kset in a pure_initcall soc/tegra: cbb: Move driver registration from pure_initcall to core_initcall firmware_loader: Fix recursive lock in device_cache_fw_images() driver core: Use system_percpu_wq instead of system_wq driver core: remove driver_set_override() rpmsg: use generic driver_override infrastructure Drivers: hv: vmbus: use generic driver_override infrastructure cdx: use generic driver_override infrastructure amba: use generic driver_override infrastructure rust: devres: add 'static bound to Devres<T> samples: rust: rust_driver_auxiliary: showcase lifetime-bound registration data rust: auxiliary: generalize Registration over ForLt rust: types: add `ForLt` trait for higher-ranked lifetime support gpu: nova-core: separate driver type from driver data samples: rust: rust_driver_pci: use HRT lifetime for Bar rust: io: make IoMem and ExclusiveIoMem lifetime-parameterized rust: pci: make Bar lifetime-parameterized ...
2026-06-15Merge tag 'thermal-7.2-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git/rafael/linux-pmLinus Torvalds1-2/+3
Pull thermal control updates from Rafael Wysocki: "These add new hardware support (i.MX93 TMU, Amlogic T7, Intel Arrow Lake, QCom Nord, Shikra and Hawi), fix issues in a number of places in the thermal control core and drivers, clean up code and refactor it in preparation for future changes: - Rework the initialization and cleanup of thermal class cooling devices to separate DT-based cooling device registration and cooling device registration without DT (Daniel Lezcano, Ovidiu Panait) - Update the cooling device DT bindings to support 3-cell cooling device representation, where the additional cell holds an ID to select a cooling mechanism for devices that offer multiple cooling mechanisms, and adjust the cooling device registration code accordingly (Gaurav Kohli, Daniel Lezcano) - Remove dead code from two functions in the thermal core and simplify the unregistration of thermal governors (Rafael Wysocki) - Fix critical temperature attribute removal handling in the generic thermal zone hwmon support code and rework that code to register a separate hwmon class device for each thermal zone (instead of using one hwmon class device for all thermal zones of the same type) to address thermal zone removal deadlocks (Rafael Wysocki) - Use attribute groups for adding temperature attributes to hwmon class devices associated with thermal zones (Rafael Wysocki) - Pass WQ_UNBOUND when allocating the thermal workqueue (Marco Crivellari) - Fix potential shift overflow in ptc_mmio_write() and improve error handling in proc_thermal_ptc_add() in the int340x thermal control driver (Aravind Anilraj) - Use sysfs_emit() for cpumask printing in the Intel powerclamp thermal driver (Yury Norov) - Add Arrow Lake CPU models to the intel_tcc_cooling driver (Srinivas Pandruvada) - Add QCom Nord, Shikra and Hawi temperature sensor DT bindings (Deepti Jaggi, Gaurav Kohli, Dipa Ramesh Mantre) - Use devm_add_action_or_reset() for clock disable on the NVidia soctherm and switch it to devm cooling device registration version (Daniel Lezcano) - Add the Amlogic T7 thermal sensor along with thermal calibration data read from SMC calls (Ronald Claveau) - Fix atomic temperature read in the QCom tsens driver to comply with hardware documentation (Priyansh Jain) - Add SpacemiT K1 thermal sensor support (Shuwei Wu) - Add i.MX93 temperature sensor support and filter out the invalid temperature (Jacky Bai) - Enable by default the TMU (Thermal Monitoring Unit) on Exynos platform (Krzysztof Kozlowski) - Rework interrupt initialization in the Tsens driver and add the optional wakeup source (Priyansh Jain) - Fix typo in a comment in the TSens QCom driver (Jinseok Kim) - Fix trailing whitespace and repeated word in the OF code, remove quoted string splitting across lines from the iMX7 driver, and remove a stray space from the thermal_trip_of_attr() macro definition (Mayur Kumar) - Update the thermal testing facility code to avoid NULL pointer dereferences by rejecting missing command arguments and replace sscanf() with kstrtoint() or kstrtoul() in that code (Ovidiu Panait, Samuel Moelius)" * tag 'thermal-7.2-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git/rafael/linux-pm: (54 commits) thermal: sysfs: Replace sscanf() with kstrtoul() thermal: testing: Replace sscanf() with kstrtoint() thermal: testing: reject missing command arguments thermal: intel: intel_tcc_cooling: Add Arrow Lake CPU models thermal/drivers/qcom/tsens: Disable wakeup interrupt setup on automotive targets thermal/drivers/qcom/tsens: Switch wake IRQ handling to PM callbacks thermal/core: Fix missing stub for devm_thermal_cooling_device_register dt-bindings: thermal: cooling-devices: Update support for 3 cells cooling device thermal/of: Support cooling device ID in cooling-spec thermal/of: Pass cdev_id and introduce devm registration helper thermal/of: Add cooling device ID support thermal/of: Rename the devm_thermal_of_cooling_device_register() function thermal/core: Make cooling device OF node conditional on CONFIG_THERMAL_OF thermal/of: Move cooling device OF helpers out of thermal core hwmon: Use non-OF thermal cooling device registration API thermal/core: Add devm_thermal_cooling_device_register() thermal/core: Introduce non-OF thermal_cooling_device_register() thermal/drivers/samsung: Enable TMU by default thermal/driver/qoriq: Workaround unexpected temperature readings from tmu thermal/drivers/qoriq: Add i.MX93 tmu support ...
2026-06-15Merge tag 'rust-7.2' of gitolite.kernel.org:pub/scm/linux/kernel/git/ojeda/linuxLinus Torvalds5-12/+11
Pull Rust updates from Miguel Ojeda: "This one is big due to the vendoring of the `zerocopy` library, which allows us to replace a bunch of `unsafe` code dealing with conversions between byte sequences and other types with safe alternatives. More details on that below (and in its merge commit). Toolchain and infrastructure: - Introduce support for the 'zerocopy' library [1][2]: Fast, safe, compile error. Pick two. Zerocopy makes zero-cost memory manipulation effortless. We write `unsafe` so you don't have to. It essentially provides derivable traits (e.g. 'FromBytes') and macros (e.g. 'transmute!') for safely converting between byte sequences and other types. Having such support allows us to remove some 'unsafe' code. It is among the most downloaded Rust crates and it is also used by the Rust compiler itself. It is licensed under "BSD-2-Clause OR Apache-2.0 OR MIT". The crates are imported essentially as-is (only +2/-3 lines needed to be adapted), plus SPDX identifiers. Upstream has since added the SPDX identifiers as well as one of the tweaks at my request, thus reducing our future diffs on updates -- I keep the details in one of our usual live lists [3]. In total, it is about ~39k lines added, ~32k without counting 'benches/' which are just for documentation purposes. The series includes a few Kbuild and rust-analyzer improvements and an example patch using it in Nova, removing one 'unsafe impl'. I checked that the codegen of an isolated example function (similar to the Nova patch on top) is essentially identical. It also turns out that (for that particular case) the 'zerocopy' version, even with 'debug-assertions' enabled, has no remaining panics, unlike a few in the current code (since the compiler can prove the remaining 'ub_checks' statically). So their "fast, safe" does indeed check out -- at least in that case. - Support AutoFDO. This allows Rust code to be profiled and optimized based on the profile. Tested with Rust Binder: ~13% slower without AutoFDO in the binderAddInts benchmark (using an app-launch benchmark for the profile). - Support Software Tag-Based KASAN. In addition, fix KASAN Kconfig by requiring Clang. - Add Kconfig options for each existing Rust KUnit test suite, such as 'CONFIG_RUST_BITMAP_KUNIT_TEST'. They are placed within a new menu, 'CONFIG_RUST_KUNIT_TESTS', in the new 'rust/kernel/Kconfig.test' file. - Support the upcoming Rust 1.98.0 release (expected 2026-08-20): lint cleanups and an unstable flag rename. - Disable 'rustdoc' documentation inlining for all prelude items, which bloats the generated documentation. - Ignore (in Git) and clean (in Kbuild) the (rarely) 'rustc'-generated '*.long-type-*.txt' files. 'kernel' crate: - Add new 'bitfield' module with the 'bitfield!' macro (extracted from the existing 'register!' one), which declares integer types that are split into distinct bit fields of arbitrary length. Each field is a 'Bounded' of the appropriate bit width (ensuring values are properly validated and avoiding implicit data loss) and gets several generated getters and setters (infallible, 'const' and fallible) as well as associated constants ('_MASK', '_SHIFT' and '_RANGE'). It also supports fields that can be converted from/to custom types, either fallibly ('?=>') or infallibly ('=>'). For instance: bitfield! { struct Rgb(u16) { 15:11 blue; 10:5 green; 4:0 red; } } // Compile-time checks. let color = Rgb::zeroed().with_const_green::<0x1f>(); assert_eq!(color.green(), 0x1f); assert_eq!(color.into_raw(), 0x1f << Rgb::GREEN_SHIFT); Add as well documentation and a test suite for it, as usual; and update the 'register!' macro to use it. It will be maintained by Alexandre Courbot (with Yury Norov as reviewer) under a new 'MAINTAINERS' entry: 'RUST [BITFIELD]'. - 'ptr' module: rework index projection syntax into keyworded syntax and introduce panicking variant. The keyword syntax ('build:', 'try:', 'panic:') is more explicit and paves the way of perhaps adding more flavors in the future, e.g. an 'unsafe' index projection. For instance, projections now look like this: fn f(p: *const [u8; 32]) -> Result { // Ok, within bounds, checked at build time. project!(p, [build: 1]); // Build error. project!(p, [build: 128]); // `OutOfBound` runtime error (convertible to `ERANGE`). project!(p, [try: 128]); // Runtime panic. project!(p, [panic: 128]); Ok(()) } Update as well the users, which now look like e.g. // Pointer to the first entry of the GSP message queue. let data = project!(self.0.as_ptr(), .gspq.msgq.data[build: 0]); - 'build_assert' module: make the module the home of its macros instead of rendering them twice. - 'sync' module: add 'UniqueArc::as_ptr()' associated function. - 'alloc' module: - Fix the 'Vec::reserve()' doctest to properly account for the existing vector length in the capacity assertion. - Fix an incorrect operator in the 'Vec::extend_with()' 'SAFETY' comment; add a doc test demonstrating basic usage and the zero-length case. - Clean imports across several modules to follow the "kernel vertical" import style in order to minimize conflicts. 'pin-init' crate: - User visible changes: - Do not generate 'non_snake_case' warnings for identifiers that are syntactically just users of a field name. This would allow all '#[allow(non_snake_case)]' in nova-core to be removed, which Gary will send to the nova tree next cycle. - Filter non-cfg attributes out properly in derived structs. This improves pin-init compatibility with other derive macros. - Insert projection types' where clause properly. - Other changes: - Bump MSRV to 1.82, plus associated cleanups. - Overhaul how init slots are projected. The new approach is easier to justify with safety comments. - Mark more functions as inline, which should help mitigate the super-long symbol name issue due to lack of inlining. rust-analyzer: - Support '--envs' for passing env vars for crates like 'zerocopy'. 'MAINTAINERS': - Add the following reviewers to the 'RUST' entry: - Daniel Almeida - Tamir Duberstein - Alexandre Courbot - Onur Özkan They have been involved in the Rust for Linux project for about 7 collective years and bring expertise across several domains, which will be very useful to have around in the future. Thanks everyone for stepping up! And some other fixes, cleanups and improvements" Link: https://github.com/google/zerocopy [1] Link: https://docs.rs/zerocopy [2] Link: https://github.com/Rust-for-Linux/linux/issues/1239 [3] * tag 'rust-7.2' of gitolite.kernel.org:pub/scm/linux/kernel/git/ojeda/linux: (86 commits) MAINTAINERS: add Onur Özkan as Rust reviewer MAINTAINERS: add Alexandre Courbot as Rust reviewer MAINTAINERS: add Tamir Duberstein as Rust reviewer MAINTAINERS: add Daniel Almeida as Rust reviewer kbuild: rust: clean `zerocopy-derive` in `mrproper` rust: make `build_assert` module the home of related macros rust: str: clean unused import for Rust >= 1.98 rust: str: use the "kernel vertical" imports style rust: aref: use the "kernel vertical" imports style rust: page: use the "kernel vertical" imports style gpu: nova-core: firmware: parse `FalconUCodeDescV2` via `zerocopy` rust: prelude: add `zerocopy{,_derive}::FromBytes` rust: zerocopy-derive: enable support in kbuild rust: zerocopy-derive: add `README.md` rust: zerocopy-derive: avoid generating non-ASCII identifiers rust: zerocopy-derive: add SPDX License Identifiers rust: zerocopy-derive: import crate rust: zerocopy: enable support in kbuild rust: zerocopy: add `README.md` rust: zerocopy: remove float `Display` support ...
2026-06-14drm/bridge: anx7625: Add WQ_PERCPU add to alloc_workqueueMarco Crivellari1-1/+2
This continues the effort to refactor workqueue APIs, which began with the introduction of new workqueues and a new alloc_workqueue flag in: commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag") The refactoring is going to alter the default behavior of alloc_workqueue() to be unbound by default. With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND), any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND must now use WQ_PERCPU. For more details see the Link tag below. In order to keep alloc_workqueue() behavior identical, explicitly request WQ_PERCPU. Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ Suggested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Tejun Heo <tj@kernel.org>
2026-06-13drm/ttm: Issue direct reclaim at beneficial_orderMatthew Brost1-2/+2
Triggering kswap at an order higher than beneficial_order makes little sense, as the driver has already indicated the optimal order at which reclaim is effective. Similarly, issuing direct reclaim or triggering kswap at a lower order than beneficial_order is ineffective, since the driver does not benefit from reclaiming lower-order pages. As a result, direct reclaim should only be issued with __GFP_NORETRY at exactly beneficial_order, or as a fallback, direct reclaim without __GFP_NORETRY at order 0 when failure is not an option. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Christian Koenig <christian.koenig@amd.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patch.msgid.link/20260612225757.3844350-1-matthew.brost@intel.com