All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 00/10] Compartmentalize uncore code
@ 2019-03-13 23:13 Daniele Ceraolo Spurio
  2019-03-13 23:13 ` [RFC 01/10] drm/i915: do not pass dev_priv to low-level forcewake functions Daniele Ceraolo Spurio
                   ` (10 more replies)
  0 siblings, 11 replies; 22+ messages in thread
From: Daniele Ceraolo Spurio @ 2019-03-13 23:13 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

In some areas of the driver we do a really bad job in
compartmentalizing the code. While passing dev_priv everywhere is always
an easy solution, our driver is growing in ways in which this is getting
in the way. We really want to compartmentalize our classes and keep as
much code as we can under a controlled scope without relying on the God
Object dev_priv.

This series initiates a rework in this direction for the uncore code.
The intel_uncore class already abstracts most of the handling around
our register access, so passing it around instead of dev_priv in code
that relates to register interface makes sense.
For extra integration, the later part of the series (patch 7+) also moves
the regs pointer inside the uncore structure. This is just an initial
proposal and I'm open to alternative solution about this if we want to
keep them separate. I've detailed a couple of simple options in the commit
message of patch 7

Compile-tested only.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>

Daniele Ceraolo Spurio (10):
  drm/i915: do not pass dev_priv to low-level forcewake functions
  drm/i915: use intel_uncore in fw get/put internal paths
  drm/i915: use intel_uncore for all forcewake get/put
  drm/i915: make more uncore function work on intel_uncore
  drm/i915: make find_fw_domain work on intel_uncore
  drm/i915: reduce the dev_priv->uncore dance in uncore.c
  drm/i915: move regs pointer inside the uncore structure
  drm/i915: make raw access function work on uncore
  drm/i915: add uncore flags
  drm/i915: switch uncore mmio funcs to use intel_uncore

 drivers/gpu/drm/i915/gvt/mmio_context.c       |   8 +-
 drivers/gpu/drm/i915/i915_debugfs.c           |  17 +-
 drivers/gpu/drm/i915/i915_drv.c               |  32 +-
 drivers/gpu/drm/i915/i915_drv.h               |  46 +-
 drivers/gpu/drm/i915/i915_gem.c               |  20 +-
 drivers/gpu/drm/i915/i915_irq.c               |  22 +-
 drivers/gpu/drm/i915/i915_perf.c              |   6 +-
 drivers/gpu/drm/i915/i915_reset.c             |  12 +-
 drivers/gpu/drm/i915/i915_vgpu.c              |   8 +-
 drivers/gpu/drm/i915/intel_display.c          |   6 +-
 drivers/gpu/drm/i915/intel_engine_cs.c        |   4 +-
 drivers/gpu/drm/i915/intel_guc.c              |   8 +-
 drivers/gpu/drm/i915/intel_guc_fw.c           |   4 +-
 drivers/gpu/drm/i915/intel_hangcheck.c        |   2 +-
 drivers/gpu/drm/i915/intel_huc_fw.c           |   4 +-
 drivers/gpu/drm/i915/intel_lrc.c              |   6 +-
 drivers/gpu/drm/i915/intel_pm.c               |  52 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c       |   8 +-
 drivers/gpu/drm/i915/intel_uncore.c           | 827 +++++++++---------
 drivers/gpu/drm/i915/intel_uncore.h           |  76 +-
 drivers/gpu/drm/i915/intel_workarounds.c      |   4 +-
 drivers/gpu/drm/i915/selftests/intel_uncore.c |  15 +-
 .../gpu/drm/i915/selftests/mock_gem_device.c  |   2 +-
 drivers/gpu/drm/i915/selftests/mock_uncore.c  |  10 +-
 drivers/gpu/drm/i915/selftests/mock_uncore.h  |   2 +-
 25 files changed, 616 insertions(+), 585 deletions(-)

-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-03-18 18:08 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13 23:13 [RFC 00/10] Compartmentalize uncore code Daniele Ceraolo Spurio
2019-03-13 23:13 ` [RFC 01/10] drm/i915: do not pass dev_priv to low-level forcewake functions Daniele Ceraolo Spurio
2019-03-15 20:07   ` Paulo Zanoni
2019-03-15 23:41   ` Chris Wilson
2019-03-13 23:13 ` [RFC 02/10] drm/i915: use intel_uncore in fw get/put internal paths Daniele Ceraolo Spurio
2019-03-15 21:00   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 03/10] drm/i915: use intel_uncore for all forcewake get/put Daniele Ceraolo Spurio
2019-03-15 21:41   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 04/10] drm/i915: make more uncore function work on intel_uncore Daniele Ceraolo Spurio
2019-03-15 22:17   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 05/10] drm/i915: make find_fw_domain " Daniele Ceraolo Spurio
2019-03-15 22:57   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 06/10] drm/i915: reduce the dev_priv->uncore dance in uncore.c Daniele Ceraolo Spurio
2019-03-15 23:07   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 07/10] drm/i915: move regs pointer inside the uncore structure Daniele Ceraolo Spurio
2019-03-15 20:50   ` Chris Wilson
2019-03-18 18:08     ` Daniele Ceraolo Spurio
2019-03-13 23:13 ` [RFC 08/10] drm/i915: make raw access function work on uncore Daniele Ceraolo Spurio
2019-03-15 23:33   ` Paulo Zanoni
2019-03-13 23:13 ` [RFC 09/10] drm/i915: add uncore flags Daniele Ceraolo Spurio
2019-03-13 23:13 ` [RFC 10/10] drm/i915: switch uncore mmio funcs to use intel_uncore Daniele Ceraolo Spurio
2019-03-14  4:09 ` ✗ Fi.CI.BAT: failure for Compartmentalize uncore code Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.