[PATCH 3/3] drm/scheduler: modify args of drm_sched_entity_init

Christian König ckoenig.leichtzumerken at gmail.com
Fri Jul 13 07:10:39 UTC 2018


Am 12.07.2018 um 08:36 schrieb Nayan Deshmukh:
> replace run queue by a list of run queues and remove the
> sched arg as that is part of run queue itself
>
> Signed-off-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>

Going over this I've found one more thing which needs to be fixed:

[SNIP]
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> index 45bfdf4cc107..121c53e04603 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> @@ -49,12 +49,12 @@ static int etnaviv_open(struct drm_device *dev, struct drm_file *file)
>   
>   	for (i = 0; i < ETNA_MAX_PIPES; i++) {
>   		struct etnaviv_gpu *gpu = priv->gpu[i];
> +		struct drm_sched_rq *rq;
>   
> +		rq = &gpu->sched.sched_rq[DRM_SCHED_PRIORITY_NORMAL];
>   		if (gpu) {

Here you use gpu right before the NULL check. It's only an address 
calculation, but still a bit ugly.

Just move the assignment under the "if (gpu) {".

> -			drm_sched_entity_init(&gpu->sched,
> -				&ctx->sched_entity[i],
> -				&gpu->sched.sched_rq[DRM_SCHED_PRIORITY_NORMAL],
> -				NULL);
> +			drm_sched_entity_init(&ctx->sched_entity[i],
> +					      &rq, 1, NULL);

Regards,
Christian.


More information about the amd-gfx mailing list