drivers/media/pci/ngene/ngene.h
Source file repositories/reference/linux-study-clean/drivers/media/pci/ngene/ngene.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/ngene/ngene.h- Extension
.h- Size
- 23168 bytes
- Lines
- 854
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/sched.hlinux/interrupt.hlinux/i2c.hasm/dma.hlinux/scatterlist.hlinux/dvb/frontend.hlinux/workqueue.hmedia/dmxdev.hmedia/dvbdev.hmedia/dvb_demux.hmedia/dvb_ca_en50221.hmedia/dvb_frontend.hmedia/dvb_ringbuffer.hmedia/dvb_net.hcxd2099.h
Detected Declarations
struct SG_ADDRstruct SHARED_MEMORYstruct BUFFER_STREAM_RESULTSstruct HW_SCATTER_GATHER_ELEMENTstruct BUFFER_HEADERstruct EVENT_BUFFERstruct FW_HEADERstruct FW_I2C_WRITEstruct FW_I2C_CONTINUE_WRITEstruct FW_I2C_READstruct FW_SPI_WRITEstruct FW_SPI_READstruct FW_FWLOAD_PREPAREstruct FW_FWLOAD_FINISHstruct FW_STREAM_CONTROLstruct FW_MEM_READstruct FW_MEM_WRITEstruct FW_SFR_IRAM_READstruct FW_SFR_IRAM_WRITEstruct FW_SET_GPIO_PINstruct FW_SET_GPIO_INTstruct FW_SET_DEBUGMODEstruct FW_CONFIGURE_BUFFERSstruct FW_CONFIGURE_FREE_BUFFERSstruct FW_CONFIGURE_UARTstruct FW_WRITE_UARTstruct ngene_commandstruct SBufferHeaderstruct SRingBufferDescriptorstruct MICI_STREAMINFOstruct ngene_channelstruct mychipstruct ngene_channelstruct ngene_cistruct ngenestruct ngenestruct ngene_infoenum STREAMenum SMODE_BITSenum STREAM_FLAG_BITSenum OPCODESenum RESPONSESenum FSC_MODE_BITSenum _BUFFER_CONFIGSenum _UART_CONFIGenum HWSTATEenum KSSTATEenum STREAMMODEFLAGS
Annotated Snippet
struct SG_ADDR {
u64 start;
u64 curr;
u16 curr_ptr;
u16 elements;
u32 pad[3];
} __attribute__ ((__packed__));
struct SHARED_MEMORY {
/* C000 */
u32 HostToNgene[64];
/* C100 */
u32 NgeneToHost[64];
/* C200 */
u64 NgeneCommand;
u64 NgeneStatus;
u64 NgeneEvent;
/* C210 */
u8 pad1[0xc260 - 0xc218];
/* C260 */
u32 IntCounts;
u32 IntEnable;
/* C268 */
u8 pad2[0xd000 - 0xc268];
} __attribute__ ((__packed__));
struct BUFFER_STREAM_RESULTS {
u32 Clock; /* Stream time in 100ns units */
u16 RemainingLines; /* Remaining lines in this field.
0 for complete field */
u8 FieldCount; /* Video field number */
u8 Flags; /* Bit 7 = Done, Bit 6 = seen, Bit 5 = overflow,
Bit 0 = FieldID */
u16 BlockCount; /* Audio block count (unused) */
u8 Reserved[2];
u32 DTOUpdate;
} __attribute__ ((__packed__));
struct HW_SCATTER_GATHER_ELEMENT {
u64 Address;
u32 Length;
u32 Reserved;
} __attribute__ ((__packed__));
struct BUFFER_HEADER {
u64 Next;
struct BUFFER_STREAM_RESULTS SR;
u32 Number_of_entries_1;
u32 Reserved5;
u64 Address_of_first_entry_1;
u32 Number_of_entries_2;
u32 Reserved7;
u64 Address_of_first_entry_2;
} __attribute__ ((__packed__));
struct EVENT_BUFFER {
u32 TimeStamp;
u8 GPIOStatus;
u8 UARTStatus;
u8 RXCharacter;
u8 EventStatus;
u32 Reserved[2];
} __attribute__ ((__packed__));
/* Firmware commands. */
enum OPCODES {
CMD_NOP = 0,
CMD_FWLOAD_PREPARE = 0x01,
CMD_FWLOAD_FINISH = 0x02,
CMD_I2C_READ = 0x03,
CMD_I2C_WRITE = 0x04,
CMD_I2C_WRITE_NOSTOP = 0x05,
CMD_I2C_CONTINUE_WRITE = 0x06,
CMD_I2C_CONTINUE_WRITE_NOSTOP = 0x07,
CMD_DEBUG_OUTPUT = 0x09,
CMD_CONTROL = 0x10,
CMD_CONFIGURE_BUFFER = 0x11,
CMD_CONFIGURE_FREE_BUFFER = 0x12,
Annotation
- Immediate include surface: `linux/types.h`, `linux/sched.h`, `linux/interrupt.h`, `linux/i2c.h`, `asm/dma.h`, `linux/scatterlist.h`, `linux/dvb/frontend.h`, `linux/workqueue.h`.
- Detected declarations: `struct SG_ADDR`, `struct SHARED_MEMORY`, `struct BUFFER_STREAM_RESULTS`, `struct HW_SCATTER_GATHER_ELEMENT`, `struct BUFFER_HEADER`, `struct EVENT_BUFFER`, `struct FW_HEADER`, `struct FW_I2C_WRITE`, `struct FW_I2C_CONTINUE_WRITE`, `struct FW_I2C_READ`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
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.