etnaviv_sched.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) 2017 Etnaviv Project
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License version 2 as published by
  6. * the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. *
  13. * You should have received a copy of the GNU General Public License along with
  14. * this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef __ETNAVIV_SCHED_H__
  17. #define __ETNAVIV_SCHED_H__
  18. #include <drm/gpu_scheduler.h>
  19. struct etnaviv_gpu;
  20. static inline
  21. struct etnaviv_gem_submit *to_etnaviv_submit(struct drm_sched_job *sched_job)
  22. {
  23. return container_of(sched_job, struct etnaviv_gem_submit, sched_job);
  24. }
  25. int etnaviv_sched_init(struct etnaviv_gpu *gpu);
  26. void etnaviv_sched_fini(struct etnaviv_gpu *gpu);
  27. int etnaviv_sched_push_job(struct drm_sched_entity *sched_entity,
  28. struct etnaviv_gem_submit *submit);
  29. #endif /* __ETNAVIV_SCHED_H__ */