drm_pagemap_...he_if_active(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

Okay bestie, so this whole page is about drm_pagemap_get_from_cache_if_active β€” like, the actual page title is drm_pagemap_get_from_cache_if_active(9) and it lives in the Kernel API Manual, section 9 (that's the kernel-functions girlies, iykyk). And what does it do? It's your quick little lookup for drm_pagemaps that are, y'know, active. That's the whole vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_pagemap * drm_pagemap_get_from_cache_if_active (struct
       drm_pagemap_cache *cache );

Like, it hands you back a struct drm_pagemap * and it only wants one thing: a cache. That's it. Low maintenance icon behavior. πŸŽ€


🌸 DESCRIPTION 🌸

So this is the function you reach for when you wanna look up a drm_pagemap that is already active β€” meaning its refcount is > 0. Not 0. Not negative (obvs). Strictly greater than zero. No cap.

Basically: if it's already popping off, this function will find it for you. If it's not active, don't @ it, because it won't come back with anything. πŸ™ˆ


πŸ“ ARGUMENTS πŸ“

  • cache β€” the cache you're looking up from. That's the one. The only one. She's the source of truth for this whole operation. πŸ’–

⭐ RETURN ⭐

  • A pointer to the cache's drm_pagemap if it's active β€” slay, you got her. πŸ‘‘
  • NULL otherwise β€” like, the pagemap isn't active, so there's literally nothing to return. πŸ’€

🌈 SEE ALSO 🌈

The kernel file that this all lives in is ./drivers/gpu/drm/drm_pagemap_util.c, and honestly the whole friend group is here, so let's do the roll call fr fr:

Go read them. All of them. Main character research arc. 🧚


Quick vibe check before you go: this page is filed under ./drivers/gpu/drm, dated October 2026, and yes those are the source and date from the footer of the original β€” so when you cite this at 2am in the group chat, you're being accurate. Periodt. πŸ«ΆπŸ’œ
πŸ“¦ where this page comes from