Re: [PATCH] drm/i915: Move LRC register offsets to a header file

Chris Wilson
2018-01-22T20:14:25Z

Quoting Michel Thierry (2018-01-22 20:06:32)
> Newer platforms may have subtle offset changes, which will increase the
> number of defines, so it is probably better to start moving them to its
> own header file. Also move the macros used while setting the reg state.

I was scared that we might be starting to duplicate the lrc setup
code. If you can see a quick way of splitting the lrc setup from
execlists submission, that would also be good.

> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 50 +-----------------
> drivers/gpu/drm/i915/intel_lrc_reg_offsets.h | 78 ++++++++++++++++++++++++++++
> 2 files changed, 79 insertions(+), 49 deletions(-)
> create mode 100644 drivers/gpu/drm/i915/intel_lrc_reg_offsets.h
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 506bc2bc04f9..bc9287645bf3 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -137,6 +137,7 @@
> #include <drm/i915_drm.h>
> #include "i915_drv.h"
> #include "i915_gem_render_state.h"
> +#include "intel_lrc_reg_offsets.h"

Just intel_lrc_reg.h to be consistent with i915_reg.h and
intel_guc_reg.h

The numbers look the same, so with a new filename,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris