[00/21] Implicit dev_priv removal
mbox series

Message ID 20190606093639.9372-1-tvrtko.ursulin@linux.intel.com
Headers show
Series
  • Implicit dev_priv removal
Related show

Message

Tvrtko Ursulin June 6, 2019, 9:36 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Mostly patches reworking the code and GEM init paths to remove some implicit
dev_priv dependencies (I915_READ/I915_WRITE), plus some small tweaks to tidy
GEM init paths to use more logical input parameters (enabled by the conversion
to uncore mmio accessors).

A few tiny fixups/tweaks as well which I spotted by doing the conversion.

Tvrtko Ursulin (21):
  drm/i915: Reset only affected engines when handling error capture
  drm/i915: Tidy engine mask types in hangcheck
  drm/i915: Make Gen6/7 RING_FAULT_REG access engine centric
  drm/i915: Extract engine fault reset to a helper
  drm/i915: Make i915_clear_error_registers take uncore
  drm/i915: Convert some more bits to use engine mmio accessors
  drm/i915: Make read_subslice_reg take uncore
  drm/i915: Tidy intel_execlists_submission_init
  drm/i915: Make i915_check_and_clear_faults take uncore
  drm/i915: Move scheduler caps init to i915_gem_init
  drm/i915: Remove impossible path from i915_gem_init_swizzling
  drm/i915: Convert i915_gem_init_swizzling to uncore
  drm/i915: Convert init_unused_rings to uncore
  drm/i915: Convert gt workarounds to uncore
  drm/i915: Convert intel_mocs_init_l3cc_table to uncore
  drm/i915: Convert i915_ppgtt_init_hw to uncore
  drm/i915: Consolidate some open coded mmio rmw
  drm/i915: Convert i915_gem_init_hw to uncore
  drm/i915: Convert intel_vgt_(de)balloon to uncore
  drm/i915: Make GuC GGTT reservation work on ggtt
  drm/i915: Unexport i915_gem_init/fini_aliasing_ppgtt

 drivers/gpu/drm/i915/gt/intel_engine.h      |  18 +++
 drivers/gpu/drm/i915/gt/intel_engine_cs.c   |  22 +--
 drivers/gpu/drm/i915/gt/intel_hangcheck.c   |   6 +-
 drivers/gpu/drm/i915/gt/intel_lrc.c         |  38 ++---
 drivers/gpu/drm/i915/gt/intel_mocs.c        |  20 ++-
 drivers/gpu/drm/i915/gt/intel_mocs.h        |   3 +-
 drivers/gpu/drm/i915/gt/intel_reset.c       |  21 +--
 drivers/gpu/drm/i915/gt/intel_reset.h       |   4 +-
 drivers/gpu/drm/i915/gt/intel_workarounds.c |  10 +-
 drivers/gpu/drm/i915/gt/intel_workarounds.h |   6 +-
 drivers/gpu/drm/i915/i915_drv.c             |   6 +-
 drivers/gpu/drm/i915/i915_drv.h             |   2 +-
 drivers/gpu/drm/i915/i915_gem.c             | 140 ++++++++++-------
 drivers/gpu/drm/i915/i915_gem_gtt.c         | 163 +++++++++++---------
 drivers/gpu/drm/i915/i915_gem_gtt.h         |   7 +-
 drivers/gpu/drm/i915/i915_gpu_error.c       |   4 +-
 drivers/gpu/drm/i915/i915_reg.h             |   2 +-
 drivers/gpu/drm/i915/i915_vgpu.c            |  24 +--
 drivers/gpu/drm/i915/i915_vgpu.h            |   4 +-
 drivers/gpu/drm/i915/intel_guc.c            |  18 +--
 drivers/gpu/drm/i915/intel_guc.h            |   6 +-
 drivers/gpu/drm/i915/intel_guc_submission.c |   4 +-
 22 files changed, 298 insertions(+), 230 deletions(-)

Comments

Chris Wilson June 6, 2019, 10:05 a.m. UTC | #1
Quoting Tvrtko Ursulin (2019-06-06 10:36:18)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Mostly patches reworking the code and GEM init paths to remove some implicit
> dev_priv dependencies (I915_READ/I915_WRITE), plus some small tweaks to tidy
> GEM init paths to use more logical input parameters (enabled by the conversion
> to uncore mmio accessors).

Passing intel_uncore to non intel_uncore functions during init, I
disagree with as it makes the layering violations worse for no apparent
gain.
-Chris
Tvrtko Ursulin June 6, 2019, 10:35 a.m. UTC | #2
On 06/06/2019 11:05, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2019-06-06 10:36:18)
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Mostly patches reworking the code and GEM init paths to remove some implicit
>> dev_priv dependencies (I915_READ/I915_WRITE), plus some small tweaks to tidy
>> GEM init paths to use more logical input parameters (enabled by the conversion
>> to uncore mmio accessors).
> 
> Passing intel_uncore to non intel_uncore functions during init, I
> disagree with as it makes the layering violations worse for no apparent
> gain.

For gem_init_hw it is questionable I agree.

Idea was that it logically makes sense to pass what is functionally 
used. And for majority this seems to be uncore with i915 being used only 
for "what gen am I" checks.

But I haven't converted the guc related bits, or the intel_engines_init 
also doesn't fit. So yes, it's not super clean so I can drop that bit 
for now.

Regards,

Tvrtko