[Intel-gfx] [PATCH 04/13] drm/i915: Consolidate get and put irq vfuncs
Chris Wilson
chris at chris-wilson.co.uk
Tue Jun 28 11:58:20 UTC 2016
On Mon, Jun 27, 2016 at 03:04:11PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
> drivers/gpu/drm/i915/intel_ringbuffer.c | 46 ++++++++++++---------------------
> 1 file changed, 17 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index a4391cbbb2b6..5dddcdd2570d 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -2884,6 +2884,23 @@ static void intel_ring_default_vfuncs(struct drm_i915_private *dev_priv,
> } else {
> engine->add_request = i9xx_add_request;
> }
> +
> + if (INTEL_GEN(dev_priv) >= 8) {
> + engine->irq_get = gen8_ring_get_irq;
> + engine->irq_put = gen8_ring_put_irq;
> + } else if (INTEL_GEN(dev_priv) >= 6) {
> + engine->irq_get = gen6_ring_get_irq;
> + engine->irq_put = gen6_ring_put_irq;
> + } else if (IS_GEN5(dev_priv)) {
For the sake of consistency 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 if (IS_GEN2(dev_priv)) {
and a plain else here ?
> + engine->irq_get = i8xx_ring_get_irq;
> + engine->irq_put = i8xx_ring_put_irq;
> + }
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list