drm_kunit_d...from_cea_vic(9)
β¨ drm_kunit_display_mode_from_cea_vic β¨
okay so bestie, welcome to the Kernel API Manual π β this one's a lil helper from the DRM KUnit corner of the kernel, and honestly? it's giving "tiny function, big main character energy". let's get into it π
πΈ NAME πΈ
drm_kunit_display_mode_from_cea_vic β return a mode for CEA VIC for a KUnit test
like, that's literally the whole job. it hands you a display mode. for a test. slay π
π¦ SYNOPSIS π¦
struct drm_display_mode * drm_kunit_display_mode_from_cea_vic (struct
kunit *test , struct drm_device *dev , u8 video_code );
yes she's a function returning a struct drm_display_mode *, and yes you pass her three things. keep scrolling for the tea β
π ARGUMENTS π
testβ the test context object π§ͺ like, the whole vibe of the test lives in heredevβ the DRM device π₯οΈ the actual star of the showvideo_codeβ the CEA VIC of the mode ποΈ it's au8, it's iconic, it picks which mode you get
π₯ DESCRIPTION π₯
so what does she do? she creates a new mode matching the specified CEA VIC, specifically for a KUnit test β¨ that's it, that's the function.
and the best part? resources will be cleaned up automatically π«Ά no manual teardown, no crying over leaked memory, no "not me forgetting to free the thing" moments. she handles it. periodt.
π RETURN π
a new drm_display_mode on success π or NULL on failure π (yes, always check. always. ngl it's the bare minimum).
π SEE ALSO π
kernel file: ./drivers/gpu/drm/tests/drm_kunit_helpers.c π
and her besties, the whole friend group, fr fr:
drm_kunit_helper_alloc_device(9)drm_kunit_helper_free_device(9)drm_kunit_helper_atomic_state_alloc(9)drm_kunit_helper_create_primary_plane(9)drm_kunit_helper_create_crtc(9)drm_kunit_helper_enable_crtc_connector(9)drm_kunit_add_mode_destroy_action(9)
real talk: if you're poking around DRM KUnit tests, you're gonna see these names a lot β they're the squad, iykyk π
and that's the page, bestie π mwah π β brought to you by the fine folks in ./drivers/gpu/drm/tests, dated October 2026, and titled drm_kunit_d...from_cea_vic(9) because apparently even manpage headers get the truncated-name treatment π stay hydrated, go write a test, and remember: if it returns NULL, that's not a vibe π
β¨
π¦ 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