[Intel-gfx] [RFC 0/3] drm/i915: split display from drm_i915_private and i915_drv.h

Jani Nikula jani.nikula at intel.com
Tue Sep 26 17:15:40 UTC 2023


We've been gradually separating display code from the rest of the i915
driver code over the past few years. We can't get much further than this
without some more drastic changes.

One of them is separating struct drm_i915_private and struct
intel_display almost completely. The former would remain for core driver
code and gem, while the latter would be for display. Long term, i915
display code would not include i915_drv.h, and would not have access to
struct drm_i915_private definion.

For display code, struct drm_i915_private would be opaque, and for the
rest of the driver, struct intel_display would be opaque.

Naturally, such separation helps the upcoming xe driver integration with
i915 display code. It's basically a requirement if (and that's still an
if) we decide to use aux-bus to have a i915.ko/xe.ko <->
intel-display.ko split. Regardless of that, I think this is a big
maintainability plus on its own too. The everything-includes-everything
model is really a nightmare.

Here are some draft ideas how this could be started. It will be a lot of
churn especially in the display code, but I believe the end result will
be cleaner.

BR,
Jani.


Jani Nikula (3):
  drm/i915: rough ideas for further separating display code from the
    rest
  drm/i915/hdmi: drafting what struct intel_display usage would look
    like
  drm/i915: draft what feature test macros would look like

 .../gpu/drm/i915/display/intel_display_core.h    | 16 ++++++++++++++++
 .../gpu/drm/i915/display/intel_display_device.c  | 13 +++++++++++++
 .../gpu/drm/i915/display/intel_display_device.h  |  4 ++++
 drivers/gpu/drm/i915/display/intel_hdmi.c        | 15 ++++++++++-----
 drivers/gpu/drm/i915/i915_drv.h                  | 11 ++++++++++-
 5 files changed, 53 insertions(+), 6 deletions(-)

-- 
2.39.2



More information about the Intel-gfx mailing list