drm/vmwgfx: Simplify devcaps code
authorZack Rusin <zackr@vmware.com>
Wed, 9 Jun 2021 17:22:59 +0000 (13:22 -0400)
committerZack Rusin <zackr@vmware.com>
Sat, 12 Jun 2021 04:00:48 +0000 (00:00 -0400)
commitd92223ead97cd697abe76c5b7a78160d6910a90d
tree473c4b210f3c40dc8aaaf0767d4d5d59f0a23dc2
parentab6f24b404c92505e82cc172d780df8f338f1d06
drm/vmwgfx: Simplify devcaps code

Make devcaps code self-contained so that it's easier to cache
and operate on them.
As the number of devcaps got bigger the code dealing with them
got more and more tricky. Lets create a central place to deal
with all the complexity. This lets us remove the lock we used
to require to deal with register write races because we only
read the devcaps at initialization.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210609172307.131929-2-zackr@vmware.com
drivers/gpu/drm/vmwgfx/Makefile
drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c
drivers/gpu/drm/vmwgfx/vmwgfx_devcaps.c [new file with mode: 0644]
drivers/gpu/drm/vmwgfx/vmwgfx_devcaps.h [new file with mode: 0644]
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c