Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: "Hellstrom, Thomas" <thomas.hellstrom@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Auld, Matthew" <matthew.auld@intel.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 1/4] drm/i915/gt: GEM_BUG_ON unexpected NULL at scatterlist walking
Date: Thu, 21 Apr 2022 19:34:56 +0530	[thread overview]
Message-ID: <20220421140455.GF18679@intel.com> (raw)
In-Reply-To: <173edd6c6f5de5d6e596d9df109bfd019ce6ca14.camel@intel.com>

On 2022-04-21 at 18:57:59 +0530, Hellstrom, Thomas wrote:
> On Thu, 2022-04-21 at 17:08 +0530, Ramalingam C wrote:
> > While locating the start of ccs scatterlist in smem scatterlist, that
> > has
> > to be the size of lmem obj size + corresponding ccs data size. Report
> > bug
> > if scatterlist terminate before that length.
> >
> > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > ---
> >  drivers/gpu/drm/i915/gt/intel_migrate.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c
> > b/drivers/gpu/drm/i915/gt/intel_migrate.c
> > index 9d552f30b627..29d761da02c4 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_migrate.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
> > @@ -687,6 +687,12 @@ static void get_ccs_sg_sgt(struct sgt_dma *it,
> > u32 bytes_to_cpy)
> >                 bytes_to_cpy -= len;
> >
> 
> 
> >                 it->sg = __sg_next(it->sg);
> 
> If bytes_to_cpy == 0 here, couldn't it->sg be NULL then?
Hi,

bytes_to_cpy is the lmem size and the scatterlist is the length of
bytes_to_cpy + GET_CCS_BYTES(bytes_to_cpy). So this should not be null.

when bytes_to_cpy reduces to zero we will be having the start of the scatterlist
for ccs.

Ram.
> 
> > +
> > +               /*
> > +                * scatterlist supposed to be the size of
> > +                * bytes_to_cpy + GET_CCS_BYTES(bytes_to_copy).
> > +                */
> > +               GEM_BUG_ON(!it->sg);
> >                 it->dma = sg_dma_address(it->sg);
> >                 it->max = it->dma + sg_dma_len(it->sg);
> >         } while (bytes_to_cpy);
> 
> /Thomas
> 

  reply	other threads:[~2022-04-21 14:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 11:38 [Intel-gfx] [PATCH 0/4] Flat-CCS eviction enhancements Ramalingam C
2022-04-21 11:38 ` [Intel-gfx] [PATCH 1/4] drm/i915/gt: GEM_BUG_ON unexpected NULL at scatterlist walking Ramalingam C
2022-04-21 13:27   ` Hellstrom, Thomas
2022-04-21 14:04     ` Ramalingam C [this message]
2022-04-21 11:38 ` [Intel-gfx] [PATCH 2/4] drm/i915/gt: optimize the ccs_sz calculation per chunk Ramalingam C
2022-04-21 11:38 ` [Intel-gfx] [PATCH 3/4] drm/i915/gt: Extend doc on Flat-CCS obj eviction Ramalingam C
2022-04-21 13:37   ` Hellstrom, Thomas
2022-04-22  8:43     ` Ramalingam C
2022-04-21 11:38 ` [Intel-gfx] [PATCH 4/4] uapi/drm/i915: Update the placement list impact on obj residency Ramalingam C
2022-04-21 13:40   ` Hellstrom, Thomas
2022-04-21 14:20 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Flat-CCS eviction enhancements (rev2) Patchwork
2022-04-21 14:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-04-21 18:50 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=20220421140455.GF18679@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=thomas.hellstrom@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