Commit 620e762f authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/scheduler: move entity handling into separate file

This is complex enough on it's own. Move it into a separate C file.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8acc7254
...@@ -20,6 +20,6 @@ ...@@ -20,6 +20,6 @@
# OTHER DEALINGS IN THE SOFTWARE. # OTHER DEALINGS IN THE SOFTWARE.
# #
# #
gpu-sched-y := gpu_scheduler.o sched_fence.o gpu-sched-y := gpu_scheduler.o sched_fence.o sched_entity.o
obj-$(CONFIG_DRM_SCHED) += gpu-sched.o obj-$(CONFIG_DRM_SCHED) += gpu-sched.o
This diff is collapsed.
This diff is collapsed.
...@@ -288,6 +288,21 @@ int drm_sched_init(struct drm_gpu_scheduler *sched, ...@@ -288,6 +288,21 @@ int drm_sched_init(struct drm_gpu_scheduler *sched,
uint32_t hw_submission, unsigned hang_limit, long timeout, uint32_t hw_submission, unsigned hang_limit, long timeout,
const char *name); const char *name);
void drm_sched_fini(struct drm_gpu_scheduler *sched); void drm_sched_fini(struct drm_gpu_scheduler *sched);
int drm_sched_job_init(struct drm_sched_job *job,
struct drm_sched_entity *entity,
void *owner);
void drm_sched_wakeup(struct drm_gpu_scheduler *sched);
void drm_sched_hw_job_reset(struct drm_gpu_scheduler *sched,
struct drm_sched_job *job);
void drm_sched_job_recovery(struct drm_gpu_scheduler *sched);
bool drm_sched_dependency_optimized(struct dma_fence* fence,
struct drm_sched_entity *entity);
void drm_sched_job_kickout(struct drm_sched_job *s_job);
void drm_sched_rq_add_entity(struct drm_sched_rq *rq,
struct drm_sched_entity *entity);
void drm_sched_rq_remove_entity(struct drm_sched_rq *rq,
struct drm_sched_entity *entity);
int drm_sched_entity_init(struct drm_sched_entity *entity, int drm_sched_entity_init(struct drm_sched_entity *entity,
struct drm_sched_rq **rq_list, struct drm_sched_rq **rq_list,
...@@ -296,22 +311,17 @@ int drm_sched_entity_init(struct drm_sched_entity *entity, ...@@ -296,22 +311,17 @@ int drm_sched_entity_init(struct drm_sched_entity *entity,
long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout); long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout);
void drm_sched_entity_fini(struct drm_sched_entity *entity); void drm_sched_entity_fini(struct drm_sched_entity *entity);
void drm_sched_entity_destroy(struct drm_sched_entity *entity); void drm_sched_entity_destroy(struct drm_sched_entity *entity);
void drm_sched_entity_select_rq(struct drm_sched_entity *entity);
struct drm_sched_job *drm_sched_entity_pop_job(struct drm_sched_entity *entity);
void drm_sched_entity_push_job(struct drm_sched_job *sched_job, void drm_sched_entity_push_job(struct drm_sched_job *sched_job,
struct drm_sched_entity *entity); struct drm_sched_entity *entity);
void drm_sched_entity_set_priority(struct drm_sched_entity *entity, void drm_sched_entity_set_priority(struct drm_sched_entity *entity,
enum drm_sched_priority priority); enum drm_sched_priority priority);
bool drm_sched_entity_is_ready(struct drm_sched_entity *entity);
struct drm_sched_fence *drm_sched_fence_create( struct drm_sched_fence *drm_sched_fence_create(
struct drm_sched_entity *s_entity, void *owner); struct drm_sched_entity *s_entity, void *owner);
void drm_sched_fence_scheduled(struct drm_sched_fence *fence); void drm_sched_fence_scheduled(struct drm_sched_fence *fence);
void drm_sched_fence_finished(struct drm_sched_fence *fence); void drm_sched_fence_finished(struct drm_sched_fence *fence);
int drm_sched_job_init(struct drm_sched_job *job,
struct drm_sched_entity *entity,
void *owner);
void drm_sched_hw_job_reset(struct drm_gpu_scheduler *sched,
struct drm_sched_job *job);
void drm_sched_job_recovery(struct drm_gpu_scheduler *sched);
bool drm_sched_dependency_optimized(struct dma_fence* fence,
struct drm_sched_entity *entity);
void drm_sched_job_kickout(struct drm_sched_job *s_job);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment