adf_client.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (C) 2013 Google, Inc.
  3. *
  4. * This software is licensed under the terms of the GNU General Public
  5. * License version 2, as published by the Free Software Foundation, and
  6. * may be copied, distributed, and modified under those terms.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. */
  14. #ifndef _VIDEO_ADF_CLIENT_H_
  15. #define _VIDEO_ADF_CLIENT_H_
  16. #include <video/adf.h>
  17. int adf_interface_blank(struct adf_interface *intf, u8 state);
  18. u8 adf_interface_dpms_state(struct adf_interface *intf);
  19. void adf_interface_current_mode(struct adf_interface *intf,
  20. struct drm_mode_modeinfo *mode);
  21. size_t adf_interface_modelist(struct adf_interface *intf,
  22. struct drm_mode_modeinfo *modelist, size_t n_modes);
  23. int adf_interface_set_mode(struct adf_interface *intf,
  24. struct drm_mode_modeinfo *mode);
  25. int adf_interface_get_screen_size(struct adf_interface *intf, u16 *width,
  26. u16 *height);
  27. int adf_interface_simple_buffer_alloc(struct adf_interface *intf, u16 w, u16 h,
  28. u32 format, struct dma_buf **dma_buf, u32 *offset, u32 *pitch);
  29. struct sync_fence *adf_interface_simple_post(struct adf_interface *intf,
  30. struct adf_buffer *buf);
  31. bool adf_overlay_engine_supports_format(struct adf_overlay_engine *eng,
  32. u32 format);
  33. size_t adf_device_attachments(struct adf_device *dev,
  34. struct adf_attachment *attachments, size_t n_attachments);
  35. size_t adf_device_attachments_allowed(struct adf_device *dev,
  36. struct adf_attachment *attachments, size_t n_attachments);
  37. bool adf_device_attached(struct adf_device *dev, struct adf_overlay_engine *eng,
  38. struct adf_interface *intf);
  39. bool adf_device_attach_allowed(struct adf_device *dev,
  40. struct adf_overlay_engine *eng, struct adf_interface *intf);
  41. int adf_device_attach(struct adf_device *dev, struct adf_overlay_engine *eng,
  42. struct adf_interface *intf);
  43. int adf_device_detach(struct adf_device *dev, struct adf_overlay_engine *eng,
  44. struct adf_interface *intf);
  45. struct sync_fence *adf_device_post(struct adf_device *dev,
  46. struct adf_interface **intfs, size_t n_intfs,
  47. struct adf_buffer *bufs, size_t n_bufs, void *custom_data,
  48. size_t custom_data_size);
  49. struct sync_fence *adf_device_post_nocopy(struct adf_device *dev,
  50. struct adf_interface **intfs, size_t n_intfs,
  51. struct adf_buffer *bufs, size_t n_bufs, void *custom_data,
  52. size_t custom_data_size);
  53. #endif /* _VIDEO_ADF_CLIENT_H_ */