File Index
Files and directories
Sign in
FILE

intel_overlay.h

File preview with syntax highlighting.

linux-6.19.14/drivers/gpu/drm/i915/display/intel_overlay.h C
 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_printer;
14struct intel_display;
15struct intel_overlay;
16struct intel_overlay_snapshot;
17
18#ifdef I915
19void intel_overlay_setup(struct intel_display *display);
20bool intel_overlay_available(struct intel_display *display);
21void intel_overlay_cleanup(struct intel_display *display);
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 intel_display *display);
28#else
29static inline void intel_overlay_setup(struct intel_display *display)
30{
31}
32static inline bool intel_overlay_available(struct intel_display *display)
33{
34	return false;
35}
36static inline void intel_overlay_cleanup(struct intel_display *display)
37{
38}
39static inline int intel_overlay_switch_off(struct intel_overlay *overlay)
40{
41	return 0;
42}
43static inline int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data,
44						struct drm_file *file_priv)
45{
46	return 0;
47}
48static inline int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data,
49					    struct drm_file *file_priv)
50{
51	return 0;
52}
53static inline void intel_overlay_reset(struct intel_display *display)
54{
55}
56#endif
57
58#if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) && defined(I915)
59struct intel_overlay_snapshot *
60intel_overlay_snapshot_capture(struct intel_display *display);
61void intel_overlay_snapshot_print(const struct intel_overlay_snapshot *error,
62				  struct drm_printer *p);
63#else
64static inline struct intel_overlay_snapshot *
65intel_overlay_snapshot_capture(struct intel_display *display)
66{
67	return NULL;
68}
69static inline void intel_overlay_snapshot_print(const struct intel_overlay_snapshot *error,
70						struct drm_printer *p)
71{
72}
73#endif
74
75#endif /* __INTEL_OVERLAY_H__ */
~/ Read-only file preview.