ipuv3-plane.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 dmfc_channel *dmfc;
  17. struct ipu_dp *dp;
  18. int dma;
  19. int dp_flow;
  20. int x;
  21. int y;
  22. int w;
  23. int h;
  24. bool enabled;
  25. };
  26. struct ipu_plane *ipu_plane_init(struct drm_device *dev, struct ipu_soc *ipu,
  27. int dma, int dp, unsigned int possible_crtcs,
  28. enum drm_plane_type type);
  29. /* Init IDMAC, DMFC, DP */
  30. int ipu_plane_mode_set(struct ipu_plane *plane, struct drm_crtc *crtc,
  31. struct drm_display_mode *mode,
  32. struct drm_framebuffer *fb, int crtc_x, int crtc_y,
  33. unsigned int crtc_w, unsigned int crtc_h,
  34. uint32_t src_x, uint32_t src_y, uint32_t src_w,
  35. uint32_t src_h, bool interlaced);
  36. void ipu_plane_enable(struct ipu_plane *plane);
  37. void ipu_plane_disable(struct ipu_plane *plane);
  38. int ipu_plane_set_base(struct ipu_plane *plane, struct drm_framebuffer *fb,
  39. int x, int y);
  40. int ipu_plane_get_resources(struct ipu_plane *plane);
  41. void ipu_plane_put_resources(struct ipu_plane *plane);
  42. int ipu_plane_irq(struct ipu_plane *plane);
  43. #endif