Displaying 9 results from an estimated 9 matches for "drm_sched_init_param".
Did you mean:
drm_sched_init_params
2025 Jan 22
5
[PATCH] drm/sched: Use struct for drm_sched_init() params
...drm/amd/amdgpu/amdgpu_device.c
index cd4fac120834..c1f03eb5f5ea 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2821,6 +2821,9 @@ static int amdgpu_device_init_schedulers(struct amdgpu_device *adev)
{
long timeout;
int r, i;
+ struct drm_sched_init_params params;
+
+ memset(¶ms, 0, sizeof(struct drm_sched_init_params));
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
struct amdgpu_ring *ring = adev->rings[i];
@@ -2844,12 +2847,18 @@ static int amdgpu_device_init_schedulers(struct amdgpu_device *adev)
break;
}
- r = drm_sched...
2025 Jan 22
1
[PATCH] drm/sched: Use struct for drm_sched_init() params
...t; @@ -814,67 +814,124 @@ static const struct drm_sched_backend_ops v3d_cpu_sched_ops = {
> .free_job = v3d_cpu_job_free
> };
>
> +/*
> + * v3d's scheduler instances are all identical, except for ops and name.
> + */
> +static void
> +v3d_common_sched_init(struct drm_sched_init_params *params, struct device *dev)
> +{
> + memset(params, 0, sizeof(struct drm_sched_init_params));
> +
> + params->submit_wq = NULL; /* Use the system_wq. */
> + params->num_rqs = DRM_SCHED_PRIORITY_COUNT;
> + params->credit_limit = 1;
> + params->hang_limit = 0;
>...
2025 Jan 23
2
[PATCH] drm/sched: Use struct for drm_sched_init() params
...end_ops
> > v3d_cpu_sched_ops = {
> > ?? .free_job = v3d_cpu_job_free
> > ? };
> > ?
> > +/*
> > + * v3d's scheduler instances are all identical, except for ops and
> > name.
> > + */
> > +static void
> > +v3d_common_sched_init(struct drm_sched_init_params *params, struct
> > device *dev)
> > +{
> > + memset(params, 0, sizeof(struct drm_sched_init_params));
> > +
> > + params->submit_wq = NULL; /* Use the system_wq. */
> > + params->num_rqs = DRM_SCHED_PRIORITY_COUNT;
> > + params->credit_limit = 1;...
2025 Jan 22
1
[PATCH] drm/sched: Use struct for drm_sched_init() params
...>> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> >> @@ -3272,6 +3272,7 @@ group_create_queue(struct panthor_group *group,
> >> const struct drm_panthor_queue_create *args)
> >> {
> >> struct drm_gpu_scheduler *drm_sched;
> >> + struct drm_sched_init_params sched_params;
> >
> > nit: Could we use a struct initializer instead of a
> > memset(0)+field-assignment?
> >
> > struct drm_sched_init_params sched_params = {
Actually, you can even make it const if it's not modified after the
declaration.
> > .ops...
2025 Jan 23
1
[PATCH] drm/sched: Use struct for drm_sched_init() params
...u/drm/panthor/panthor_sched.c
> > >> @@ -3272,6 +3272,7 @@ group_create_queue(struct panthor_group *group,
> > >> const struct drm_panthor_queue_create *args)
> > >> {
> > >> struct drm_gpu_scheduler *drm_sched;
> > >> + struct drm_sched_init_params sched_params;
> > >
> > > nit: Could we use a struct initializer instead of a
> > > memset(0)+field-assignment?
> > >
> > > struct drm_sched_init_params sched_params = {
>
> Actually, you can even make it const if it's not modified after...
2025 Jan 23
0
[PATCH] drm/sched: Use struct for drm_sched_init() params
...;>>>>
>>>>> +/*
>>>>> + * v3d's scheduler instances are all identical, except for ops
>>>>> and
>>>>> name.
>>>>> + */
>>>>> +static void
>>>>> +v3d_common_sched_init(struct drm_sched_init_params *params,
>>>>> struct
>>>>> device *dev)
>>>>> +{
>>>>> + memset(params, 0, sizeof(struct
>>>>> drm_sched_init_params));
>>>>> +
>>>>> + params->submit_wq = NULL; /* Use the system_wq. */
&g...
2025 Jan 23
0
[PATCH] drm/sched: Use struct for drm_sched_init() params
...> - ?? struct workqueue_struct *submit_wq,
> > > - ?? u32 num_rqs, u32 credit_limit, unsigned int hang_limit,
> > > - ?? long timeout, struct workqueue_struct *timeout_wq,
> > > - ?? atomic_t *score, const char *name, struct device *dev);
> > > + const struct drm_sched_init_params *params);
> >
> >
> > Another nit: indenting is messed up here.
>
> That was done on purpose.
>
> I never got why so many like to intend to the opening brackets,
> because:
> 1. The kernel coding guide line does not demand it
> 2. It mixes tabs...
2025 Jan 23
0
[PATCH] drm/sched: Use struct for drm_sched_init() params
...> - ?? struct workqueue_struct *submit_wq,
> > > - ?? u32 num_rqs, u32 credit_limit, unsigned int hang_limit,
> > > - ?? long timeout, struct workqueue_struct *timeout_wq,
> > > - ?? atomic_t *score, const char *name, struct device *dev);
> > > + const struct drm_sched_init_params *params);
> >
> >
> > Another nit: indenting is messed up here.
>
> That was done on purpose.
Let's not change this convention, it's used all over the kernel tree, including
the GPU scheduler. People are used to read code that is formatted this way, plus
the att...
2025 Jan 23
0
[PATCH] drm/sched: Use struct for drm_sched_init() params
...it_wq,
> > > > > - ?? u32 num_rqs, u32 credit_limit, unsigned int hang_limit,
> > > > > - ?? long timeout, struct workqueue_struct *timeout_wq,
> > > > > - ?? atomic_t *score, const char *name, struct device *dev);
> > > > > + const struct drm_sched_init_params *params);
> > > >
> > > >
> > > > Another nit: indenting is messed up here.
> > >
> > > That was done on purpose.
> >
> > Let's not change this convention, it's used all over the kernel tree,
> > including
> >...