drivers/staging/media/atomisp/pci/ia_css_dvs.h
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/ia_css_dvs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/ia_css_dvs.h- Extension
.h- Size
- 10228 bytes
- Lines
- 294
- Domain
- Driver Families
- Bucket
- drivers/staging
- 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/build_bug.htype_support.hia_css_types.hia_css_err.hia_css_stream_public.h
Detected Declarations
struct ia_css_isp_dvs_statisticsstruct ia_css_isp_skc_dvs_statisticsstruct ia_css_isp_dvs_statistics_mapenum dvs_statistics_type
Annotated Snippet
struct ia_css_isp_dvs_statistics {
ia_css_ptr hor_proj;
ia_css_ptr ver_proj;
u32 hor_size;
u32 ver_size;
u32 exp_id; /** see ia_css_event_public.h for more detail */
ia_css_ptr data_ptr; /* base pointer containing all memory */
u32 size; /* size of allocated memory in data_ptr */
};
/* Structure that holds SKC DVS statistics in the ISP internal
* format. Use ia_css_dvs_statistics_get() to translate this to
* the format used on the host.
* */
struct ia_css_isp_skc_dvs_statistics;
#define SIZE_OF_IA_CSS_ISP_DVS_STATISTICS_STRUCT \
((3 * SIZE_OF_IA_CSS_PTR) + \
(4 * sizeof(uint32_t)))
static_assert(sizeof(struct ia_css_isp_dvs_statistics) == SIZE_OF_IA_CSS_ISP_DVS_STATISTICS_STRUCT);
/* Map with host-side pointers to ISP-format statistics.
* These pointers can either be copies of ISP data or memory mapped
* ISP pointers.
* All of the data behind these pointers is allocatd contiguously, the
* allocated pointer is stored in the data_ptr field. The other fields
* point into this one block of data.
*/
struct ia_css_isp_dvs_statistics_map {
void *data_ptr;
s32 *hor_proj;
s32 *ver_proj;
u32 size; /* total size in bytes */
u32 data_allocated; /* indicate whether data was allocated */
};
union ia_css_dvs_statistics_isp {
struct ia_css_isp_dvs_statistics *p_dvs_statistics_isp;
struct ia_css_isp_skc_dvs_statistics *p_skc_dvs_statistics_isp;
};
union ia_css_dvs_statistics_host {
struct ia_css_dvs_statistics *p_dvs_statistics_host;
struct ia_css_dvs2_statistics *p_dvs2_statistics_host;
struct ia_css_skc_dvs_statistics *p_skc_dvs_statistics_host;
};
/* @brief Copy DVS statistics from an ISP buffer to a host buffer.
* @param[in] host_stats Host buffer
* @param[in] isp_stats ISP buffer
* @return error value if temporary memory cannot be allocated
*
* This may include a translation step as well depending
* on the ISP version.
* Always use this function, never copy the buffer directly.
* Note that this function uses the mem_load function from the CSS
* environment struct.
* In certain environments this may be slow. In those cases it is
* advised to map the ISP memory into a host-side pointer and use
* the ia_css_translate_dvs_statistics() function instead.
*/
int
ia_css_get_dvs_statistics(struct ia_css_dvs_statistics *host_stats,
const struct ia_css_isp_dvs_statistics *isp_stats);
/* @brief Translate DVS statistics from ISP format to host format
* @param[in] host_stats Host buffer
* @param[in] isp_stats ISP buffer
* @return None
*
* This function translates the dvs statistics from the ISP-internal
* format to the format used by the DVS library on the CPU.
* This function takes a host-side pointer as input. This can either
* point to a copy of the data or be a memory mapped pointer to the
* ISP memory pages.
*/
void
ia_css_translate_dvs_statistics(
struct ia_css_dvs_statistics *host_stats,
const struct ia_css_isp_dvs_statistics_map *isp_stats);
/* @brief Copy DVS 2.0 statistics from an ISP buffer to a host buffer.
* @param[in] host_stats Host buffer
* @param[in] isp_stats ISP buffer
* @return error value if temporary memory cannot be allocated
*
* This may include a translation step as well depending
* on the ISP version.
* Always use this function, never copy the buffer directly.
Annotation
- Immediate include surface: `linux/build_bug.h`, `type_support.h`, `ia_css_types.h`, `ia_css_err.h`, `ia_css_stream_public.h`.
- Detected declarations: `struct ia_css_isp_dvs_statistics`, `struct ia_css_isp_skc_dvs_statistics`, `struct ia_css_isp_dvs_statistics_map`, `enum dvs_statistics_type`.
- Atlas domain: Driver Families / drivers/staging.
- 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.