From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Tvrtko Ursulin <tursulin@ursulin.net>, Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v10] drm/i915: Emit to ringbuffer directly
Date: Tue, 14 Feb 2017 14:03:49 +0200 [thread overview]
Message-ID: <1487073829.3057.18.camel@linux.intel.com> (raw)
In-Reply-To: <20170214113242.29241-1-tvrtko.ursulin@linux.intel.com>
On ti, 2017-02-14 at 11:32 +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> This removes the usage of intel_ring_emit in favour of
> directly writing to the ring buffer.
>
> intel_ring_emit was preventing the compiler for optimising
> fetch and increment of the current ring buffer pointer and
> therefore generating very verbose code for every write.
>
> It had no useful purpose since all ringbuffer operations
> are started and ended with intel_ring_begin and
> intel_ring_advance respectively, with no bail out in the
> middle possible, so it is fine to increment the tail in
> intel_ring_begin and let the code manage the pointer
> itself.
>
> Useless instruction removal amounts to approximately
> two and half kilobytes of saved text on my build.
>
> Not sure if this has any measurable performance
> implications but executing a ton of useless instructions
> on fast paths cannot be good.
>
> Patch is not fully polished, but it compiles and runs
> on Gen9 at least.
>
> v2:
> * Change return from intel_ring_begin to error pointer by
> popular demand.
> * Move tail increment to intel_ring_advance to enable some
> error checking.
>
> v3:
> * Move tail advance back into intel_ring_begin.
> * Rebase and tidy.
>
> v4:
> * Complete rebase after a few months since v3.
>
> v5:
> * Remove unecessary cast and fix !debug compile. (Chris Wilson)
>
> v6:
> * Make intel_ring_offset take request as well.
> * Fix recording of request postfix plus a sprinkle of asserts.
> (Chris Wilson)
>
> v7:
> * Use intel_ring_offset to get the postfix. (Chris Wilson)
> * Convert GVT code as well.
>
> v8:
> * Rename *out++ to *cs++.
>
> v9:
> * Fix GVT out to cs conversion in GVT.
>
> v10:
> * Rebase for new intel_ring_begin in selftests.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Zhi Wang <zhi.a.wang@intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v9)
Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-02-14 12:04 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 13:10 [PATCH] drm/i915: Emit to ringbuffer directly Tvrtko Ursulin
2017-02-08 13:36 ` Chris Wilson
2017-02-08 13:58 ` Chris Wilson
2017-02-08 14:14 ` [PATCH v5] " Tvrtko Ursulin
2017-02-08 17:49 ` Chris Wilson
2017-02-08 18:04 ` [PATCH v6] " Tvrtko Ursulin
2017-02-08 18:21 ` Chris Wilson
2017-02-09 9:02 ` [PATCH v7] " Tvrtko Ursulin
2017-02-09 13:35 ` Chris Wilson
2017-02-13 12:53 ` [PATCH v8] " Tvrtko Ursulin
2017-02-13 13:06 ` [PATCH v9] " Tvrtko Ursulin
2017-02-13 21:09 ` Chris Wilson
2017-02-14 11:32 ` [PATCH v10] " Tvrtko Ursulin
2017-02-14 12:03 ` Joonas Lahtinen [this message]
2017-02-14 12:06 ` Chris Wilson
2017-02-09 8:00 ` [PATCH v6] " Joonas Lahtinen
2017-02-09 9:10 ` Chris Wilson
2017-02-09 10:37 ` Mika Kuoppala
2017-02-09 11:49 ` Tvrtko Ursulin
2017-02-09 13:29 ` Chris Wilson
2017-02-08 22:32 ` ✗ Fi.CI.BAT: failure for drm/i915: Emit to ringbuffer directly (rev7) Patchwork
2017-02-09 10:22 ` ✗ Fi.CI.BAT: failure for drm/i915: Emit to ringbuffer directly (rev8) Patchwork
2017-02-09 21:52 ` Patchwork
2017-02-10 8:22 ` ✗ Fi.CI.BAT: warning " Patchwork
2017-02-13 13:02 ` ✗ Fi.CI.BAT: failure for drm/i915: Emit to ringbuffer directly (rev9) Patchwork
2017-02-13 13:52 ` ✓ Fi.CI.BAT: success for drm/i915: Emit to ringbuffer directly (rev10) Patchwork
2017-02-14 13:52 ` ✓ Fi.CI.BAT: success for drm/i915: Emit to ringbuffer directly (rev11) Patchwork
2017-02-14 14:39 ` Tvrtko Ursulin
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=1487073829.3057.18.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=tursulin@ursulin.net \
/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