Skip to content

Commit 485d98d

Browse files
Martin Krastevzackr
Martin Krastev
authored andcommitted
drm/vmwgfx: Add support for CursorMob and CursorBypass 4
* Add support for CursorMob * Add support for CursorBypass 4 * Refactor vmw_du_cursor_plane_atomic_update to be kms-helper-atomic -- move BO mappings to vmw_du_cursor_plane_prepare_fb -- move BO unmappings to vmw_du_cursor_plane_cleanup_fb Cursor mobs are a new svga feature which enables support for large cursors, e.g. large accessibility cursor on platforms with vmwgfx. It also cleans up the cursor code and makes it more uniform with the rest of modern guest backed objects support. Signed-off-by: Martin Krastev <[email protected]> Reviewed-by: Zack Rusin <[email protected]> Reviewed-by: Maaz Mombasawala <[email protected]> Signed-off-by: Zack Rusin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f28dd50 commit 485d98d

File tree

7 files changed

+382
-104
lines changed

7 files changed

+382
-104
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0 OR MIT
22
/**************************************************************************
33
*
4-
* Copyright 2009-2016 VMware, Inc., Palo Alto, CA., USA
4+
* Copyright 2009-2022 VMware, Inc., Palo Alto, CA., USA
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a
77
* copy of this software and associated documentation files (the

drivers/gpu/drm/vmwgfx/vmwgfx_drv.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
22
/**************************************************************************
33
*
4-
* Copyright 2009-2021 VMware, Inc., Palo Alto, CA., USA
4+
* Copyright 2009-2022 VMware, Inc., Palo Alto, CA., USA
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a
77
* copy of this software and associated documentation files (the
@@ -101,6 +101,7 @@ struct vmw_fpriv {
101101
* struct vmw_buffer_object - TTM buffer object with vmwgfx additions
102102
* @base: The TTM buffer object
103103
* @res_tree: RB tree of resources using this buffer object as a backing MOB
104+
* @base_mapped_count: ttm BO mapping count; used by KMS atomic helpers.
104105
* @cpu_writers: Number of synccpu write grabs. Protected by reservation when
105106
* increased. May be decreased without reservation.
106107
* @dx_query_ctx: DX context if this buffer object is used as a DX query MOB
@@ -111,6 +112,9 @@ struct vmw_fpriv {
111112
struct vmw_buffer_object {
112113
struct ttm_buffer_object base;
113114
struct rb_root res_tree;
115+
/* For KMS atomic helpers: ttm bo mapping count */
116+
atomic_t base_mapped_count;
117+
114118
atomic_t cpu_writers;
115119
/* Not ref-counted. Protected by binding_mutex */
116120
struct vmw_resource *dx_query_ctx;

0 commit comments

Comments
 (0)