Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 28 Jan 2025 22:49:47 +0100
Christian Gmeiner <christian.gmeiner@xxxxxxxxx> wrote:

> >  int etnaviv_sched_init(struct etnaviv_gpu *gpu)
> >  {
> > -       int ret;
> > +       const struct drm_sched_init_args args = {  
> 
> Why not declare it as static const struct drm_sched_init_args args = { ?

Because some bits in there are not static, in this particular case,
gpu->dev is not static for instance.

> This question applies to all similar occurrences in the patch.
> 
> > +               .ops = &etnaviv_sched_ops,
> > +               .num_rqs = DRM_SCHED_PRIORITY_COUNT,
> > +               .credit_limit = etnaviv_hw_jobs_limit,
> > +               .hang_limit = etnaviv_job_hang_limit,
> > +               .timeout = msecs_to_jiffies(500),
> > +               .name = dev_name(gpu->dev),
> > +               .dev = gpu->dev
> > +       };
> >
> > -       ret = drm_sched_init(&gpu->sched, &etnaviv_sched_ops, NULL,
> > -                            DRM_SCHED_PRIORITY_COUNT,
> > -                            etnaviv_hw_jobs_limit, etnaviv_job_hang_limit,
> > -                            msecs_to_jiffies(500), NULL, NULL,
> > -                            dev_name(gpu->dev), gpu->dev);
> > -       if (ret)
> > -               return ret;
> > -
> > -       return 0;
> > +       return drm_sched_init(&gpu->sched, &args);
> >  }



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux