[PATCH 00/25] drm/i915: the great header refactoring, part one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



intel_drv.h has grown out of proportions, and turned into a dumping
ground. Way back when it was useful to have only a handful of headers,
but we're long past that.

Start splitting off per-module headers. The basic principles:

* Make the new headers self-contained (i.e. can be compiled without
  including other headers first), and test this using the new infra for
  that.

* Use minimal includes for making the headers self-contained. Use
  forward declarations for structs where applicable, and e.g. include
  <linux/types.h> instead of <linux/kernel.h>.

* Only split off the headers, and mostly refrain from doing other
  refactoring while at it. (There are a few minor things.)

* Mostly only split off function declarations. Splitting off types is
  left for follow-up work.

* Include the new headers only where needed. This leads to a lot of
  includes here and there, but on the other hand increases the clarity
  of the relationships between the modules. (And already raises a bunch
  of questions about the split and cross-calls between some
  modules. It'll be easier to analyze this.)

* Wherever adding new includes, group the includes by <linux/...> first,
  then <drm/...>, then "...", and sort the groups alphabetically.

* Choice of what to extract first here is purely arbitrary.

* Follow-up work should consider renaming functions according to the
  module, i.e. functions in intel_foo.c should be prefixed
  intel_foo_. Better naming will be helpful in further organizing the
  driver, as well as grasping the structure to begin with.

BR,
Jani.


Jani Nikula (25):
  drm/i915: make intel_frontbuffer.h self-contained
  drm/i915: extract intel_audio.h from intel_drv.h
  drm/i915: extract intel_crt.h from intel_drv.h
  drm/i915: extract intel_ddi.h from intel_drv.h
  drm/i915: extract intel_connector.h from intel_drv.h
  drm/i915: extract intel_csr.h from intel_drv.h
  drm/i915: extract intel_fbc.h from intel_drv.h
  drm/i915: extract intel_psr.h from intel_drv.h
  drm/i915: extract intel_color.h from intel_drv.h
  drm/i915: extract intel_lspcon.h from intel_drv.h
  drm/i915: extract intel_sdvo.h from intel_drv.h
  drm/i915: extract intel_hdcp.h from intel_drv.h
  drm/i915: extract intel_panel.h from intel_drv.h
  drm/i915: extract intel_pm.h from intel_drv.h
  drm/i915: extract intel_fbdev.h from intel_drv.h
  drm/i915: extract intel_dp.h from intel_drv.h
  drm/i915: extract intel_hdmi.h from intel_drv.h
  drm/i915: extract intel_atomic_plane.h from intel_drv.h
  drm/i915: extract intel_pipe_crc.h from intel_drv.h
  drm/i915: extract intel_tv.h from intel_drv.h
  drm/i915: extract intel_lvds.h from intel_drv.h
  drm/i915: extract intel_dvo.h from intel_drv.h
  drm/i915: extract intel_sprite.h from intel_drv.h
  drm/i915: extract intel_cdclk.h from intel_drv.h
  drm/i915/cdclk: have only one init/uninit function

 drivers/gpu/drm/i915/Makefile.header-test     |  24 +
 drivers/gpu/drm/i915/i915_debugfs.c           |  13 +-
 drivers/gpu/drm/i915/i915_drv.c               |  11 +-
 drivers/gpu/drm/i915/i915_drv.h               |  11 +-
 drivers/gpu/drm/i915/i915_gem.c               |   1 +
 drivers/gpu/drm/i915/i915_irq.c               |  11 +-
 drivers/gpu/drm/i915/i915_pci.c               |   1 +
 drivers/gpu/drm/i915/i915_request.c           |   3 +-
 drivers/gpu/drm/i915/i915_reset.h             |   1 +
 drivers/gpu/drm/i915/i915_suspend.c           |   5 +-
 drivers/gpu/drm/i915/icl_dsi.c                |   6 +-
 drivers/gpu/drm/i915/intel_atomic.c           |   2 +
 drivers/gpu/drm/i915/intel_atomic_plane.c     |  36 +-
 drivers/gpu/drm/i915/intel_atomic_plane.h     |  40 ++
 drivers/gpu/drm/i915/intel_audio.c            |  12 +-
 drivers/gpu/drm/i915/intel_audio.h            |  24 +
 drivers/gpu/drm/i915/intel_cdclk.c            | 121 ++--
 drivers/gpu/drm/i915/intel_cdclk.h            |  46 ++
 drivers/gpu/drm/i915/intel_color.h            |  17 +
 drivers/gpu/drm/i915/intel_connector.c        |   8 +-
 drivers/gpu/drm/i915/intel_connector.h        |  35 ++
 drivers/gpu/drm/i915/intel_crt.c              |   7 +-
 drivers/gpu/drm/i915/intel_crt.h              |  21 +
 drivers/gpu/drm/i915/intel_csr.h              |  17 +
 drivers/gpu/drm/i915/intel_ddi.c              |   9 +
 drivers/gpu/drm/i915/intel_ddi.h              |  53 ++
 drivers/gpu/drm/i915/intel_display.c          |  28 +-
 drivers/gpu/drm/i915/intel_dp.c               |  20 +-
 drivers/gpu/drm/i915/intel_dp.h               | 121 ++++
 drivers/gpu/drm/i915/intel_dp_link_training.c |   1 +
 drivers/gpu/drm/i915/intel_dp_mst.c           |   9 +-
 drivers/gpu/drm/i915/intel_dpio_phy.c         |   1 +
 drivers/gpu/drm/i915/intel_drv.h              | 580 +-----------------
 drivers/gpu/drm/i915/intel_dvo.c              |   9 +-
 drivers/gpu/drm/i915/intel_dvo.h              |  13 +
 drivers/gpu/drm/i915/intel_fbc.c              |   3 +-
 drivers/gpu/drm/i915/intel_fbc.h              |  42 ++
 drivers/gpu/drm/i915/intel_fbdev.c            |  17 +-
 drivers/gpu/drm/i915/intel_fbdev.h            |  53 ++
 drivers/gpu/drm/i915/intel_fifo_underrun.c    |   1 +
 drivers/gpu/drm/i915/intel_frontbuffer.c      |   5 +-
 drivers/gpu/drm/i915/intel_frontbuffer.h      |  10 +
 drivers/gpu/drm/i915/intel_hdcp.h             |  33 +
 drivers/gpu/drm/i915/intel_hdmi.c             |  16 +-
 drivers/gpu/drm/i915/intel_hdmi.h             |  51 ++
 drivers/gpu/drm/i915/intel_lspcon.c           |   5 +-
 drivers/gpu/drm/i915/intel_lspcon.h           |  38 ++
 drivers/gpu/drm/i915/intel_lvds.c             |   8 +-
 drivers/gpu/drm/i915/intel_lvds.h             |  22 +
 drivers/gpu/drm/i915/intel_opregion.c         |   3 +-
 drivers/gpu/drm/i915/intel_panel.c            |   2 +
 drivers/gpu/drm/i915/intel_panel.h            |  65 ++
 drivers/gpu/drm/i915/intel_pipe_crc.h         |  35 ++
 drivers/gpu/drm/i915/intel_pm.c               |   5 +-
 drivers/gpu/drm/i915/intel_pm.h               |  72 +++
 drivers/gpu/drm/i915/intel_psr.c              |  13 +-
 drivers/gpu/drm/i915/intel_psr.h              |  40 ++
 drivers/gpu/drm/i915/intel_runtime_pm.c       |  20 +-
 drivers/gpu/drm/i915/intel_sdvo.c             |  12 +-
 drivers/gpu/drm/i915/intel_sdvo.h             |  23 +
 drivers/gpu/drm/i915/intel_sprite.c           |  16 +-
 drivers/gpu/drm/i915/intel_sprite.h           |  55 ++
 drivers/gpu/drm/i915/intel_tv.c               |   4 +-
 drivers/gpu/drm/i915/intel_tv.h               |  13 +
 drivers/gpu/drm/i915/intel_uncore.c           |   9 +-
 drivers/gpu/drm/i915/vlv_dsi.c                |  10 +-
 66 files changed, 1267 insertions(+), 751 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_atomic_plane.h
 create mode 100644 drivers/gpu/drm/i915/intel_audio.h
 create mode 100644 drivers/gpu/drm/i915/intel_cdclk.h
 create mode 100644 drivers/gpu/drm/i915/intel_color.h
 create mode 100644 drivers/gpu/drm/i915/intel_connector.h
 create mode 100644 drivers/gpu/drm/i915/intel_crt.h
 create mode 100644 drivers/gpu/drm/i915/intel_csr.h
 create mode 100644 drivers/gpu/drm/i915/intel_ddi.h
 create mode 100644 drivers/gpu/drm/i915/intel_dp.h
 create mode 100644 drivers/gpu/drm/i915/intel_dvo.h
 create mode 100644 drivers/gpu/drm/i915/intel_fbc.h
 create mode 100644 drivers/gpu/drm/i915/intel_fbdev.h
 create mode 100644 drivers/gpu/drm/i915/intel_hdcp.h
 create mode 100644 drivers/gpu/drm/i915/intel_hdmi.h
 create mode 100644 drivers/gpu/drm/i915/intel_lspcon.h
 create mode 100644 drivers/gpu/drm/i915/intel_lvds.h
 create mode 100644 drivers/gpu/drm/i915/intel_panel.h
 create mode 100644 drivers/gpu/drm/i915/intel_pipe_crc.h
 create mode 100644 drivers/gpu/drm/i915/intel_pm.h
 create mode 100644 drivers/gpu/drm/i915/intel_psr.h
 create mode 100644 drivers/gpu/drm/i915/intel_sdvo.h
 create mode 100644 drivers/gpu/drm/i915/intel_sprite.h
 create mode 100644 drivers/gpu/drm/i915/intel_tv.h

-- 
2.20.1

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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux