v4l2_phys_addr_validate(9)
π v4l2_phys_addr_validate β the vibe check for EDID physical addresses β¨
okay so bestie, this is a page from the Kernel API Manual, and it's literally all about v4l2_phys_addr_validate(9). yes the function name is a mouthful, no we're not changing it. sit down, grab a strawberry π, and let's get into it.
πΈ NAME πΈ
v4l2_phys_addr_validate β validate a physical address from an EDID
like, it checks that the PA is actually valid. that's the whole job. main character energy honestly π
β¨ SYNOPSIS β¨
int v4l2_phys_addr_validate (u16 phys_addr , u16 *parent , u16 *port );
three args, one int back. iconic. π
π ARGUMENTS π
phys_addrβ the physical address you want to validate. the star of the show.parentβ if it's notNULL, then this gets filled with the parent's PA. (yes, PA = physical address, keep up bestie π«Ά)portβ if it's notNULL, then this gets filled with the input port. same deal.
ngl if you passNULLforparentorportthat's totally fine β they just get skipped. no cap.
π¦ DESCRIPTION π¦
so what this does is it validates a physical address as read from an EDID. and here's the tea β: if the PA is invalid β like, say, 1.0.1.0, because '0' is only allowed at the end β then it's gonna return -EINVAL. periodt. π
the parent PA gets passed into parent, and the input port gets passed into port. for example, and honestly these examples ate:
PA = 0.0.0.0: has parent0.0.0.0and input port0.PA = 1.0.0.0: has parent0.0.0.0and input port1.PA = 3.2.0.0: has parent3.0.0.0and input port2.PA = f.f.f.f: has parentf.f.f.fand input port0.
look at that consistency. we love to see it. π
π₯ RETURN π₯
0if the PA is valid π-EINVALif not π
that's it. two outcomes. lowkey refreshing.
π SEE ALSO π
the kernel file lives right here, fr fr:
./drivers/media/v4l2-core/v4l2-dv-timings.c
and these besties are all in the same friend group:
v4l2_match_dv_timings(9)v4l2_num_edid_blocks(9)v4l2_get_edid_phys_addr(9)v4l2_set_edid_phys_addr(9)v4l2_phys_addr_for_input(9)
π§ sign-off π§
this little beauty comes to you from ./drivers/media/v4l2-core, dated October 2026, and it's the v4l2_phys_addr_validate(9) page from the Kernel API Manual. go validate something. slay. ππΈ
ok that's the whole page, you're welcome, iykyk β¨π«Ά
π¦ 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