drm_fb_cma_helper.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __DRM_FB_CMA_HELPER_H__
  3. #define __DRM_FB_CMA_HELPER_H__
  4. struct drm_fbdev_cma;
  5. struct drm_gem_cma_object;
  6. struct drm_fb_helper_surface_size;
  7. struct drm_framebuffer_funcs;
  8. struct drm_fb_helper_funcs;
  9. struct drm_framebuffer;
  10. struct drm_fb_helper;
  11. struct drm_device;
  12. struct drm_file;
  13. struct drm_mode_fb_cmd2;
  14. struct drm_plane;
  15. struct drm_plane_state;
  16. struct drm_fbdev_cma *drm_fbdev_cma_init_with_funcs(struct drm_device *dev,
  17. unsigned int preferred_bpp, unsigned int max_conn_count,
  18. const struct drm_framebuffer_funcs *funcs);
  19. struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
  20. unsigned int preferred_bpp, unsigned int max_conn_count);
  21. void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);
  22. void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
  23. void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
  24. void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state);
  25. void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
  26. bool state);
  27. void drm_fb_cma_destroy(struct drm_framebuffer *fb);
  28. int drm_fb_cma_create_handle(struct drm_framebuffer *fb,
  29. struct drm_file *file_priv, unsigned int *handle);
  30. struct drm_framebuffer *drm_fb_cma_create_with_funcs(struct drm_device *dev,
  31. struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd,
  32. const struct drm_framebuffer_funcs *funcs);
  33. struct drm_framebuffer *drm_fb_cma_create(struct drm_device *dev,
  34. struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd);
  35. struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
  36. unsigned int plane);
  37. dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb,
  38. struct drm_plane_state *state,
  39. unsigned int plane);
  40. int drm_fb_cma_prepare_fb(struct drm_plane *plane,
  41. struct drm_plane_state *state);
  42. #ifdef CONFIG_DEBUG_FS
  43. struct seq_file;
  44. int drm_fb_cma_debugfs_show(struct seq_file *m, void *arg);
  45. #endif
  46. #endif