[Intel-gfx] [PATCH] drm/i915: Move LRC register offsets to a header file

Michel Thierry michel.thierry at intel.com
Mon Jan 22 20:26:35 UTC 2018


On 1/22/2018 12:14 PM, Chris Wilson wrote:
> 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.
>   

At the very least, we will need different implementations of 
execlists_init_reg_state.


>> Signed-off-by: Michel Thierry <michel.thierry at intel.com>
>> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
>> Cc: Lucas De Marchi <lucas.demarchi at 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 at chris-wilson.co.uk>

Thanks, I'll resend it with the new filename.

> -Chris
> 


More information about the Intel-gfx mailing list