From: "Hellstrom, Thomas" <thomas.hellstrom@intel.com>
To: "Das, Nirmoy" <nirmoy.das@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Cc: "Auld, Matthew" <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: individualize fences before adding
Date: Mon, 16 May 2022 09:38:13 +0000 [thread overview]
Message-ID: <ff9bf2cc8942481020d5bb3f9e25d246e4fa4f8f.camel@intel.com> (raw)
In-Reply-To: <20220513113752.21265-1-nirmoy.das@intel.com>
Hi Nirmoy.
On Fri, 2022-05-13 at 13:37 +0200, Nirmoy Das wrote:
> _i915_vma_move_to_active() can receive > 1 fence for
> multiple batch buffer submission so make sure to
> individualize fences before adding to dma_resv obj
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5614
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
LGTM.
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_vma.c | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_vma.c
> b/drivers/gpu/drm/i915/i915_vma.c
> index 4f6db539571a..f987fc1264c0 100644
> --- a/drivers/gpu/drm/i915/i915_vma.c
> +++ b/drivers/gpu/drm/i915/i915_vma.c
> @@ -23,6 +23,7 @@
> */
>
> #include <linux/sched/mm.h>
> +#include <linux/dma-fence-array.h>
> #include <drm/drm_gem.h>
>
> #include "display/intel_frontbuffer.h"
> @@ -1840,8 +1841,12 @@ int _i915_vma_move_to_active(struct i915_vma
> *vma,
> }
>
> if (fence) {
> - dma_resv_add_fence(vma->obj->base.resv,
> fence,
> - DMA_RESV_USAGE_WRITE);
> + int idx;
> + struct dma_fence *curr;
> +
> + dma_fence_array_for_each(curr, idx, fence)
> + dma_resv_add_fence(vma->obj-
> >base.resv, curr,
> +
> DMA_RESV_USAGE_WRITE);
> obj->write_domain = I915_GEM_DOMAIN_RENDER;
> obj->read_domains = 0;
> }
> @@ -1853,8 +1858,12 @@ int _i915_vma_move_to_active(struct i915_vma
> *vma,
> }
>
> if (fence) {
> - dma_resv_add_fence(vma->obj->base.resv,
> fence,
> - DMA_RESV_USAGE_READ);
> + int idx;
> + struct dma_fence *curr;
> +
> + dma_fence_array_for_each(curr, idx, fence)
> + dma_resv_add_fence(vma->obj-
> >base.resv, curr,
> +
> DMA_RESV_USAGE_READ);
> obj->write_domain = 0;
> }
> }
next prev parent reply other threads:[~2022-05-16 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 11:37 [Intel-gfx] [PATCH] drm/i915: individualize fences before adding Nirmoy Das
2022-05-13 14:54 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2022-05-16 10:57 ` Das, Nirmoy
2022-05-16 9:38 ` Hellstrom, Thomas [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-05-16 15:51 [Intel-gfx] [PATCH] " Nirmoy Das
2022-05-16 16:30 ` Das, Nirmoy
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=ff9bf2cc8942481020d5bb3f9e25d246e4fa4f8f.camel@intel.com \
--to=thomas.hellstrom@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=nirmoy.das@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox