STRUCT VMW_RES_FUNC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 the lru list 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. NULL if 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 has prio, dirty_prio, and dirty_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