drm/vmwgfx: Implement virtual crc generation
authorZack Rusin <zack.rusin@broadcom.com>
Fri, 12 Apr 2024 02:55:08 +0000 (22:55 -0400)
committerZack Rusin <zack.rusin@broadcom.com>
Mon, 15 Apr 2024 17:32:45 +0000 (13:32 -0400)
commit7b0062036c3b71b4a69e244ecf0502c06c4cf5f0
tree2428c3917acf731097d295ffb7d2538c73d79271
parentcd2eb57df1b8bbac90daad622b2f1ef00640c38c
drm/vmwgfx: Implement virtual crc generation

crc checksums are used to validate the output. Normally they're part
of the actual display hardware but on virtual stack there's nothing
to automatically generate them.

Implement crc generation for the vmwgfx stack. This works only on
screen targets, where it's possibly to easily make sure that the
guest side contents of the surface matches the host sides output.

Just like the vblank support, crc generation can only be enabled via:
guestinfo.vmwgfx.vkms_enable = "TRUE"
option in the vmx file.

Makes IGT's kms_pipe_crc_basic pass and allows a huge number of other
IGT tests which require CRC generation of the output to actually run
on vmwgfx. Makes it possible to actually validate a lof of the kms and
drm functionality with vmwgfx.

Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Acked-by: Martin Krastev <martin.krastev@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240412025511.78553-3-zack.rusin@broadcom.com
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c
drivers/gpu/drm/vmwgfx/vmwgfx_vkms.h