STRUCT GSC_CTX(9)
β¨ NAME β¨
struct gsc_ctx β bestie, this is the device context data π
straight out of the Kernel API Manual (section 9, iykyk). Think of it as the little main-character bundle that holds everything a G-Scaler context needs to know about itself. Obsessed.
π SYNOPSIS π
struct gsc_ctx {
struct gsc_frame s_frame;
struct gsc_frame d_frame;
enum gsc_datapath in_path;
enum gsc_datapath out_path;
struct gsc_scaler scaler;
u32 flags;
u32 state;
int rotation;
unsigned int hflip:1;
unsigned int vflip:1;
struct gsc_dev *gsc_dev;
struct v4l2_m2m_ctx *m2m_ctx;
struct v4l2_fh fh;
struct v4l2_ctrl_handler ctrl_handler;
struct gsc_ctrls gsc_ctrls;
bool ctrls_rdy;
enum v4l2_colorspace out_colorspace;
};
Look at her. Gorgeous. Not a single field out of place. π«Ά
πΈ Members πΈ
Okay so let's go field by field, because every one of these is doing its own little job and they all ate:
s_frameβ the source frame properties. Where the pixels are coming from, periodt.d_frameβ the destination frame properties. Where they're going π«in_pathβ the input mode: DMA or camera.out_pathβ the output mode: DMA or FIFO.scalerβ the image scaler properties. She resizes, she slays.flagsβ extra flags for image conversion.stateβ flags that keep track of the user configuration. Literally the memory of this whole operation.rotationβ rotation. Yeah. That's the whole description. Iconic brevity πhflipβ horizontal flip.vflipβ vertical flip. (Yes, they're eachunsigned intbitfields,:1and everything β check the synopsis, no cap.)gsc_devβ the G-Scaler device this context applies to.m2m_ctxβ the memory-to-memory device context.fhβ the v4l2 file handle.ctrl_handlerβ the v4l2 controls handler.gsc_ctrlsβ the G-Scaler control set.ctrls_rdyβtrueif the control handler is initialized. Abool, bestie, so it's either fully ready or it's not β no in-between vibes.out_colorspaceβ the colorspace of the OUTPUT queue. π
π¦ SEE ALSO π¦
The kernel file lives at ./drivers/media/platform/samsung/exynos-gsc/gsc-core.h, and it's friends with all of these:
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_dev(9)
Go read them, bestie, they're all part of the same friend group π₯
Quick vibe check: this page is from ./drivers/media/platform/samsu... (yes the path is truncated in the source, not me being lazy π) and it's dated October 2026.
Okay that's the whole page, mwah π Go forth and configure your G-Scaler contexts, you gorgeous nerd π
π¦ 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