[Intel-gfx] [PATCH] drm/i915/selftests: Set igt_spinner.gt for early exit
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Tue Jul 9 06:28:18 UTC 2019
On 08/07/2019 22:55, Chris Wilson wrote:
> Set up a default gt pointer for an early cleanup of igt_spinnter, before
> a request is created and igt_spinner.gt set to the active engine's.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
> drivers/gpu/drm/i915/selftests/igt_spinner.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/selftests/igt_spinner.c b/drivers/gpu/drm/i915/selftests/igt_spinner.c
> index 0c1f65262a63..89b6552a6497 100644
> --- a/drivers/gpu/drm/i915/selftests/igt_spinner.c
> +++ b/drivers/gpu/drm/i915/selftests/igt_spinner.c
> @@ -19,6 +19,7 @@ int igt_spinner_init(struct igt_spinner *spin, struct drm_i915_private *i915)
>
> memset(spin, 0, sizeof(*spin));
> spin->i915 = i915;
> + spin->gt = &i915->gt;
>
> spin->hws = i915_gem_object_create_internal(i915, PAGE_SIZE);
> if (IS_ERR(spin->hws)) {
>
I thought I audited all call paths but this is certainly safer. Could
drop the conditional something which check gt now.. hm it's not there..
I thought I put "if (spin->gt) igt_gt_chipset_flush(spin->gt);" on the
end path. Strange..
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Regards,
Tvrtko
More information about the Intel-gfx
mailing list