Skip to content

cirrus: Modernize the cirrus driver

Thomas Zimmermann dri-devel virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17drm/cirrus: Compute blit destination offset in single locationdrivers/gpu/drm/tiny/cirrus.c+1 -30 replies
2/17drm/cirrus: Replace cpp value with formatdrivers/gpu/drm/tiny/cirrus.c+26 -240 replies
3/17drm/cirrus: Use drm_fb_blit() to update scanout bufferdrivers/gpu/drm/tiny/cirrus.c+1 -140 replies
4/17drm/cirrus: Move drm_dev_{enter, exit}() into DRM helpersdrivers/gpu/drm/tiny/cirrus.c+13 -180 replies
5/17drm/cirrus: Split cirrus_mode_set() into smaller functionsdrivers/gpu/drm/tiny/cirrus.c+38 -250 replies
6/17drm/cirrus: Integrate connector into pipeline codedrivers/gpu/drm/tiny/cirrus.c+38 -420 replies
7/17drm/cirrus: Move primary-plane format arraysdrivers/gpu/drm/tiny/cirrus.c+14 -140 replies
8/17drm/cirrus: Convert to regular atomic helpersdrivers/gpu/drm/tiny/cirrus.c+138 -640 replies
9/17drm/cirrus: Enable damage clipping on primary planedrivers/gpu/drm/tiny/cirrus.c+7 -30 replies
10/17drm/cirrus: Inline cirrus_fb_blit_rect()drivers/gpu/drm/tiny/cirrus.c+6 -160 replies
11/17drm/cirrus: Remove format test from cirrus_fb_create()drivers/gpu/drm/tiny/cirrus.c+0 -40 replies
12/17drm/cirrus: Remove size test from cirrus_fb_create()drivers/gpu/drm/tiny/cirrus.c+1 -100 replies
13/17drm/cirrus: Test mode against video-memory size in device-wide mode_validdrivers/gpu/drm/tiny/cirrus.c+13 -100 replies
14/17drm/cirrus: Inline cirrus_check_size() into primary-plane atomic_checkdrivers/gpu/drm/tiny/cirrus.c+10 -160 replies
15/17drm/cirrus: Introduce struct cirrus_primary_plane_statedrivers/gpu/drm/tiny/cirrus.c+58 -10 replies
16/17drm/cirrus: Store HW format/pitch in primary-plane statedrivers/gpu/drm/tiny/cirrus.c+31 -200 replies
17/17drm/cirrus: Use VGA macro constants to unblankdrivers/gpu/drm/tiny/cirrus.c+1 -110 replies

Reviews trailers per patch

1 of 17 patches has a Reviewed-by or Acked-by.

PatchGerd Hoffmann
1/17
2/17
3/17
4/17
5/17
6/17
7/17
8/17
9/17
10/17
11/17
12/17
13/17
14/17
15/17
16/17
17/17A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/17] cirrus: Modernize the cirrus driver

Update the cirrus driver to follow current best practices. While the driver's hardware is obsolete, the cirrus driver is still one of the go-to modules to learn about writing a DRM driver. So keep it in good shape.

Patches 1 to 3 simplify blitting and convert it to the DRM's current helpers.

Patches 4 to 8 replace simple-KMS helpers with DRM's regular atomic helpers. The former are midlayers on top of the latter, and should be replaced entirely.

Patches 9 and 10 further improve blitting. This enables damage clipping for userspace and the console. Until now, cirrus' mandatory fullscreen updates have added unnecessary overhead to every screen update.

Patches 11 to 14 simplify mode and framebuffer tests. With the use of regular helpers, these tests can now be implemented in the places they belong.

Patches 15 and 16 move hardware color format and pitch into plane state of the primary plane. These fields have been kept in the device structure itself, where thy don't belong.

Patch 17 replaces two magic values by macro constants. There are more such cases within cirrus, but those two values stuck out as specifically hard to interpret.

Tested with qemu's cirrus emulation.

Thomas Zimmermann (17):
drm/cirrus: Compute blit destination offset in single location drm/cirrus: Replace cpp value with format
drm/cirrus: Use drm_fb_blit() to update scanout buffer drm/cirrus: Move drm_dev_{enter,exit}() into DRM helpers drm/cirrus: Split cirrus_mode_set() into smaller functions drm/cirrus: Integrate connector into pipeline code drm/cirrus: Move primary-plane format arrays
drm/cirrus: Convert to regular atomic helpers
drm/cirrus: Enable damage clipping on primary plane drm/cirrus: Inline cirrus_fb_blit_rect()
drm/cirrus: Remove format test from cirrus_fb_create() drm/cirrus: Remove size test from cirrus_fb_create() drm/cirrus: Test mode against video-memory size in device-wide
mode_valid
drm/cirrus: Inline cirrus_check_size() into primary-plane atomic_check drm/cirrus: Introduce struct cirrus_primary_plane_state drm/cirrus: Store HW format/pitch in primary-plane state drm/cirrus: Use VGA macro constants to unblank

 drivers/gpu/drm/tiny/cirrus.c | 499 +++++++++++++++++++++-------------
 1 file changed, 305 insertions(+), 194 deletions(-)
Signature · 1 line
2.39.1