ipuv3-plane.h 1.3 KB

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