Split ast_device_create() and its helpers into individual helpers
for each supported hardware generation. Adds some duplicated code,
but simplifies maintenance and support of additional hardware.

Patches 1 to 4 move some code around and prepare for the split.

Patches 5 to 11 each add device initialization for a hardware
generation. The code is duplicated from existing code and stripped
from unnecesary calls. More specialization is possible in later
patches.

Patch 12 removes the original, now unused, code.

Tested on AST2100, AST2300, AST2500 and AST2600.

v2:
- clean up the widescreen-detection logic (Jocelyn)

Thomas Zimmermann (12):
  drm/ast: Move display-clock tables to per-Gen source files
  drm/ast: Move mode-detection helpers to Gen2 source files
  drm/ast: Split ast_detect_tx_chip() per chip generation
  drm/ast: Prepare per-Gen device initialization
  drm/ast: Move Gen1 device initialization into separate helper
  drm/ast: Move Gen2 device initialization into separate helper
  drm/ast: Move Gen3 device initialization into separate helper
  drm/ast: Move Gen4 device initialization into separate helper
  drm/ast: Move Gen5 device initialization into separate helper
  drm/ast: Move Gen6 device initialization into separate helper
  drm/ast: Move Gen7 device initialization into separate helper
  drm/ast: Remove generic device initialization

 drivers/gpu/drm/ast/Makefile     |   3 +-
 drivers/gpu/drm/ast/ast_2000.c   | 101 ++++++++++++
 drivers/gpu/drm/ast/ast_2100.c   |  85 ++++++++++
 drivers/gpu/drm/ast/ast_2200.c   |  85 ++++++++++
 drivers/gpu/drm/ast/ast_2300.c   | 128 +++++++++++++++
 drivers/gpu/drm/ast/ast_2400.c   |  93 +++++++++++
 drivers/gpu/drm/ast/ast_2500.c   |  98 +++++++++++
 drivers/gpu/drm/ast/ast_2600.c   |  63 ++++++++
 drivers/gpu/drm/ast/ast_drv.c    |  67 +++++++-
 drivers/gpu/drm/ast/ast_drv.h    |  75 ++++++++-
 drivers/gpu/drm/ast/ast_main.c   | 268 -------------------------------
 drivers/gpu/drm/ast/ast_mode.c   |   4 +-
 drivers/gpu/drm/ast/ast_tables.h |  60 -------
 13 files changed, 788 insertions(+), 342 deletions(-)
 create mode 100644 drivers/gpu/drm/ast/ast_2200.c
 create mode 100644 drivers/gpu/drm/ast/ast_2400.c
 delete mode 100644 drivers/gpu/drm/ast/ast_main.c

-- 
2.51.0

Reply via email to