vmw_view_lookup(9)
π vmw_view_lookup(9) β aka the Kernel API Manual glow-up β¨
okay so bestie, we're in the Kernel API Manual today and the main character of this page is vmw_view_lookup. it's short, it's sweet, it's doing exactly one thing and honestly? respect. π«Ά
β¨ SYNOPSIS β¨
struct vmw_resource * vmw_view_lookup (struct vmw_cmdbuf_res_manager *man , enum vmw_view_type view_type , u32 user_key );
like, look at that signature. it's giving "i have three arguments and i know how to use them." π₯
π ARGUMENTS π
manβ the context's cmdbuf ref manager. yes it's literally namedman, no we're not gonna make it weird, it's just the manager bestie. πview_typeβ the view type. that's it. that's the whole vibe check. π¦user_keyβ the view user id. your little lookup key, your lil finder-print, your iykyk. π
πΈ DESCRIPTION πΈ
okay so here's the tea β β it returns a refcounted pointer to a viewβ¦ or an error pointer if it's not found. π
that's it. that's the whole function. no cap. it goes and looks up a view, and either you get your refcounted pointer (slay π) or you get an error pointer (not slay, but at least it's honest about it π).
β οΈ heads up bestie: the returned pointer is refcounted, so you gotta handle that refcount properly or things get messy. and "error pointer if not found" means check it before you use it β don't just rawdog that return value, fr fr. π
π SEE ALSO π
the kernel file lives at ./drivers/gpu/drm/vmwgfx/vmwgfx_so.c β that's the mothership π β and here's the whole friend group, all present and accounted for, none of them skipped, i would never:
struct vmw_view(9)struct vmw_view_define(9)vmw_view(9)vmw_view_commit_notify(9)vmw_view_create(9)vmw_view_destroy(9)vmw_hw_view_destroy(9)vmw_view_key(9)vmw_view_id_ok(9)vmw_view_res_free(9)vmw_view_add(9)vmw_view_remove(9)vmw_view_cotable_list_destroy(9)vmw_view_surface_list_destroy(9)vmw_view_srf(9)vmw_view_dirtying(9)
you will be clicking through all of these, i fear. but like, in a cute way. π§
and that's the page!! it's from ./drivers/gpu/drm/vmwgfx, dated October 2026 β so yeah, mark your calendars besties, this one's from the future πβ go look up those views, keep those refcounts clean, and stan vmw_view_lookup. periodt. ππ
π¦ 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