STRUCT S5P_MFC_DEV(9)
π struct s5p_mfc_dev(9) β Kernel API Manual π
okay so picture this: it's the kernel API manual, it's the struct s5p_mfc_dev, and it's the struct holding all the driver's internal parameters. everything. the whole vibe. one big beautiful bag of state and we're gonna go through it together, bestie π«Ά
β¨ NAME β¨
struct s5p_mfc_dev β the struct that contains all the driver's internal parameters, no cap π
πΈ SYNOPSIS πΈ
struct s5p_mfc_dev {
struct v4l2_device v4l2_dev;
struct video_device *vfd_dec;
struct video_device *vfd_enc;
struct platform_device *plat_dev;
struct device *mem_dev[BANK_CTX_NUM];
void __iomem *regs_base;
int irq;
struct v4l2_ctrl_handler dec_ctrl_handler;
struct v4l2_ctrl_handler enc_ctrl_handler;
struct s5p_mfc_pm pm;
const struct s5p_mfc_variant *variant;
int num_inst;
spinlock_t irqlock;
spinlock_t condlock;
struct mutex mfc_mutex;
int int_cond;
int int_type;
unsigned int int_err;
wait_queue_head_t queue;
struct s5p_mfc_priv_buf fw_buf;
size_t mem_size;
dma_addr_t mem_base;
unsigned long *mem_bitmap;
void *mem_virt;
dma_addr_t dma_base[BANK_CTX_NUM];
unsigned long hw_lock;
struct s5p_mfc_ctx *ctx[MFC_NUM_CONTEXTS];
int curr_ctx;
unsigned long ctx_work_bits;
atomic_t watchdog_cnt;
struct timer_list watchdog_timer;
struct workqueue_struct *watchdog_workqueue;
struct work_struct watchdog_work;
unsigned long enter_suspend;
struct s5p_mfc_priv_buf ctx_buf;
int warn_start;
const struct s5p_mfc_hw_ops *mfc_ops;
const struct s5p_mfc_hw_cmds *mfc_cmds;
const struct s5p_mfc_regs *mfc_regs;
enum s5p_mfc_fw_ver fw_ver;
bool fw_get_done;
bool risc_on;
};
like, look at her. main character energy fr fr π
π Members π
every single field, one by one, so you never have to guess what's what:
v4l2_devβ typev4l2_device. the v4l2_device, obviously πvfd_decβ the video device for decodingvfd_encβ the video device for encodingplat_devβ the platform devicemem_devβ the child devices of the memory banksregs_baseβ the base address of the MFC hw registersirqβ the irq resourcedec_ctrl_handlerβ the control framework handler for decodingenc_ctrl_handlerβ the control framework handler for encodingpmβ power management controlvariantβ MFC hardware variant informationnum_instβ counter of active MFC instancesirqlockβ the lock for operations on videobuf2 queuescondlockβ the lock for changing/checking if a context is ready to be processedmfc_mutexβ the lock for video_deviceint_condβ variable used by the waitqueueint_typeβ the type of the last interruptint_errβ the error number for the last interruptqueueβ the waitqueue for waiting for completion of device commandsfw_bufβ the firmware buffer data structuremem_sizeβ the size of the firmware operation memorymem_baseβ the base DMA address of the firmware operation memorymem_bitmapβ the bitmap for managing MFC internal buffer allocationsmem_virtβ the virtual address of the firmware operation memorydma_baseβ the address of the beginning of memory bankshw_lockβ used for hardware lockingctxβ the array of driver contextscurr_ctxβ the number of the currently running contextctx_work_bitsβ used to mark which contexts are waiting for hardwarewatchdog_cntβ the counter for the watchdogwatchdog_timerβ the timer for the watchdogwatchdog_workqueueβ the workqueue for the watchdogwatchdog_workβ the worker for the watchdogenter_suspendβ the flag set when entering suspendctx_bufβ the common context memory (MFCv6)warn_startβ the hardware error code from which warnings startmfc_opsβ the ops structure holding HW operation function pointersmfc_cmdsβ the cmd structure holding HW commands function pointersmfc_regsβ the structure holding MFC registersfw_verβ the loaded firmware sub-versionfw_get_doneβ the flag set whenrequest_firmwareis complete and copied intofw_bufrisc_onβ the flag indicating whether RISC is on or off
ngl there's a lot of locks in there βirqlock,condlock,mfc_mutex,hw_lockβ and they're all doing different jobs. don't mix them up, bestie π
π¦ SEE ALSO π¦
- the kernel file
./drivers/media/platform/samsung/s5p-mfc/s5p_mfc_common.h struct s5p_mfc_priv_buf(9)struct s5p_mfc_ctx(9)
that's the whole tour, and honestly? she ate. π
this page came from ./drivers/media/platform/samsu... β dated October 2026, struct s5p_mfc_dev(9) π slay, go read the headers now β¨
π¦ 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