STRUCT GSC_DEV(9)
π 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 range0..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 calledclock. π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β thev4l2_devicefor 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
- 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