STRUCT DRM_MODE_MODEINFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct drm_mode_modeinfo(9) πŸ’–

okay so this is a page straight out of the Kernel API Manual (yes, that one) and it's all about struct drm_mode_modeinfo, which is literally just display mode info. cute name, big job. let's get into it bestie 🫢


✨ SYNOPSIS ✨

like, here's the whole struct, no notes, copy it exactly or the compiler will simply end you πŸ’€

struct drm_mode_modeinfo {
    __u32 clock;
    __u16 hdisplay;
    __u16 hsync_start;
    __u16 hsync_end;
    __u16 htotal;
    __u16 hskew;
    __u16 vdisplay;
    __u16 vsync_start;
    __u16 vsync_end;
    __u16 vtotal;
    __u16 vscan;
    __u32 vrefresh;
    __u32 flags;
    __u32 type;
    char name[DRM_DISPLAY_MODE_LEN];
 };

πŸŽ€ Members πŸŽ€

time for the roster 😌 every field is a main character, no filler:

  • clock β€” pixel clock, measured in kHz. the tempo of your pixels fr fr.
  • hdisplay β€” horizontal display size.
  • hsync_start β€” horizontal sync start.
  • hsync_end β€” horizontal sync end.
  • htotal β€” horizontal total size.
  • hskew β€” horizontal skew.
  • vdisplay β€” vertical display size.
  • vsync_start β€” vertical sync start.
  • vsync_end β€” vertical sync end.
  • vtotal β€” vertical total size.
  • vscan β€” vertical scan.
  • vrefresh β€” approximate vertical refresh rate in Hz (key word: approximate, she's not making promises πŸ’…).
  • flags β€” a bitmask of misc. flags, see the DRM_MODE_FLAG_* defines.
  • type β€” a bitmask of type flags, see the DRM_MODE_TYPE_* defines.
  • name β€” a string describing the mode resolution. yes queen, label yourself 🌸

πŸ¦‹ Description πŸ¦‹

so this is the user-space API display mode information structure. iykyk. if you were looking for the kernel-side version, that's a whole different girl β€” go see struct drm_display_mode πŸ”₯


🌈 SEE ALSO 🌈

the friend group 🫢 all of these are linked and you will be clicking through them:

  • Kernel file ./include/uapi/drm/drm_mode.h overview(9)
  • struct drm_mode_get_plane(9)
  • struct drm_mode_get_connector(9)
  • struct drm_mode_property_enum(9)
  • struct drm_mode_get_property(9)
  • struct drm_mode_fb_cmd2(9)
  • enum drm_colorop_type(9)
  • enum drm_colorop_lut3d_interpolation_type(9)
  • enum drm_colorop_lut1d_interpolation_type(9)
  • struct drm_plane_size_hint(9)
  • struct hdr_metadata_infoframe(9)
  • struct hdr_output_metadata(9)
  • DRM_MODE_PAGE_FLIP_EVENT(9)
  • DRM_MODE_PAGE_FLIP_ASYNC(9)
  • DRM_MODE_PAGE_FLIP_FLAGS(9)
  • struct drm_mode_create_dumb(9)
  • DRM_MODE_ATOMIC_TEST_ONLY(9)
  • DRM_MODE_ATOMIC_NONBLOCK(9)
  • DRM_MODE_ATOMIC_ALLOW_MODESET(9)
  • DRM_MODE_ATOMIC_FLAGS(9)
  • struct drm_mode_create_blob(9)
  • struct drm_mode_destroy_blob(9)
  • struct drm_mode_create_lease(9)
  • struct drm_mode_list_lessees(9)
  • struct drm_mode_get_lease(9)
  • struct drm_mode_revoke_lease(9)
  • struct drm_mode_rect(9)
  • struct drm_mode_closefb(9)

ngl bestie, if you're touching modesetting, read drm_mode.h first. it's giving "required reading" energy πŸ“šβœ¨

and that's the whole vibe check πŸ’œ this one lives in ./include/uapi/drm, dated October 2026, and it's filed under struct drm_mode_modeinfo(9) β€” go off, mode queen πŸ‘‘πŸ’…

πŸ“¦ where this page comes from