drm/vmwgfx: Implement virtual kms
authorZack Rusin <zack.rusin@broadcom.com>
Fri, 12 Apr 2024 02:55:07 +0000 (22:55 -0400)
committerZack Rusin <zack.rusin@broadcom.com>
Mon, 15 Apr 2024 17:32:18 +0000 (13:32 -0400)
commitcd2eb57df1b8bbac90daad622b2f1ef00640c38c
tree3c833c4ee7afaa845175776844f60e171874fe53
parentbfc7bc539392f681194de341dd2bb9e83f31f588
drm/vmwgfx: Implement virtual kms

By default vmwgfx doesn't support vblanking or crc generation which
makes it impossible to use various IGT tests to validate vmwgfx.
Implement virtual kernel mode setting, which is mainly related to
simulated vblank support.

Code is very similar to amd's vkms and the vkms module itself, except
that it's integrated with vmwgfx three different output technologies -
legacy, screen object and screen targets.

Make IGT's kms_vblank pass on vmwgfx and allows a lot of other IGT
tests to run with vmwgfx.

Support for vkms needs to be manually enabled by adding:
guestinfo.vmwgfx.vkms_enable = "TRUE"
somewhere in the vmx file, otherwise it's off by default.

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-2-zack.rusin@broadcom.com
drivers/gpu/drm/vmwgfx/Makefile
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_ldu.c
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c [new file with mode: 0644]
drivers/gpu/drm/vmwgfx/vmwgfx_vkms.h [new file with mode: 0644]