Matt Roper
8367585154
drm/xe: Cleanup unused header includes
...
clangd reports many "unused header" warnings throughout the Xe driver.
Start working to clean this up by removing unnecessary includes in our
.c files and/or replacing them with explicit includes of other headers
that were previously being included indirectly.
By far the most common offender here was unnecessary inclusion of
xe_gt.h. That likely originates from the early days of xe.ko when
xe_mmio did not exist and all register accesses, including those
unrelated to GTs, were done with GT functions.
There's still a lot of additional #include cleanup that can be done in
the headers themselves; that will come as a followup series.
v2:
- Squash the 79-patch series down to a single patch. (MattB)
Reviewed-by: Matthew Brost <matthew.brost@intel.com >
Link: https://patch.msgid.link/20260115032803.4067824-2-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
2026-01-15 07:05:04 -08:00
Raag Jadav
e70711be0d
drm/xe/i2c: Force polling mode in survivability
...
SGUnit interrupts are not initialized in survivability. Force I2C
controller to polling mode while in survivability.
v2: Use helper function instead of manual check (Riana)
Signed-off-by: Raag Jadav <raag.jadav@intel.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://patch.msgid.link/20260105080750.16605-1-raag.jadav@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
2026-01-05 07:43:22 -08:00
Raag Jadav
bd5840819a
drm/xe/cri: Enable I2C controller
...
Enable I2C controller for Crescent Island and while at it, rely on
has_i2c flag instead of manual platform checks.
Signed-off-by: Raag Jadav <raag.jadav@intel.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patch.msgid.link/20251128084414.306265-1-raag.jadav@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
2025-12-12 08:49:22 -08:00
Raag Jadav
0bb78ce099
drm/xe/i2c: Wire up reset/postinstall for I2C IRQ
...
I2C IRQ needs to be routed to SGUnit or PUnit for the devices that support
it. Wire up reset/postinstall handles for I2C IRQ to take care of this.
Signed-off-by: Raag Jadav <raag.jadav@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20251011123509.3233213-3-raag.jadav@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
2025-10-13 07:24:25 -07:00
Raag Jadav
3df5aacb9d
drm/xe/i2c: Introduce xe_i2c_irq_present()
...
In preparation of wider usecases which require checking for I2C IRQ
presence, introduce xe_i2c_irq_present() helper.
Signed-off-by: Raag Jadav <raag.jadav@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20251011123509.3233213-2-raag.jadav@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
2025-10-13 07:24:25 -07:00
Raag Jadav
fce99326c9
drm/xe/i2c: Enable bus mastering
...
Enable bus mastering for I2C controller to support device initiated
in-band transactions.
Signed-off-by: Raag Jadav <raag.jadav@intel.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Link: https://lore.kernel.org/r/20250908055320.2549722-1-raag.jadav@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
2025-09-09 06:02:35 -07:00
Raag Jadav
cc8b221172
drm/xe/i2c: Introduce xe_i2c_present()
...
In preparation of wider usecases which require checking for I2C
controller presence, introduce xe_i2c_present() helper.
v2: Doc fix (Riana)
Suggested-by: Riana Tauro <riana.tauro@intel.com >
Signed-off-by: Raag Jadav <raag.jadav@intel.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Reviewed-by: Riana Tauro <riana.tauro@intel.com >
Link: https://lore.kernel.org/r/20250814091845.1356135-1-raag.jadav@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2025-08-17 12:27:50 -04:00
Lukasz Laguna
9a220e0659
drm/xe/vf: Don't register I2C devices if VF
...
VF drivers can't access I2C devices, so skip their registration when
running as VF.
Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com >
Fixes: f0e53aadd7 ("drm/xe: Support for I2C attached MCUs")
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://lore.kernel.org/r/20250717155420.25298-1-lukasz.laguna@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2025-07-23 09:10:53 -04:00
Dan Carpenter
2f264d58cc
drm/xe: Fix a NULL vs IS_ERR() bug in xe_i2c_register_adapter()
...
The fwnode_create_software_node() function returns error pointers. It
never returns NULL. Update the checks to match.
Fixes: f0e53aadd7 ("drm/xe: Support for I2C attached MCUs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://lore.kernel.org/r/65825d00-81ab-4665-af51-4fff6786a250@sabinyo.mountain
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2025-07-16 10:51:36 -04:00
Raag Jadav
0ea07b6951
drm/xe/pm: Wire up suspend/resume for I2C controller
...
Wire up suspend/resume handles for I2C controller to match its power
state with SGUnit.
Signed-off-by: Raag Jadav <raag.jadav@intel.com >
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Reviewed-by: Karthik Poosa <karthik.poosa@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Link: https://lore.kernel.org/r/20250701122252.2590230-5-heikki.krogerus@linux.intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2025-07-10 10:19:41 -04:00
Heikki Krogerus
f0e53aadd7
drm/xe: Support for I2C attached MCUs
...
Adding adaption/glue layer where the I2C host adapter
(Synopsys DesignWare I2C adapter) and the I2C clients (the
microcontroller units) are enumerated.
The microcontroller units (MCU) that are attached to the GPU
depend on the OEM. The initially supported MCU will be the
Add-In Management Controller (AMC).
Co-developed-by: Michael J. Ruhl <michael.j.ruhl@intel.com >
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com >
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com >
Link: https://lore.kernel.org/r/20250701122252.2590230-4-heikki.krogerus@linux.intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
[Rodrigo fixed the co-developed tags and SPDX format in the .c file]
2025-07-10 10:19:41 -04:00