1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Debugfs tracing for bitstream buffers. This is similar to VA-API's
4  * LIBVA_TRACE_BUFDATA in that the raw bitstream can be dumped as a debugging
5  * aid.
6  *
7  * Produces one file per OUTPUT buffer. Files are automatically cleared on
8  * STREAMOFF unless the module parameter "keep_bitstream_buffers" is set.
9  */
10 
11 #include "visl.h"
12 #include "visl-dec.h"
13 
14 #ifdef CONFIG_VISL_DEBUGFS
15 
16 int visl_debugfs_init(struct visl_dev *dev);
17 int visl_debugfs_bitstream_init(struct visl_dev *dev);
18 void visl_trace_bitstream(struct visl_ctx *ctx, struct visl_run *run);
19 void visl_debugfs_clear_bitstream(struct visl_dev *dev);
20 void visl_debugfs_bitstream_deinit(struct visl_dev *dev);
21 void visl_debugfs_deinit(struct visl_dev *dev);
22 
23 #else
24 
25 static inline int visl_debugfs_init(struct visl_dev *dev)
26 {
27 	return 0;
28 }
29 
30 static inline int visl_debugfs_bitstream_init(struct visl_dev *dev)
31 {
32 	return 0;
33 }
34 
35 static inline void visl_trace_bitstream(struct visl_ctx *ctx, struct visl_run *run) {}
36 static inline void visl_debugfs_clear_bitstream(struct visl_dev *dev) {}
37 static inline void visl_debugfs_bitstream_deinit(struct visl_dev *dev) {}
38 static inline void visl_debugfs_deinit(struct visl_dev *dev) {}
39 
40 #endif
41