ipuv3-plane.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef __IPUV3_PLANE_H__
  2. #define __IPUV3_PLANE_H__
  3. #include <drm/drm_crtc.h> /* drm_plane */
  4. struct drm_plane;
  5. struct drm_device;
  6. struct ipu_soc;
  7. struct drm_crtc;
  8. struct drm_framebuffer;
  9. struct ipuv3_channel;
  10. struct dmfc_channel;
  11. struct ipu_dp;
  12. struct ipu_plane {
  13. struct drm_plane base;
  14. struct ipu_soc *ipu;
  15. struct ipuv3_channel *ipu_ch;
  16. struct ipuv3_channel *alpha_ch;
  17. struct dmfc_channel *dmfc;
  18. struct ipu_dp *dp;
  19. int dma;
  20. int dp_flow;
  21. bool disabling;
  22. };
  23. struct ipu_plane *ipu_plane_init(struct drm_device *dev, struct ipu_soc *ipu,
  24. int dma, int dp, unsigned int possible_crtcs,
  25. enum drm_plane_type type);
  26. /* Init IDMAC, DMFC, DP */
  27. int ipu_plane_mode_set(struct ipu_plane *plane, struct drm_crtc *crtc,
  28. struct drm_display_mode *mode,
  29. struct drm_framebuffer *fb, int crtc_x, int crtc_y,
  30. unsigned int crtc_w, unsigned int crtc_h,
  31. uint32_t src_x, uint32_t src_y, uint32_t src_w,
  32. uint32_t src_h, bool interlaced);
  33. int ipu_plane_get_resources(struct ipu_plane *plane);
  34. void ipu_plane_put_resources(struct ipu_plane *plane);
  35. int ipu_plane_irq(struct ipu_plane *plane);
  36. void ipu_plane_disable(struct ipu_plane *ipu_plane, bool disable_dp_channel);
  37. void ipu_plane_disable_deferred(struct drm_plane *plane);
  38. #endif