]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: add GEN2_ prefix to the I{E, I, M, S}R registers
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Wed, 10 Apr 2019 23:53:42 +0000 (16:53 -0700)
committerPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 16 Apr 2019 21:18:58 +0000 (14:18 -0700)
commitc9b392787c799a133eba7dc8f64b8c5cfb02507d
tree560087b146b30a59dd049b91b68f57eda8c724b7
parentdb8112afa3a03c0d092f6d63b93d5392d7a81565
drm/i915: add GEN2_ prefix to the I{E, I, M, S}R registers

This discussion started because we use token pasting in the
GEN{2,3}_IRQ_INIT and GEN{2,3}_IRQ_RESET macros, so gen2-4 passes an
empty argument to those macros, making the code a little weird. The
original proposal was to just add a comment as the empty argument, but
Ville suggested we just add a prefix to the registers, and that indeed
sounds like a more elegant solution.

Now doing this is kinda against our rules for register naming since we
only add gens or platform names as register prefixes when the given
gen/platform changes a register that already existed before. On the
other hand, we have so many instances of IIR/IMR in comments that
adding a prefix would make the users of these register more easily
findable, in addition to make our token pasting macros actually
readable. So IMHO opening an exception here is worth it.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190410235344.31199-4-paulo.r.zanoni@intel.com
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/i915_reset.c
drivers/gpu/drm/i915/intel_overlay.c
drivers/gpu/drm/i915/intel_ringbuffer.c