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)28static inline void intel_display_crc_init(struct drm_i915_private *dev_priv) {} intel_display_crc_fini(struct drm_i915_private * dev_priv)29static 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)33static inline void intel_crtc_disable_pipe_crc(struct intel_crtc *crtc) 34 { 35 } 36 intel_crtc_enable_pipe_crc(struct intel_crtc * crtc)37static inline void intel_crtc_enable_pipe_crc(struct intel_crtc *crtc) 38 { 39 } 40 #endif 41 42 #endif /* __INTEL_PIPE_CRC_H__ */ 43