1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2019 Intel Corporation
6 #ifndef __INTEL_OVERLAY_H__
7 #define __INTEL_OVERLAY_H__
9 #include <linux/types.h>
13 struct drm_i915_private;
17 struct intel_overlay_snapshot;
20 void intel_overlay_setup(struct drm_i915_private *dev_priv);
21 void intel_overlay_cleanup(struct drm_i915_private *dev_priv);
22 int intel_overlay_switch_off(struct intel_overlay *overlay);
23 int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data,
24 struct drm_file *file_priv);
25 int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data,
26 struct drm_file *file_priv);
27 void intel_overlay_reset(struct drm_i915_private *dev_priv);
29 static inline void intel_overlay_setup(struct drm_i915_private *dev_priv)
32 static inline void intel_overlay_cleanup(struct drm_i915_private *dev_priv)
35 static inline int intel_overlay_switch_off(struct intel_overlay *overlay)
39 static inline int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data,
40 struct drm_file *file_priv)
44 static inline int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data,
45 struct drm_file *file_priv)
49 static inline void intel_overlay_reset(struct drm_i915_private *dev_priv)
54 #if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) && defined(I915)
55 struct intel_overlay_snapshot *
56 intel_overlay_snapshot_capture(struct intel_display *display);
57 void intel_overlay_snapshot_print(const struct intel_overlay_snapshot *error,
58 struct drm_printer *p);
60 static inline struct intel_overlay_snapshot *
61 intel_overlay_snapshot_capture(struct intel_display *display)
65 static inline void intel_overlay_snapshot_print(const struct intel_overlay_snapshot *error,
66 struct drm_printer *p)
71 #endif /* __INTEL_OVERLAY_H__ */