[PATCH 00/17] cirrus: Modernize the cirrus driver
Thomas Zimmermann
tzimmermann at suse.de
Wed Feb 15 16:15:00 UTC 2023
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(-)
--
2.39.1
More information about the dri-devel
mailing list