]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/debug_public.h
staging/atomisp: Add support for the Intel IPU v2
[mirror_ubuntu-jammy-kernel.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / hive_isp_css_include / host / debug_public.h
1 /*
2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 */
14
15 #ifndef __DEBUG_PUBLIC_H_INCLUDED__
16 #define __DEBUG_PUBLIC_H_INCLUDED__
17
18 #include <type_support.h>
19 #include "system_types.h"
20
21 /*! brief
22 *
23 * Simple queuing trace buffer for debug data
24 * instantiatable in SP DMEM
25 *
26 * The buffer has a remote and and a local store
27 * which contain duplicate data (when in sync).
28 * The buffers are automatically synched when the
29 * user dequeues, or manualy using the synch function
30 *
31 * An alternative (storage efficient) implementation
32 * could manage the buffers to contain unique data
33 *
34 * The buffer empty status is computed from local
35 * state which does not reflect the presence of data
36 * in the remote buffer (unless the alternative
37 * implementation is followed)
38 */
39
40 typedef struct debug_data_s debug_data_t;
41 typedef struct debug_data_ddr_s debug_data_ddr_t;
42
43 extern debug_data_t *debug_data_ptr;
44 extern hrt_address debug_buffer_address;
45 extern hrt_vaddress debug_buffer_ddr_address;
46
47 /*! Check the empty state of the local debug data buffer
48
49 \return isEmpty(buffer)
50 */
51 STORAGE_CLASS_DEBUG_H bool is_debug_buffer_empty(void);
52
53 /*! Dequeue a token from the debug data buffer
54
55 \return isEmpty(buffer)?0:buffer[head]
56 */
57 STORAGE_CLASS_DEBUG_H hrt_data debug_dequeue(void);
58
59 /*! Synchronise the remote buffer to the local buffer
60
61 \return none
62 */
63 STORAGE_CLASS_DEBUG_H void debug_synch_queue(void);
64
65 /*! Synchronise the remote buffer to the local buffer
66
67 \return none
68 */
69 STORAGE_CLASS_DEBUG_H void debug_synch_queue_isp(void);
70
71
72 /*! Synchronise the remote buffer to the local buffer
73
74 \return none
75 */
76 STORAGE_CLASS_DEBUG_H void debug_synch_queue_ddr(void);
77
78 /*! Set the offset/address of the (remote) debug buffer
79
80 \return none
81 */
82 extern void debug_buffer_init(
83 const hrt_address addr);
84
85 /*! Set the offset/address of the (remote) debug buffer
86
87 \return none
88 */
89 extern void debug_buffer_ddr_init(
90 const hrt_vaddress addr);
91
92 /*! Set the (remote) operating mode of the debug buffer
93
94 \return none
95 */
96 extern void debug_buffer_setmode(
97 const debug_buf_mode_t mode);
98
99 #endif /* __DEBUG_PUBLIC_H_INCLUDED__ */