All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Matthew Auld <matthew.auld@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: clear the end of the shadow batch if needed
Date: Wed, 23 Dec 2020 20:46:49 +0000	[thread overview]
Message-ID: <160875640941.15843.17454890865469237203@build.alporthouse.com> (raw)
In-Reply-To: <20201223171941.308038-1-matthew.auld@intel.com>

Quoting Matthew Auld (2020-12-23 17:19:41)
> The shadow batch is an internal object, which doesn't have any page
> clearing, and since the batch_len might be within a page, we should take
> care to clear any unused dwords before making it visible in the ppGTT.
> 
> Testcase: igt/gen9_exec_parse/shadow-peek
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_cmd_parser.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
> index 8d88402387bd..6506ed30b444 100644
> --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
> +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
> @@ -1139,6 +1139,7 @@ static u32 *copy_batch(struct drm_i915_gem_object *dst_obj,
>                        struct drm_i915_gem_object *src_obj,
>                        unsigned long offset, unsigned long length)
>  {
> +       unsigned long orig_length = length;

Hmm. This is too short, since this is shorter than the vma->size we
retrieved from the pool. It does feel like we need to clear first.

Anyway well spotted, and this should be cc'ed stable when we push.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-12-23 20:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23 17:19 [Intel-gfx] [PATCH] drm/i915: clear the end of the shadow batch if needed Matthew Auld
2020-12-23 18:57 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-12-23 20:46 ` Chris Wilson [this message]
2020-12-23 23:33 ` [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=160875640941.15843.17454890865469237203@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    /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.