Skip to content
Snippets Groups Projects
Commit 19026b7e authored by Lucas De Marchi's avatar Lucas De Marchi
Browse files

drm/xe: Remove i915 header dependency when building without display


If xe is built without support for driving display, it shouldn't need
the i915 headers. As a consequence the build system shouldn't be passing
the additional CFLAGS to include the i915 directories. However as the
display structs were needed in other compilation units, it was not
possible to remove, leading to every single file indirectly including
the i915 headers via xe_device_types.h.

The Makefile had a note about i915 register definitions, but missed the
display dependencies.

Now that the display substruct from xe_device and the info substruct
from xe->info are initialized by display-only files, it's possible to
shield the rest of the driver with some additional ifdefs. Ideally the
structs should be made opaque and only defined in the display
compilation units: this would allow removing the includes from
xe_device_types.h even when building with display. However this needs
more refactors and cleanups because the i915 files expect the info and
display substruct to be available from drm_i915_private that is aliased
by xe_device when building xe.  So, to avoid future dependencies on the
i915 headers, just add a few more ifdefs in the header so a build
without display breaks if this is attempted.

Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://lore.kernel.org/r/20230302013411.3262608-8-lucas.demarchi@intel.com
parent d41d0cdb
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment