summaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)Author
2026-08-05drm/ttm: Split cgroup charge and resource allocationNatalie Vock
Coupling resource allocation and cgroup charging is racy when charging succeeds, but subsequent resource allocation fails. Certain eviction decisions are made on the basis of whether the allocating cgroup is protected, i.e. within its min/low limits, but with the charge being tied to resource allocation (and uncharged when the resource allocation fails), this check is done at a point where the allocation is not actually charged to the cgroup. This is subtly wrong if the allocation were to cause the cgroup to exceed the min/low protection, but it's even more wrong if the same cgroup tries allocating multiple buffers concurrently: In this case, the min/low protection may pass for all allocation attempts when the real min/low protection covers only some, or potentially none of the allocated buffers. Instead, charge the allocation to the cgroup once and keep the charge for as long as we try to allocate a ttm_resource, and only undo the charge if allocating the resource is ultimately unsuccessful and we move on to a different ttm_place. Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Natalie Vock <natalie.vock@gmx.de> Link: https://patch.msgid.link/20260804-dmemcg-aggressive-protect-v8-4-07af96681bf8@gmx.de
2026-08-05drm/ttm: Extract code for attempting allocation in a placeNatalie Vock
Move all code for attempting allocation for a specific place to ttm_bo_alloc_place. With subsequent patches, this logic is going to get more complicated, so it helps readability to have this separate. ttm_bo_alloc_at_place takes a pointer to a struct ttm_bo_alloc_state. This struct holds various state produced by the allocation (e.g. cgroup resource associated with the allocation) that the caller needs to keep track of (and potentially dispose of). This is just the limiting cgroup pool for now, but future patches will add more state needing to be tracked. ttm_bo_alloc_at_place also communicates via return codes if eviction using ttm_bo_evict_alloc should be attempted. This is preparation for attempting eviction in more cases than just force_space being set. No functional change intended. Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Natalie Vock <natalie.vock@gmx.de> Link: https://patch.msgid.link/20260804-dmemcg-aggressive-protect-v8-3-07af96681bf8@gmx.de
2026-08-05drm/{i915,xe}/display: add core workaround query to display parent interfaceJani Nikula
There are workarounds display needs to apply depending on information only available to the core driver. Add a display parent interface for the query. For starters, there's only one workaround like this, so keep it simple instead of over-engineering. This lets us drop an #ifdef I915 as well as xe dependency on some display headers. v2: git add xe_display_wa.h v3: Add a comments about usage (Suraj) Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260803115417.1760484-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2026-08-05drm/xe/display: drop redundant intel_audio_deinit() callJani Nikula
intel_audio_deinit() is already being called via xe_display_unregister() -> intel_display_driver_unregister(). Remove the redundant call. Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/b2b376f5d6f7ecb48bf9028ab5d0b9c95dbe9859.1785250188.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2026-08-05drm/xe/display: drop redundant intel_hdcp_component_fini() callJani Nikula
intel_hdcp_component_fini() is already being called via xe_display_fini_early() -> intel_display_driver_remove_noirq(). Remove the redundant call. Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/08355094a47cbf63f2092dae000780567636c967.1785250188.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2026-08-05drm/xe/display: drop redundant intel_hpd_poll_fini() callJani Nikula
intel_hpd_poll_fini() is already being called via xe_display_fini_early() -> intel_display_driver_remove_noirq(). Remove the redundant call. Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/6c3a537d69af2bca21e9f04cd678aaf9d72f7c8e.1785250188.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2026-08-05drm/bridge: remove unneeded 'fast_io' parameter in regmap_configWolfram Sang
When using MMIO with regmap, fast_io is implied. No need to set it again. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20260705163536.1850-6-wsa+renesas@sang-engineering.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-08-05gpu: nova-core: pass WPR metadata ownership to FmcBootArgsEliot Courtney
`FmcBootArgs` logically owns this, so pass ownership to it instead of storing a reference. Signed-off-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260804-blackwell-fixes-v4-5-ac858b6a1935@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-08-05gpu: nova-core: split FbLayout into FSP and non-FSP versionsEliot Courtney
`FbLayout` is currently used for both pre and post FSP architectures. It contains ranges for each region of framebuffer, but on post FSP architectures, only the size is actually used. The region locations are decided by ACR, which runs as part of the GSP-FMC, not by the driver. The driver only provides the sizes. So, for post FSP architectures `FbLayout` contains essentially guesses for the offsets. Instead, make separate types so that we only store the information that's actually needed, rather than keeping around offsets that may not be correct. Signed-off-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260804-blackwell-fixes-v4-4-ac858b6a1935@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-08-05gpu: nova-core: return non-WPR heap size as u64 from HALsEliot Courtney
This is always immediately widened to u64, so just return it as a u64 from the beginning. Signed-off-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260804-blackwell-fixes-v4-3-ac858b6a1935@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-08-05gpu: nova-core: rename heap size fieldEliot Courtney
This field is called non_wpr_heap_size everywhere else. Unify the name to make it more obvious which heap it is. Signed-off-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260804-blackwell-fixes-v4-2-ac858b6a1935@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-08-05gpu: nova-core: correct FRTS vidmem offset calculationEliot Courtney
Currently, the frts vidmem offset is calculated based on the non-wpr heap size and pmu reservation size, but this is not right. The layout actually looks like this: | non-wpr heap | WPR2 .. FRTS | PMU reserved | ... | VGA workspace | It's just by coincidence + generous alignment that the values happened to match. Instead, define a per-architecture reserved size at the end of the framebuffer and use this plus the PMU reserved size to calculate the frts vidmem offset. Fixes: d317e4585fa3 ("gpu: nova-core: Hopper/Blackwell: add FSP Chain of Trust boot") Signed-off-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260804-blackwell-fixes-v4-1-ac858b6a1935@nvidia.com [acourbot: add comment clarifying reason for testing pmu_reserved_size.] [acourbot: make fb_end_reserved_size() return u64.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-08-04mm: use linear_page_[index, delta]() consistentlyLorenzo Stoakes
There are a number of places where we open code what linear_page_index() and linear_page_delta() calculate. Replace this code with the appropriate functions for consistency. No functional change intended. Link: https://lore.kernel.org/20260710-b4-pre-scalable-cow-v2-21-2a5aa403d977@kernel.org Signed-off-by: Lorenzo Stoakes <ljs@kernel.org> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> [DRM] Acked-by: Kai Huang <kai.huang@intel.com> # for sgx Reviewed-by: Gregory Price <gourry@gourry.net> Reviewed-by: Pedro Falcato <pfalcato@suse.de> # for mm Reviewed-by: Ackerley Tng <ackerleytng@google.com> [guest_memfd] Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Cc: David Hildenbrand (Arm) <david@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: SJ Park <sj@kernel.org> Cc: Liam R. Howlett (Oracle) <liam@infradead.org> Cc: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-08-04drm/gpusvm: use hmm_range_fault_unlocked_timeout() for range faultsStanislav Kinsburskii
Several GPU SVM paths take mmap_read_lock() only to call hmm_range_fault() and open-code mmu interval sequence setup before each HMM walk. They also retry -EBUSY until HMM_RANGE_DEFAULT_TIMEOUT expires. Use hmm_range_fault_unlocked_timeout() for those faults. The HMM helper now owns mmap_lock acquisition and refreshes range->notifier_seq for its internal retries, while GPU SVM keeps its existing driver-lock validation with mmu_interval_read_retry() after a successful fault. drm_gpusvm_scan_mm() and drm_gpusvm_range_evict() pass HMM_RANGE_DEFAULT_TIMEOUT as the helper retry budget for each HMM fault attempt. drm_gpusvm_get_pages() keeps its existing absolute outer deadline because it can be reached from GPU page-fault workers, where fatal signals from the faulting process cannot stop an endless invalidation retry loop. It passes the remaining time from that deadline to HMM for each fault attempt. Leave drm_gpusvm_check_pages() on hmm_range_fault() because that path is called with the mmap lock already held by its caller. Link: https://lore.kernel.org/20260723-hmm-v10-v11-8-c55b003a4b61@gmail.com Signed-off-by: Stanislav Kinsburskii <skinsburskii@gmail.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Cc: Danilo Krummrich <dakr@kernel.org> Cc: Dave Airlie <airlied@gmail.com> Cc: David Hildenbrand <david@kernel.org> Cc: Dexuan Cui <decui@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Leon Romanovsky <leon@kernel.org> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lizhi Hou <lizhi.hou@amd.com> Cc: Long Li <longli@microsoft.com> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Lyude <lyude@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Oded Gabbay <ogabbay@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Thomas Zimemrmann <tzimmermann@suse.de> Cc: Vlastimil Babka <vbabka@kernel.org> Cc: Wei Liu <wei.liu@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-08-04drm/nouveau: use hmm_range_fault_unlocked_timeout() for SVM faultsStanislav Kinsburskii
nouveau_range_fault() takes mmap_read_lock() only to call hmm_range_fault(). It also keeps a single HMM_RANGE_DEFAULT_TIMEOUT deadline across both HMM -EBUSY retries and post-fault mmu_interval_read_retry() retries. Use hmm_range_fault_unlocked_timeout() instead. The HMM helper now owns the mmap lock and refreshes range->notifier_seq for its internal retries. Nouveau keeps its existing absolute deadline in the outer loop and passes the remaining jiffies to the helper for each fault attempt, so retries caused by mmu_interval_read_retry() do not reset the overall retry budget. Nouveau still validates the interval notifier sequence while holding svmm->mutex before programming the GPU mapping. Link: https://lore.kernel.org/20260723-hmm-v10-v11-5-c55b003a4b61@gmail.com Signed-off-by: Stanislav Kinsburskii <skinsburskii@gmail.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Cc: Danilo Krummrich <dakr@kernel.org> Cc: Dave Airlie <airlied@gmail.com> Cc: David Hildenbrand <david@kernel.org> Cc: Dexuan Cui <decui@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Leon Romanovsky <leon@kernel.org> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lizhi Hou <lizhi.hou@amd.com> Cc: Long Li <longli@microsoft.com> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Lyude <lyude@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Oded Gabbay <ogabbay@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Thomas Zimemrmann <tzimmermann@suse.de> Cc: Vlastimil Babka <vbabka@kernel.org> Cc: Wei Liu <wei.liu@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-08-04Merge tag 'qcom-drivers-for-7.3' of ↵Arnd Bergmann
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers Qualcomm driver updates for v7.3 Add Maili platform bindings for SCM, IMEM, AOSS, and PMIC GLINK. Add Shikra IMEM, RPM SMD, LLCC, and UBWC support, including handling for firmware-configured LLCC ECC interrupts. Add the generic Peripheral Authentication Service with SCM and OP-TEE backends, and migrate the MSM DRM and IPA drivers to it. Add SCM SMC-call tracepoints and configurable minidump delivery through always-on SRAM. Correct SCM download-mode pointer ordering and improve download-mode probe diagnostics. Rework the UBWC configuration database and add Milos and Shikra configuration. Add protection-domain mappings for SA8775P and QCS8300, support newer ICE versions, Hawi subsystem statistics, and SDM850 identification. Simplify Qualcomm SoC Kconfig selection and architecture dependencies. Use managed resources in EBI2 and RPMh RSC probe paths to correct cleanup on failures. * tag 'qcom-drivers-for-7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (44 commits) soc: qcom: llcc: Skip ECC interrupt setup on Shikra, pre-configured by DSF dt-bindings: sram: Document qcom,shikra-imem compatible net: ipa: Switch to generic PAS TZ APIs firmware: qcom: scm: Add minidump SRAM support firmware: qcom: scm: use dev_err_probe() for dload address failure firmware: qcom: scm: Fix missing smp_load_acquire() dt-bindings: firmware: qcom,scm: Add minidump SRAM property drm/msm: Switch to generic PAS TZ APIs bus: qcom-ebi2: use managed resources for clocks and children soc: qcom: rpmh-rsc: manage PM notifiers with devres firmware: qcom: scm: Allow QSEECOM on Honor Magicbook Art 14 firmware: qcom: scm: instrument SMC call path with tracepoints firmware: qcom: scm: add trace events for the SMC call interface soc: qcom: Avoid SCM and SPM for cpuidle drivers soc: qcom: Make important drivers default soc: qcom: Restrict drivers per ARM/ARM64 soc: qcom: Hide all drivers behind selectable menu MAINTAINERS: Add maintainer entry for Qualcomm PAS TZ service firmware: qcom: Add a PAS TEE service firmware: qcom_scm: Migrate to generic PAS service ... Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-08-04drm/xe/uc: Apply RCS/CCS yield policy to SR-IOV VFsMarcin Bernatowicz
VFs were missing the call to apply the global scheduling policy. Call xe_guc_submit_enable() during vf_uc_load_hw() to ensure VFs get the same policy enforcement as PF. Fixes: 26caeae9fb48 ("drm/xe/guc: Set RCS/CCS yield policy") Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patch.msgid.link/20260709075945.1337660-1-marcin.bernatowicz@linux.intel.com Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> (cherry picked from commit f09360e857130f7ab7f069e2421e6b4a6e502531) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-04drm/xe: Fix memory leak in exec_queue_set_hang_replay_state()Michał Winiarski
The q->replay_state is blindly overwritten, which can potentially leak memory that was previously allocated by vmemdup_user(). Return an error if q->replay_state is not empty. Discovered using AI-assisted static analysis confirmed by Intel Product Security. Reported-by: Martin Hodo <martin.hodo@intel.com> Fixes: 1026c1a73a96 ("drm/xe: Implement DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE") Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260624111421.1258364-1-michal.winiarski@intel.com Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> (cherry picked from commit f6b6cc1118bdbc4265fa8b3bdf8565b26f13e56e) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-04drm/shmem_helper: Check VMA boundaries for PMD mappingsChristian A. Ehrhardt
In the ->huge_fault handler do not install a PMD huge page mapping if the huge page exceeds the boundaries of the VMA. All other ->huge_fault handlers have similar checks and the resulting mapping will trigger a VM_BUG_ON_VMA() if it ever reaches copy_pmd_range(). Cc: Pedro Demarchi Gomes <pedrodemargomes@gmail.com> Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: stable@vger.kernel.org Fixes: fc3bbf34e643 ("drm/shmem-helper: Fix huge page mapping in fault handler") Signed-off-by: Christian A. Ehrhardt <lk@c--e.de> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://patch.msgid.link/20260622215718.1532689-1-lk@c--e.de Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2026-08-04drm/omap: dsi: Do not copy isr tableAndreas Kemnade
To be able to unregister stuff from isrs, the corresponding table was copied. Nobody seems to unregister stuff that way, so it does not help. But there are stack-allocated objects passed to these isrs giving chances of UAF of these objects if irqs are unregistered while they are handled, so better do not copy that table. Fixes: 4ae2ddddf44cd ("OMAP: DSS2: DSI: Add ISR support") Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://patch.msgid.link/20260702-dsi-uaf-v2-1-dbb4aa0f0b8e@kemnade.info Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2026-08-04drm/xe/ras: Fix boot-time ras error processingRaag Jadav
Currently, we xe_ras_process_errors() inside xe_ras_init() to handle boot time errors. But this can potentially result in declaring the device as wedged quite early in the driver load sequence, which is problematic due to the lack of registered drm device or required wedged cleanup hooks at this point. Call xe_ras_process_errors() only after the prerequisites are available. Fixes: d9732e498f5f ("drm/xe/xe_ras: Query errors from system controller on probe") Signed-off-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Tested-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260730110635.925537-1-raag.jadav@intel.com Signed-off-by: Riana Tauro <riana.tauro@intel.com>
2026-08-03drm/xe/multi_queue: replay dynamic CGP updates lost during VF migrationNiranjana Vishwanathapura
When guc_exec_queue_revert_pending_state_change() sets needs_cgp_sync for a queue, replay that update during unpause by injecting a CGP_SYNC_MSG static message at the head of the scheduler queue. The message handler __guc_exec_queue_process_msg_cgp_sync() calls guc_exec_queue_send_cgp_sync() which re-reads the current priority from q->multi_queue.priority and re-issues the CGP write + CGP_SYNC H2G, so the queue's CGP entry is restored to the correct value after migration. Assisted-by: Github-Copilot:Claude-opus-4.8 Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260803230528.3428029-10-niranjana.vishwanathapura@intel.com
2026-08-03drm/xe/multi_queue: track and recover lost CGP updates across VF migrationNiranjana Vishwanathapura
When a CGP_SYNC (or REGISTER_CONTEXT_MULTI_QUEUE with CGP) is in flight during VF migration, GuC loses the message and never sends CGP_SYNC_DONE. Two failure modes exist: 1. The send was already issued (CGP_SYNC_DONE not received): group->sync_pending stays set and cgp_update_q points to the queue that owns the outstanding sync. 2. The wait woke early (send not issued): The queue returned from xe_guc_exec_queue_group_cgp_sync() without sending after vf_recovery() became true. Track which kind of sync is outstanding (registering_cgp / updating_cgp) and the owning queue (cgp_update_q) so guc_exec_queue_revert_pending_state_change() can recover both cases: - A registration-time CGP bails or is lost → clear registered flag so run_job re-registers after unpause (re_register / registering_cgp paths). - A dynamic CGP update bails or is lost → set needs_cgp_sync so replay re-issues the update after unpause (re_update / updating_cgp paths). Tag all registration call sites with CGP_SYNC_REGISTRATION so the bail path distinguishes them from dynamic updates. Assisted-by: Github-Copilot:Claude-opus-4.8 Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260803230528.3428029-9-niranjana.vishwanathapura@intel.com
2026-08-03drm/xe/multi_queue: handle CGP_SYNC wait timeout during VF recoveryNiranjana Vishwanathapura
The CGP_SYNC wait in xe_guc_exec_queue_group_cgp_sync() only woke on sync_pending clearing or GuC stop. During VF migration the CT wakes all waiters but sync_pending may still be set (the GuC lost the in-flight message), causing the timeout path to fire and ban the group. Add vf_recovery() as a third wake condition and exclude it from the error path so a migration-woken wait returns success rather than triggering a GT reset. Assisted-by: Github-Copilot:Claude-opus-4.8 Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260803230528.3428029-8-niranjana.vishwanathapura@intel.com
2026-08-03drm/xe: split VF pause into prepare and revert phasesNiranjana Vishwanathapura
Extract xe_sched_submission_stop() + cancel_delayed_work_sync() into a new guc_exec_queue_pause_prepare() helper, then call it in a first pass over all queues before the existing revert loop in xe_guc_submit_pause_vf(). In a multi-queue group a secondary's run_job() can register the primary queue, which must not race an in-progress revert of a sibling queue. Stopping every scheduler before reverting any queue prevents that race. No functional change outside the VF migration path. Assisted-by: Github-Copilot:Claude-opus-4.8 Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260803230528.3428029-7-niranjana.vishwanathapura@intel.com
2026-08-04drm/xe/uc: Apply RCS/CCS yield policy to SR-IOV VFsMarcin Bernatowicz
VFs were missing the call to apply the global scheduling policy. Call xe_guc_submit_enable() during vf_uc_load_hw() to ensure VFs get the same policy enforcement as PF. Fixes: 26caeae9fb48 ("drm/xe/guc: Set RCS/CCS yield policy") Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patch.msgid.link/20260709075945.1337660-1-marcin.bernatowicz@linux.intel.com Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
2026-08-04drm/xe: Reject duplicated properties for EXEC_QUEUE_SET_PROPERTYMichał Winiarski
All of the properties are idempotent - setting them multiple times on the same exec_queue within a single IOCTL doesn't make sense. Return an error when duplicated property is found. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260624111421.1258364-2-michal.winiarski@intel.com Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
2026-08-04drm/xe: Fix memory leak in exec_queue_set_hang_replay_state()Michał Winiarski
The q->replay_state is blindly overwritten, which can potentially leak memory that was previously allocated by vmemdup_user(). Return an error if q->replay_state is not empty. Discovered using AI-assisted static analysis confirmed by Intel Product Security. Reported-by: Martin Hodo <martin.hodo@intel.com> Fixes: 1026c1a73a96 ("drm/xe: Implement DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE") Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260624111421.1258364-1-michal.winiarski@intel.com Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
2026-08-03drm/xe: Add debugfs for IA/GT biasVinay Belgaumkar
GT_IA_PERF_BIAS_REG indicates power budget between IA and GT. Lower 16 bits correspond to IA and upper to GT. Higher value indicates more bias towards that plane. The values are in U1.15 format. $ cat /sys/kernel/debug/dri/0/gt0/gt_ia_bias 0x80004000 (GT: 1.0000, IA: 0.5000) This interface will allow us to observe power budget changes while running workloads and also, if needed, tune it. Minimum allowed value for each of GT/IA bias is 0x10, and max is 0x8000 which corresponds to a bias ratio of 1. Bspec: 51878 v3: Add a helper function for U1.15 decode (Michal) v4: Validate input values (Rodrigo) v5: Comments (Michal, Rodrigo) v6: Rename to gt_ia_bias (Anirban), check lower bound (Michal) v7: Update filename in commit message Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Sk Anirban <sk.anirban@intel.com> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Assisted-by: Copilot:auto Reviewed-by: Sk Anirban <sk.anirban@intel.com> Link: https://patch.msgid.link/20260729221629.593195-3-vinay.belgaumkar@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-03drm/xe: Use IBC v3 on PTLVinay Belgaumkar
Intelligent Bias Control (IBC) v3 algorithm in GuC has PTL specific optimizations. This version selection param is only available GuC 70.48.0 onwards. v4: Fix sashiko.dev review issue v5: Don't cascade return checks (Rodrigo) Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Link: https://patch.msgid.link/20260729221629.593195-2-vinay.belgaumkar@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-03drm/panel-edp: Add Sharp LQ120P1JX51 (Surface Pro 12in 1st Ed.)François Roux
The internal eDP panel of the Microsoft Surface Pro 12in 1st Edition (Snapdragon X Plus, X1P42100) is not in edp_panels[], so every boot produces the deliberate WARN_ON splat in panel_edp_probe() and the panel falls back to conservative timings: WARNING: drivers/gpu/drm/panel/panel-edp.c:814 panel_edp_probe+0x53c/0x56c panel-simple-dp-aux aux-aea0000.displayport-controller: Unknown panel SHP 0x15a7, using conservative timings EDID, read over the panel's DP AUX DDC bus: 00 ff ff ff ff ff ff 00 4d 10 a7 15 a0 00 00 1f 31 22 01 04 a5 19 11 78 07 ee 91 a3 54 4c 99 26 0f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 62 53 94 a0 80 b8 2e 50 18 10 3a 00 fe a9 00 00 00 18 13 7d 94 a0 80 b8 2e 50 18 10 3a 00 fe a9 00 00 00 18 00 00 00 fd 00 18 5a 88 88 21 01 00 00 00 00 00 00 00 00 00 00 fc 00 4c 51 31 32 30 50 31 4a 58 35 31 0a 20 00 69 Manufacturer: SHP Model: 0x15a7 Made in: week 49 of 2024 Display Product Name: 'LQ120P1JX51' DTD 1: 2196x1464 60.001799 Hz 3:2 (254 mm x 169 mm) DTD 2: 2196x1464 90.002698 Hz 3:2 (254 mm x 169 mm) Timings are deliberately cautious rather than datasheet-derived. The conservative fallback sets unprepare=2000 and enable=200; unprepare=2000 is a safety margin for unknown panels only and is the single occurrence of that value in the file -- no real panel entry uses it. delay_200_500_e200 keeps the same generous 200 ms enable delay while using the 500 ms unprepare shared by every actual panel in the table. A shorter enable delay may well be fine, but has not been validated here. Signed-off-by: François Roux <info@humanlearning.ch> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patch.msgid.link/20260802135107.4420-1-info@humanlearning.ch
2026-08-03drm/xe/mert: Rate limit VF LMTT fault debug logPiotr Piórkowski
A faulty or malicious VF may repeatedly trigger LMTT faults and generate many identical CATERR debug messages. Use xe_sriov_dbg_ratelimited() to reduce log spam while keeping useful debug information available. Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://patch.msgid.link/20260721093116.4011940-3-piotr.piorkowski@intel.com Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
2026-08-03drm/xe: Add dbg_ratelimited printk wrappersPiotr Piórkowski
Add dbg_ratelimited() wrappers for Xe logging helpers. These wrappers provide a debug logging equivalent of the existing rate-limited error messages and allow callers to limit repeated debug prints to reduce log spam and makes debugging easier. Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://patch.msgid.link/20260721093116.4011940-2-piotr.piorkowski@intel.com Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
2026-08-03drm/imagination: Reuse layout check macros for MIPS FW structuresAlessio Belle
Replace static asserts on MIPS firmware structures offsets and sizes with more compact macros that are already used for similar checks on common firmware interface structures. Reviewed-by: Brajesh Gupta <brajesh.gupta@imgtec.com> Link: https://patch.msgid.link/20260729-fwif-checks-updates-v1-2-af65e9606a7e@imgtec.com Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
2026-08-03drm/imagination: Move all FW interface check macros to pvr_checks.hAlexandru Dadu
The same macros are redefined in three places, so move them to a common file to reduce duplication and make it easier to reuse them. Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com> Co-developed-by: Alessio Belle <alessio.belle@imgtec.com> Reviewed-by: Brajesh Gupta <brajesh.gupta@imgtec.com> Link: https://patch.msgid.link/20260729-fwif-checks-updates-v1-1-af65e9606a7e@imgtec.com Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
2026-08-03drm/{i915,xe}/display: move transient data flush call to display parent ↵Jani Nikula
interface Move the core driver TDF call to display parent interface to avoid direct calls from display to xe driver. Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260728170029.608289-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2026-08-03drm/xe/ras: Validate sysctrl responseRaag Jadav
Validate errors raised by sysctrl firmware instead of blindly trusting them. Signed-off-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Riana Tauro <riana.tauro@intel.com> Link: https://patch.msgid.link/20260722143142.675658-1-raag.jadav@intel.com Signed-off-by: Riana Tauro <riana.tauro@intel.com>
2026-08-03drm/i915/display: Switch DG2 to use DPLL frameworkMika Kahola
Now that DG2 has a DPLL manager and its users are prepared to obtain clock state through the framework, switch the platform over to use the shared DPLL manager. Remove specific MPLLB state verification and use .compare_hw function hook to compare HW and SW PLL states. Assisted-by: Copilot:claude-sonnet-4-6 Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Link: https://patch.msgid.link/20260630115336.1059976-5-mika.kahola@intel.com
2026-08-03drm/i915/display: Prepare DG2 DDI and compute paths for DPLL frameworkMika Kahola
Prepare DG2 users to obtain clock state and reserve PLLs through the shared DPLL framework. Replace the DG2-specific compute hook with the generic framework-backed helpers. Assisted-by: Copilot:claude-sonnet-4-6 Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Link: https://patch.msgid.link/20260630115336.1059976-4-mika.kahola@intel.com
2026-08-03drm/i915/display: Add DG2 MPLLB DPLL manager supportMika Kahola
Add DG2-specific DPLL manager infrastructure for MPLLB-backed port PLLs. Introduce PLL id mapping, DG2-specific DPLL callbacks for enable/disable/readout/frequency calculation, and manager callbacks for compute/get/dump/compare. The platform is not switched over yet. DG2's PLL-to-encoder lookup prefers the active encoder using the PLL, but fall back to a matching encoder for the fixed port-to-PLL mapping when no active user can be identified. This keeps the active-user fix for operational paths while allowing readout and verification paths to resolve the PHY even when pll->active_mask does not identify an active user. v2: Use intel_encoder_is_dig_port() to filter out MST virtual encoders (Imre) Assisted-by: Copilot:claude-sonnet-4-6 Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> (v1) Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Link: https://patch.msgid.link/20260630115336.1059976-3-mika.kahola@intel.com
2026-08-03drm/i915/display: Split out DG2 MPLLB enable helperMika Kahola
Refactor the DG2 MPLLB enable path by splitting out a helper that programs the PHY directly from an intel_mpllb_state. This is preparatory work for moving DG2 MPLLB handling under the DPLL framework, where callbacks operate on dpll_hw_state rather than the full crtc_state. Assisted-by: Copilot:claude-sonnet-4-6 Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Link: https://patch.msgid.link/20260630115336.1059976-2-mika.kahola@intel.com
2026-08-03drm/i915/vrr: Enable CMRRMitul Golani
Set crtc_state->vrr.cmrr.enable at the end of intel_vrr_cmrr_compute_config() so that CMRR is actually enabled once the M/N parameters have been computed. This is the final step that turns on CMRR, with all the parameter computation handled in the earlier patches. --v2: - Everything else except enable compute to handle before this patch (Chaitanya) --v3: - Remove redundant return from compute config --v4: - Update CMRR commit message (Chaitanya) Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260730105919.3913412-11-mitulkumar.ajitkumar.golani@intel.com
2026-08-03drm/i915/vrr: Dump CMRR state in the crtc state dumpMitul Golani
Add crtc state dump for CMRR. --v2: - Remove video mode state checker. Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260730105919.3913412-10-mitulkumar.ajitkumar.golani@intel.com
2026-08-03drm/i915/vrr: Program CMRR enable/disable from transcoder timingsMitul Golani
Move the CMRR M/N register writes into a new intel_vrr_set_cmrr_timings() helper called from intel_vrr_set_fixed_rr_timings(), so CMRR is programmed together with the fixed rr timings for both the CMTG and CPU transcoder, instead of being open-coded in intel_vrr_set_transcoder_timings(). Drop the now-unused cmrr_enable argument to intel_vrr_tg_enable(). No functional change intended for non-CMRR configurations. --v2: - Commit message changes. - Added Simplified enable/disable sequence. (Chaitanya) --v3: - Guard CMRR enable condition (Chaitanya) - Comment changes updated (Chaitanya) - Squash register write commits together and avoid double writing issue. (Chaitanya) --v4: - Guard CMRR enable/disable with platform check --v5: - Update CMRR in enable/disable path --v6: - Simplify enable/disable calls (Chaitanya) - Make function usable for common cmtg and cpu transcoder (Chaitanya) --v7: - Update commit message (Chaitanya) Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260730105919.3913412-9-mitulkumar.ajitkumar.golani@intel.com
2026-08-03drm/i915/vrr: Latch CMRR ratio via atomic commit on debugfs writeMitul Golani
Writing the per-CRTC "intel_vrr_target_refresh_rate" debugfs file only updates crtc->force_cmrr, a side channel that is not tracked by the atomic state. The requested ratio therefore does not reach the hardware until some unrelated commit recomputes the pipe config. Kick an internal atomic commit for the CRTC from the debugfs write and mark the CRTC mode as changed so the pipe config is recomputed. Note that this commit may or may not be downgraded to a fastset, depending on whether the computed vblank value (with LRR disabled) changes, so it is not characterised as a fastset. If the commit fails, restore the previous numerator/denominator so that force_cmrr does not hold on to bad values, which would otherwise make all subsequent commits fail. --v2: - Commit message and code comment update (Chaitanya) - Commit header update - Restore to old known debugfs values when commit fails (Chaitanya) Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260730105919.3913412-8-mitulkumar.ajitkumar.golani@intel.com
2026-08-03drm/i915/vrr: Compute CMRR fractional timings genericallyMitul Golani
Rework the fractional CMRR computation into a generic, transcoder-agnostic helper driven by an explicit per-CRTC debugfs target, replacing the previous disabled, eDP-only code path. Compute CMRR_M and CMRR_N timings based on the video mode requirements. A 1:1 ratio (denominator == 1000) means no video timing is required. Note that the CMRR enable path is wired up separately; this patch only lays down the generic computation. Remove computation of mode_flags, I915_MODE_FLAG_VRR, as CMRR is being moved to the fixed refresh rate path. Also return early from the CMRR computation if the existing computation is already sufficient. --v2: - Derive video_mode locally instead of caching it in the persistent struct intel_crtc state (Jani, Chaitanya) - Fix numerator unit in comment: milli-Hz, not kHz (Chaitanya) - Fix "requirement" typo and clarify that CMRR is not yet enabled in the commit message (Chaitanya) - Fix precision issue while computing the M/N ratio (Chaitanya) - Rename multiplier_m and multiplier_n to improve readability (Chaitanya) - Compute vtotal as it is required for dithering as per the algorithm implementation (Chaitanya) - Replace the misleading adjusted_pixel_rate with dividend, which is more descriptive --v3: - Mention the rationale for not computing I915_MODE_FLAG_VRR (Chaitanya) - Remove the redundant return statement at the end of the CMRR computation (Chaitanya) - Correct cmrr_n calculation (Chaitanya) - Add an early return if the current computation is already sufficient to drive the mode without CMRR (Chaitanya) - Round up requested_refresh_rate (Validation) - Fix integer overflow --v4: - Update cmrr_n calculation to avoid aggressive dithering - Use div64_u64 to truncate to the floor value instead of DIV_ROUND_UP_ULL, which rounds up to the ceiling value - Add a TODO comment to the cmrr_n calculation - Add a condition for custom refresh rate requests - Update the CMRR computation comment block in compute_config --v5: - Simplify computation - Correct typo in commit message (Chaitanya) - Compute early return condition (Chaitanya) --v6: - Simplify commit message - Simplify video timing requirement compute function (Chaitanya) Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260730105919.3913412-7-mitulkumar.ajitkumar.golani@intel.com
2026-08-03drm/i915/display: Move CMRR crtc_state members under VRRMitul Golani
Move CMRR crtc state members under VRR infrastructure as it is enabled during fixed-refresh-rate VRR timing generator is enabled. --v2: - Move cmrr structure under vrr umbrella. - Remove dups. (Jani) --v3: - Update commit message Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260730105919.3913412-6-mitulkumar.ajitkumar.golani@intel.com
2026-08-03drm/i915/vrr: Update AS_SDP target_rr_divider based on CMRR config requestMitul Golani
Compute AS_SDP target_rr_divider based on actual CMRR request requirement. Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260730105919.3913412-5-mitulkumar.ajitkumar.golani@intel.com
2026-08-03drm/i915/vrr: Add per-CRTC vrr/cmrr debugfs controlMitul Golani
Add a per-CRTC debugfs file 'intel_vrr_target_refresh_rate' that lets the user force a CMRR target refresh rate and video-mode requirement. The file uses a "numerator/denominator" format: - numerator: requested refresh rate in milli-Hz (refresh rate in Hz * 1000, e.g. 60000 for 60 Hz) - denominator: 1000 for a 1:1 ratio (no video timing) or 1001 for the 1000/1001 video timing Reading the file reports the currently stored values; writing updates them. The file is created only on platforms with VRR and CMRR support. --v2: - Drop the "vrr" debugfs subdirectory and expose a single flat, intel_-prefixed "intel_vrr_cmrr" file (Jani, Nikula) - Rename struct intel_crtc.cmrr to force_cmrr to make its purpose explicit (Chaitanya) - Fix parse comment: numerator unit is milli-Hz, not KHz (Chaitanya) - Add debugfs/intel_ prefixes to the debugfs handler functions (Chaitanya) - Expand commit message with debugfs entry semantics (Chaitanya) --v3: - Rename debugfs function and file name (Chaitanya) - Remove railing new line at EOF (Chaitanya) - Update CMRR guard conditions (Chaitanya) - Add 0/0 default case. (Ramanaidu) --v4: - Correct CMRR guard check while creating debugfs --v5: - Commit message update (Chaitanya) - Add support for 0/0 writing (Validation) Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260730105919.3913412-4-mitulkumar.ajitkumar.golani@intel.com
2026-08-03drm/i915/vrr: Restrict CMRR enable condition to VRR-TG-default platformsMitul Golani
CMRR is currently advertised on all HAS_CMRR platforms, but it depends on the VRR timing generator being the default timing generator, which currently only applies to DISPLAY_VER >= 30. Gate the CMRR enable condition and readout accordingly so CMRR is only reported on supported platforms. No functional change. --v2: - Create a separate function to check if CMRR possible --v3: - Simplify commit message (Chaitanya) - Remove redundant outer parenthesis (Chaitanya) Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260730105919.3913412-3-mitulkumar.ajitkumar.golani@intel.com