<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 22, 2022 at 4:29 PM Matthew Brost <<a href="mailto:matthew.brost@intel.com">matthew.brost@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
This is a submission for Xe, a new driver for Intel GPUs that supports both<br>
integrated and discrete platforms starting with Tiger Lake (first platform with<br>
Intel Xe Architecture). The intention of this new driver is to have a fresh base<br>
to work from that is unencumbered by older platforms, whilst also taking the<br>
opportunity to rearchitect our driver to increase sharing across the drm<br>
subsystem, both leveraging and allowing us to contribute more towards other<br>
shared components like TTM and drm/scheduler. The memory model is based on VM<br>
bind which is similar to the i915 implementation. Likewise the execbuf<br>
implementation for Xe is very similar to execbuf3 in the i915 [1].<br>
<br>
The code is at a stage where it is already functional and has experimental<br>
support for multiple platforms starting from Tiger Lake, with initial support<br>
implemented in Mesa (for Iris and Anv, our OpenGL and Vulkan drivers), as well<br>
as in NEO (for OpenCL and Level0). A Mesa MR has been posted [2] and NEO<br>
implementation will be released publicly early next year. We also have a suite<br>
of IGTs for XE that will appear on the IGT list shortly.<br>
<br>
It has been built with the assumption of supporting multiple architectures from<br>
the get-go, right now with tests running both on X86 and ARM hosts. And we<br>
intend to continue working on it and improving on it as part of the kernel<br>
community upstream.<br>
<br>
The new Xe driver leverages a lot from i915 and work on i915 continues as we<br>
ready Xe for production throughout 2023.<br>
<br>
As for display, the intent is to share the display code with the i915 driver so<br>
that there is maximum reuse there. Currently this is being done by compiling the<br>
display code twice, but alternatives to that are under consideration and we want<br>
to have more discussion on what the best final solution will look like over the<br>
next few months. Right now, work is ongoing in refactoring the display codebase<br>
to remove as much as possible any unnecessary dependencies on i915 specific data<br>
structures there..<br>
<br>
We currently have 2 submission backends, execlists and GuC. The execlist is<br>
meant mostly for testing and is not fully functional while GuC backend is fully<br>
functional. As with the i915 and GuC submission, in Xe the GuC firmware is<br>
required and should be placed in /lib/firmware/xe.<br>
<br>
The GuC firmware can be found in the below location:<br>
<a href="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915" rel="noreferrer" target="_blank">https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915</a><br>
<br>
The easiest way to setup firmware is:<br>
cp -r /lib/firmware/i915 /lib/firmware/xe<br>
<br>
The code has been organized such that we have all patches that touch areas<br>
outside of drm/xe first for review, and then the actual new driver in a separate<br>
commit. The code which is outside of drm/xe is included in this RFC while<br>
drm/xe is not due to the size of the commit. The drm/xe is code is available in<br>
a public repo listed below.<br>
<br>
Xe driver commit:<br>
<a href="https://cgit.freedesktop.org/drm/drm-xe/commit/?h=drm-xe-next&id=9cb016ebbb6a275f57b1cb512b95d5a842391ad7" rel="noreferrer" target="_blank">https://cgit.freedesktop.org/drm/drm-xe/commit/?h=drm-xe-next&id=9cb016ebbb6a275f57b1cb512b95d5a842391ad7</a></blockquote><div><br></div><div>Drive-by comment here because I don't see any actual xe patches on the list:</div><div><br></div><div>You probably want to drop DRM_XE_SYNC_DMA_BUF from the uAPI. Now that we've landed the new dma-buf ioctls for sync_file import/export, there's really no reason to have it as part of submit. Dropping it should also make locking a tiny bit easier.</div><div><br></div><div>--Jason</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Xe kernel repo:<br>
<a href="https://cgit.freedesktop.org/drm/drm-xe/" rel="noreferrer" target="_blank">https://cgit.freedesktop.org/drm/drm-xe/</a><br>
<br>
There's a lot of work still to happen on Xe but we're very excited about it and<br>
wanted to share it early and welcome feedback and discussion.<br>
<br>
Cheers,<br>
Matthew Brost<br>
<br>
[1] <a href="https://patchwork.freedesktop.org/series/105879/" rel="noreferrer" target="_blank">https://patchwork.freedesktop.org/series/105879/</a><br>
[2] <a href="https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20418" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20418</a><br>
<br>
Maarten Lankhorst (12):<br>
drm/amd: Convert amdgpu to use suballocation helper.<br>
drm/radeon: Use the drm suballocation manager implementation.<br>
drm/i915: Remove gem and overlay frontbuffer tracking<br>
drm/i915/display: Neuter frontbuffer tracking harder<br>
drm/i915/display: Add more macros to remove all direct calls to uncore<br>
drm/i915/display: Remove all uncore mmio accesses in favor of intel_de<br>
drm/i915: Rename find_section to find_bdb_section<br>
drm/i915/regs: Set DISPLAY_MMIO_BASE to 0 for xe<br>
drm/i915/display: Fix a use-after-free when intel_edp_init_connector<br>
fails<br>
drm/i915/display: Remaining changes to make xe compile<br>
sound/hda: Allow XE as i915 replacement for sound<br>
mei/hdcp: Also enable for XE<br>
<br>
Matthew Brost (5):<br>
drm/sched: Convert drm scheduler to use a work queue rather than<br>
kthread<br>
drm/sched: Add generic scheduler message interface<br>
drm/sched: Start run wq before TDR in drm_sched_start<br>
drm/sched: Submit job before starting TDR<br>
drm/sched: Add helper to set TDR timeout<br>
<br>
Thomas Hellström (3):<br>
drm/suballoc: Introduce a generic suballocation manager<br>
drm: Add a gpu page-table walker helper<br>
drm/ttm: Don't print error message if eviction was interrupted<br>
<br>
drivers/gpu/drm/Kconfig | 5 +<br>
drivers/gpu/drm/Makefile | 4 +<br>
drivers/gpu/drm/amd/amdgpu/Kconfig | 1 +<br>
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 26 +-<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 14 +-<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +-<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +-<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 23 +-<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +-<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 320 +-----------------<br>
drivers/gpu/drm/drm_pt_walk.c | 159 +++++++++<br>
drivers/gpu/drm/drm_suballoc.c | 301 ++++++++++++++++<br>
drivers/gpu/drm/i915/Makefile | 2 +-<br>
drivers/gpu/drm/i915/display/hsw_ips.c | 7 +-<br>
drivers/gpu/drm/i915/display/i9xx_plane.c | 1 +<br>
drivers/gpu/drm/i915/display/intel_atomic.c | 2 +<br>
.../gpu/drm/i915/display/intel_atomic_plane.c | 25 +-<br>
.../gpu/drm/i915/display/intel_backlight.c | 2 +-<br>
drivers/gpu/drm/i915/display/intel_bios.c | 71 ++--<br>
drivers/gpu/drm/i915/display/intel_bw.c | 36 +-<br>
drivers/gpu/drm/i915/display/intel_cdclk.c | 68 ++--<br>
drivers/gpu/drm/i915/display/intel_color.c | 1 +<br>
drivers/gpu/drm/i915/display/intel_crtc.c | 14 +-<br>
drivers/gpu/drm/i915/display/intel_cursor.c | 14 +-<br>
drivers/gpu/drm/i915/display/intel_de.h | 38 +++<br>
drivers/gpu/drm/i915/display/intel_display.c | 155 +++++++--<br>
drivers/gpu/drm/i915/display/intel_display.h | 9 +-<br>
.../gpu/drm/i915/display/intel_display_core.h | 5 +-<br>
.../drm/i915/display/intel_display_debugfs.c | 8 +<br>
.../drm/i915/display/intel_display_power.c | 40 ++-<br>
.../drm/i915/display/intel_display_power.h | 6 +<br>
.../i915/display/intel_display_power_map.c | 7 +<br>
.../i915/display/intel_display_power_well.c | 24 +-<br>
.../drm/i915/display/intel_display_reg_defs.h | 4 +<br>
.../drm/i915/display/intel_display_trace.h | 6 +<br>
.../drm/i915/display/intel_display_types.h | 32 +-<br>
drivers/gpu/drm/i915/display/intel_dmc.c | 17 +-<br>
drivers/gpu/drm/i915/display/intel_dp.c | 11 +-<br>
drivers/gpu/drm/i915/display/intel_dp_aux.c | 6 +<br>
drivers/gpu/drm/i915/display/intel_dpio_phy.c | 9 +-<br>
drivers/gpu/drm/i915/display/intel_dpio_phy.h | 15 +<br>
drivers/gpu/drm/i915/display/intel_dpll.c | 8 +-<br>
drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 4 +<br>
drivers/gpu/drm/i915/display/intel_drrs.c | 1 +<br>
drivers/gpu/drm/i915/display/intel_dsb.c | 124 +++++--<br>
drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 26 +-<br>
drivers/gpu/drm/i915/display/intel_fb.c | 108 ++++--<br>
drivers/gpu/drm/i915/display/intel_fb_pin.c | 6 -<br>
drivers/gpu/drm/i915/display/intel_fbc.c | 49 ++-<br>
drivers/gpu/drm/i915/display/intel_fbdev.c | 108 +++++-<br>
.../gpu/drm/i915/display/intel_frontbuffer.c | 103 +-----<br>
.../gpu/drm/i915/display/intel_frontbuffer.h | 67 +---<br>
drivers/gpu/drm/i915/display/intel_gmbus.c | 2 +-<br>
drivers/gpu/drm/i915/display/intel_hdcp.c | 9 +-<br>
drivers/gpu/drm/i915/display/intel_hdmi.c | 1 -<br>
.../gpu/drm/i915/display/intel_lpe_audio.h | 8 +<br>
.../drm/i915/display/intel_modeset_setup.c | 11 +-<br>
drivers/gpu/drm/i915/display/intel_opregion.c | 2 +-<br>
drivers/gpu/drm/i915/display/intel_overlay.c | 14 -<br>
.../gpu/drm/i915/display/intel_pch_display.h | 16 +<br>
.../gpu/drm/i915/display/intel_pch_refclk.h | 8 +<br>
drivers/gpu/drm/i915/display/intel_pipe_crc.c | 1 +<br>
.../drm/i915/display/intel_plane_initial.c | 3 +-<br>
drivers/gpu/drm/i915/display/intel_psr.c | 1 +<br>
drivers/gpu/drm/i915/display/intel_sprite.c | 21 ++<br>
drivers/gpu/drm/i915/display/intel_vbt_defs.h | 2 +-<br>
drivers/gpu/drm/i915/display/intel_vga.c | 5 +<br>
drivers/gpu/drm/i915/display/skl_scaler.c | 2 +<br>
.../drm/i915/display/skl_universal_plane.c | 52 ++-<br>
drivers/gpu/drm/i915/display/skl_watermark.c | 25 +-<br>
drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 4 -<br>
drivers/gpu/drm/i915/gem/i915_gem_domain.c | 7 -<br>
.../gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 -<br>
drivers/gpu/drm/i915/gem/i915_gem_object.c | 25 --<br>
drivers/gpu/drm/i915/gem/i915_gem_object.h | 22 --<br>
drivers/gpu/drm/i915/gem/i915_gem_phys.c | 4 -<br>
drivers/gpu/drm/i915/gt/intel_gt_regs.h | 3 +-<br>
drivers/gpu/drm/i915/i915_driver.c | 1 +<br>
drivers/gpu/drm/i915/i915_gem.c | 8 -<br>
drivers/gpu/drm/i915/i915_gem_gtt.c | 1 -<br>
drivers/gpu/drm/i915/i915_reg_defs.h | 8 +<br>
drivers/gpu/drm/i915/i915_vma.c | 12 -<br>
drivers/gpu/drm/radeon/radeon.h | 55 +--<br>
drivers/gpu/drm/radeon/radeon_ib.c | 12 +-<br>
drivers/gpu/drm/radeon/radeon_object.h | 25 +-<br>
drivers/gpu/drm/radeon/radeon_sa.c | 314 ++---------------<br>
drivers/gpu/drm/radeon/radeon_semaphore.c | 6 +-<br>
drivers/gpu/drm/scheduler/sched_main.c | 182 +++++++---<br>
drivers/gpu/drm/ttm/ttm_bo.c | 3 +-<br>
drivers/misc/mei/hdcp/Kconfig | 2 +-<br>
drivers/misc/mei/hdcp/mei_hdcp.c | 3 +-<br>
include/drm/drm_pt_walk.h | 161 +++++++++<br>
include/drm/drm_suballoc.h | 112 ++++++<br>
include/drm/gpu_scheduler.h | 41 ++-<br>
sound/hda/hdac_i915.c | 17 +-<br>
sound/pci/hda/hda_intel.c | 56 +--<br>
sound/soc/intel/avs/core.c | 13 +-<br>
sound/soc/sof/intel/hda.c | 7 +-<br>
98 files changed, 2076 insertions(+), 1325 deletions(-)<br>
create mode 100644 drivers/gpu/drm/drm_pt_walk.c<br>
create mode 100644 drivers/gpu/drm/drm_suballoc.c<br>
create mode 100644 include/drm/drm_pt_walk.h<br>
create mode 100644 include/drm/drm_suballoc.h<br>
<br>
-- <br>
2.37.3<br>
<br>
</blockquote></div></div>