pvr_device_a...ze_are_valid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pvr_device_a...ze_are_valid(9) πŸ’…

Okay so bestie, welcome to the Kernel API Manual β€” this one's about pvr_device_addr_and_size_are_valid, and like… the name literally spoils the whole plot but stay with me, it's actually a cute little corner-case baddie πŸŽ€


✨ NAME ✨

pvr_device_addr_and_size_are_valid β€” it's the vibe-check function that tests whether a device-virtual address and its associated size are both valid. Two-for-one. A little duo. Periodt πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

bool pvr_device_addr_and_size_are_valid (struct pvr_vm_context *vm_ctx ,
u64 device_addr , u64 size );

🌸 ARGUMENTS 🌸

  • vm_ctx β€” the target VM context. Like, the whole scene this function is operating in, y'know? πŸ’œ
  • device_addr β€” the virtual device address you want to test, bestie.
  • size β€” the size of the range based at device_addr that you're testing. It's giving "how much are we checking here" energy ✨

🧚 DESCRIPTION 🧚

So here's the tea β˜• β€” the obvious move is to call pvr_device_addr_is_valid twice: once on size, and again on device_addr + size. And honestly? It seems intuitive. Like, it lowkey looks correct. But it's NOT, because it produces a false-negative when the address range is right at the end of device-virtual address space πŸ˜­πŸ’€

This function catches that corner case β€” it's the main character that swoops in β€” and it also checks that size is non-zero. Two jobs. One icon πŸ‘‘


πŸ”₯ RETURN πŸ”₯

  • true if device_addr is device page aligned; and size is device page aligned; and the range specified by device_addr and size is within the bounds of the device-virtual address space; and size is non-zero β€” like, all four, no skipping, okay? β€” or
  • false otherwise 🫢

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/imagination/pvr_vm.c β€” and honestly the whole friend group:


Fr fr, that's the whole page. No cap. The address-range girly is valid or she isn't, and now you know exactly what "valid" means in this context πŸ’…

And that's a wrap, bestie! πŸŽ€ This gem came to you straight from ./drivers/gpu/drm/imagination and it's dated October 2026 β€” bookmark it, screenshot it, put it on your vision board 🌟 byeee πŸ¦‹πŸ’–

πŸ“¦ where this page comes from