STRUCT VMW_RES_FUNC(9)
hey bestie, welcome to the struct vmw_res_func(9) page from the Kernel API Manual β the group-chat glow-up where every fact still eats. π
πΈ NAME πΈ
struct vmw_res_func β the shared members and functions that are common for a resource type, aka the blueprint energy for the stuff every resource type has in common. periodt. β¨
β¨ SYNOPSIS β¨
hereβs the whole struct, exactly as the page lays it out, no edits, no cap:
struct vmw_res_func {
enum vmw_res_type res_type;
bool needs_guest_memory;
const char *type_name;
u32 domain;
u32 busy_domain;
bool may_evict;
u32 prio;
u32 dirty_prio;
int (*create) (struct vmw_resource *res);
int (*destroy) (struct vmw_resource *res);
int (*bind) (struct vmw_resource *res, struct ttm_validate_buffer
*val_buf);
int (*unbind) (struct vmw_resource *res, bool readback, struct
ttm_validate_buffer *val_buf);
void (*commit_notify)(struct vmw_resource *res, enum
vmw_cmdbuf_res_state state);
int (*dirty_alloc)(struct vmw_resource *res);
void (*dirty_free)(struct vmw_resource *res);
int (*dirty_sync)(struct vmw_resource *res);
void (*dirty_range_add)(struct vmw_resource *res, size_t start,
size_t end);
int (*clean)(struct vmw_resource *res);
};
π Members π
res_typeβ enum that identifies thelrulist to use for eviction. iconic little routing moment. π¦needs_guest_memoryβ whether the resource is guest-backed and needs persistent buffer storage.type_nameβ string that identifies the resource type.domainβ TTM placement for guest memory buffers.busy_domainβ TTM busy placement for guest memory buffers.may_evictβ whether the resource may be evicted.createβ create a hardware resource.destroyβ destroy a hardware resource.bindβ bind a hardware resource to persistent buffer storage.unbindβ unbind a hardware resource from persistent buffer storage.commit_notifyβ if the resource is a command buffer managed resource, callback to notify that a define or remove command has been committed to the device. πdirty_allocβ allocate a dirty tracker.NULLif dirty-tracking is not supported.dirty_freeβ free the dirty tracker.dirty_syncβ upload the dirty mob contents to the resource.cleanβ clean the resource.
heads up, bestie: the struct up top also hasprio,dirty_prio, anddirty_range_add, but the original Members list doesnβt hand them a description here β so Iβm not inventing one. π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h struct vmw_user_resource_conv(9)struct vmw_simple_resource_func(9)struct vmw_simple_resource(9)
xoxo, your struct vmw_res_func(9) bestie β from ./drivers/gpu/drm/vmwgfx, October 2026. slay responsibly πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms