Re: [Intel-gfx] [PATCH 5/6] drm/i915: Introduce i915_reg_types.h

2019-08-16 Thread Daniele Ceraolo Spurio



On 8/16/19 2:40 AM, Michal Wajdeczko wrote:
On Fri, 16 Aug 2019 03:23:42 +0200, Daniele Ceraolo Spurio 
 wrote:



With the introduction of display uncore, we want to categorize registers
between display and non-display. To help us getting it right, it will
be useful to move the display registers to a new file that can be used
without including i915_reg.h. To allow that, move all the basic register
type definitions and helpers to i915_reg_types.h and include that
instead of i915_reg.h from header files in the driver. We'll then
be able to replace i915_reg.h with the new display-only header in
display files and make sure the registers are correctly
compartmentalized.



maybe this split should another way:

 i915_reg.h = basic typedefs and macros
 intel_reg.h = register definitions
and
 intel_display_reg.h = display related regs (your goal)
 intel_guc_reg.h = GuC related regs (we already have that!)

then we follow the rule to use i915_ prefix for driver specific
code and intel_ prefix for hardware originated definitions



Around the code we're using the *_types.h format for the headers with 
the basic defs, so I'd prefer to stick with that. But I can go with 
intel_* prefix and rename i915_reg.h to intel_reg.h.


Daniele


Michal

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 5/6] drm/i915: Introduce i915_reg_types.h

2019-08-16 Thread Michal Wajdeczko
On Fri, 16 Aug 2019 03:23:42 +0200, Daniele Ceraolo Spurio  
 wrote:



With the introduction of display uncore, we want to categorize registers
between display and non-display. To help us getting it right, it will
be useful to move the display registers to a new file that can be used
without including i915_reg.h. To allow that, move all the basic register
type definitions and helpers to i915_reg_types.h and include that
instead of i915_reg.h from header files in the driver. We'll then
be able to replace i915_reg.h with the new display-only header in
display files and make sure the registers are correctly
compartmentalized.



maybe this split should another way:

i915_reg.h = basic typedefs and macros
intel_reg.h = register definitions
and
intel_display_reg.h = display related regs (your goal)
intel_guc_reg.h = GuC related regs (we already have that!)

then we follow the rule to use i915_ prefix for driver specific
code and intel_ prefix for hardware originated definitions

Michal
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH 5/6] drm/i915: Introduce i915_reg_types.h

2019-08-15 Thread Daniele Ceraolo Spurio
With the introduction of display uncore, we want to categorize registers
between display and non-display. To help us getting it right, it will
be useful to move the display registers to a new file that can be used
without including i915_reg.h. To allow that, move all the basic register
type definitions and helpers to i915_reg_types.h and include that
instead of i915_reg.h from header files in the driver. We'll then
be able to replace i915_reg.h with the new display-only header in
display files and make sure the registers are correctly
compartmentalized.

