drm/i915: move gen8 irq shifts to intel_lrc.c
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Wed, 14 Mar 2018 18:26:53 +0000 (11:26 -0700)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Mar 2018 08:46:06 +0000 (08:46 +0000)
commitfa6f071d54fb3658c7012634b8e4035c8d3a25bc
treefe473a7450542c9fef82a9f2de321c32f9a683ae
parent210060edc216ebd6330ee4fded5a01547d938642
drm/i915: move gen8 irq shifts to intel_lrc.c

The only usage outside the intel_lrc.c file is in the ringbuffer
init, but the irq mask calculated there is then overwritten for
all engines that have a non-zero shift, so we can drop it.

This change is not aimed at code saving but at removing from
intel_engines information that does not apply to all gens that have
the engine. When checking without the temporary WARN_ON, code size
is basically unchanged.

v2: make the irq_shifts array static const
v3: rebase, move irq_shifts array to logical_ring_default_irqs
v4: move array inside the if and use u8 for it (Chris)

Suggested-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180314182653.26981-4-daniele.ceraolospurio@intel.com
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h