Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8bf0e76 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915/selftests: Let igt_vma_partial et al breathe

Give the scheduler a chance to breathe by calling cond_resched() as some
of the loops may take some time on slower machines, and so catch the
attention of the watchdogs.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111196


Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Reviewed-by: default avatarMatthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190723095800.2820-1-chris@chris-wilson.co.uk
parent de6a2634
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -193,6 +193,8 @@ static int igt_vma_create(void *arg)
			list_del_init(&ctx->link);
			mock_context_close(ctx);
		}

		cond_resched();
	}

end:
@@ -341,6 +343,8 @@ static int igt_vma_pin1(void *arg)
				goto out;
			}
		}

		cond_resched();
	}

	err = 0;
@@ -597,6 +601,8 @@ static int igt_vma_rotate_remap(void *arg)
					}

					i915_vma_unpin(vma);

					cond_resched();
				}
			}
		}
@@ -752,6 +758,8 @@ static int igt_vma_partial(void *arg)

				i915_vma_unpin(vma);
				nvma++;

				cond_resched();
			}
		}

@@ -961,6 +969,8 @@ static int igt_vma_remapped_gtt(void *arg)
				}
			}
			i915_vma_unpin_iomap(vma);

			cond_resched();
		}
	}