diff options
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_sched.c')
| -rw-r--r-- | drivers/gpu/drm/v3d/v3d_sched.c | 44 | 
1 files changed, 8 insertions, 36 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c index dd7fcc36d726..e0cb7d0697a7 100644 --- a/drivers/gpu/drm/v3d/v3d_sched.c +++ b/drivers/gpu/drm/v3d/v3d_sched.c @@ -13,7 +13,7 @@   * jobs when bulk background jobs are queued up, we submit a new job   * to the HW only when it has completed the last one, instead of   * filling up the CT[01]Q FIFOs with jobs.  Similarly, we use - * v3d_job_dependency() to manage the dependency between bin and + * drm_sched_job_add_dependency() to manage the dependency between bin and   * render, instead of having the clients submit jobs using the HW's   * semaphores to interlock between them.   */ @@ -55,12 +55,11 @@ to_csd_job(struct drm_sched_job *sched_job)  }  static void -v3d_job_free(struct drm_sched_job *sched_job) +v3d_sched_job_free(struct drm_sched_job *sched_job)  {  	struct v3d_job *job = to_v3d_job(sched_job); -	drm_sched_job_cleanup(sched_job); -	v3d_job_put(job); +	v3d_job_cleanup(job);  }  static void @@ -73,28 +72,6 @@ v3d_switch_perfmon(struct v3d_dev *v3d, struct v3d_job *job)  		v3d_perfmon_start(v3d, job->perfmon);  } -/* - * Returns the fences that the job depends on, one by one. - * - * If placed in the scheduler's .dependency method, the corresponding - * .run_job won't be called until all of them have been signaled. - */ -static struct dma_fence * -v3d_job_dependency(struct drm_sched_job *sched_job, -		   struct drm_sched_entity *s_entity) -{ -	struct v3d_job *job = to_v3d_job(sched_job); - -	/* XXX: Wait on a fence for switching the GMP if necessary, -	 * and then do so. -	 */ - -	if (!xa_empty(&job->deps)) -		return xa_erase(&job->deps, job->last_dep++); - -	return NULL; -} -  static struct dma_fence *v3d_bin_job_run(struct drm_sched_job *sched_job)  {  	struct v3d_bin_job *job = to_bin_job(sched_job); @@ -373,38 +350,33 @@ v3d_csd_job_timedout(struct drm_sched_job *sched_job)  }  static const struct drm_sched_backend_ops v3d_bin_sched_ops = { -	.dependency = v3d_job_dependency,  	.run_job = v3d_bin_job_run,  	.timedout_job = v3d_bin_job_timedout, -	.free_job = v3d_job_free, +	.free_job = v3d_sched_job_free,  };  static const struct drm_sched_backend_ops v3d_render_sched_ops = { -	.dependency = v3d_job_dependency,  	.run_job = v3d_render_job_run,  	.timedout_job = v3d_render_job_timedout, -	.free_job = v3d_job_free, +	.free_job = v3d_sched_job_free,  };  static const struct drm_sched_backend_ops v3d_tfu_sched_ops = { -	.dependency = v3d_job_dependency,  	.run_job = v3d_tfu_job_run,  	.timedout_job = v3d_generic_job_timedout, -	.free_job = v3d_job_free, +	.free_job = v3d_sched_job_free,  };  static const struct drm_sched_backend_ops v3d_csd_sched_ops = { -	.dependency = v3d_job_dependency,  	.run_job = v3d_csd_job_run,  	.timedout_job = v3d_csd_job_timedout, -	.free_job = v3d_job_free +	.free_job = v3d_sched_job_free  };  static const struct drm_sched_backend_ops v3d_cache_clean_sched_ops = { -	.dependency = v3d_job_dependency,  	.run_job = v3d_cache_clean_job_run,  	.timedout_job = v3d_generic_job_timedout, -	.free_job = v3d_job_free +	.free_job = v3d_sched_job_free  };  int  |