All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [RFC 0/5] Split up intel_lrc.c
Date: Wed, 11 Dec 2019 13:12:39 -0800	[thread overview]
Message-ID: <20191211211244.7831-1-daniele.ceraolospurio@intel.com> (raw)

The new GuC submission code will get rid of the execlists emulation and
move towards being a more independent submission flow. However, given
that the HW underneath is still the same, the generic engine HW setup
and context handling can be shared between the GuC and execlists
submission paths. Currently, the execlists submission code and the more
generic handlers are mixed together in intel_lrc.c, which makes code
sharing trickier and makes it harder to isolate the 2 submission
mechanisms. Therefore, this series proposes to split the intel_lrc file
to divide the common parts from the submission-specific ones. Apart from
execlists submission and context management, the virtual engine code has
also been split in a generic part to be re-used and a back-end specific
one.

The status of the intel_lrc.c file gets a bit more confusing in the
first patch as execlists_* and lr_context_* functions are mixed
together, but that is solved at the end of the series when all the
execlists_* code is moved away.

I'm not too sure where the functions to emit commands in the ring belong
to, because most of them are common but there will be some small
differences between the GuC and execlist paths (e.g. no busywait with
the GuC). I've left them in intel_lrc.c for now, with a plan to
reconsider once the new GuC code lands and it becomes clearer what the
differences are.

Very lightly tested.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: John Harrison <john.c.harrison@intel.com>

Daniele Ceraolo Spurio (4):
  drm/i915: introduce logical_ring and lr_context naming
  drm/i915: split out virtual engine code
  drm/i915: move execlists selftests to their own file
  drm/i915: introduce intel_execlists_submission.<c/h>

Matthew Brost (1):
  drm/i915: Move struct intel_virtual_engine to its own header

 drivers/gpu/drm/i915/Makefile                 |    2 +
 drivers/gpu/drm/i915/gem/i915_gem_context.c   |    5 +-
 .../drm/i915/gem/selftests/igt_gem_utils.c    |   27 +
 .../drm/i915/gem/selftests/igt_gem_utils.h    |    3 +
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |    1 +
 drivers/gpu/drm/i915/gt/intel_engine_pool.c   |    1 +
 .../drm/i915/gt/intel_execlists_submission.c  | 2485 ++++++++++++
 .../drm/i915/gt/intel_execlists_submission.h  |   58 +
 drivers/gpu/drm/i915/gt/intel_lrc.c           | 3132 +--------------
 drivers/gpu/drm/i915/gt/intel_lrc.h           |   59 +-
 .../gpu/drm/i915/gt/intel_virtual_engine.c    |  360 ++
 .../gpu/drm/i915/gt/intel_virtual_engine.h    |   48 +
 .../drm/i915/gt/intel_virtual_engine_types.h  |   57 +
 drivers/gpu/drm/i915/gt/selftest_execlists.c  | 3316 ++++++++++++++++
 drivers/gpu/drm/i915/gt/selftest_lrc.c        | 3346 +----------------
 drivers/gpu/drm/i915/gt/selftest_mocs.c       |   30 +-
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c |    1 +
 drivers/gpu/drm/i915/gvt/scheduler.c          |    1 +
 drivers/gpu/drm/i915/i915_perf.c              |    1 +
 19 files changed, 6547 insertions(+), 6386 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/gt/intel_execlists_submission.c
 create mode 100644 drivers/gpu/drm/i915/gt/intel_execlists_submission.h
 create mode 100644 drivers/gpu/drm/i915/gt/intel_virtual_engine.c
 create mode 100644 drivers/gpu/drm/i915/gt/intel_virtual_engine.h
 create mode 100644 drivers/gpu/drm/i915/gt/intel_virtual_engine_types.h
 create mode 100644 drivers/gpu/drm/i915/gt/selftest_execlists.c

-- 
2.23.0

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

             reply	other threads:[~2019-12-11 21:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 21:12 Daniele Ceraolo Spurio [this message]
2019-12-11 21:12 ` [Intel-gfx] [RFC 1/5] drm/i915: introduce logical_ring and lr_context naming Daniele Ceraolo Spurio
2019-12-11 21:20   ` Chris Wilson
2019-12-11 21:33     ` Chris Wilson
2019-12-11 22:04     ` Daniele Ceraolo Spurio
2019-12-11 23:35       ` Matthew Brost
2019-12-11 21:12 ` [Intel-gfx] [RFC 2/5] drm/i915: Move struct intel_virtual_engine to its own header Daniele Ceraolo Spurio
2019-12-11 21:22   ` Chris Wilson
2019-12-11 21:12 ` [Intel-gfx] [RFC 3/5] drm/i915: split out virtual engine code Daniele Ceraolo Spurio
2019-12-11 21:22   ` Chris Wilson
2019-12-11 21:34     ` Daniele Ceraolo Spurio
2019-12-11 23:09       ` Matthew Brost
2019-12-11 21:12 ` [Intel-gfx] [RFC 4/5] drm/i915: move execlists selftests to their own file Daniele Ceraolo Spurio
2019-12-11 21:26   ` Chris Wilson
2019-12-11 22:07     ` Daniele Ceraolo Spurio
2019-12-11 21:12 ` [Intel-gfx] [RFC 5/5] drm/i915: introduce intel_execlists_submission.<c/h> Daniele Ceraolo Spurio
2019-12-11 21:31   ` Chris Wilson
2019-12-11 22:35     ` Daniele Ceraolo Spurio
2019-12-12  1:27 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Split up intel_lrc.c Patchwork
2019-12-12  1:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2019-12-12 12:51 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191211211244.7831-1-daniele.ceraolospurio@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.