[CI 3/6] drm/xe/pcode: add struct drm_device based interface

Jani Nikula jani.nikula at intel.com
Thu Jun 26 19:10:52 UTC 2025


On Thu, 26 Jun 2025, Lucas De Marchi <lucas.demarchi at intel.com> wrote:
> 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?

I was thinking of (4) for now. Or prefix them differently and have a
#define in a header. I saw the report, but didn't get around to it yet.

I really don't want an ad hoc separate module. I think it's a
distraction to the display module goal.

BR,
Jani.


-- 
Jani Nikula, Intel


More information about the Intel-xe mailing list