tidss_crtc.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
  4. * Author: Tomi Valkeinen <[email protected]>
  5. */
  6. #ifndef __TIDSS_CRTC_H__
  7. #define __TIDSS_CRTC_H__
  8. #include <linux/completion.h>
  9. #include <linux/wait.h>
  10. #include <drm/drm_crtc.h>
  11. #define to_tidss_crtc(c) container_of((c), struct tidss_crtc, crtc)
  12. struct tidss_device;
  13. struct tidss_crtc {
  14. struct drm_crtc crtc;
  15. u32 hw_videoport;
  16. struct drm_pending_vblank_event *event;
  17. struct completion framedone_completion;
  18. };
  19. #define to_tidss_crtc_state(x) container_of(x, struct tidss_crtc_state, base)
  20. struct tidss_crtc_state {
  21. /* Must be first. */
  22. struct drm_crtc_state base;
  23. bool plane_pos_changed;
  24. u32 bus_format;
  25. u32 bus_flags;
  26. };
  27. void tidss_crtc_vblank_irq(struct drm_crtc *crtc);
  28. void tidss_crtc_framedone_irq(struct drm_crtc *crtc);
  29. void tidss_crtc_error_irq(struct drm_crtc *crtc, u64 irqstatus);
  30. struct tidss_crtc *tidss_crtc_create(struct tidss_device *tidss,
  31. u32 hw_videoport,
  32. struct drm_plane *primary);
  33. #endif