From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: Take an explicit ref for rq->batch
Date: Wed, 08 Apr 2020 14:36:59 +0300 [thread overview]
Message-ID: <87lfn6nr8k.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200408091723.28937-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Since we are peeking into the batch object of the request, it is
> beholden on us to hold a reference to it.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/issues/1634
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Follow the mon^H^H^H request.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/selftest_lrc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> index 57db3d0ffaf2..616d03506c2c 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> @@ -2655,7 +2655,7 @@ static int create_gang(struct intel_engine_cs *engine,
> if (IS_ERR(rq))
> goto err_obj;
>
> - rq->batch = vma;
> + rq->batch = i915_vma_get(vma);
> i915_request_get(rq);
>
> i915_vma_lock(vma);
> @@ -2679,6 +2679,7 @@ static int create_gang(struct intel_engine_cs *engine,
> return 0;
>
> err_rq:
> + i915_vma_put(rq->batch);
> i915_request_put(rq);
> err_obj:
> i915_gem_object_put(obj);
> @@ -2775,6 +2776,7 @@ static int live_preempt_gang(void *arg)
> err = -ETIME;
> }
>
> + i915_vma_put(rq->batch);
> i915_request_put(rq);
> rq = n;
> }
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-04-08 11:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 9:16 [Intel-gfx] [PATCH] drm/i915/selftests: Take an explicit ref for rq->batch Chris Wilson
2020-04-08 9:17 ` Chris Wilson
2020-04-08 11:36 ` Mika Kuoppala [this message]
2020-04-08 10:51 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: Take an explicit ref for rq->batch (rev2) Patchwork
2020-04-08 19:24 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfn6nr8k.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.