Skip to content

Commit

Permalink
Merge tag 'drm-misc-next-fixes-2023-01-03' of git://anongit.freedeskt…
Browse files Browse the repository at this point in the history
…op.org/drm/drm-misc into drm-fixes

Maxime writes:

"The drm-misc-next-fixes leftovers. It addresses a bug in drm/scheduler
ending up causing a lockup, and reduces the stack usage of some drm/mm
kunit tests."

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20230103144926.bmjjni3xnuis2jmq@houat
  • Loading branch information
Daniel Vetter committed Jan 3, 2023
2 parents 88603b6 + 03dec92 commit c8de526
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/scheduler/sched_entity.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int drm_sched_entity_init(struct drm_sched_entity *entity,
init_completion(&entity->entity_idle);

/* We start in an idle state. */
complete(&entity->entity_idle);
complete_all(&entity->entity_idle);

spin_lock_init(&entity->rq_lock);
spsc_queue_init(&entity->job_queue);
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/scheduler/sched_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ static int drm_sched_main(void *param)
sched_job = drm_sched_entity_pop_job(entity);

if (!sched_job) {
complete(&entity->entity_idle);
complete_all(&entity->entity_idle);
continue;
}

Expand All @@ -998,7 +998,7 @@ static int drm_sched_main(void *param)

trace_drm_run_job(sched_job, entity);
fence = sched->ops->run_job(sched_job);
complete(&entity->entity_idle);
complete_all(&entity->entity_idle);
drm_sched_fence_scheduled(s_fence);

if (!IS_ERR_OR_NULL(fence)) {
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ obj-$(CONFIG_DRM_KUNIT_TEST) += \
drm_mm_test.o \
drm_plane_helper_test.o \
drm_rect_test.o

CFLAGS_drm_mm_test.o := $(DISABLE_STRUCTLEAK_PLUGIN)
6 changes: 3 additions & 3 deletions drivers/gpu/drm/tests/drm_mm_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ static bool expect_reserve_fail(struct kunit *test, struct drm_mm *mm, struct dr
return false;
}

static bool check_reserve_boundaries(struct kunit *test, struct drm_mm *mm,
unsigned int count,
u64 size)
static bool noinline_for_stack check_reserve_boundaries(struct kunit *test, struct drm_mm *mm,
unsigned int count,
u64 size)
{
const struct boundary {
u64 start, size;
Expand Down

0 comments on commit c8de526

Please sign in to comment.