1 /* SPDX-License-Identifier: MIT */
2 /*
3 * Copyright © 2019 Intel Corporation
4 */
5
6 #ifndef __INTEL_OVERLAY_H__
7 #define __INTEL_OVERLAY_H__
8
9 struct drm_device;
10 struct drm_file;
11 #define drm_i915_private inteldrm_softc
12 struct drm_i915_private;
13 struct drm_printer;
14 struct intel_overlay;
15 struct intel_overlay_error_state;
16
17 #ifdef I915
18 void intel_overlay_setup(struct drm_i915_private *dev_priv);
19 void intel_overlay_cleanup(struct drm_i915_private *dev_priv);
20 int intel_overlay_switch_off(struct intel_overlay *overlay);
21 int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data,
22 struct drm_file *file_priv);
23 int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data,
24 struct drm_file *file_priv);
25 void intel_overlay_reset(struct drm_i915_private *dev_priv);
26 struct intel_overlay_error_state *
27 intel_overlay_capture_error_state(struct drm_i915_private *dev_priv);
28 void intel_overlay_print_error_state(struct drm_printer *p,
29 struct intel_overlay_error_state *error);
30 #else
intel_overlay_setup(struct drm_i915_private * dev_priv)31 static inline void intel_overlay_setup(struct drm_i915_private *dev_priv)
32 {
33 }
intel_overlay_cleanup(struct drm_i915_private * dev_priv)34 static inline void intel_overlay_cleanup(struct drm_i915_private *dev_priv)
35 {
36 }
intel_overlay_switch_off(struct intel_overlay * overlay)37 static inline int intel_overlay_switch_off(struct intel_overlay *overlay)
38 {
39 return 0;
40 }
intel_overlay_put_image_ioctl(struct drm_device * dev,void * data,struct drm_file * file_priv)41 static inline int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data,
42 struct drm_file *file_priv)
43 {
44 return 0;
45 }
intel_overlay_attrs_ioctl(struct drm_device * dev,void * data,struct drm_file * file_priv)46 static inline int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data,
47 struct drm_file *file_priv)
48 {
49 return 0;
50 }
intel_overlay_reset(struct drm_i915_private * dev_priv)51 static inline void intel_overlay_reset(struct drm_i915_private *dev_priv)
52 {
53 }
54 static inline struct intel_overlay_error_state *
intel_overlay_capture_error_state(struct drm_i915_private * dev_priv)55 intel_overlay_capture_error_state(struct drm_i915_private *dev_priv)
56 {
57 return NULL;
58 }
intel_overlay_print_error_state(struct drm_printer * p,struct intel_overlay_error_state * error)59 static inline void intel_overlay_print_error_state(struct drm_printer *p,
60 struct intel_overlay_error_state *error)
61 {
62 }
63 #endif
64
65 #endif /* __INTEL_OVERLAY_H__ */
66