1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
4 * Author: Benoit Parrot <bparrot@ti.com>
5 */
6
7#ifndef __OMAPDRM_OVERLAY_H__
8#define __OMAPDRM_OVERLAY_H__
9
10#include <linux/types.h>
11
12enum drm_plane_type;
13
14struct drm_device;
15struct drm_mode_object;
16struct drm_plane;
17
18/* Used to associate a HW overlay/plane to a plane */
19struct omap_hw_overlay {
20 unsigned int idx;
21
22 const char *name;
23 enum omap_plane_id id;
24
25 enum omap_overlay_caps caps;
26};
27
28int omap_hwoverlays_init(struct omap_drm_private *priv);
29void omap_hwoverlays_destroy(struct omap_drm_private *priv);
30int omap_overlay_assign(struct drm_atomic_state *s, struct drm_plane *plane,
31 u32 caps, u32 fourcc, struct omap_hw_overlay **overlay,
32 struct omap_hw_overlay **r_overlay);
33void omap_overlay_release(struct drm_atomic_state *s, struct omap_hw_overlay *overlay);
34void omap_overlay_update_state(struct omap_drm_private *priv, struct omap_hw_overlay *overlay);
35#endif /* __OMAPDRM_OVERLAY_H__ */
36

source code of linux/drivers/gpu/drm/omapdrm/omap_overlay.h