Nayan Deshmukh <[email protected]> writes: > entity has a scheduler field and we don't need the sched argument > in any of the functions where entity is provided. > > Signed-off-by: Nayan Deshmukh <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 13 +++++-------- > drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +-- > drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 +-- > drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- > drivers/gpu/drm/etnaviv/etnaviv_drv.c | 3 +-- > drivers/gpu/drm/etnaviv/etnaviv_sched.c | 4 ++-- > drivers/gpu/drm/scheduler/gpu_scheduler.c | 20 +++++++++++--------- > drivers/gpu/drm/v3d/v3d_drv.c | 4 +--- > drivers/gpu/drm/v3d/v3d_gem.c | 2 -- > include/drm/gpu_scheduler.h | 10 +++------- > 13 files changed, 30 insertions(+), 42 deletions(-) >
> diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c
> b/drivers/gpu/drm/scheduler/gpu_scheduler.c
> index dac71e3b4514..a3b55c542025 100644
> --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c
> +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c
> @@ -273,11 +273,12 @@ static void drm_sched_entity_kill_jobs_cb(struct
> dma_fence *f,
> *
> * Returns the remaining time in jiffies left from the input timeout
> */
> -long drm_sched_entity_flush(struct drm_gpu_scheduler *sched,
> - struct drm_sched_entity *entity, long timeout)
> +long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout)
> {
> + struct drm_gpu_scheduler *sched;
> long ret = timeout;
>
> + sched = entity->sched;
> if (!drm_sched_entity_is_initialized(sched, entity))
> return ret;
> /**
> @@ -312,10 +313,11 @@ EXPORT_SYMBOL(drm_sched_entity_flush);
> * entity and signals all jobs with an error code if the process was killed.
> *
> */
> -void drm_sched_entity_fini(struct drm_gpu_scheduler *sched,
> - struct drm_sched_entity *entity)
> +void drm_sched_entity_fini(struct drm_sched_entity *entity)
> {
> + struct drm_gpu_scheduler *sched;
>
> + sched = entity->sched;
Maybe fold the initialization into the declaration above, like you did
elsewhere?
Regardless, this is a wonderful cleanup of the API.
Reviewed-by: Eric Anholt <[email protected]>
signature.asc
Description: PGP signature
_______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
