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