[Intel-gfx] [PATCH 07/32] drm/i915: Move GraphicsTechnology files under gt/

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Apr 23 08:57:03 UTC 2019


Quoting Joonas Lahtinen (2019-04-18 15:04:49)
> + Jani and Rodrigo to comment

No objection here and drm-intel-next was freshly tagged, so this is:

Acked-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas

> 
> I'm definitely all for doing this, so it's only a matter of the timing.
> 
> Question is, do we want to do it right now after last drm-intel-next was
> tagged, or do we want to wait a couple of release candidates.
> 
> I'm leaning towards doing this ASAP, as git cherry-pick should
> understand that they're just renames, so there should be no issue with
> doing the -fixes.
> 
> Regards, Joonas
> 
> Quoting Chris Wilson (2019-04-17 10:56:32)
> > Start partitioning off the code that talks to the hardware (GT) from the
> > uapi layers and move the device facing code under gt/
> > 
> > One casualty is s/intel_ringbuffer.h/intel_engine.h/ with the plan to
> > subdivide that header and body further (and split out the submission
> > code from the ringbuffer and logical context handling). This patch aims
> > to be simple motion so git can fixup inflight patches with little mess.
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
> >  drivers/gpu/drm/i915/Makefile                 | 46 ++++++++++++-------
> >  drivers/gpu/drm/i915/Makefile.header-test     |  6 +--
> >  drivers/gpu/drm/i915/gt/Makefile              |  2 +
> >  drivers/gpu/drm/i915/gt/Makefile.header-test  | 16 +++++++
> >  .../gpu/drm/i915/{ => gt}/intel_breadcrumbs.c |  0
> >  drivers/gpu/drm/i915/{ => gt}/intel_context.c |  3 +-
> >  drivers/gpu/drm/i915/{ => gt}/intel_context.h |  0
> >  .../drm/i915/{ => gt}/intel_context_types.h   |  0
> >  .../{intel_ringbuffer.h => gt/intel_engine.h} |  0
> >  .../gpu/drm/i915/{ => gt}/intel_engine_cs.c   |  8 ++--
> >  .../drm/i915/{ => gt}/intel_engine_types.h    |  5 +-
> >  .../drm/i915/{ => gt}/intel_gpu_commands.h    |  0
> >  .../gpu/drm/i915/{ => gt}/intel_hangcheck.c   |  4 +-
> >  drivers/gpu/drm/i915/{ => gt}/intel_lrc.c     |  5 +-
> >  drivers/gpu/drm/i915/{ => gt}/intel_lrc.h     |  4 +-
> >  drivers/gpu/drm/i915/{ => gt}/intel_lrc_reg.h |  0
> >  drivers/gpu/drm/i915/{ => gt}/intel_mocs.c    |  4 +-
> >  drivers/gpu/drm/i915/{ => gt}/intel_mocs.h    |  4 +-
> >  .../i915/{i915_reset.c => gt/intel_reset.c}   |  2 +-
> >  .../i915/{i915_reset.h => gt/intel_reset.h}   |  2 +-
> >  .../gpu/drm/i915/{ => gt}/intel_ringbuffer.c  |  3 +-
> >  drivers/gpu/drm/i915/{ => gt}/intel_sseu.c    |  0
> >  drivers/gpu/drm/i915/{ => gt}/intel_sseu.h    |  0
> >  .../gpu/drm/i915/{ => gt}/intel_workarounds.c |  2 +-
> >  .../gpu/drm/i915/{ => gt}/intel_workarounds.h |  8 +++-
> >  .../i915/{ => gt}/intel_workarounds_types.h   |  0
> >  .../drm/i915/{selftests => gt}/mock_engine.c  | 10 ++--
> >  .../drm/i915/{selftests => gt}/mock_engine.h  |  2 +-
> >  .../selftest_engine_cs.c}                     |  0
> >  .../selftest_hangcheck.c}                     | 16 +++----
> >  .../intel_lrc.c => gt/selftest_lrc.c}         | 16 +++----
> >  .../selftest_workarounds.c}                   | 18 ++++----
> >  drivers/gpu/drm/i915/i915_cmd_parser.c        |  3 +-
> >  drivers/gpu/drm/i915/i915_debugfs.c           |  3 +-
> >  drivers/gpu/drm/i915/i915_drv.c               |  5 +-
> >  drivers/gpu/drm/i915/i915_drv.h               |  7 +--
> >  drivers/gpu/drm/i915/i915_gem.c               |  7 +--
> >  drivers/gpu/drm/i915/i915_gem_context.c       |  7 ++-
> >  drivers/gpu/drm/i915/i915_gem_context.h       |  3 +-
> >  drivers/gpu/drm/i915/i915_gem_context_types.h |  3 +-
> >  drivers/gpu/drm/i915/i915_gem_gtt.c           |  1 -
> >  drivers/gpu/drm/i915/i915_gem_gtt.h           |  2 +-
> >  drivers/gpu/drm/i915/i915_gpu_error.h         |  3 +-
> >  drivers/gpu/drm/i915/i915_perf.c              |  3 +-
> >  drivers/gpu/drm/i915/i915_pmu.c               |  4 +-
> >  drivers/gpu/drm/i915/i915_request.c           |  1 -
> >  drivers/gpu/drm/i915/i915_scheduler_types.h   |  2 +-
> >  drivers/gpu/drm/i915/i915_trace.h             |  3 +-
> >  drivers/gpu/drm/i915/i915_vma.c               |  3 +-
> >  drivers/gpu/drm/i915/intel_device_info.h      |  6 ++-
> >  drivers/gpu/drm/i915/intel_display.c          |  1 -
> >  drivers/gpu/drm/i915/intel_guc_submission.c   |  3 +-
> >  drivers/gpu/drm/i915/intel_guc_submission.h   |  3 +-
> >  drivers/gpu/drm/i915/intel_uc.c               |  2 +-
> >  .../gpu/drm/i915/selftests/i915_gem_context.c |  5 +-
> >  drivers/gpu/drm/i915/selftests/igt_reset.c    |  3 +-
> >  drivers/gpu/drm/i915/selftests/igt_spinner.h  |  3 +-
> >  .../gpu/drm/i915/selftests/mock_gem_device.c  |  3 +-
> >  drivers/gpu/drm/i915/selftests/mock_request.c |  3 +-
> >  59 files changed, 166 insertions(+), 112 deletions(-)
> >  create mode 100644 drivers/gpu/drm/i915/gt/Makefile
> >  create mode 100644 drivers/gpu/drm/i915/gt/Makefile.header-test
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_breadcrumbs.c (100%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_context.c (99%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_context.h (100%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_context_types.h (100%)
> >  rename drivers/gpu/drm/i915/{intel_ringbuffer.h => gt/intel_engine.h} (100%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_engine_cs.c (99%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_engine_types.h (99%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_gpu_commands.h (100%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_hangcheck.c (99%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_lrc.c (99%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_lrc.h (98%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_lrc_reg.h (100%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_mocs.c (99%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_mocs.h (97%)
> >  rename drivers/gpu/drm/i915/{i915_reset.c => gt/intel_reset.c} (99%)
> >  rename drivers/gpu/drm/i915/{i915_reset.h => gt/intel_reset.h} (98%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_ringbuffer.c (99%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_sseu.c (100%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_sseu.h (100%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_workarounds.c (99%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_workarounds.h (88%)
> >  rename drivers/gpu/drm/i915/{ => gt}/intel_workarounds_types.h (100%)
> >  rename drivers/gpu/drm/i915/{selftests => gt}/mock_engine.c (97%)
> >  rename drivers/gpu/drm/i915/{selftests => gt}/mock_engine.h (98%)
> >  rename drivers/gpu/drm/i915/{selftests/intel_engine_cs.c => gt/selftest_engine_cs.c} (100%)
> >  rename drivers/gpu/drm/i915/{selftests/intel_hangcheck.c => gt/selftest_hangcheck.c} (99%)
> >  rename drivers/gpu/drm/i915/{selftests/intel_lrc.c => gt/selftest_lrc.c} (99%)
> >  rename drivers/gpu/drm/i915/{selftests/intel_workarounds.c => gt/selftest_workarounds.c} (98%)
> > 
> > diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> > index 53ff209b91bb..40130cf5c003 100644
> > --- a/drivers/gpu/drm/i915/Makefile
> > +++ b/drivers/gpu/drm/i915/Makefile
> > @@ -35,32 +35,53 @@ subdir-ccflags-y += \
> >  # Extra header tests
> >  include $(src)/Makefile.header-test
> >  
> > +subdir-ccflags-y += -I$(src)
> > +
> >  # Please keep these build lists sorted!
> >  
> >  # core driver code
> >  i915-y += i915_drv.o \
> >           i915_irq.o \
> > -         i915_memcpy.o \
> > -         i915_mm.o \
> >           i915_params.o \
> >           i915_pci.o \
> > -         i915_reset.o \
> >           i915_suspend.o \
> > -         i915_sw_fence.o \
> > -         i915_syncmap.o \
> >           i915_sysfs.o \
> > -         i915_user_extensions.o \
> >           intel_csr.o \
> >           intel_device_info.o \
> >           intel_pm.o \
> >           intel_runtime_pm.o \
> > -         intel_workarounds.o
> > +         intel_uncore.o
> > +
> > +# core library code
> > +i915-y += \
> > +       i915_memcpy.o \
> > +       i915_mm.o \
> > +       i915_sw_fence.o \
> > +       i915_syncmap.o \
> > +       i915_user_extensions.o
> >  
> >  i915-$(CONFIG_COMPAT)   += i915_ioc32.o
> >  i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
> >  i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
> >  
> > -# GEM code
> > +# "Graphics Technology" (aka we talk to the gpu)
> > +obj-y += gt/
> > +gt-y += \
> > +       gt/intel_breadcrumbs.o \
> > +       gt/intel_context.o \
> > +       gt/intel_engine_cs.o \
> > +       gt/intel_hangcheck.o \
> > +       gt/intel_lrc.o \
> > +       gt/intel_reset.o \
> > +       gt/intel_ringbuffer.o \
> > +       gt/intel_mocs.o \
> > +       gt/intel_sseu.o \
> > +       gt/intel_workarounds.o
> > +gt-$(CONFIG_DRM_I915_SELFTEST) += \
> > +       gt/mock_engine.o
> > +i915-y += $(gt-y)
> > +
> > +# GEM (Graphics Execution Management) code
> >  i915-y += \
> >           i915_active.o \
> >           i915_cmd_parser.o \
> > @@ -88,15 +109,6 @@ i915-y += \
> >           i915_timeline.o \
> >           i915_trace_points.o \
> >           i915_vma.o \
> > -         intel_breadcrumbs.o \
> > -         intel_context.o \
> > -         intel_engine_cs.o \
> > -         intel_hangcheck.o \
> > -         intel_lrc.o \
> > -         intel_mocs.o \
> > -         intel_ringbuffer.o \
> > -         intel_sseu.o \
> > -         intel_uncore.o \
> >           intel_wopcm.o
> >  
> >  # general-purpose microcontroller (GuC) support
> > diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test
> > index 5bcc78d7ac96..96a5d90629ec 100644
> > --- a/drivers/gpu/drm/i915/Makefile.header-test
> > +++ b/drivers/gpu/drm/i915/Makefile.header-test
> > @@ -13,13 +13,11 @@ header_test := \
> >         intel_cdclk.h \
> >         intel_color.h \
> >         intel_connector.h \
> > -       intel_context_types.h \
> >         intel_crt.h \
> >         intel_csr.h \
> >         intel_ddi.h \
> >         intel_dp.h \
> >         intel_dvo.h \
> > -       intel_engine_types.h \
> >         intel_fbc.h \
> >         intel_fbdev.h \
> >         intel_frontbuffer.h \
> > @@ -33,9 +31,7 @@ header_test := \
> >         intel_psr.h \
> >         intel_sdvo.h \
> >         intel_sprite.h \
> > -       intel_sseu.h \
> > -       intel_tv.h \
> > -       intel_workarounds_types.h
> > +       intel_tv.h
> >  
> >  quiet_cmd_header_test = HDRTEST $@
> >        cmd_header_test = echo "\#include \"$(<F)\"" > $@
> > diff --git a/drivers/gpu/drm/i915/gt/Makefile b/drivers/gpu/drm/i915/gt/Makefile
> > new file mode 100644
> > index 000000000000..1c75b5c9790c
> > --- /dev/null
> > +++ b/drivers/gpu/drm/i915/gt/Makefile
> > @@ -0,0 +1,2 @@
> > +# Extra header tests
> > +include $(src)/Makefile.header-test
> > diff --git a/drivers/gpu/drm/i915/gt/Makefile.header-test b/drivers/gpu/drm/i915/gt/Makefile.header-test
> > new file mode 100644
> > index 000000000000..61e06cbb4b32
> > --- /dev/null
> > +++ b/drivers/gpu/drm/i915/gt/Makefile.header-test
> > @@ -0,0 +1,16 @@
> > +# SPDX-License-Identifier: MIT
> > +# Copyright © 2019 Intel Corporation
> > +
> > +# Test the headers are compilable as standalone units
> > +header_test := $(notdir $(wildcard $(src)/*.h))
> > +
> > +quiet_cmd_header_test = HDRTEST $@
> > +      cmd_header_test = echo "\#include \"$(<F)\"" > $@
> > +
> > +header_test_%.c: %.h
> > +       $(call cmd,header_test)
> > +
> > +extra-$(CONFIG_DRM_I915_WERROR) += \
> > +       $(foreach h,$(header_test),$(patsubst %.h,header_test_%.o,$(h)))
> > +
> > +clean-files += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.c,$(h)))
> > diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
> > similarity index 100%
> > rename from drivers/gpu/drm/i915/intel_breadcrumbs.c
> > rename to drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
> > diff --git a/drivers/gpu/drm/i915/intel_context.c b/drivers/gpu/drm/i915/gt/intel_context.c
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/intel_context.c
> > rename to drivers/gpu/drm/i915/gt/intel_context.c
> > index 961d1445833d..ebd1e5919a4a 100644
> > --- a/drivers/gpu/drm/i915/intel_context.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_context.c
> > @@ -7,8 +7,9 @@
> >  #include "i915_drv.h"
> >  #include "i915_gem_context.h"
> >  #include "i915_globals.h"
> > +
> >  #include "intel_context.h"
> > -#include "intel_ringbuffer.h"
> > +#include "intel_engine.h"
> >  
> >  static struct i915_global_context {
> >         struct i915_global base;
> > diff --git a/drivers/gpu/drm/i915/intel_context.h b/drivers/gpu/drm/i915/gt/intel_context.h
> > similarity index 100%
> > rename from drivers/gpu/drm/i915/intel_context.h
> > rename to drivers/gpu/drm/i915/gt/intel_context.h
> > diff --git a/drivers/gpu/drm/i915/intel_context_types.h b/drivers/gpu/drm/i915/gt/intel_context_types.h
> > similarity index 100%
> > rename from drivers/gpu/drm/i915/intel_context_types.h
> > rename to drivers/gpu/drm/i915/gt/intel_context_types.h
> > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/gt/intel_engine.h
> > similarity index 100%
> > rename from drivers/gpu/drm/i915/intel_ringbuffer.h
> > rename to drivers/gpu/drm/i915/gt/intel_engine.h
> > diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/intel_engine_cs.c
> > rename to drivers/gpu/drm/i915/gt/intel_engine_cs.c
> > index ad2a683d97f7..21dd3f25e641 100644
> > --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> > @@ -25,9 +25,10 @@
> >  #include <drm/drm_print.h>
> >  
> >  #include "i915_drv.h"
> > -#include "i915_reset.h"
> > -#include "intel_ringbuffer.h"
> > +
> > +#include "intel_engine.h"
> >  #include "intel_lrc.h"
> > +#include "intel_reset.h"
> >  
> >  /* Haswell does have the CXT_SIZE register however it does not appear to be
> >   * valid. Now, docs explain in dwords what is in the context object. The full
> > @@ -1756,6 +1757,5 @@ intel_engine_find_active_request(struct intel_engine_cs *engine)
> >  }
> >  
> >  #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
> > -#include "selftests/mock_engine.c"
> > -#include "selftests/intel_engine_cs.c"
> > +#include "selftest_engine_cs.c"
> >  #endif
> > diff --git a/drivers/gpu/drm/i915/intel_engine_types.h b/drivers/gpu/drm/i915/gt/intel_engine_types.h
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/intel_engine_types.h
> > rename to drivers/gpu/drm/i915/gt/intel_engine_types.h
> > index d07a01b3ed0b..3adf58da6d2c 100644
> > --- a/drivers/gpu/drm/i915/intel_engine_types.h
> > +++ b/drivers/gpu/drm/i915/gt/intel_engine_types.h
> > @@ -14,15 +14,14 @@
> >  #include <linux/types.h>
> >  
> >  #include "i915_gem.h"
> > +#include "i915_gem_batch_pool.h"
> > +#include "i915_pmu.h"
> >  #include "i915_priolist_types.h"
> >  #include "i915_selftest.h"
> >  #include "i915_timeline_types.h"
> >  #include "intel_sseu.h"
> >  #include "intel_workarounds_types.h"
> >  
> > -#include "i915_gem_batch_pool.h"
> > -#include "i915_pmu.h"
> > -
> >  #define I915_MAX_SLICES        3
> >  #define I915_MAX_SUBSLICES 8
> >  
> > diff --git a/drivers/gpu/drm/i915/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> > similarity index 100%
> > rename from drivers/gpu/drm/i915/intel_gpu_commands.h
> > rename to drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> > diff --git a/drivers/gpu/drm/i915/intel_hangcheck.c b/drivers/gpu/drm/i915/gt/intel_hangcheck.c
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/intel_hangcheck.c
> > rename to drivers/gpu/drm/i915/gt/intel_hangcheck.c
> > index 3d51ed1428d4..3053a706a561 100644
> > --- a/drivers/gpu/drm/i915/intel_hangcheck.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_hangcheck.c
> > @@ -22,8 +22,8 @@
> >   *
> >   */
> >  
> > +#include "intel_reset.h"
> >  #include "i915_drv.h"
> > -#include "i915_reset.h"
> >  
> >  struct hangcheck {
> >         u64 acthd;
> > @@ -330,5 +330,5 @@ void intel_hangcheck_init(struct drm_i915_private *i915)
> >  }
> >  
> >  #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
> > -#include "selftests/intel_hangcheck.c"
> > +#include "selftest_hangcheck.c"
> >  #endif
> > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/intel_lrc.c
> > rename to drivers/gpu/drm/i915/gt/intel_lrc.c
> > index 18a9dc6ca877..5cadf8f6a23d 100644
> > --- a/drivers/gpu/drm/i915/intel_lrc.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> > @@ -133,13 +133,12 @@
> >   */
> >  #include <linux/interrupt.h>
> >  
> > -#include <drm/i915_drm.h>
> >  #include "i915_drv.h"
> >  #include "i915_gem_render_state.h"
> > -#include "i915_reset.h"
> >  #include "i915_vgpu.h"
> >  #include "intel_lrc_reg.h"
> >  #include "intel_mocs.h"
> > +#include "intel_reset.h"
> >  #include "intel_workarounds.h"
> >  
> >  #define RING_EXECLIST_QFULL            (1 << 0x2)
> > @@ -2905,5 +2904,5 @@ void intel_lr_context_reset(struct intel_engine_cs *engine,
> >  }
> >  
> >  #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
> > -#include "selftests/intel_lrc.c"
> > +#include "selftest_lrc.c"
> >  #endif
> > diff --git a/drivers/gpu/drm/i915/intel_lrc.h b/drivers/gpu/drm/i915/gt/intel_lrc.h
> > similarity index 98%
> > rename from drivers/gpu/drm/i915/intel_lrc.h
> > rename to drivers/gpu/drm/i915/gt/intel_lrc.h
> > index 99f75ee9d087..1a33ec74af8c 100644
> > --- a/drivers/gpu/drm/i915/intel_lrc.h
> > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.h
> > @@ -24,8 +24,7 @@
> >  #ifndef _INTEL_LRC_H_
> >  #define _INTEL_LRC_H_
> >  
> > -#include "intel_ringbuffer.h"
> > -#include "i915_gem_context.h"
> > +#include "intel_engine.h"
> >  
> >  /* Execlists regs */
> >  #define RING_ELSP(base)                                _MMIO((base) + 0x230)
> > @@ -99,7 +98,6 @@ int logical_xcs_ring_init(struct intel_engine_cs *engine);
> >  struct drm_printer;
> >  
> >  struct drm_i915_private;
> > -struct i915_gem_context;
> >  
> >  void intel_execlists_set_default_submission(struct intel_engine_cs *engine);
> >  
> > diff --git a/drivers/gpu/drm/i915/intel_lrc_reg.h b/drivers/gpu/drm/i915/gt/intel_lrc_reg.h
> > similarity index 100%
> > rename from drivers/gpu/drm/i915/intel_lrc_reg.h
> > rename to drivers/gpu/drm/i915/gt/intel_lrc_reg.h
> > diff --git a/drivers/gpu/drm/i915/intel_mocs.c b/drivers/gpu/drm/i915/gt/intel_mocs.c
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/intel_mocs.c
> > rename to drivers/gpu/drm/i915/gt/intel_mocs.c
> > index 274ba78500c0..79df66022d3a 100644
> > --- a/drivers/gpu/drm/i915/intel_mocs.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_mocs.c
> > @@ -20,9 +20,11 @@
> >   * SOFTWARE.
> >   */
> >  
> > +#include "i915_drv.h"
> > +
> > +#include "intel_engine.h"
> >  #include "intel_mocs.h"
> >  #include "intel_lrc.h"
> > -#include "intel_ringbuffer.h"
> >  
> >  /* structures required */
> >  struct drm_i915_mocs_entry {
> > diff --git a/drivers/gpu/drm/i915/intel_mocs.h b/drivers/gpu/drm/i915/gt/intel_mocs.h
> > similarity index 97%
> > rename from drivers/gpu/drm/i915/intel_mocs.h
> > rename to drivers/gpu/drm/i915/gt/intel_mocs.h
> > index 3d99d1271b2b..0913704a1af2 100644
> > --- a/drivers/gpu/drm/i915/intel_mocs.h
> > +++ b/drivers/gpu/drm/i915/gt/intel_mocs.h
> > @@ -49,7 +49,9 @@
> >   * context handling keep the MOCS in step.
> >   */
> >  
> > -#include "i915_drv.h"
> > +struct drm_i915_private;
> > +struct i915_request;
> > +struct intel_engine_cs;
> >  
> >  int intel_rcs_context_init_mocs(struct i915_request *rq);
> >  void intel_mocs_init_l3cc_table(struct drm_i915_private *dev_priv);
> > diff --git a/drivers/gpu/drm/i915/i915_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/i915_reset.c
> > rename to drivers/gpu/drm/i915/gt/intel_reset.c
> > index 677d59304e78..9731a2295639 100644
> > --- a/drivers/gpu/drm/i915/i915_reset.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> > @@ -9,7 +9,7 @@
> >  
> >  #include "i915_drv.h"
> >  #include "i915_gpu_error.h"
> > -#include "i915_reset.h"
> > +#include "intel_reset.h"
> >  
> >  #include "intel_guc.h"
> >  
> > diff --git a/drivers/gpu/drm/i915/i915_reset.h b/drivers/gpu/drm/i915/gt/intel_reset.h
> > similarity index 98%
> > rename from drivers/gpu/drm/i915/i915_reset.h
> > rename to drivers/gpu/drm/i915/gt/intel_reset.h
> > index 3c0450289b8f..8e662bb43a9b 100644
> > --- a/drivers/gpu/drm/i915/i915_reset.h
> > +++ b/drivers/gpu/drm/i915/gt/intel_reset.h
> > @@ -11,7 +11,7 @@
> >  #include <linux/types.h>
> >  #include <linux/srcu.h>
> >  
> > -#include "intel_engine_types.h"
> > +#include "gt/intel_engine_types.h"
> >  
> >  struct drm_i915_private;
> >  struct i915_request;
> > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/intel_ringbuffer.c
> > rename to drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> > index 029fd8ec1857..c1214fd25702 100644
> > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> > @@ -33,9 +33,8 @@
> >  
> >  #include "i915_drv.h"
> >  #include "i915_gem_render_state.h"
> > -#include "i915_reset.h"
> >  #include "i915_trace.h"
> > -#include "intel_drv.h"
> > +#include "intel_reset.h"
> >  #include "intel_workarounds.h"
> >  
> >  /* Rough estimate of the typical request size, performing a flush,
> > diff --git a/drivers/gpu/drm/i915/intel_sseu.c b/drivers/gpu/drm/i915/gt/intel_sseu.c
> > similarity index 100%
> > rename from drivers/gpu/drm/i915/intel_sseu.c
> > rename to drivers/gpu/drm/i915/gt/intel_sseu.c
> > diff --git a/drivers/gpu/drm/i915/intel_sseu.h b/drivers/gpu/drm/i915/gt/intel_sseu.h
> > similarity index 100%
> > rename from drivers/gpu/drm/i915/intel_sseu.h
> > rename to drivers/gpu/drm/i915/gt/intel_sseu.h
> > diff --git a/drivers/gpu/drm/i915/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/intel_workarounds.c
> > rename to drivers/gpu/drm/i915/gt/intel_workarounds.c
> > index b3cbed1ee1c9..f46ed0e2f07c 100644
> > --- a/drivers/gpu/drm/i915/intel_workarounds.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> > @@ -1398,5 +1398,5 @@ int intel_engine_verify_workarounds(struct intel_engine_cs *engine,
> >  }
> >  
> >  #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
> > -#include "selftests/intel_workarounds.c"
> > +#include "selftest_workarounds.c"
> >  #endif
> > diff --git a/drivers/gpu/drm/i915/intel_workarounds.h b/drivers/gpu/drm/i915/gt/intel_workarounds.h
> > similarity index 88%
> > rename from drivers/gpu/drm/i915/intel_workarounds.h
> > rename to drivers/gpu/drm/i915/gt/intel_workarounds.h
> > index fdf7ebb90f28..3761a6ee58bb 100644
> > --- a/drivers/gpu/drm/i915/intel_workarounds.h
> > +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.h
> > @@ -4,13 +4,17 @@
> >   * Copyright © 2014-2018 Intel Corporation
> >   */
> >  
> > -#ifndef _I915_WORKAROUNDS_H_
> > -#define _I915_WORKAROUNDS_H_
> > +#ifndef _INTEL_WORKAROUNDS_H_
> > +#define _INTEL_WORKAROUNDS_H_
> >  
> >  #include <linux/slab.h>
> >  
> >  #include "intel_workarounds_types.h"
> >  
> > +struct drm_i915_private;
> > +struct i915_request;
> > +struct intel_engine_cs;
> > +
> >  static inline void intel_wa_list_free(struct i915_wa_list *wal)
> >  {
> >         kfree(wal->list);
> > diff --git a/drivers/gpu/drm/i915/intel_workarounds_types.h b/drivers/gpu/drm/i915/gt/intel_workarounds_types.h
> > similarity index 100%
> > rename from drivers/gpu/drm/i915/intel_workarounds_types.h
> > rename to drivers/gpu/drm/i915/gt/intel_workarounds_types.h
> > diff --git a/drivers/gpu/drm/i915/selftests/mock_engine.c b/drivers/gpu/drm/i915/gt/mock_engine.c
> > similarity index 97%
> > rename from drivers/gpu/drm/i915/selftests/mock_engine.c
> > rename to drivers/gpu/drm/i915/gt/mock_engine.c
> > index 61a8206ed677..414afd2f27fe 100644
> > --- a/drivers/gpu/drm/i915/selftests/mock_engine.c
> > +++ b/drivers/gpu/drm/i915/gt/mock_engine.c
> > @@ -22,8 +22,11 @@
> >   *
> >   */
> >  
> > +#include "i915_drv.h"
> > +#include "intel_context.h"
> > +
> >  #include "mock_engine.h"
> > -#include "mock_request.h"
> > +#include "selftests/mock_request.h"
> >  
> >  struct mock_ring {
> >         struct intel_ring base;
> > @@ -268,8 +271,9 @@ struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
> >         timer_setup(&engine->hw_delay, hw_delay_complete, 0);
> >         INIT_LIST_HEAD(&engine->hw_queue);
> >  
> > -       if (pin_context(i915->kernel_context, &engine->base,
> > -                       &engine->base.kernel_context))
> > +       engine->base.kernel_context =
> > +               intel_context_pin(i915->kernel_context, &engine->base);
> > +       if (IS_ERR(engine->base.kernel_context))
> >                 goto err_breadcrumbs;
> >  
> >         return &engine->base;
> > diff --git a/drivers/gpu/drm/i915/selftests/mock_engine.h b/drivers/gpu/drm/i915/gt/mock_engine.h
> > similarity index 98%
> > rename from drivers/gpu/drm/i915/selftests/mock_engine.h
> > rename to drivers/gpu/drm/i915/gt/mock_engine.h
> > index b9cc3a245f16..44b35a85e9d1 100644
> > --- a/drivers/gpu/drm/i915/selftests/mock_engine.h
> > +++ b/drivers/gpu/drm/i915/gt/mock_engine.h
> > @@ -29,7 +29,7 @@
> >  #include <linux/spinlock.h>
> >  #include <linux/timer.h>
> >  
> > -#include "../intel_ringbuffer.h"
> > +#include "gt/intel_engine.h"
> >  
> >  struct mock_engine {
> >         struct intel_engine_cs base;
> > diff --git a/drivers/gpu/drm/i915/selftests/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/selftest_engine_cs.c
> > similarity index 100%
> > rename from drivers/gpu/drm/i915/selftests/intel_engine_cs.c
> > rename to drivers/gpu/drm/i915/gt/selftest_engine_cs.c
> > diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> > rename to drivers/gpu/drm/i915/gt/selftest_hangcheck.c
> > index 050bd1e19e02..87c26920212f 100644
> > --- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> > +++ b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
> > @@ -24,14 +24,14 @@
> >  
> >  #include <linux/kthread.h>
> >  
> > -#include "../i915_selftest.h"
> > -#include "i915_random.h"
> > -#include "igt_flush_test.h"
> > -#include "igt_reset.h"
> > -#include "igt_wedge_me.h"
> > -
> > -#include "mock_context.h"
> > -#include "mock_drm.h"
> > +#include "i915_selftest.h"
> > +#include "selftests/i915_random.h"
> > +#include "selftests/igt_flush_test.h"
> > +#include "selftests/igt_reset.h"
> > +#include "selftests/igt_wedge_me.h"
> > +
> > +#include "selftests/mock_context.h"
> > +#include "selftests/mock_drm.h"
> >  
> >  #define IGT_IDLE_TIMEOUT 50 /* ms; time to wait after flushing between tests */
> >  
> > diff --git a/drivers/gpu/drm/i915/selftests/intel_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> > similarity index 99%
> > rename from drivers/gpu/drm/i915/selftests/intel_lrc.c
> > rename to drivers/gpu/drm/i915/gt/selftest_lrc.c
> > index fbee030db940..cd0551f97c2f 100644
> > --- a/drivers/gpu/drm/i915/selftests/intel_lrc.c
> > +++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> > @@ -6,15 +6,13 @@
> >  
> >  #include <linux/prime_numbers.h>
> >  
> > -#include "../i915_reset.h"
> > -
> > -#include "../i915_selftest.h"
> > -#include "igt_flush_test.h"
> > -#include "igt_live_test.h"
> > -#include "igt_spinner.h"
> > -#include "i915_random.h"
> > -
> > -#include "mock_context.h"
> > +#include "gt/intel_reset.h"
> > +#include "i915_selftest.h"
> > +#include "selftests/i915_random.h"
> > +#include "selftests/igt_flush_test.h"
> > +#include "selftests/igt_live_test.h"
> > +#include "selftests/igt_spinner.h"
> > +#include "selftests/mock_context.h"
> >  
> >  static int live_sanitycheck(void *arg)
> >  {
> > diff --git a/drivers/gpu/drm/i915/selftests/intel_workarounds.c b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
> > similarity index 98%
> > rename from drivers/gpu/drm/i915/selftests/intel_workarounds.c
> > rename to drivers/gpu/drm/i915/gt/selftest_workarounds.c
> > index 6f941c31dcab..96c6282f3a10 100644
> > --- a/drivers/gpu/drm/i915/selftests/intel_workarounds.c
> > +++ b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
> > @@ -4,15 +4,15 @@
> >   * Copyright © 2018 Intel Corporation
> >   */
> >  
> > -#include "../i915_selftest.h"
> > -#include "../i915_reset.h"
> > -
> > -#include "igt_flush_test.h"
> > -#include "igt_reset.h"
> > -#include "igt_spinner.h"
> > -#include "igt_wedge_me.h"
> > -#include "mock_context.h"
> > -#include "mock_drm.h"
> > +#include "i915_selftest.h"
> > +#include "intel_reset.h"
> > +
> > +#include "selftests/igt_flush_test.h"
> > +#include "selftests/igt_reset.h"
> > +#include "selftests/igt_spinner.h"
> > +#include "selftests/igt_wedge_me.h"
> > +#include "selftests/mock_context.h"
> > +#include "selftests/mock_drm.h"
> >  
> >  static const struct wo_register {
> >         enum intel_platform platform;
> > diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
> > index 503d548a55f7..e9fadcb4d592 100644
> > --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
> > +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
> > @@ -25,8 +25,9 @@
> >   *
> >   */
> >  
> > +#include "gt/intel_engine.h"
> > +
> >  #include "i915_drv.h"
> > -#include "intel_ringbuffer.h"
> >  
> >  /**
> >   * DOC: batch buffer command parser
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index 5823ffb17821..3f039758b152 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -32,7 +32,8 @@
> >  #include <drm/drm_debugfs.h>
> >  #include <drm/drm_fourcc.h>
> >  
> > -#include "i915_reset.h"
> > +#include "gt/intel_reset.h"
> > +
> >  #include "intel_dp.h"
> >  #include "intel_drv.h"
> >  #include "intel_fbc.h"
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index 1ad88e6d7c04..98b997526daa 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -47,10 +47,12 @@
> >  #include <drm/drm_probe_helper.h>
> >  #include <drm/i915_drm.h>
> >  
> > +#include "gt/intel_workarounds.h"
> > +#include "gt/intel_reset.h"
> > +
> >  #include "i915_drv.h"
> >  #include "i915_pmu.h"
> >  #include "i915_query.h"
> > -#include "i915_reset.h"
> >  #include "i915_trace.h"
> >  #include "i915_vgpu.h"
> >  #include "intel_audio.h"
> > @@ -62,7 +64,6 @@
> >  #include "intel_pm.h"
> >  #include "intel_sprite.h"
> >  #include "intel_uc.h"
> > -#include "intel_workarounds.h"
> >  
> >  static struct drm_driver driver;
> >  
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 7b5da9eddc1c..fad5306f07da 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -62,18 +62,19 @@
> >  #include "i915_reg.h"
> >  #include "i915_utils.h"
> >  
> > +#include "gt/intel_lrc.h"
> > +#include "gt/intel_engine.h"
> > +#include "gt/intel_workarounds.h"
> > +
> >  #include "intel_bios.h"
> >  #include "intel_device_info.h"
> >  #include "intel_display.h"
> >  #include "intel_dpll_mgr.h"
> >  #include "intel_frontbuffer.h"
> > -#include "intel_lrc.h"
> >  #include "intel_opregion.h"
> > -#include "intel_ringbuffer.h"
> >  #include "intel_uc.h"
> >  #include "intel_uncore.h"
> >  #include "intel_wopcm.h"
> > -#include "intel_workarounds.h"
> >  
> >  #include "i915_gem.h"
> >  #include "i915_gem_context.h"
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index a5412323fee1..9554960977a3 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -39,19 +39,20 @@
> >  #include <linux/dma-buf.h>
> >  #include <linux/mman.h>
> >  
> > +#include "gt/intel_mocs.h"
> > +#include "gt/intel_reset.h"
> > +#include "gt/intel_workarounds.h"
> > +
> >  #include "i915_drv.h"
> >  #include "i915_gem_clflush.h"
> >  #include "i915_gemfs.h"
> >  #include "i915_globals.h"
> > -#include "i915_reset.h"
> >  #include "i915_trace.h"
> >  #include "i915_vgpu.h"
> >  
> >  #include "intel_drv.h"
> >  #include "intel_frontbuffer.h"
> > -#include "intel_mocs.h"
> >  #include "intel_pm.h"
> > -#include "intel_workarounds.h"
> >  
> >  static void i915_gem_flush_free_objects(struct drm_i915_private *i915);
> >  
> > diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> > index c02a30612df9..37dff694456c 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_context.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> > @@ -86,13 +86,16 @@
> >   */
> >  
> >  #include <linux/log2.h>
> > +
> >  #include <drm/i915_drm.h>
> > +
> > +#include "gt/intel_lrc_reg.h"
> > +#include "gt/intel_workarounds.h"
> > +
> >  #include "i915_drv.h"
> >  #include "i915_globals.h"
> >  #include "i915_trace.h"
> >  #include "i915_user_extensions.h"
> > -#include "intel_lrc_reg.h"
> > -#include "intel_workarounds.h"
> >  
> >  #define I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE (1 << 1)
> >  #define I915_CONTEXT_PARAM_VM 0x9
> > diff --git a/drivers/gpu/drm/i915/i915_gem_context.h b/drivers/gpu/drm/i915/i915_gem_context.h
> > index 23dcb01bfd82..cec278ab04e2 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_context.h
> > +++ b/drivers/gpu/drm/i915/i915_gem_context.h
> > @@ -27,9 +27,10 @@
> >  
> >  #include "i915_gem_context_types.h"
> >  
> > +#include "gt/intel_context.h"
> > +
> >  #include "i915_gem.h"
> >  #include "i915_scheduler.h"
> > -#include "intel_context.h"
> >  #include "intel_device_info.h"
> >  
> >  struct drm_device;
> > diff --git a/drivers/gpu/drm/i915/i915_gem_context_types.h b/drivers/gpu/drm/i915/i915_gem_context_types.h
> > index e2ec58b10fb2..d282a6ab3b9f 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_context_types.h
> > +++ b/drivers/gpu/drm/i915/i915_gem_context_types.h
> > @@ -17,8 +17,9 @@
> >  #include <linux/rcupdate.h>
> >  #include <linux/types.h>
> >  
> > +#include "gt/intel_context_types.h"
> > +
> >  #include "i915_scheduler.h"
> > -#include "intel_context_types.h"
> >  
> >  struct pid;
> >  
> > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > index 8f460cc4cc1f..aab778728ea2 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > @@ -37,7 +37,6 @@
> >  
> >  #include "i915_drv.h"
> >  #include "i915_vgpu.h"
> > -#include "i915_reset.h"
> >  #include "i915_trace.h"
> >  #include "intel_drv.h"
> >  #include "intel_frontbuffer.h"
> > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
> > index f597f35b109b..c8d96e91f3dc 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_gtt.h
> > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
> > @@ -38,8 +38,8 @@
> >  #include <linux/mm.h>
> >  #include <linux/pagevec.h>
> >  
> > +#include "gt/intel_reset.h"
> >  #include "i915_request.h"
> > -#include "i915_reset.h"
> >  #include "i915_selftest.h"
> >  #include "i915_timeline.h"
> >  
> > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.h b/drivers/gpu/drm/i915/i915_gpu_error.h
> > index 5dc761e85d9d..b419d0f59275 100644
> > --- a/drivers/gpu/drm/i915/i915_gpu_error.h
> > +++ b/drivers/gpu/drm/i915/i915_gpu_error.h
> > @@ -13,8 +13,9 @@
> >  
> >  #include <drm/drm_mm.h>
> >  
> > +#include "gt/intel_engine.h"
> > +
> >  #include "intel_device_info.h"
> > -#include "intel_ringbuffer.h"
> >  #include "intel_uc_fw.h"
> >  
> >  #include "i915_gem.h"
> > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> > index 56da457bed21..a87f790335c1 100644
> > --- a/drivers/gpu/drm/i915/i915_perf.c
> > +++ b/drivers/gpu/drm/i915/i915_perf.c
> > @@ -195,6 +195,8 @@
> >  #include <linux/sizes.h>
> >  #include <linux/uuid.h>
> >  
> > +#include "gt/intel_lrc_reg.h"
> > +
> >  #include "i915_drv.h"
> >  #include "i915_oa_hsw.h"
> >  #include "i915_oa_bdw.h"
> > @@ -210,7 +212,6 @@
> >  #include "i915_oa_cflgt3.h"
> >  #include "i915_oa_cnl.h"
> >  #include "i915_oa_icl.h"
> > -#include "intel_lrc_reg.h"
> >  
> >  /* HW requires this to be a power of two, between 128k and 16M, though driver
> >   * is currently generally designed assuming the largest 16M size is used such
> > diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> > index 46a52da3db29..35e502481f29 100644
> > --- a/drivers/gpu/drm/i915/i915_pmu.c
> > +++ b/drivers/gpu/drm/i915/i915_pmu.c
> > @@ -6,8 +6,10 @@
> >  
> >  #include <linux/irq.h>
> >  #include <linux/pm_runtime.h>
> > +
> > +#include "gt/intel_engine.h"
> > +
> >  #include "i915_pmu.h"
> > -#include "intel_ringbuffer.h"
> >  #include "i915_drv.h"
> >  
> >  /* Frequency for the sampling timer for events which need it. */
> > diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> > index e0efc334463b..74ae698c1f95 100644
> > --- a/drivers/gpu/drm/i915/i915_request.c
> > +++ b/drivers/gpu/drm/i915/i915_request.c
> > @@ -32,7 +32,6 @@
> >  #include "i915_active.h"
> >  #include "i915_drv.h"
> >  #include "i915_globals.h"
> > -#include "i915_reset.h"
> >  #include "intel_pm.h"
> >  
> >  struct execute_cb {
> > diff --git a/drivers/gpu/drm/i915/i915_scheduler_types.h b/drivers/gpu/drm/i915/i915_scheduler_types.h
> > index f1af3916a808..166a457884b2 100644
> > --- a/drivers/gpu/drm/i915/i915_scheduler_types.h
> > +++ b/drivers/gpu/drm/i915/i915_scheduler_types.h
> > @@ -9,8 +9,8 @@
> >  
> >  #include <linux/list.h>
> >  
> > +#include "gt/intel_engine_types.h"
> >  #include "i915_priolist_types.h"
> > -#include "intel_engine_types.h"
> >  
> >  struct drm_i915_private;
> >  struct i915_request;
> > diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> > index 12893304c8f8..b5286f3d8146 100644
> > --- a/drivers/gpu/drm/i915/i915_trace.h
> > +++ b/drivers/gpu/drm/i915/i915_trace.h
> > @@ -8,9 +8,10 @@
> >  
> >  #include <drm/drm_drv.h>
> >  
> > +#include "gt/intel_engine.h"
> > +
> >  #include "i915_drv.h"
> >  #include "intel_drv.h"
> > -#include "intel_ringbuffer.h"
> >  
> >  #undef TRACE_SYSTEM
> >  #define TRACE_SYSTEM i915
> > diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
> > index 36726392e737..d4d308b6d1d8 100644
> > --- a/drivers/gpu/drm/i915/i915_vma.c
> > +++ b/drivers/gpu/drm/i915/i915_vma.c
> > @@ -22,11 +22,12 @@
> >   *
> >   */
> >  
> > +#include "gt/intel_engine.h"
> > +
> >  #include "i915_vma.h"
> >  
> >  #include "i915_drv.h"
> >  #include "i915_globals.h"
> > -#include "intel_ringbuffer.h"
> >  #include "intel_frontbuffer.h"
> >  
> >  #include <drm/drm_gem.h>
> > diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
> > index 3045e0dee2a1..aa89a9adeffb 100644
> > --- a/drivers/gpu/drm/i915/intel_device_info.h
> > +++ b/drivers/gpu/drm/i915/intel_device_info.h
> > @@ -27,9 +27,11 @@
> >  
> >  #include <uapi/drm/i915_drm.h>
> >  
> > -#include "intel_engine_types.h"
> > +#include "gt/intel_engine_types.h"
> > +#include "gt/intel_context_types.h"
> > +#include "gt/intel_sseu.h"
> > +
> >  #include "intel_display.h"
> > -#include "intel_sseu.h"
> >  
> >  struct drm_printer;
> >  struct drm_i915_private;
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 3bd40a4a6739..24e70d46b872 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -46,7 +46,6 @@
> >  
> >  #include "i915_drv.h"
> >  #include "i915_gem_clflush.h"
> > -#include "i915_reset.h"
> >  #include "i915_trace.h"
> >  #include "intel_atomic_plane.h"
> >  #include "intel_color.h"
> > diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> > index 37f60cb8e9e1..1b6d6403ee92 100644
> > --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> > +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> > @@ -25,8 +25,9 @@
> >  #include <linux/circ_buf.h>
> >  #include <trace/events/dma_fence.h>
> >  
> > +#include "gt/intel_lrc_reg.h"
> > +
> >  #include "intel_guc_submission.h"
> > -#include "intel_lrc_reg.h"
> >  #include "i915_drv.h"
> >  
> >  #define GUC_PREEMPT_FINISHED           0x1
> > diff --git a/drivers/gpu/drm/i915/intel_guc_submission.h b/drivers/gpu/drm/i915/intel_guc_submission.h
> > index aa5e6749c925..7d823a513b9c 100644
> > --- a/drivers/gpu/drm/i915/intel_guc_submission.h
> > +++ b/drivers/gpu/drm/i915/intel_guc_submission.h
> > @@ -27,9 +27,10 @@
> >  
> >  #include <linux/spinlock.h>
> >  
> > +#include "gt/intel_engine_types.h"
> > +
> >  #include "i915_gem.h"
> >  #include "i915_selftest.h"
> > -#include "intel_engine_types.h"
> >  
> >  struct drm_i915_private;
> >  
> > diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> > index 25b80ffe71ad..13f823ff8083 100644
> > --- a/drivers/gpu/drm/i915/intel_uc.c
> > +++ b/drivers/gpu/drm/i915/intel_uc.c
> > @@ -22,11 +22,11 @@
> >   *
> >   */
> >  
> > +#include "gt/intel_reset.h"
> >  #include "intel_uc.h"
> >  #include "intel_guc_submission.h"
> >  #include "intel_guc.h"
> >  #include "i915_drv.h"
> > -#include "i915_reset.h"
> >  
> >  static void guc_free_load_err_log(struct intel_guc *guc);
> >  
> > diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > index e1cb22f03e8e..6f52ca881173 100644
> > --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > @@ -24,8 +24,9 @@
> >  
> >  #include <linux/prime_numbers.h>
> >  
> > -#include "../i915_reset.h"
> > -#include "../i915_selftest.h"
> > +#include "gt/intel_reset.h"
> > +#include "i915_selftest.h"
> > +
> >  #include "i915_random.h"
> >  #include "igt_flush_test.h"
> >  #include "igt_live_test.h"
> > diff --git a/drivers/gpu/drm/i915/selftests/igt_reset.c b/drivers/gpu/drm/i915/selftests/igt_reset.c
> > index 208a966da8ca..4f31b137c428 100644
> > --- a/drivers/gpu/drm/i915/selftests/igt_reset.c
> > +++ b/drivers/gpu/drm/i915/selftests/igt_reset.c
> > @@ -6,8 +6,9 @@
> >  
> >  #include "igt_reset.h"
> >  
> > +#include "gt/intel_engine.h"
> > +
> >  #include "../i915_drv.h"
> > -#include "../intel_ringbuffer.h"
> >  
> >  void igt_global_reset_lock(struct drm_i915_private *i915)
> >  {
> > diff --git a/drivers/gpu/drm/i915/selftests/igt_spinner.h b/drivers/gpu/drm/i915/selftests/igt_spinner.h
> > index 391777c76dc7..d312e7cdab68 100644
> > --- a/drivers/gpu/drm/i915/selftests/igt_spinner.h
> > +++ b/drivers/gpu/drm/i915/selftests/igt_spinner.h
> > @@ -9,9 +9,10 @@
> >  
> >  #include "../i915_selftest.h"
> >  
> > +#include "gt/intel_engine.h"
> > +
> >  #include "../i915_drv.h"
> >  #include "../i915_request.h"
> > -#include "../intel_ringbuffer.h"
> >  #include "../i915_gem_context.h"
> >  
> >  struct igt_spinner {
> > diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > index 60bbf8b4df40..f444ee5add27 100644
> > --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > @@ -25,7 +25,8 @@
> >  #include <linux/pm_domain.h>
> >  #include <linux/pm_runtime.h>
> >  
> > -#include "mock_engine.h"
> > +#include "gt/mock_engine.h"
> > +
> >  #include "mock_context.h"
> >  #include "mock_request.h"
> >  #include "mock_gem_device.h"
> > diff --git a/drivers/gpu/drm/i915/selftests/mock_request.c b/drivers/gpu/drm/i915/selftests/mock_request.c
> > index d1a7c9608712..f739ba63057f 100644
> > --- a/drivers/gpu/drm/i915/selftests/mock_request.c
> > +++ b/drivers/gpu/drm/i915/selftests/mock_request.c
> > @@ -22,7 +22,8 @@
> >   *
> >   */
> >  
> > -#include "mock_engine.h"
> > +#include "gt/mock_engine.h"
> > +
> >  #include "mock_request.h"
> >  
> >  struct i915_request *
> > -- 
> > 2.20.1
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list