Skip to content

drm/mgag200: Convert to atomic modesetting

Thomas Zimmermann dri-devel oe-lkp 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest15 patches 8 repliesIn review
  2. v215 patches 14 repliesSuperseded
  3. v117 patches 37 repliesSuperseded

Changes in v3 from the cover letter

* update commit messages
* remove unused defines

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15drm/mgag200: Remove HW cursordrivers/gpu/drm/mgag200/Makefile drivers/gpu/drm/mgag200/mgag200_drv.h drivers/gpu/drm/mgag200/mgag200_main.c +1 more+1 -210 replies
2/15drm/mgag200: Clean up mga_set_start_address()drivers/gpu/drm/mgag200/mgag200_drv.h drivers/gpu/drm/mgag200/mgag200_mode.c+53 -340 replies
3/15drm/mgag200: Clean up mga_crtc_do_set_base()drivers/gpu/drm/mgag200/mgag200_mode.c+9 -90 replies
4/15drm/mgag200: Move mode-setting code into separate helper functiondrivers/gpu/drm/mgag200/mgag200_mode.c+78 -620 replies
5/15drm/mgag200: Split MISC register update into PLL selection, SYNC and I/Odrivers/gpu/drm/mgag200/mgag200_mode.c drivers/gpu/drm/mgag200/mgag200_reg.h+31 -138 replies
6/15drm/mgag200: Update mode registers after plane registersdrivers/gpu/drm/mgag200/mgag200_mode.c+2 -20 replies
7/15drm/mgag200: Set pitch in a separate helper functiondrivers/gpu/drm/mgag200/mgag200_mode.c drivers/gpu/drm/mgag200/mgag200_reg.h+45 -140 replies
8/15drm/mgag200: Set primary plane's format in separate helper functiondrivers/gpu/drm/mgag200/mgag200_mode.c+69 -400 replies
9/15drm/mgag200: Move TAGFIFO reset into separate functiondrivers/gpu/drm/mgag200/mgag200_drv.h drivers/gpu/drm/mgag200/mgag200_mode.c drivers/gpu/drm/mgag200/mgag200_reg.h+38 -160 replies
10/15drm/mgag200: Move hiprilvl setting into separate functionsdrivers/gpu/drm/mgag200/mgag200_mode.c+54 -440 replies
11/15drm/mgag200: Move register initialization into separate functiondrivers/gpu/drm/mgag200/mgag200_mode.c+147 -1140 replies
12/15drm/mgag200: Remove out-commented suspend/resume helpersdrivers/gpu/drm/mgag200/mgag200_drv.h drivers/gpu/drm/mgag200/mgag200_mode.c+0 -720 replies
13/15drm/mgag200: Use simple-display data structuresdrivers/gpu/drm/mgag200/mgag200_drv.h drivers/gpu/drm/mgag200/mgag200_mode.c+8 -350 replies
14/15drm/mgag200: Convert to simple KMS helperdrivers/gpu/drm/mgag200/mgag200_drv.c drivers/gpu/drm/mgag200/mgag200_mode.c+164 -1520 replies
15/15drm/mgag200: Replace VRAM helpers with SHMEM helpersdrivers/gpu/drm/mgag200/Kconfig drivers/gpu/drm/mgag200/mgag200_drv.c drivers/gpu/drm/mgag200/mgag200_drv.h +2 more+56 -880 replies

Reviews trailers per patch

All 15 patches have a Reviewed-by or Acked-by.

PatchJohn DonnellySam RavnborgEmil Velikov
1/15T-b A-b A-b
2/15T-b A-b A-b
3/15T-b A-b A-b
4/15T-b A-b A-b
5/15T-b A-b A-b
6/15T-b A-b A-b
7/15T-b A-b A-b
8/15T-b A-b A-b
9/15T-b A-b A-b
10/15T-b A-b A-b
11/15T-b A-b A-b
12/15T-b A-b A-b
13/15T-b A-b A-b
14/15T-b A-b A-b
15/15T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/15] drm/mgag200: Convert to atomic modesetting

This patchset converts mgag200 to atomic modesetting. It uses simple KMS helpers and SHMEM. I'm posting v3 mostly for reference. These patches will land soon if no one objects.

Patch 1 removes cursor support. The HW cursor is not usable with the way universal planes work.

Patches 2 to 11 untangle the existing modesetting code into smaller functions. Specifically, mode setting and plane updates are being separated from each other.

Patch 12 to 14 convert mgag200 to simple KMS helpers and enables atomic mode setting.

Atomically switching plane framebuffers, requires either source or target buffer to be located at a non-0 offet. As some HW revisions seem to require a framebuffer offset of 0 within the video memory, they do not work with atomic modesetting. To resolve this problem, patch 15 converts mgag200 from VRAM helpers to SHMEM helpers. During plane updates, the content of the SHMEM BO is memcpy'd to VRAM. From my observation, performance is not nuch different from the original code.

The patchset has been tested on MGA G200EH hardware.

v3:
* update commit messages
* remove unused defines
v2:
* rebase patchset
* replace uint{8,32}_t with u{8,32} through-out patchset
* define additional register constants
* use helper functions around bpp-shift computations
* split conversion patch
* keep busy-waiting in DPMS code
* cleanups

Thomas Zimmermann (15):
drm/mgag200: Remove HW cursor
drm/mgag200: Clean up mga_set_start_address() drm/mgag200: Clean up mga_crtc_do_set_base()
drm/mgag200: Move mode-setting code into separate helper function drm/mgag200: Split MISC register update into PLL selection, SYNC and

    I/O

drm/mgag200: Update mode registers after plane registers drm/mgag200: Set pitch in a separate helper function drm/mgag200: Set primary plane's format in separate helper function drm/mgag200: Move TAGFIFO reset into separate function drm/mgag200: Move hiprilvl setting into separate functions drm/mgag200: Move register initialization into separate function drm/mgag200: Remove out-commented suspend/resume helpers drm/mgag200: Use simple-display data structures drm/mgag200: Convert to simple KMS helper
drm/mgag200: Replace VRAM helpers with SHMEM helpers

 drivers/gpu/drm/mgag200/Kconfig        |   4 +-
 drivers/gpu/drm/mgag200/Makefile       |   2 +-
 drivers/gpu/drm/mgag200/mgag200_drv.c  |  51 +-
 drivers/gpu/drm/mgag200/mgag200_drv.h  |  45 +-
 drivers/gpu/drm/mgag200/mgag200_main.c |   5 -
 drivers/gpu/drm/mgag200/mgag200_mode.c | 871 ++++++++++++++-----------
 drivers/gpu/drm/mgag200/mgag200_reg.h  |  11 +-
 drivers/gpu/drm/mgag200/mgag200_ttm.c  |  28 +-
 8 files changed, 528 insertions(+), 489 deletions(-)

--
2.26.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel