All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhi Wang <zhi.a.wang@intel.com>
To: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Fwd: Discuss GVT context hacks in i915
Date: Mon, 15 Feb 2016 17:13:44 +0800	[thread overview]
Message-ID: <56C196C8.7000104@intel.com> (raw)
In-Reply-To: <56C19630.5010301@intel.com>

+ mailing-list

-------- Original Message --------
Subject: Discuss GVT context hacks in i915
Date: Mon, 15 Feb 2016 17:11:12 +0800
From: Zhi Wang <zhi.a.wang@intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,  Chris Wilson 
<chris@chris-wilson.co.uk>, Daniel Vetter <daniel.vetter@intel.com>, 
Zhiyuan Lv <zhiyuan.lv@intel.com>, "Tian, Kevin" <kevin.tian@intel.com>

Hi Guys:
    Previously we have sent our GVT-g device model RFC code, and thanks
for the advices and comments! As you see GVT-g needs a special kind of
LRC context as shadow context so it could be able to use i915 GEM
submission subsystem, which requires some changes in i915.

Probably we can discuss them one by one and settle them down before the
next version of RFC code. :)

Difference between a i915 LRC context and a GVT LRC context
------

* The engine context initialization of a GVT LRC context can be
bypassed, as GVT-g will initialize it by guest LRC context.

http://www.spinics.net/lists/intel-gfx/msg86546.html

* The addressing mode bit in the context descriptor should be able to
configured at runtime, as some guest is still using 32bit PPGTT address
space.

http://www.spinics.net/lists/intel-gfx/msg86544.html

* As the GVT LRC context will go with the shadow PPGTT page table
populated by GVT-g, a GVT LRC context doesn't need a i915 PPGTT
instance, also its PDP root pointer doesn't need to be populated by i915.

http://www.spinics.net/lists/intel-gfx/msg86545.html

* The ring buffer size of a GVT LRC context ring buffer object should be
configurable or hard-coded to the max size, as some guest (e.g. windows)
has a large ring buffer and could submit a lot of commands at one time.

Hacking i915
-------

The above changes needs to hack i915, in the RFC code, you can see a lot
of codes like below:

if (!gvt_context) {
	/* do something i915 needed */
} else {
	/* do something GVT-g needed */
}

This kinds of code piece is GVT-g specific, another approach should be
refining some i915 APIs or say something generic, like:

if (context->need_i915_ppgtt) {
	/* allocating i915 ppgtt instance */
}

if (context->ppgtt) {
	/* update PDP root pointers in LRC context. */
}

if (context->need_initialization) {
	/* emit commands to initialize the engine context of LRC context */
}

I'm wondering which kinds do you prefer? Or maybe you can give me some
advices? :)

Thanks,
Zhi.


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

       reply	other threads:[~2016-02-15  9:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <56C19630.5010301@intel.com>
2016-02-15  9:13 ` Zhi Wang [this message]
     [not found] ` <56C19B26.7020206@intel.com>
2016-02-15 16:03   ` Discuss GVT context hacks in i915 Wang, Zhi A
2016-02-15 17:20     ` Daniel Vetter
2016-02-16  1:09       ` Wang, Zhi A
2016-02-16  3:11     ` Tian, Kevin
2016-02-16  4:08       ` Zhi Wang

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=56C196C8.7000104@intel.com \
    --to=zhi.a.wang@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.