summaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)Author
2026-08-14Revert "nouveau/gsp: fix suspend/resume regression on r570 firmware"Lyude Paul
This reverts commit 8302d0afeaec0bc57d951dd085e0cffe997d4d18. It turns out this looked like the right fix on some systems, but it's not - as this causes runtime PM to actually fail on many a laptop. Fixes: 8302d0afeaec ("nouveau/gsp: fix suspend/resume regression on r570 firmware") Cc: <stable@vger.kernel.org> # v6.19+ Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260814194542.781955-2-lyude@redhat.com
2026-08-14drm/nouveau/kms/nv50-: Enable atomic modesetting by defaultLyude Paul
Nouveau is one of the very few modern hardware drivers in the kernel that doesn't have atomic modesetting enabled by default, in part because when it was originally written by Ben there wasn't much in the way of good atomic modesetting clients to actually test things out with. Nowadays however, atomic modesetting is very much the norm - and support in userspace for non-atomic drivers is starting to bitrot a bit - leading to its own set of issues. At the same time, many of those issues are fixed by just turning on atomic in nouveau. Plus, I've been running nouveau with atomic modesetting on by default for most of the machines I work on, and I've already fixed quite a number of issues to the point where things seem quite stable (excluding a single screen flashing bug on my desktop, which I am not particularly convinced has anything to do with atomic modesetting). Now that we've protected against breaking things for chipsets where atomic isn't supported (<nv50) - let's enable it by default on generations of hardware that support it. We'll leave the module parameter around for the time being, as turning it off may be helpful in the possibility that we hit regressions. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260813204803.2097176-6-lyude@redhat.com
2026-08-14drm/nouveau/kms: Only allow enabling atomic modesetting on nv50+Lyude Paul
Atomic modesetting support was never added for pre-nv50 chipsets, so make sure we don't allow it to be forced on. Additionally, print a small warning when it's not supported. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260813204803.2097176-5-lyude@redhat.com
2026-08-14drm/nouveau: Fix drm_driver struct/nouveau.atomic parameter handlingLyude Paul
The way we handled the nouveau.atomic module parameter before was fairly broken, and had a number of issues: - It was only ever actually parsed in the case of PCI devices. - When nouveau.atomic was enabled, it would add the cap for atomic modesetting to the global driver_pci structure. This meant that if one GPU on a system supported atomic and another didn't, it would still get enabled for both. Looking into this exposed further silliness in the way that we actually handle the drm_driver struct. We have one global structure for platform devices, and another for PCI devices - both of which are literally identical. So before we start preparing to enable atomic modesetting by default, let's fix this. Instead of sharing driver_pci and driver_platform, we instead create driver_legacy_kms and driver_atomic_kms, each of which is identical except for the DRIVER_ATOMIC capabilities flag, and then assign either depending on the nouveau_atomic module parameter. Doing this is also preferable, as the next step for enabling atomic modesetting by default will be ensuring that we don't enable it for legacy devices that still don't support it. This requires only checking the atomic modesetting module parameter after the NVKM device is ready, as this allows us to check the GPU family that nouveau is running on. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260813204803.2097176-4-lyude@redhat.com
2026-08-14drm/nouveau: Print the nouveau.atomic parameter in nouveau_display_options()Lyude Paul
Seems like we never remembered to start printing the value for this, so let's start to aid in troubleshooting in case we run into any issues with atomic. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260813204803.2097176-3-lyude@redhat.com
2026-08-14drm/nouveau: Fix cleanup bug in nouveau_drm_device_new()Lyude Paul
Sashiko caught this while reviewing the patches for enabling atomic by default - if we fail to allocate the DRM device pointer, we'll attempt to free the error pointer that it returns rather than the actual struct. Let's fix this while we're at it. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260813204803.2097176-2-lyude@redhat.com
2026-08-14drm/xe/pci: Report 'cannot re-enable' error using SIGIDMichal Wajdeczko
Report 'cannot re-enable PCI device' error using xe_log() helper. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-34-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/gt: Report 'Queue full' pagefault error using SIGIDMichal Wajdeczko
Report 'Queue full' error using xe_log_err() helper. While around, replace WARN_ON with WARN_ON_ONCE as there is no need for extra noise each time we hit this unlikely condition. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-33-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/gt: Report 'Fault response' pagefault error using SIGIDMichal Wajdeczko
Report 'Unsuccessful response' error using xe_log_err_info() helper. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-32-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/gt: Report 'reset failed' errors using SIGIDMichal Wajdeczko
Report 'reset' related err/info messages using xe_log() helpers. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-31-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/guc: Report 'GuC mmio' errors using SIGIDMichal Wajdeczko
Report various 'GuC mmio' errors using xe_log() helpers. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-30-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/pcode: Report 'initialization timedout' error using SIGIDMichal Wajdeczko
Report 'initialization timedout' error using xe_log_err() helper. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-29-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/pcode: Report 'timeout, retrying' error using SIGIDMichal Wajdeczko
Report 'timeout, retrying with preemption disabled' error using xe_log_err() helper. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Badal Nilawar <badal.nilawar@intel.com> Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patch.msgid.link/20260814171801.13347-28-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/pcode: Report 'Mailbox failed' error using SIGIDMichal Wajdeczko
Report 'Mailbox failed' error using xe_log_err() helper. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-27-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe: Report 'device wedged' errors using SIGIDMichal Wajdeczko
Report 'device wedged' error using xe_log_err_fatal() helper. Use -EIO as the error cause, as nothing else is provided here. The hints about the recovery method and bug filing are now separated as it only needs to be printed once. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-26-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/survivability: Report 'Runtime Mode enabled' status using SIGIDMichal Wajdeczko
Report 'Runtime Mode' status or failure using xe_log_err() helper. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-25-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/survivability: Report 'Boot Mode enabled' status using SIGIDMichal Wajdeczko
Report 'Boot Mode' status or failure using various xe_log() helpers. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-24-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/survivability: Report 'boot status' on sysfs failureMichal Wajdeczko
If we fail to create any of the survivability sysfs files, the user can't view boot status registers any more. Report them into dmesg instead using our existing SIGID helper. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-23-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/survivability: Report sysfs failure in one placeMichal Wajdeczko
If we fail to create any of the survivability sysfs files, actual error is reported by the caller. Move that reporting to sysfs helper. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-22-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/survivability: Report 'boot status' using SIGIDMichal Wajdeczko
Report 'boot status' and other scratch registers details using the xe_log_info() macros. While around, add helper to decode boot status code and change pdev parameter to xe. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> #v1 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-21-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe: Report all probe errors using SIGIDMichal Wajdeczko
For completeness, we should catch and report all probe errors, not just the ones that have explicit error message. Split xe_pci_probe() function after a display check to avoid reporting -EPROBE_DEFER and use xe_log_err_fatal() helper to report all returned errors. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-20-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe: Report 'probe blocked' status using SIGIDMichal Wajdeczko
Report 'driver loading blocked' status using xe_log_info() helper. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-19-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/tests: Add kunit tests for xe_anyMichal Wajdeczko
Add simple sanity tests for all xe_any macros to make sure they are working as expected. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-18-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/tests: Add Kunit tests for xe_logMichal Wajdeczko
All dmesg log lines generated by the xe_log() functions or helper macros are expected to have a stable format. Add tests to verify that generated output is not accidentally changed. Add demo pseudo tests to show how to use all variants of the xe_log() helpers. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-17-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/kunit: Setup driver data in the test deviceMichal Wajdeczko
While we have helpers pdev_to_xe_device() and kdev_to_xe_device() to obtain the xe_device pointer from the struct device pointer or from the struct pci_dev pointer, we must also setup the drm_device pointer as driver data in the device to make them work. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-16-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/ras: Check RAS and LOG component definitionsMichal Wajdeczko
While not strictly required, we want to make sure that components definitions used by the RAS firmware are in the same fixed relation with HW components definitions used by the LOG infrastructure to allow code simplification. Add static asserts to enforce that. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-15-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Extend components list with hardware itemsMichal Wajdeczko
Update our super macro with new top level hardware components. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> #v2 Cc: Riana Tauro <riana.tauro@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-14-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add hardware error signaturesMichal Wajdeczko
Extend our error signatures definitions xe_sigid to cover also firmware/hardware-originated errors and make them distinguishable from initially defined software-initiated errors. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Yoni Levitt <yoni.levitt@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-13-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Index all SIGID printk messagesMichal Wajdeczko
When CONFIG_PRINTK_INDEX is enabled, it is expected that all device level printk messages are indexed for audit. While usually this is done automatically behind the scenes when code is using regular dev_printk macros, since we are generating different dmesg messages inside xe_log_emit() based on the severity, component and location, we only get those entries in /sys/kernel/debug/printk/index/xe: <3> drivers/gpu/drm/xe/xe_log.c:142 log_dmesg_vprintk "%s %s: [drm] *ERROR* %pV" <6> drivers/gpu/drm/xe/xe_log.c:140 log_dmesg_vprintk "%s %s: [drm] %pV" Explicitly generate printk index using dev_printk_index_emit() with some generic prefix that includes the SIGID tag. Suggested-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-12-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for errno-onlyMichal Wajdeczko
For the software based SIGID errors, we will usually want to pass only the errno value as the data to be logged in the dmesg line or the CPER record. Add simple wrappers for that. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> #v3 Link: https://patch.msgid.link/20260814171801.13347-11-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for component & severityMichal Wajdeczko
There are only few CPER severity levels defined, add some helpers to avoid forcing developers to write full CPER severity enum name in every macro call. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-10-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for componentsMichal Wajdeczko
Our component list already defines relation between the component name, identified by the TAG, and its numerical identifier and the assigned SIGID. We can also already prepare location identifier based on the pointer type used to emit the log entry. Add helper that will prepare SIGID, COMPONENT and LOCATION parameters for xe_log_emit() using provided components TAG and the pointer. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-9-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for location & severityMichal Wajdeczko
There are only few CPER severity levels defined, add more helpers to avoid forcing developers to write full CPER severity name in every function call. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-8-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for locationMichal Wajdeczko
We can determine the location of the SIGID error source based on the type of the xe pointer being currently available. Add helper macros that will accept any of xe_device, xe_tile or xe_gt pointers instead of plain pci_dev to generate valid XE_LOG_LOCATION identifier and then call low-level xe_log_emit(pdev) function. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-7-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add SIGID log helpers for severityMichal Wajdeczko
There are only few CPER severity levels defined, add simple helper for each of them, to avoid forcing developers to write full severity name in every function call. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-6-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add component/location decorations to dmesgMichal Wajdeczko
While we can't directly use our xe_tile|gt_err|info helpers to get nice Tile/GT decorations, we can still add them manually based on the structured location parameter. Similarly, we can add component name prefix based on the component identifier. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Link: https://patch.msgid.link/20260814171801.13347-5-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Introduce structured component/location identifiersMichal Wajdeczko
Introduce structured identifiers for each component type that could emit a SIGID log entry and for their locations. We plan to store those IDs in the CPER records for better filtering. Define also structured identifiers for the supported locations. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> #v3 Link: https://patch.msgid.link/20260814171801.13347-4-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe/log: Add structured SIGID error logging infrastructureMallesh Koujalagi
Today the driver reports faults with ad-hoc drm_err()/xe_gt_err() strings that have no stable shape. That is readable for a human, but it gives fleet tooling nothing durable to match on: the wording changes between releases, lines can be rate-limited or dropped under an error storm, and there is no consistent way to ask "which recognised fault just happened?". Introduce a signature identifier (SIGID): a small, stable integer that names one recognised Xe fault site and serves as the primary handle for triage. A SIGID maps, through published end-user documentation, to a description and a recommended action; the driver only has to emit the right SIGID next to the usual human-readable text. Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Assisted-by: Copilot:Opus-4.8 Co-developed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Riana Tauro <riana.tauro@intel.com> Cc: Stuart Summers <stuart.summers@intel.com> cc: Badal Nilawar <badal.nilawar@intel.com> Reviewed-by: Badal Nilawar <badal.nilawar@intel.com> Link: https://patch.msgid.link/20260814171801.13347-3-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm/xe: Introduce xe_any helpersMichal Wajdeczko
In upcoming patches we want to define macros that will work with either xe_device or xe_tile or xe_gt pointers. To make them work and to allow compiler optimizations, introduce set of helpers that will return either expected pointer type or NULL or make necessary conversions to/from the struct xe/device/pci_dev. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Link: https://patch.msgid.link/20260814171801.13347-2-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-08-14drm: use drm_warn() in validate_blend_mode_for_alpha_formats()Leandro Ribeiro
Commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") introduced a WARN() to let driver developers know that a previously valid behavior should now be changed. But WARN() should not be used for that, as it's a kernel warning report mechanism for conditions that are not expected to happen. It also produces a stack trace. Instead, a simple warning-level log message should have been used, as drivers were expected to trigger the condition. This is causing problems for fuzzers, as they may stop when encountering a "BUG:" or "WARNING:" in the logs. Replace WARN() with drm_warn() in this function, avoiding these issues. Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Link: https://patch.msgid.link/20260731154232.37020-2-leandro.ribeiro@collabora.com Signed-off-by: Daniel Stone <daniels@collabora.com>
2026-08-14drm/virtio: use the DMA API for resource backing on XenBenjamin Leggett
On a Xen PV domain page addresses bear no relation to the real machine addresses the host would have to use to reach it. virtio_ring.c handles this correctly, vring_use_map_api() returns true for any xen_domain() regardless of VIRTIO_F_ACCESS_PLATFORM. virtio-gpu makes the same decision independently, but its copy looks only at the feature bit: bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev); QEMU does not set iommu_platform on virtio-vga by default, so VIRTIO_F_ACCESS_PLATFORM is not negotiated, use_dma_api is false, and virtio_gpu_object_shmem_init() describes the framebuffer's backing pages to the host with sg_phys(). Those are guest-physical addresses. In a PV domain they resolve, on the host side, to pages belonging to some other domain, so the host scans out unrelated memory. Move the decision into virtio_gpu_use_dma_api() and give it the xen_domain() check, like vring_use_map_api() has. This additionally enables the dma_sync_sgtable_for_device() calls in virtgpu_vq.c, which are required for correctness whenever swiotlb is in play. Reproduced with a Xen 4.21 PV dom0 nested inside QEMU 8.2 with virtio-vga, on both a distro 6.8 kernel and 6.18 LTS. A PVH dom0 works fine and doesn't need this fix because it is identity-mapped, only PV dom0s are affected. Fixes: a3b815f09bb8 ("drm/virtio: add iommu support.") Signed-off-by: Ben Leggett <benjamin@edera.io> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patch.msgid.link/20260806-virtgpu-xen-dma-v1-1-e499b345bbad@edera.io
2026-08-14drm/virtio: reclaim pending vbufs before tearing down vqsAnuj Bolewar
virtio_gpu_free_vbufs() destroys the vbufs kmem_cache after the virtqueues have already been released. Commands that were queued but never completed by the device leave their vbuffers stranded in the virtqueue, so the cache still holds live objects when virtio_gpu_deinit() tears everything down. This triggers a WARNING in virtio_gpu_free_vbufs: BUG virtio-gpu-vbufs (Not tainted): Objects remaining in cache on __kmem_cache_shutdown() Drain any buffers still sitting in the control and cursor virtqueues in virtio_gpu_deinit() after the device has been reset and before the virtqueues are deleted, following the same pattern used by virtio_console's remove_vqs(). Each reclaimed buffer is released with free_vbuf(), dropping the reference on any GEM objects it holds. Pending RESOURCE_UNREF commands are handled as well: their resp_cb_data still references a GEM object, so it is cleaned up with virtio_gpu_cleanup_object() to avoid leaking it on teardown. Reported-by: syzbot+06f9b2a53ba4a5a47644@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=06f9b2a53ba4a5a47644 Signed-off-by: Anuj Bolewar <bolewara@gmail.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patch.msgid.link/20260802-virtio-gpu-reclaim-vbufs-v2-1-5767fb860691@gmail.com
2026-08-14drm/virtio: check return value of vgdev_output_init()shechenglong
The return value of vgdev_output_init(), called by virtio_gpu_modeset_init(), is not checked. As a result, modeset initialization continues even if an output fails to initialize. check the return value and return the error to the caller. Signed-off-by: shechenglong <shechenglong@xfusion.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patch.msgid.link/20260811015624.830-1-shechenglong@xfusion.com
2026-08-14drm/virtio: Fix a NULL vs ERR_PTR() bug in virtio_gpu_user_framebuffer_create()Dan Carpenter
Smatch complains that returning a NULL here will lead to a NULL pointer dereference in drm_mode_addfb2(). Return an error pointer instead. Fixes: dc5698e80cf7 ("Add virtio gpu driver.") Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patch.msgid.link/an1tWfHIHwtXd9SO@stanley.mountain
2026-08-14Merge tag 'drm-xe-next-fixes-2026-08-13' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Couple drm-ras fixes, a probe failure clean-up fix, a GT freq boundaries fixes for BMG/CRI and a Media engines/slice fix. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/an4NGzsYN9MOTFII@intel.com
2026-08-14Merge tag 'drm-misc-next-fixes-2026-08-13' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/misc/kernel into drm-next A single patch to remove a .orig file introduced by accident. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://patch.msgid.link/20260813-shrewd-ocelot-of-research-aa3caa@houat
2026-08-14drm/panel: samsung-s6d16d0: Use mipi_dsi_*_multi(); fix minor bugsAkash Sukhavasi
The mipi_dsi_dcs_*() functions used by this driver are deprecated in favour of their _multi() counterparts, as noted in Documentation/gpu/todo.rst. The _multi() variants record the first error in a context structure and skip subsequent calls once an error is set, removing the need to check the return value after each command. They also log failures internally, making the per-call dev_err() calls redundant. Convert prepare(), enable(), disable(), and unprepare() to use mipi_dsi_dcs_*_multi(). unprepare() previously returned an error if mipi_dsi_dcs_enter_sleep_mode() failed, skipping RESET assertion and regulator_disable(). Because drm_panel_unprepare() does not clear panel->prepared when the callback returns an error, drm_panel_prepare() would then return early on the next call, leaving the panel powered and unable to be re-initialised. The converted code always asserts RESET, disables the regulator, and returns 0. Also fix a typo in a comment ("Enabe" -> "Enable"). Signed-off-by: Akash Sukhavasi <akash.sukhavasi@gmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260810-mipi-dsi-s6d16d0-multi-v2-1-8fcdfbf9bbd2@gmail.com
2026-08-14Merge tag 'drm-xe-fixes-2026-08-13' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Fix DPT Allocation paths (Maarten) - Fixes around UM queue BO (Jia) - Order ring writes before ring tail updates (Matthew Brost) - Add termination on resume for PXP (Daniele) - Document Sentinel and make CTX_TIMESTAMP read TOCTOU-safe (Gajendra) - Fix sync entry leak on OA config emit failure (Linmao Li) - Check managed mutex initilization errors (Linmao Li) - Fix min frequency setting (Vinay) - Fix xe_device_probe error path (Raag) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com> Link: https://patch.msgid.link/an4ZogmPqP2Xtfx3@fedora
2026-08-14Merge tag 'drm-misc-fixes-2026-08-13' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v7.3: - Revert fair scheduler patches and mark fair policy as experimental due to reported regressions. - Fix OOB read in connector/hdmi infoframe. - Handle invalid scaling parameters and empty messages in log target. - Skip attempting to populate unmapped pages in amdxdna. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patch.msgid.link/a9b38792-bdd0-42da-a46a-7a048c26c0c2@linux.intel.com
2026-08-13drm/xe/hwmon: Enable package and vram temperatures for CRIKarthik Poosa
Enable package and vram temperatures support from hwmon on CRI. The required MMIO offsets of these are same as on BMG. Signed-off-by: Karthik Poosa <karthik.poosa@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260813193546.511093-1-karthik.poosa@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>