drivers/staging/media/atomisp/pci/hive_isp_css_include/host/debug_public.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/debug_public.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/atomisp/pci/hive_isp_css_include/host/debug_public.h
Extension
.h
Size
2219 bytes
Lines
92
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.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __DEBUG_PUBLIC_H_INCLUDED__
#define __DEBUG_PUBLIC_H_INCLUDED__

#include <type_support.h>
#include <ia_css_types.h>
#include "system_local.h"

/*! brief
 *
 * Simple queuing trace buffer for debug data
 * instantiatable in SP DMEM
 *
 * The buffer has a remote and a local store
 * which contain duplicate data (when in sync).
 * The buffers are automatically synched when the
 * user dequeues, or manualy using the synch function
 *
 * An alternative (storage efficient) implementation
 * could manage the buffers to contain unique data
 *
 * The buffer empty status is computed from local
 * state which does not reflect the presence of data
 * in the remote buffer (unless the alternative
 * implementation is followed)
 */

typedef struct debug_data_s		debug_data_t;
typedef struct debug_data_ddr_s	debug_data_ddr_t;

extern debug_data_t				*debug_data_ptr;
extern hrt_address				debug_buffer_address;
extern ia_css_ptr				debug_buffer_ddr_address;

/*! Check the empty state of the local debug data buffer

 \return isEmpty(buffer)
 */
STORAGE_CLASS_DEBUG_H bool is_debug_buffer_empty(void);

/*! Dequeue a token from the debug data buffer

 \return isEmpty(buffer)?0:buffer[head]
 */
STORAGE_CLASS_DEBUG_H hrt_data debug_dequeue(void);

/*! Synchronise the remote buffer to the local buffer

 \return none
 */
STORAGE_CLASS_DEBUG_H void debug_synch_queue(void);

/*! Synchronise the remote buffer to the local buffer

 \return none
 */
STORAGE_CLASS_DEBUG_H void debug_synch_queue_isp(void);

/*! Synchronise the remote buffer to the local buffer

 \return none
 */
STORAGE_CLASS_DEBUG_H void debug_synch_queue_ddr(void);

/*! Set the offset/address of the (remote) debug buffer

 \return none
 */
void debug_buffer_init(
    const hrt_address		addr);

/*! Set the offset/address of the (remote) debug buffer

 \return none
 */
void debug_buffer_ddr_init(
    const ia_css_ptr		addr);

/*! Set the (remote) operating mode of the debug buffer

 \return none
 */
void debug_buffer_setmode(
    const debug_buf_mode_t	mode);

#endif /* __DEBUG_PUBLIC_H_INCLUDED__ */

Annotation

Implementation Notes