STRUCT FIMC_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct fimc_dev β€” abstraction for FIMC entity πŸ’–

okay bestie, gather round, because this is the big one in the FIMC corner of the kernel: struct fimc_dev is literally the whole-vibe abstraction for a FIMC entity ✨ It's the main character struct that everything else in this driver orbits around. This page lives in the Kernel API Manual, section 9 (that's the kernel-symbols girlies), and honestly? Obsessed.


🌸 SYNOPSIS 🌸

Here's the whole shape of her, verbatim, no cap β€” copy it exactly, don't you dare retype it by hand πŸ™ˆ

struct fimc_dev {
    spinlock_t slock;
    struct mutex                    lock;
    struct platform_device          *pdev;
    struct s5p_platform_fimc        *pdata;
    struct regmap                   *sysreg;
    const struct fimc_variant       *variant;
    const struct fimc_drvdata       *drv_data;
    int id;
    struct clk                      *clock[MAX_FIMC_CLOCKS];
    void __iomem                    *regs;
    wait_queue_head_t irq_queue;
    struct v4l2_device              *v4l2_dev;
    struct fimc_m2m_device          m2m;
    struct fimc_vid_cap             vid_cap;
    unsigned long                   state;
 };

πŸŽ€ Members πŸŽ€

like, member by member, here's who's who in the group chat πŸ’…

  • slock β€” the spinlock guarding this data structure πŸŒ€ short and spicy, don't sleep in it.
  • lock β€” the mutex guarding this data structure πŸ” the chill, can-take-a-nap version of protection.
  • pdev β€” pointer to the FIMC platform device 🧚
  • pdata β€” pointer to the device platform data πŸ“
  • sysreg β€” pointer to the SYSREG regmap πŸ—ΊοΈ
  • variant β€” the IP variant information πŸ‘‘ tells you which flavour of silicon you're dealing with.
  • drv_data β€” driver data πŸ“¦
  • id β€” FIMC device index (0..FIMC_MAX_DEVS) πŸ”’ literally her number in the lineup.
  • clock β€” clocks required for FIMC operation ⏰ yes, plural, it's giving MAX_FIMC_CLOCKS of them.
  • regs β€” the mapped hardware registers πŸ–₯️ (void __iomem *, so you know it's the real hardware door.)
  • irq_queue β€” interrupt handler waitqueue πŸŒ™ where everyone waits for the interrupt to show up.
  • v4l2_dev β€” root v4l2_device πŸ“Ί
  • m2m β€” memory-to-memory V4L2 device information πŸ”
  • vid_cap β€” camera capture device information πŸ“·
  • state β€” flags used to synchronize m2m and capture mode operation 🚦 the referee between the two modes, lowkey the most important job here.

πŸ¦‹ SEE ALSO πŸ¦‹

go read the source, bestie, it's right here in the kernel tree:

Kernel file ./drivers/media/platform/samsung/exynos4-is/fimc-core.h

and the whole friend group, fr fr:


πŸ’€ tiny heads-up: slock and lock are both here protecting this same struct β€” two different lock types, two different rules, so know which one you're holding before you touch anything. no cap, that's the classic oopsie.

okay that's the whole page, you ate that 🫢 this gem comes from ./drivers/media/platform/samsu... and it's dated October 2026 β€” so go forth, read the header file, and slay your FIMC bring-up, bestie πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from