lsdc_gem.h 907 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2023 Loongson Technology Corporation Limited
  4. */
  5. #ifndef __LSDC_GEM_H__
  6. #define __LSDC_GEM_H__
  7. #include <drm/drm_device.h>
  8. #include <drm/drm_gem.h>
  9. struct drm_gem_object *
  10. lsdc_prime_import_sg_table(struct drm_device *ddev,
  11. struct dma_buf_attachment *attach,
  12. struct sg_table *sg);
  13. int lsdc_dumb_map_offset(struct drm_file *file,
  14. struct drm_device *dev,
  15. u32 handle,
  16. uint64_t *offset);
  17. int lsdc_dumb_create(struct drm_file *file,
  18. struct drm_device *ddev,
  19. struct drm_mode_create_dumb *args);
  20. void lsdc_gem_init(struct drm_device *ddev);
  21. int lsdc_show_buffer_object(struct seq_file *m, void *arg);
  22. struct drm_gem_object *
  23. lsdc_gem_object_create(struct drm_device *ddev,
  24. u32 domain,
  25. size_t size,
  26. bool kerenl,
  27. struct sg_table *sg,
  28. struct dma_resv *resv);
  29. #endif