[CI 3/6] drm/xe/pcode: add struct drm_device based interface
Lucas De Marchi
lucas.demarchi at intel.com
Thu Jun 26 18:56:23 UTC 2025
On Mon, Jun 23, 2025 at 02:43:46PM +0300, Jani Nikula wrote:
>In preparation for dropping the dependency on struct intel_uncore or
>struct xe_tile from display code, add a struct drm_device based
>interface to pcode.
>
>Cc: Lucas De Marchi <lucas.demarchi at intel.com>
>Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
>Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
>Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>---
So now we define intel_pcode_read() in both xe.ko and i915.ko.
And intel_pcode is only called from display or
drivers/gpu/drm/i915/soc/intel_dram.c (which afair xe is concerned is
built under XE_DISPLAY only).
We used to allow both i915 and xe as built-in as long as XE_DISPLAY is
not set, but with this patch this is now broken.
I think we have a few possible ways to handle it.
1) Revert. See https://lore.kernel.org/intel-xe/3667a992-a24b-4e49-aab2-5ca73f2c0a56@infradead.org/
2) Move the common symbols to a separate module. We can name the module
xe-i915-common or intel-display or something else. Then we keep moving
symbols there until we can move the entire display. From the module
point of view it's just another dependency that will get loaded.
However, looking at the implementation, they are actually helpers that
depend on the driver backing that device so it's not very
straightforward at this point.
3) Forbid DRM_XE=y && DRM_I915=y (rather than based on DRM_XE_DISPLAY)
4) ifdef the helpers based on XE_DISPLAY... because if XE_DISPLAY is
set, then XE can't be built-in.
I have (3) ready based on an earlier patch and (4) is pretty easy. But
I'd prefer (2) to move things forward. Or maybe you already have
something else? Thoughts?
thanks
Lucas De Marchi
More information about the Intel-xe
mailing list