drivers/staging/media/atomisp/pci/hive_isp_css_common/host/debug.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/debug.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/debug.c- Extension
.c- Size
- 1508 bytes
- Lines
- 64
- 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.
Dependency Surface
debug.hhmm.hdebug_private.hsp.hassert_support.h
Detected Declarations
function debug_buffer_initfunction debug_buffer_ddr_initfunction debug_buffer_setmode
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Support for Intel Camera Imaging ISP subsystem.
* Copyright (c) 2010-2016, Intel Corporation.
*/
#include "debug.h"
#include "hmm.h"
#ifndef __INLINE_DEBUG__
#include "debug_private.h"
#endif /* __INLINE_DEBUG__ */
#define __INLINE_SP__
#include "sp.h"
#include "assert_support.h"
/* The address of the remote copy */
hrt_address debug_buffer_address = (hrt_address) - 1;
ia_css_ptr debug_buffer_ddr_address = (ia_css_ptr)-1;
/* The local copy */
static debug_data_t debug_data;
debug_data_t *debug_data_ptr = &debug_data;
void debug_buffer_init(const hrt_address addr)
{
debug_buffer_address = addr;
debug_data.head = 0;
debug_data.tail = 0;
}
void debug_buffer_ddr_init(const ia_css_ptr addr)
{
debug_buf_mode_t mode = DEBUG_BUFFER_MODE_LINEAR;
u32 enable = 1;
u32 head = 0;
u32 tail = 0;
/* set the ddr queue */
debug_buffer_ddr_address = addr;
hmm_store(addr + DEBUG_DATA_BUF_MODE_DDR_ADDR,
&mode, sizeof(debug_buf_mode_t));
hmm_store(addr + DEBUG_DATA_HEAD_DDR_ADDR,
&head, sizeof(uint32_t));
hmm_store(addr + DEBUG_DATA_TAIL_DDR_ADDR,
&tail, sizeof(uint32_t));
hmm_store(addr + DEBUG_DATA_ENABLE_DDR_ADDR,
&enable, sizeof(uint32_t));
/* set the local copy */
debug_data.head = 0;
debug_data.tail = 0;
}
void debug_buffer_setmode(const debug_buf_mode_t mode)
{
assert(debug_buffer_address != ((hrt_address)-1));
sp_dmem_store_uint32(SP0_ID,
debug_buffer_address + DEBUG_DATA_BUF_MODE_ADDR, mode);
}
Annotation
- Immediate include surface: `debug.h`, `hmm.h`, `debug_private.h`, `sp.h`, `assert_support.h`.
- Detected declarations: `function debug_buffer_init`, `function debug_buffer_ddr_init`, `function debug_buffer_setmode`.
- 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.