On 2023-10-16 11:00, Matthew Brost wrote: > On Fri, Oct 13, 2023 at 10:06:18PM -0400, Luben Tuikov wrote: >> On 2023-10-11 19:58, Matthew Brost wrote: >>> DRM_SCHED_POLICY_SINGLE_ENTITY creates a 1 to 1 relationship between >>> scheduler and entity. No priorities or run queue used in this mode. >>> Intended for devices with firmware schedulers. >>> >>> v2: >>> - Drop sched / rq union (Luben) >>> v3: >>> - Don't pick entity if stopped in drm_sched_select_entity (Danilo) >>> v4: >>> - Rework if statement in drm_sched_entity_init (Luben) >>> - Update comment for drm_sched_entity_to_scheduler (Luben) >>> - Reword a few things in DOC comment (Luben) >>> - Do not check sched policy in for statement (Luben) >>> >>> Signed-off-by: Matthew Brost <matthew.brost@xxxxxxxxx> >>> --- >>> drivers/gpu/drm/scheduler/sched_entity.c | 70 ++++++++++++++----- >>> drivers/gpu/drm/scheduler/sched_fence.c | 2 +- >>> drivers/gpu/drm/scheduler/sched_main.c | 86 ++++++++++++++++++------ >>> include/drm/gpu_scheduler.h | 8 +++ >>> 4 files changed, 131 insertions(+), 35 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c >>> index cf42e2265d64..1ef3883764f9 100644 >>> --- a/drivers/gpu/drm/scheduler/sched_entity.c >>> +++ b/drivers/gpu/drm/scheduler/sched_entity.c >>> @@ -83,6 +83,7 @@ int drm_sched_entity_init(struct drm_sched_entity *entity, >>> memset(entity, 0, sizeof(struct drm_sched_entity)); >>> INIT_LIST_HEAD(&entity->list); >>> entity->rq = NULL; >>> + entity->single_sched = NULL; >>> entity->guilty = guilty; >>> entity->num_sched_list = num_sched_list; >>> entity->priority = priority; >>> @@ -90,8 +91,18 @@ int drm_sched_entity_init(struct drm_sched_entity *entity, >>> RCU_INIT_POINTER(entity->last_scheduled, NULL); >>> RB_CLEAR_NODE(&entity->rb_tree_node); >>> >>> - if(num_sched_list) >>> - entity->rq = &sched_list[0]->sched_rq[entity->priority]; >>> + >> >> ^ This adds an extra blank line and scripts/checkpatch.pl rejects it. >> > > Agree this isn't correct, will fix. > > Question - catch patch doesn't complain for me though. Wondering what I > am missing: > > mbrost@lstrano-desk:drivers.gpu.i915.drm-intel$ ./scripts/checkpatch.pl drivers/gpu/drm/i915/0004-drm-sched-Add-DRM_SCHED_POLICY_SINGLE_ENTITY-schedul.patch > total: 0 errors, 0 warnings, 386 lines checked > > drivers/gpu/drm/i915/0004-drm-sched-Add-DRM_SCHED_POLICY_SINGLE_ENTITY-schedul.patch has no obvious style problems and is ready for submission. Use this "--strict --emacs --show-types --codespell". -- Regards, Luben