Signed-off-by: Daniele Ceraolo Spurio 
Cc: Jani Nikula 
Cc: Chris Wilson 
---
 Documentation/gpu/i915.rst|   4 +-
 drivers/gpu/drm/i915/display/icl_dsi.c|   1 +
 drivers/gpu/drm/i915/display/intel_atomic.c   |   1 +
 drivers/gpu/drm/i915/display/intel_audio.c|   1 +
 drivers/gpu/drm/i915/display/intel_bw.c   |   1 +
 drivers/gpu/drm/i915/display/intel_cdclk.c|   1 +
 drivers/gpu/drm/i915/display/intel_color.c|   1 +
 .../gpu/drm/i915/display/intel_combo_phy.c|   1 +
 drivers/gpu/drm/i915/display/intel_crt.c  |   1 +
 drivers/gpu/drm/i915/display/intel_crt.h  |   2 +-
 drivers/gpu/drm/i915/display/intel_ddi.c  |   1 +
 drivers/gpu/drm/i915/display/intel_display.c  |   1 +
 .../drm/i915/display/intel_display_power.c|   1 +
 .../drm/i915/display/intel_display_power.h|   2 +-
 drivers/gpu/drm/i915/display/intel_dp.c   |   1 +
 drivers/gpu/drm/i915/display/intel_dp.h   |   2 +-
 .../drm/i915/display/intel_dp_link_training.c |   1 +
 drivers/gpu/drm/i915/display/intel_dp_mst.c   |   1 +
 drivers/gpu/drm/i915/display/intel_dpio_phy.c |   1 +
 drivers/gpu/drm/i915/display/intel_dpll_mgr.c |   1 +
 drivers/gpu/drm/i915/display/intel_dsi.c  |   1 +
 drivers/gpu/drm/i915/display/intel_dsi_vbt.c  |   1 +
 drivers/gpu/drm/i915/display/intel_dvo.c  |   1 +
 drivers/gpu/drm/i915/display/intel_dvo_dev.h  |   2 +-
 drivers/gpu/drm/i915/display/intel_fbc.c  |   1 +
 .../drm/i915/display/intel_fifo_underrun.c|   1 +
 drivers/gpu/drm/i915/display/intel_gmbus.c|   1 +
 drivers/gpu/drm/i915/display/intel_hdmi.c |   1 +
 drivers/gpu/drm/i915/display/intel_hdmi.h |   2 +-
 .../gpu/drm/i915/display/intel_lpe_audio.c|   1 +
 drivers/gpu/drm/i915/display/intel_lspcon.c   |   1 +
 drivers/gpu/drm/i915/display/intel_lvds.c |   1 +
 drivers/gpu/drm/i915/display/intel_lvds.h |   2 +-
 drivers/gpu/drm/i915/display/intel_opregion.c |   1 +
 drivers/gpu/drm/i915/display/intel_panel.c|   1 +
 drivers/gpu/drm/i915/display/intel_pipe_crc.c |   1 +
 drivers/gpu/drm/i915/display/intel_psr.c  |   1 +
 drivers/gpu/drm/i915/display/intel_sdvo.c |   1 +
 drivers/gpu/drm/i915/display/intel_sdvo.h |   2 +-
 drivers/gpu/drm/i915/display/intel_sprite.c   |   1 +
 drivers/gpu/drm/i915/display/intel_tc.c   |   1 +
 drivers/gpu/drm/i915/display/intel_tv.c   |   1 +
 drivers/gpu/drm/i915/display/intel_vdsc.c |   1 +
 drivers/gpu/drm/i915/display/vlv_dsi.c|   1 +
 drivers/gpu/drm/i915/display/vlv_dsi_pll.c|   1 +
 drivers/gpu/drm/i915/gem/i915_gem_context.c   |   1 +
 .../gpu/drm/i915/gem/i915_gem_execbuffer.c|   1 +
 drivers/gpu/drm/i915/gem/i915_gem_mman.c  |   1 +
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c|   1 +
 drivers/gpu/drm/i915/gem/i915_gem_tiling.c|   1 +
 .../drm/i915/gem/selftests/i915_gem_context.c |   1 +
 drivers/gpu/drm/i915/gt/intel_engine.h|   2 +-
 drivers/gpu/drm/i915/gt/intel_engine_cs.c |   1 +
 drivers/gpu/drm/i915/gt/intel_gt.c|   1 +
 drivers/gpu/drm/i915/gt/intel_gt_irq.c|   1 +
 drivers/gpu/drm/i915/gt/intel_hangcheck.c |   1 +
 drivers/gpu/drm/i915/gt/intel_lrc.c   |   1 +
 drivers/gpu/drm/i915/gt/intel_mocs.c  |   1 +
 drivers/gpu/drm/i915/gt/intel_reset.c |   1 +
 drivers/gpu/drm/i915/gt/intel_ringbuffer.c|   1 +
 drivers/gpu/drm/i915/gt/intel_sseu.c  |   1 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c   |   1 +
 .../gpu/drm/i915/gt/intel_workarounds_types.h |   2 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c |   1 +
 drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h|   2 +-
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c |   1 +
 drivers/gpu/drm/i915/gt/uc/intel_huc.h|   2 +-
 drivers/gpu/drm/i915/gvt/aperture_gm.c|   1 +
 drivers/gpu/drm/i915/gvt/cmd_parser.c |   1 +
 drivers/gpu/drm/i915/gvt/display.c|   1 +
 drivers/gpu/drm/i915/gvt/dmabuf.c |   1 +
 drivers/gpu/drm/i915/gvt/edid.c   |   1 +
 drivers/gpu/drm/i915/gvt/fb_decoder.c |   1 +
 drivers/gpu/drm/i915/gvt/gtt.c|   1 +
 drivers/gpu/drm/i915/gvt/handlers.c   |   1 +
 drivers/gpu/drm/i915/gvt/interrupt.c  |   1 +
 drivers/gpu/drm/i915/gvt/mmio.c   |   1 +
 drivers/gpu/drm/i915/gvt/mmio_context.c   |   1 +
 drivers/gpu/drm/i915/gvt/scheduler.c  |   1 +
 dr