From: Daniel Vetter <daniel@ffwll.ch>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 1/7] drm/i915: Specify bsd rings through exec flag
Date: Tue, 9 Dec 2014 10:46:15 +0100 [thread overview]
Message-ID: <20141209094615.GN27182@phenom.ffwll.local> (raw)
In-Reply-To: <CABVU7+tYHzDaWpCtA9N9ikvaZ+Vi2WBFE3Mphq5F9QrMfoPodQ@mail.gmail.com>
On Mon, Dec 08, 2014 at 01:55:56PM -0800, Rodrigo Vivi wrote:
> On Tue, Nov 25, 2014 at 5:04 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Mon, Nov 24, 2014 at 08:29:40AM -0800, Rodrigo Vivi wrote:
> >> From: Zhipeng Gong <zhipeng.gong@intel.com>
> >>
> >> On Broadwell GT3 we have 2 Video Command Streamers (VCS), but userspace
> >> has no control when using VCS1 or VCS2. This patch introduces a mechanism
> >> to avoid the default ping-pong mode and use one specific ring through
> >> execution flag.
> >>
> >> v2: fix whitespace (Rodrigo)
> >> v3: remove incorrect chunk that came on -collector rebase. (Rodrigo)
> >>
> >> Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
> >> Reviewed-by-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >
> > There's review from me pending on testcases and stuff, but I get the
> > impression that's lost now. Is it?
>
> tests are ready as well, I've tested and reviewed them.
> imho this is ready for merge. Anyway I'm going to submit again on next
> -collector round
Last time I've looked it doesn't really address my review. Quoting
relevant parts:
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index e1ed85a..d9081ec 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1273,8 +1273,23 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
> else if ((args->flags & I915_EXEC_RING_MASK) == I915_EXEC_BSD) {
> if (HAS_BSD2(dev)) {
> int ring_id;
> - ring_id = gen8_dispatch_bsd_ring(dev, file);
> - ring = &dev_priv->ring[ring_id];
> +
> + switch (args->flags & I915_EXEC_BSD_MASK) {
> + case I915_EXEC_BSD_DEFAULT:
> + ring_id = gen8_dispatch_bsd_ring(dev, file);
> + ring = &dev_priv->ring[ring_id];
> + break;
> + case I915_EXEC_BSD_RING1:
> + ring = &dev_priv->ring[VCS];
Do we have any use-case for selecting ring1 specifically? I've thought
it's only ring2 that is special?
> + break;
> + case I915_EXEC_BSD_RING2:
This needs a if (!IS_SKL(dev) return -EINVAL; check since the flag isnt
valid anywhere else. Also you must add code to reject these flags if
userspace selects a ring other than bsd.
And all these new -EINVAL cases need new subtests to validate them in
gem_exec_params.c.
And I might have missed some case, ioctl validation is hard ;-) So please
double-check that really no insane combination that userspace might try to
abuse is caught and has a testcase in gem_exec_params.
/endquote
The testcase also doesn't check for these nasty condiditions (it would
fail with the current patch).
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-12-09 9:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 16:29 [PATCH 0/7] drm-intel-collector - update Rodrigo Vivi
2014-11-24 16:29 ` [PATCH 1/7] drm/i915: Specify bsd rings through exec flag Rodrigo Vivi
2014-11-25 13:04 ` Daniel Vetter
2014-12-08 21:55 ` Rodrigo Vivi
2014-12-09 9:46 ` Daniel Vetter [this message]
2014-12-10 2:18 ` Gong, Zhipeng
2014-12-10 9:11 ` Daniel Vetter
2014-12-10 15:55 ` Dave Gordon
2014-12-11 3:50 ` Zhao, Yakui
2014-12-24 21:32 ` Rodrigo Vivi
2014-11-24 16:29 ` [PATCH 2/7] drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam Rodrigo Vivi
2014-11-24 16:29 ` [PATCH 3/7] drm/i915: Move the ban period onto the context Rodrigo Vivi
2014-11-24 16:29 ` [PATCH 4/7] drm/i915: Add ioctl to set per-context parameters Rodrigo Vivi
2014-11-24 16:29 ` [PATCH 5/7] drm/i915: Put logical pipe_control emission into a helper Rodrigo Vivi
2014-11-24 16:29 ` [PATCH 6/7] drm/i915: Add WaCsStallBeforeStateCacheInvalidate:bdw, chv to logical ring Rodrigo Vivi
2014-11-24 16:29 ` [PATCH 7/7] drm/i915: Broaden application of set-domain(GTT) Rodrigo Vivi
2014-11-25 12:43 ` [PATCH 7/7] drm/i915: Broaden application of shuang.he
2014-11-25 13:05 ` [PATCH 7/7] drm/i915: Broaden application of set-domain(GTT) Daniel Vetter
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=20141209094615.GN27182@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@gmail.com \
--cc=rodrigo.vivi@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox