1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (C) 2017 Etnaviv Project 4 */ 5 6 #ifndef __ETNAVIV_SCHED_H__ 7 #define __ETNAVIV_SCHED_H__ 8 9 #include <drm/gpu_scheduler.h> 10 11 struct etnaviv_gpu; 12 13 static inline 14 struct etnaviv_gem_submit *to_etnaviv_submit(struct drm_sched_job *sched_job) 15 { 16 return container_of(sched_job, struct etnaviv_gem_submit, sched_job); 17 } 18 19 int etnaviv_sched_init(struct etnaviv_gpu *gpu); 20 void etnaviv_sched_fini(struct etnaviv_gpu *gpu); 21 int etnaviv_sched_push_job(struct drm_sched_entity *sched_entity, 22 struct etnaviv_gem_submit *submit); 23 24 #endif /* __ETNAVIV_SCHED_H__ */ 25