drm/i915/execlists: Pull the w/a LRI emission into a helper
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 18 Jun 2018 09:41:50 +0000 (10:41 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 18 Jun 2018 13:43:47 +0000 (14:43 +0100)
commit5ee4a7a6db8eb46aafdfea1f26cbdbbb4cef76b3
tree6b8d75fa70ecc6369e56b6455627bccc553244e1
parentbcc2661e3243fe75b91ec682de01e7cbedfbe7f9
drm/i915/execlists: Pull the w/a LRI emission into a helper

Having the w/a registers as an open-coded table leaves a trap for the
unwary; it would be easy to miss incrementing the LRI counter when
adding a new register to the list. Instead, pull the list of registers
into a table, so that we only need add new registers to that table
rather than try and remember important side-effects of earlier chunks of
GPU instructions.

Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180618094150.30895-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_lrc.c