[PATCH v3 00/14] drm/mgag200: Move model-specific code into separate functions

Thomas Zimmermann tzimmermann at suse.de
Thu Jul 28 12:40:49 UTC 2022


Mgag200 still mixes model-specific code and generic code in the same
functions. Separate it into distinct helpers.

As part of this effort, convert the driver from simple-KMS helpers
to regular atomic helpers. The latter are way more flexible and can
be adapted easily for each hardware model.

Tested on Matrox G200 and G200EH hardware.

v3:
	* only flip SCROFF when enabling/disable the plane (Jocelyn)
	* style clean-ups throughout the patchset
v2:
	* don't duplicate DAC init values unecessarily (Sam, Jocelyn)

Thomas Zimmermann (14):
  drm/mgag200: Split mgag200_modeset_init()
  drm/mgag200: Move DAC-register setup into model-specific code
  dmr/mgag200: Move ER/EW3 register initialization to per-model code
  drm/mgag200: Acquire I/O-register lock in atomic_commit_tail function
  drm/mgag200: Store primary plane's color format in CRTC state
  drm/mgag200: Reorganize before dropping simple-KMS helpers
  drm/mgag200: Replace simple-KMS with regular atomic helpers
  drm/mgag200: Set SCROFF in primary-plane code
  drm/mgag200: Add per-device callbacks
  drm/mgag200: Provide per-device callbacks for BMC synchronization
  drm/mgag200: Provide per-device callbacks for PIXPLLC
  drm/mgag200: Move mode-config to model-specific code
  drm/mgag200: Move CRTC atomic_enable to model-specific code
  drm/mgag200: Remove type field from struct mga_device

 drivers/gpu/drm/mgag200/Makefile          |   4 +-
 drivers/gpu/drm/mgag200/mgag200_bmc.c     |  99 +++
 drivers/gpu/drm/mgag200/mgag200_drv.c     |  21 +-
 drivers/gpu/drm/mgag200/mgag200_drv.h     | 208 ++++-
 drivers/gpu/drm/mgag200/mgag200_g200.c    | 254 +++++-
 drivers/gpu/drm/mgag200/mgag200_g200eh.c  | 277 +++++-
 drivers/gpu/drm/mgag200/mgag200_g200eh3.c | 181 +++-
 drivers/gpu/drm/mgag200/mgag200_g200er.c  | 315 ++++++-
 drivers/gpu/drm/mgag200/mgag200_g200ev.c  | 316 ++++++-
 drivers/gpu/drm/mgag200/mgag200_g200ew3.c | 192 ++++-
 drivers/gpu/drm/mgag200/mgag200_g200se.c  | 431 +++++++++-
 drivers/gpu/drm/mgag200/mgag200_g200wb.c  | 326 ++++++-
 drivers/gpu/drm/mgag200/mgag200_mode.c    | 725 +++++-----------
 drivers/gpu/drm/mgag200/mgag200_pll.c     | 997 ----------------------
 14 files changed, 2761 insertions(+), 1585 deletions(-)
 create mode 100644 drivers/gpu/drm/mgag200/mgag200_bmc.c
 delete mode 100644 drivers/gpu/drm/mgag200/mgag200_pll.c


base-commit: 15fbed4f822211fbb7653c2b8591594d92de9551
-- 
2.37.1



More information about the dri-devel mailing list