summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2021-06-09 20:22:59 +0300
committerZack Rusin <zackr@vmware.com>2021-06-12 07:00:48 +0300
commitd92223ead97cd697abe76c5b7a78160d6910a90d (patch)
tree473c4b210f3c40dc8aaaf0767d4d5d59f0a23dc2 /drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
parentab6f24b404c92505e82cc172d780df8f338f1d06 (diff)
downloadlinux-d92223ead97cd697abe76c5b7a78160d6910a90d.tar.xz
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
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.h')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index d1cef3b69e9d..4c2afe9c0505 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -513,7 +513,6 @@ struct vmw_private {
bool has_gmr;
bool has_mob;
spinlock_t hw_lock;
- spinlock_t cap_lock;
bool assume_16bpp;
enum vmw_sm_type sm_type;
@@ -629,6 +628,8 @@ struct vmw_private {
/* Validation memory reservation */
struct vmw_validation_mem vvm;
+
+ uint32 *devcaps;
};
static inline struct vmw_surface *vmw_res_to_srf(struct vmw_resource *res)