linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.william.auld@gmail.com>
To: Matthew Auld <matthew.auld@intel.com>
Cc: "Robert Beckett" <bob.beckett@collabora.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Tvrtko Ursulin" <tvrtko.ursulin@linux.intel.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Oak Zeng" <oak.zeng@intel.com>,
	"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
	"kernel list" <linux-kernel@vger.kernel.org>,
	"ML dri-devel" <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/ttm: fix large buffer population trucation
Date: Tue, 14 Dec 2021 14:52:08 +0000	[thread overview]
Message-ID: <CAM0jSHNn4yq1u_Qwr9v9kUCcEexBmb+=LML2=OF1Rspyf-TDfA@mail.gmail.com> (raw)
In-Reply-To: <e7cad6ca-d106-c529-6f22-93a7847cd7c0@intel.com>

On Mon, 13 Dec 2021 at 13:03, Matthew Auld <matthew.auld@intel.com> wrote:
>
> On 10/12/2021 19:50, Robert Beckett wrote:
> > ttm->num_pages is uint32_t which was causing very large buffers to
> > only populate a truncated size.
> >
> > This fixes gem_create@create-clear igt test on large memory systems.
> >
> > Fixes: 7ae034590cea ("drm/i915/ttm: add tt shmem backend")
> > Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
>
> Nice catch,
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>

Pushed to drm-intel-gt-next. Thanks again for the fix.

>
> > ---
> >   drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > index 218a9b3037c7..923cc7ad8d70 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> > @@ -166,7 +166,7 @@ static int i915_ttm_tt_shmem_populate(struct ttm_device *bdev,
> >       struct intel_memory_region *mr = i915->mm.regions[INTEL_MEMORY_SYSTEM];
> >       struct i915_ttm_tt *i915_tt = container_of(ttm, typeof(*i915_tt), ttm);
> >       const unsigned int max_segment = i915_sg_segment_size();
> > -     const size_t size = ttm->num_pages << PAGE_SHIFT;
> > +     const size_t size = (size_t)ttm->num_pages << PAGE_SHIFT;
> >       struct file *filp = i915_tt->filp;
> >       struct sgt_iter sgt_iter;
> >       struct sg_table *st;
> >

      reply	other threads:[~2021-12-14 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 19:50 [PATCH] drm/i915/ttm: fix large buffer population trucation Robert Beckett
2021-12-13 13:02 ` Matthew Auld
2021-12-14 14:52   ` Matthew Auld [this message]

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='CAM0jSHNn4yq1u_Qwr9v9kUCcEexBmb+=LML2=OF1Rspyf-TDfA@mail.gmail.com' \
    --to=matthew.william.auld@gmail.com \
    --cc=airlied@linux.ie \
    --cc=bob.beckett@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.auld@intel.com \
    --cc=oak.zeng@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tvrtko.ursulin@linux.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;
as well as URLs for NNTP newsgroup(s).