]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/cirrus-qemu: Use framebuffer format as-is, drop adjustments
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 28 Mar 2025 09:17:07 +0000 (10:17 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 1 Apr 2025 13:35:12 +0000 (15:35 +0200)
commit9efd2cfc84ba7a98cc798da7186d13137fda58ba
treedb922661c0dcbf0acc9d138906c810bf3fb3fb85
parent1eb4d744fb86199f0f6da9463d83ed3eec2f61bf
drm/cirrus-qemu: Use framebuffer format as-is, drop adjustments

Remove internal adjustments to framebuffer format from cirrus-qemu
driver. The driver did this to support higher resolutions by reducing
the per-pixel memory consumption. DRM has a policy of exporting formats
as they are implemented in hardware. So avoid internal adjustments if
possible.

Also remove the call to drm_fb_blit() from cirrus-qemu. The helper
is useful if source and destination format are not known beforehand.
This is not the case for cirrus-qemu.

This change effectively reduces the maximum available resolution to
800x600 at 32 bpp. A maximum scanline pitch of 4095 byte prevents
1024 pixels per scanline at 32 bpp. Higher resolutions are possible
at lower bit depths, but are currently not supported by userspace.

When cirrus-qemu currently reduced the internal bit depth to support
higher resolutions, it trades resolution for bit depth and CPU time.
Converting from 32-bit colors has a significant runtime overhead, as
outlined at [1]. Avoiding color-format adjustments also avoids this
tradeoff.

v2:
- expand commit message (Gerd)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://lore.kernel.org/dri-devel/20250325110407.81107-1-tzimmermann@suse.de/
Link: https://lore.kernel.org/r/20250328091821.195061-4-tzimmermann@suse.de
drivers/gpu/drm/tiny/cirrus-qemu.c