omap_overlay.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #ifndef __OMAPDRM_OVERLAY_H__
  7. #define __OMAPDRM_OVERLAY_H__
  8. #include <linux/types.h>
  9. enum drm_plane_type;
  10. struct drm_device;
  11. struct drm_mode_object;
  12. struct drm_plane;
  13. /* Used to associate a HW overlay/plane to a plane */
  14. struct omap_hw_overlay {
  15. int idx;
  16. const char *name;
  17. enum omap_plane_id overlay_id;
  18. enum omap_overlay_caps caps;
  19. u32 possible_crtcs;
  20. };
  21. int omap_hwoverlays_init(struct omap_drm_private *priv);
  22. void omap_hwoverlays_destroy(struct omap_drm_private *priv);
  23. int omap_overlay_assign(struct drm_atomic_state *s, struct drm_plane *plane,
  24. u32 caps, u32 fourcc, u32 crtc_mask,
  25. struct omap_hw_overlay **overlay,
  26. struct omap_hw_overlay **r_overlay);
  27. void omap_overlay_release(struct drm_atomic_state *s,
  28. struct drm_plane *plane,
  29. struct omap_hw_overlay *overlay);
  30. void omap_overlay_disable(struct drm_atomic_state *s,
  31. struct drm_plane *plane,
  32. struct omap_hw_overlay *overlay);
  33. #endif /* __OMAPDRM_OVERLAY_H__ */