drm_analog_tv_mode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ drm_analog_tv_mode πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” today's main character is drm_analog_tv_mode, and it literally makes a display mode for an analog TV. retro vibes only, no cap ✨


✨ NAME ✨

drm_analog_tv_mode β€” creates a display mode for an analog TV πŸ“Ί


🌸 SYNOPSIS 🌸

struct drm_display_mode * drm_analog_tv_mode (struct drm_device *dev ,
enum drm_connector_tv_mode tv_mode , unsigned long pixel_clock_hz ,
unsigned int hdisplay , unsigned int vdisplay , bool interlace );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the drm device, your main squeeze here 🫢
  • tv_mode β€” the TV Mode standard you're building a mode for. check DRM_MODE_TV_MODE_* for the full lineup, iykyk
  • pixel_clock_hz β€” Pixel Clock Frequency, in Hertz. hertz!! ⚑
  • hdisplay β€” the hdisplay size
  • vdisplay β€” the vdisplay size
  • interlace β€” whether to compute an interlaced mode. yes it's a bool, yes it matters πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

This function creates a struct drm_display_mode instance suited for an analog TV output, for one of the usual analog TV modes. the way it just… does that. iconic.

Where this is DRM_MODE_TV_MODE_MONOCHROME, a 625-line mode will be created πŸ–€πŸ€ (monochrome excellence, we love to see it)

heads up bestie: note that hdisplay is larger than the usual constraints for the PAL and NTSC timings, and we'll choose to ignore most timings constraints to reach those resolutions. so like… yeah, she's bending the rules a lil πŸ’€ but on purpose, fr fr.

🌈 RETURN 🌈

A pointer to the mode, allocated with drm_mode_create. Returns NULL on error 😭 (sad girl hours if that happens)


πŸ‘‘ SEE ALSO πŸ‘‘

the Kernel file ./drivers/gpu/drm/drm_modes.c β€” go read her, she's the source of truth 🧚

and the whole bestie group chat:


that's the whole page, bestie πŸ“ sourced from ./drivers/gpu/drm, dated October 2026, and it's literally called drm_analog_tv_mode(9) β€” slay πŸ’œ

πŸ“¦ where this page comes from