From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/ringbuffer: Move all default irq vfuncs init to a separate func
Date: Fri, 1 Jul 2016 09:41:16 +0100 [thread overview]
Message-ID: <57762CAC.4040501@linux.intel.com> (raw)
In-Reply-To: <1467361093-20209-2-git-send-email-chris@chris-wilson.co.uk>
On 01/07/16 09:18, Chris Wilson wrote:
> Just plonk all the default irq vfuncs together in one function to keep
> the initialisers of reasonable size.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
> drivers/gpu/drm/i915/intel_ringbuffer.c | 43 ++++++++++++++++++---------------
> 1 file changed, 24 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index caebe812d10f..24cdc920f4b4 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -2983,6 +2983,29 @@ static void intel_ring_init_semaphores(struct drm_i915_private *dev_priv,
> }
> }
>
> +static void intel_ring_init_irq(struct drm_i915_private *dev_priv,
> + struct intel_engine_cs *engine)
> +{
> + 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;
> + } else if (INTEL_GEN(dev_priv) >= 3) {
> + engine->irq_get = i9xx_ring_get_irq;
> + engine->irq_put = i9xx_ring_put_irq;
> + } else {
> + engine->irq_get = i8xx_ring_get_irq;
> + engine->irq_put = i8xx_ring_put_irq;
> + }
> +}
> +
> static void intel_ring_default_vfuncs(struct drm_i915_private *dev_priv,
> struct intel_engine_cs *engine)
> {
> @@ -3006,25 +3029,7 @@ static void intel_ring_default_vfuncs(struct drm_i915_private *dev_priv,
> 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;
> - } else if (INTEL_GEN(dev_priv) >= 3) {
> - engine->irq_get = i9xx_ring_get_irq;
> - engine->irq_put = i9xx_ring_put_irq;
> - } else {
> - engine->irq_get = i8xx_ring_get_irq;
> - engine->irq_put = i8xx_ring_put_irq;
> - }
> -
> + intel_ring_init_irq(dev_priv, engine);
> intel_ring_init_semaphores(dev_priv, engine);
> }
>
>
Yes thats better.
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:41 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 [this message]
2016-07-01 8:40 ` [PATCH 1/2] drm/i915/ringbuffer: Move all generic engine->dispatch_batchbuffer together Tvrtko Ursulin
2016-07-01 8:41 ` ✗ Ro.CI.BAT: failure for series starting with [1/2] " 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=57762CAC.4040501@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