STRUCT GSC_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct gsc_dev(9) β€” like, the whole G-Scaler entity, bestie

okay so real talk: this is a page from the Kernel API Manual, and it's all about struct gsc_dev β€” the abstraction for a G-Scaler entity. no cap, it's the main-character struct of the whole G-Scaler situation, and once you see the members you're gonna get it. πŸŽ€


✨ NAME ✨

struct gsc_dev β€” the abstraction for a G-Scaler entity. that's it, that's the vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

struct gsc_dev {
    spinlock_t slock;
    struct mutex                    lock;
    struct platform_device          *pdev;
    struct gsc_variant              *variant;
    u16 id;
    int num_clocks;
    struct clk                      *clock[GSC_MAX_CLOCKS];
    void __iomem                    *regs;
    wait_queue_head_t irq_queue;
    struct gsc_m2m_device           m2m;
    unsigned long                   state;
    struct video_device             vdev;
    struct v4l2_device              v4l2_dev;
 };

like, look at her. she's got locks, she's got clocks, she's got a whole register map. iconic behavior tbh. πŸ‘‘


🫢 Members 🫢

  • slock β€” the spinlock that protects this data structure. short, fast, absolutely not here to wait around for you. ⚑
  • lock β€” the mutex protecting this data structure. the patient one. she'll wait her turn, respectfully. πŸ’…
  • pdev β€” pointer to the G-Scaler platform device. it's giving "where you actually came from." 🐣
  • variant β€” the IP variant information. iykyk β€” every chip's a little different, bestie. 🧚
  • id β€” the G-Scaler device index, and it lives in the range 0..GSC_MAX_DEVS. know your number. πŸ”’
  • num_clocks β€” how many clocks are required for G-Scaler operation. not optional, fr fr. ⏰
  • clock β€” the clocks required for G-Scaler operation. yes, it's the array, and yes, it's literally called clock. 🌈
  • regs β€” the mapped hardware registers. this is where the actual hardware gossip lives. πŸ”₯
  • irq_queue β€” the interrupt handler waitqueue. somebody's waiting on an interrupt and it's her. 😭
  • m2m β€” memory-to-memory V4L2 device information. the m2m of it all. πŸ¦‹
  • state β€” flags used to synchronize m2m and capture mode operation. keeping the two modes from fighting in the group chat. 🫢
  • vdev β€” the video device for this G-Scaler instance. main character energy, obviously. πŸ“Ή
  • v4l2_dev β€” the v4l2_device for this G-Scaler instance. the V4L2 side of the story. πŸ’œ

πŸ‘€ SEE ALSO πŸ‘€

kernel file ./drivers/media/platform/samsung/exynos-gsc/gsc-core.h β€” that's the source of truth, go read her. and then the whole friend group: enum gsc_datapath(9), struct gsc_fmt(9), struct gsc_input_buf(9), struct gsc_addr(9), struct gsc_scaler(9), struct gsc_frame(9), struct gsc_m2m_device(9), struct gsc_pix_max(9), struct gsc_pix_min(9), struct gsc_driverdata(9), struct gsc_ctx(9).

lowkey a whole ensemble cast. click through them, bestie, they're all connected. πŸŽ€

and that's the page!! mwah πŸ’‹ β€” this one came from ./drivers/media/platform/samsu..., dated October 2026, and the header said struct gsc_dev(9) on both sides like bookends. slay. βœ¨πŸŒΈπŸ’–

πŸ“¦ where this page comes from