rocket_drv.h 716 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright 2024-2025 Tomeu Vizoso <tomeu@tomeuvizoso.net> */
  3. #ifndef __ROCKET_DRV_H__
  4. #define __ROCKET_DRV_H__
  5. #include <drm/drm_mm.h>
  6. #include <drm/gpu_scheduler.h>
  7. #include "rocket_device.h"
  8. extern const struct dev_pm_ops rocket_pm_ops;
  9. struct rocket_iommu_domain {
  10. struct iommu_domain *domain;
  11. struct kref kref;
  12. };
  13. struct rocket_file_priv {
  14. struct rocket_device *rdev;
  15. struct rocket_iommu_domain *domain;
  16. struct drm_mm mm;
  17. struct mutex mm_lock;
  18. struct drm_sched_entity sched_entity;
  19. };
  20. struct rocket_iommu_domain *rocket_iommu_domain_get(struct rocket_file_priv *rocket_priv);
  21. void rocket_iommu_domain_put(struct rocket_iommu_domain *domain);
  22. #endif