drivers/media/platform/samsung/exynos-gsc/gsc-core.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/samsung/exynos-gsc/gsc-core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/samsung/exynos-gsc/gsc-core.h- Extension
.h- Size
- 15053 bytes
- Lines
- 525
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/delay.hlinux/sched.hlinux/spinlock.hlinux/types.hlinux/videodev2.hlinux/io.hlinux/pm_runtime.hmedia/videobuf2-v4l2.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-mem2mem.hmedia/v4l2-mediabus.hmedia/videobuf2-dma-contig.hgsc-regs.h
Detected Declarations
struct gsc_fmtstruct gsc_input_bufstruct gsc_addrstruct gsc_ctrlsstruct gsc_scalerstruct gsc_devstruct gsc_ctxstruct gsc_framestruct gsc_m2m_devicestruct gsc_pix_maxstruct gsc_pix_minstruct gsc_pix_alignstruct gsc_variantstruct gsc_driverdatastruct gsc_devstruct gsc_ctxenum gsc_dev_flagsenum gsc_irqenum gsc_datapathenum gsc_color_fmtenum gsc_yuv_fmtfunction gsc_ctx_state_lock_setfunction gsc_ctx_state_lock_clearfunction is_tiledfunction gsc_hw_enable_controlfunction gsc_hw_get_irq_statusfunction gsc_hw_clear_irqfunction gsc_ctx_state_is_set
Annotated Snippet
struct gsc_fmt {
u32 mbus_code;
u32 pixelformat;
u32 color;
u32 yorder;
u32 corder;
u16 num_planes;
u16 num_comp;
u8 depth[VIDEO_MAX_PLANES];
u32 flags;
};
/**
* struct gsc_input_buf - the driver's video buffer
* @vb: videobuf2 buffer
* @list : linked list structure for buffer queue
* @idx : index of G-Scaler input buffer
*/
struct gsc_input_buf {
struct vb2_v4l2_buffer vb;
struct list_head list;
int idx;
};
/**
* struct gsc_addr - the G-Scaler physical address set
* @y: luminance plane address
* @cb: Cb plane address
* @cr: Cr plane address
*/
struct gsc_addr {
dma_addr_t y;
dma_addr_t cb;
dma_addr_t cr;
};
/* struct gsc_ctrls - the G-Scaler control set
* @rotate: rotation degree
* @hflip: horizontal flip
* @vflip: vertical flip
* @global_alpha: the alpha value of current frame
*/
struct gsc_ctrls {
struct v4l2_ctrl *rotate;
struct v4l2_ctrl *hflip;
struct v4l2_ctrl *vflip;
struct v4l2_ctrl *global_alpha;
};
/**
* struct gsc_scaler - the configuration data for G-Scaler inetrnal scaler
* @pre_shfactor: pre sclaer shift factor
* @pre_hratio: horizontal ratio of the prescaler
* @pre_vratio: vertical ratio of the prescaler
* @main_hratio: the main scaler's horizontal ratio
* @main_vratio: the main scaler's vertical ratio
*/
struct gsc_scaler {
u32 pre_shfactor;
u32 pre_hratio;
u32 pre_vratio;
u32 main_hratio;
u32 main_vratio;
};
struct gsc_dev;
struct gsc_ctx;
/**
* struct gsc_frame - source/target frame properties
* @f_width: SRC : SRCIMG_WIDTH, DST : OUTPUTDMA_WHOLE_IMG_WIDTH
* @f_height: SRC : SRCIMG_HEIGHT, DST : OUTPUTDMA_WHOLE_IMG_HEIGHT
* @crop: cropped(source)/scaled(destination) size
* @payload: image size in bytes (w x h x bpp)
* @addr: image frame buffer physical addresses
* @fmt: G-Scaler color format pointer
* @colorspace: value indicating v4l2_colorspace
* @alpha: frame's alpha value
*/
struct gsc_frame {
u32 f_width;
u32 f_height;
struct v4l2_rect crop;
unsigned long payload[VIDEO_MAX_PLANES];
struct gsc_addr addr;
const struct gsc_fmt *fmt;
u32 colorspace;
u8 alpha;
};
Annotation
- Immediate include surface: `linux/delay.h`, `linux/sched.h`, `linux/spinlock.h`, `linux/types.h`, `linux/videodev2.h`, `linux/io.h`, `linux/pm_runtime.h`, `media/videobuf2-v4l2.h`.
- Detected declarations: `struct gsc_fmt`, `struct gsc_input_buf`, `struct gsc_addr`, `struct gsc_ctrls`, `struct gsc_scaler`, `struct gsc_dev`, `struct gsc_ctx`, `struct gsc_frame`, `struct gsc_m2m_device`, `struct gsc_pix_max`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.