drm/vkms: Add support for writeback
authorRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Sun, 30 Aug 2020 14:20:00 +0000 (10:20 -0400)
committerRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Mon, 7 Sep 2020 21:03:48 +0000 (17:03 -0400)
commitdbd9d80c1b2e033d5ec2d00add89a4f18f6899eb
tree98285fd14de60b7ce98130796ddc9009d3e3c25c
parent60cc20214cedaa5128005a6ccf38c4f37242cf5b
drm/vkms: Add support for writeback

This patch implements the necessary functions to add writeback support
for vkms. This feature is useful for testing compositors if you don't
have hardware with writeback support.

Change in V4 (Emil and Melissa):
- Move signal completion above drm_crtc_add_crc_entry()
- Make writeback always available
- Use appropriate namespace
- Drop fb check in vkms_wb_atomic_commit
- Make vkms_set_composer visible for writeback code
- Enable composer operation on prepare_job and disable it on cleanup_job
- Drop extra space at the end of the file
- Rebase

Change in V3 (Daniel):
- If writeback is enabled, compose everything into the writeback buffer
instead of CRC private buffer
- Guarantees that the CRC will match exactly what we have in the
writeback buffer.

Change in V2:
- Rework signal completion (Brian)
- Integrates writeback with active_planes (Daniel)
- Compose cursor (Daniel)

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200830142000.146706-4-rodrigosiqueiramelo@gmail.com
drivers/gpu/drm/vkms/Makefile
drivers/gpu/drm/vkms/vkms_composer.c
drivers/gpu/drm/vkms/vkms_drv.h
drivers/gpu/drm/vkms/vkms_output.c
drivers/gpu/drm/vkms/vkms_writeback.c [new file with mode: 0644]