drm_prime_gem_destroy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_prime_gem_destroy(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” yes that's the manual name, we're in kernel-land now, put your hair up πŸŽ€. This page is drm_prime_gem_destroy(9) and honestly? It's the cleanup queen of the PRIME world. She's not glamorous, she's necessary. 🫢


✨ NAME ✨

drm_prime_gem_destroy β€” the helper that cleans up a PRIME-imported GEM object. literally just the "okay we're done here, tidy up bestie" function πŸ’…


🌸 SYNOPSIS 🌸

void drm_prime_gem_destroy (struct drm_gem_object *obj , struct sg_table *sg );

no cap, that's the whole vibe. returns void, takes two pointers, does the cleanup. periodt.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • obj β€” the GEM object which was created from a dma-buf. like, this is the baby that got born from an import, and now it's time to say goodbye 😭
  • sg β€” the sg-table which was pinned at import time. yes, pinned. it's been holding on since day one, and now you're releasing it. iconic behavior honestly.

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea β˜•: this is the cleanup function that GEM drivers need to call when they use drm_gem_prime_import or drm_gem_prime_import_dev to import dma-bufs.

that's it. that's the whole description. she's a one-job girlie and she does her job. if you imported it, you gotta call this to clean it up β€” main character energy, but make it memory management. πŸ”₯

fr fr though: GEM drivers need to call this when they use those two import functions. not optional. not a suggestion. it's giving responsibility. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

bestie, the reference list is long and we're not skipping a single one, because every link is a friend of the family πŸ’–:

like, go read all of them. iykyk. 🌈


okay that's the whole page, mwah πŸ’‹ β€” this one lives in ./drivers/gpu/drm and the version/date on the tin says October 2026, so mark your calendars bestie, and go free that memory. slay. βœ¨πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from