Loading...
Note: File does not exist in v3.1.
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#include <linux/types.h>
10
11struct drm_device;
12struct drm_file;
13struct drm_i915_private;
14struct drm_printer;
15struct intel_display;
16struct intel_overlay;
17struct intel_overlay_snapshot;
18
19#ifdef I915
20void intel_overlay_setup(struct drm_i915_private *dev_priv);
21void intel_overlay_cleanup(struct drm_i915_private *dev_priv);
22int intel_overlay_switch_off(struct intel_overlay *overlay);
23int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data,
24 struct drm_file *file_priv);
25int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data,
26 struct drm_file *file_priv);
27void intel_overlay_reset(struct drm_i915_private *dev_priv);
28#else
29static inline void intel_overlay_setup(struct drm_i915_private *dev_priv)
30{
31}
32static inline void intel_overlay_cleanup(struct drm_i915_private *dev_priv)
33{
34}
35static inline int intel_overlay_switch_off(struct intel_overlay *overlay)
36{
37 return 0;
38}
39static inline int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data,
40 struct drm_file *file_priv)
41{
42 return 0;
43}
44static inline int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data,
45 struct drm_file *file_priv)
46{
47 return 0;
48}
49static inline void intel_overlay_reset(struct drm_i915_private *dev_priv)
50{
51}
52#endif
53
54#if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) && defined(I915)
55struct intel_overlay_snapshot *
56intel_overlay_snapshot_capture(struct intel_display *display);
57void intel_overlay_snapshot_print(const struct intel_overlay_snapshot *error,
58 struct drm_printer *p);
59#else
60static inline struct intel_overlay_snapshot *
61intel_overlay_snapshot_capture(struct intel_display *display)
62{
63 return NULL;
64}
65static inline void intel_overlay_snapshot_print(const struct intel_overlay_snapshot *error,
66 struct drm_printer *p)
67{
68}
69#endif
70
71#endif /* __INTEL_OVERLAY_H__ */