From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915/ringbuffer: Move all generic engine->dispatch_batchbuffer together
Date: Fri, 1 Jul 2016 09:40:28 +0100 [thread overview]
Message-ID: <57762C7C.4080201@linux.intel.com> (raw)
In-Reply-To: <1467361093-20209-1-git-send-email-chris@chris-wilson.co.uk>
On 01/07/16 09:18, Chris Wilson wrote:
> Consolidate the block of default vfuncs for dispatching the batchbuffer.
> Just a minor tweak on top of Tvrtko's great job of tidying up the vfunc
> initialisation.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
> drivers/gpu/drm/i915/intel_ringbuffer.c | 27 ++++++++++++++-------------
> 1 file changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 4d61ea923154..caebe812d10f 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -2991,25 +2991,29 @@ static void intel_ring_default_vfuncs(struct drm_i915_private *dev_priv,
> engine->get_seqno = ring_get_seqno;
> engine->set_seqno = ring_set_seqno;
>
> - if (INTEL_GEN(dev_priv) >= 8) {
> - engine->dispatch_execbuffer = gen8_ring_dispatch_execbuffer;
> + engine->add_request = i9xx_add_request;
> + if (INTEL_GEN(dev_priv) >= 6)
> engine->add_request = gen6_add_request;
> - engine->irq_seqno_barrier = gen6_seqno_barrier;
> - } else if (INTEL_GEN(dev_priv) >= 6) {
> +
> + if (INTEL_GEN(dev_priv) >= 8)
> + engine->dispatch_execbuffer = gen8_ring_dispatch_execbuffer;
> + else if (INTEL_GEN(dev_priv) >= 6)
> engine->dispatch_execbuffer = gen6_ring_dispatch_execbuffer;
> - engine->add_request = gen6_add_request;
> - engine->irq_seqno_barrier = gen6_seqno_barrier;
> - } else {
> + else if (INTEL_GEN(dev_priv) >= 4)
> engine->dispatch_execbuffer = i965_dispatch_execbuffer;
> - engine->add_request = i9xx_add_request;
> - }
> + else if (IS_I830(dev_priv) || IS_845G(dev_priv))
> + engine->dispatch_execbuffer = i830_dispatch_execbuffer;
> + else
> + engine->dispatch_execbuffer = i915_dispatch_execbuffer;
>
> if (INTEL_GEN(dev_priv) >= 8) {
> engine->irq_get = gen8_ring_get_irq;
> engine->irq_put = gen8_ring_put_irq;
> + engine->irq_seqno_barrier = gen6_seqno_barrier;
> } else if (INTEL_GEN(dev_priv) >= 6) {
> engine->irq_get = gen6_ring_get_irq;
> engine->irq_put = gen6_ring_put_irq;
> + engine->irq_seqno_barrier = gen6_seqno_barrier;
> } else if (INTEL_GEN(dev_priv) >= 5) {
> engine->irq_get = gen5_ring_get_irq;
> engine->irq_put = gen5_ring_put_irq;
> @@ -3069,10 +3073,7 @@ int intel_init_render_ring_buffer(struct drm_device *dev)
>
> if (IS_HASWELL(dev_priv))
> engine->dispatch_execbuffer = hsw_ring_dispatch_execbuffer;
> - else if (IS_I830(dev_priv) || IS_845G(dev_priv))
> - engine->dispatch_execbuffer = i830_dispatch_execbuffer;
> - else if (INTEL_GEN(dev_priv) <= 3)
> - engine->dispatch_execbuffer = i915_dispatch_execbuffer;
> +
> engine->init_hw = init_render_ring;
> engine->cleanup = render_ring_cleanup;
I was planning to do this today after your comment from yesterday, which
I was agreeing with, but you beat me to it. No complaints about that. :)
Looks correct.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-07-01 8:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 8:18 [PATCH 1/2] drm/i915/ringbuffer: Move all generic engine->dispatch_batchbuffer together Chris Wilson
2016-07-01 8:18 ` [PATCH 2/2] drm/i915/ringbuffer: Move all default irq vfuncs init to a separate func Chris Wilson
2016-07-01 8:41 ` Tvrtko Ursulin
2016-07-01 8:40 ` Tvrtko Ursulin [this message]
2016-07-01 8:41 ` ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915/ringbuffer: Move all generic engine->dispatch_batchbuffer together Patchwork
2016-07-01 8:46 ` Chris Wilson
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=57762C7C.4080201@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox