xref: /netbsd-src/sys/external/bsd/drm2/dist/drm/i915/display/intel_pipe_crc.h (revision 2a8c33eaff5adddac3ef2c5cb48ee67ef6d5d6dc)
1 /*	$NetBSD: intel_pipe_crc.h,v 1.3 2021/12/19 12:32:15 riastradh Exp $	*/
2 
3 /* SPDX-License-Identifier: MIT */
4 /*
5  * Copyright © 2019 Intel Corporation
6  */
7 
8 #ifndef __INTEL_PIPE_CRC_H__
9 #define __INTEL_PIPE_CRC_H__
10 
11 #include <linux/types.h>
12 
13 struct drm_crtc;
14 struct drm_i915_private;
15 struct intel_crtc;
16 
17 #ifdef CONFIG_DEBUG_FS
18 void intel_display_crc_init(struct drm_i915_private *dev_priv);
19 void intel_display_crc_fini(struct drm_i915_private *dev_priv);
20 int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name);
21 int intel_crtc_verify_crc_source(struct drm_crtc *crtc,
22 				 const char *source_name, size_t *values_cnt);
23 const char *const *intel_crtc_get_crc_sources(struct drm_crtc *crtc,
24 					      size_t *count);
25 void intel_crtc_disable_pipe_crc(struct intel_crtc *crtc);
26 void intel_crtc_enable_pipe_crc(struct intel_crtc *crtc);
27 #else
intel_display_crc_init(struct drm_i915_private * dev_priv)28 static inline void intel_display_crc_init(struct drm_i915_private *dev_priv) {}
intel_display_crc_fini(struct drm_i915_private * dev_priv)29 static inline void intel_display_crc_fini(struct drm_i915_private *dev_priv) {}
30 #define intel_crtc_set_crc_source NULL
31 #define intel_crtc_verify_crc_source NULL
32 #define intel_crtc_get_crc_sources NULL
intel_crtc_disable_pipe_crc(struct intel_crtc * crtc)33 static inline void intel_crtc_disable_pipe_crc(struct intel_crtc *crtc)
34 {
35 }
36 
intel_crtc_enable_pipe_crc(struct intel_crtc * crtc)37 static inline void intel_crtc_enable_pipe_crc(struct intel_crtc *crtc)
38 {
39 }
40 #endif
41 
42 #endif /* __INTEL_PIPE_CRC_H__ */
43