intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/4] drm/i915: better high level abstraction for display
@ 2024-03-06 12:24 Jani Nikula
  2024-03-06 12:24 ` [RFC v2 1/4] drm/i915/display: ideas for further separating display code from the rest Jani Nikula
                   ` (11 more replies)
  0 siblings, 12 replies; 17+ messages in thread
From: Jani Nikula @ 2024-03-06 12:24 UTC (permalink / raw)
  To: intel-gfx, intel-xe
  Cc: rodrigo.vivi, lucas.demarchi, ville.syrjala, jani.nikula

This is v2 of [1]. Improve the abstractions for display code.

The main goals are:

1) The display code does not access struct drm_i915_private or struct
   xe_device. It only uses its own struct intel_display instead.

2) The i915 and xe driver cores do not access struct intel_display
   directly. It becomes an opaque pointer to them, stored in struct
   drm_i915_private and struct xe_device, and passed to display code.

This will mean a lot of churn, unfortunately. But it will better
separate the display code from the xe and i915 driver cores, and pave
the way for a) removing -Ddrm_i915_private=xe_device from xe Makefile,
and b) stop building the display code twice.

What's presented here goes a long way, and could get us started. But
there are still opens, such as:

1) How to handle platform checks such as IS_TIGERLAKE().

2) How to handle access to non-display members of i915/xe, such as
   i915->uncore.

There are other similar things, but I believe those are the most
prevalent, and are the biggest blockers for converting a lot of
functions over from i915 -> intel_display.


BR,
Jani.

[1] https://lore.kernel.org/r/cover.1695747484.git.jani.nikula@intel.com


Jani Nikula (4):
  drm/i915/display: ideas for further separating display code from the
    rest
  drm/i915/display: add generic to_intel_display() macro
  drm/i915/display: accept either i915 or display for feature tests
  drm/i915/display: test various to_intel_display() scenarios

 .../gpu/drm/i915/display/intel_display_core.h |  3 ++
 .../drm/i915/display/intel_display_device.c   | 13 ++++++
 .../drm/i915/display/intel_display_device.h   | 10 +++-
 .../drm/i915/display/intel_display_types.h    | 46 +++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_dp.c       |  6 +--
 drivers/gpu/drm/i915/display/intel_hdmi.c     | 13 +++---
 drivers/gpu/drm/i915/i915_drv.h               | 11 ++++-
 drivers/gpu/drm/xe/xe_device_types.h          | 15 +++++-
 8 files changed, 103 insertions(+), 14 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-03-07 13:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-06 12:24 [RFC v2 0/4] drm/i915: better high level abstraction for display Jani Nikula
2024-03-06 12:24 ` [RFC v2 1/4] drm/i915/display: ideas for further separating display code from the rest Jani Nikula
2024-03-06 12:42   ` Jani Nikula
2024-03-06 12:24 ` [RFC v2 2/4] drm/i915/display: add generic to_intel_display() macro Jani Nikula
2024-03-06 18:16   ` Rodrigo Vivi
2024-03-07 11:28     ` Jani Nikula
2024-03-07 13:43       ` Rodrigo Vivi
2024-03-06 12:24 ` [RFC v2 3/4] drm/i915/display: accept either i915 or display for feature tests Jani Nikula
2024-03-06 12:24 ` [RFC v2 4/4] drm/i915/display: test various to_intel_display() scenarios Jani Nikula
2024-03-06 12:29 ` ✓ CI.Patch_applied: success for drm/i915: better high level abstraction for display Patchwork
2024-03-06 12:29 ` ✗ CI.checkpatch: warning " Patchwork
2024-03-06 12:30 ` ✓ CI.KUnit: success " Patchwork
2024-03-06 12:41 ` ✓ CI.Build: " Patchwork
2024-03-06 12:41 ` ✗ CI.Hooks: failure " Patchwork
2024-03-06 12:43 ` ✗ CI.checksparse: warning " Patchwork
2024-03-06 13:11 ` ✓ CI.BAT: success " Patchwork
2024-03-06 18:23 ` [RFC v2 0/4] " Rodrigo Vivi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).