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>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/blt: fixup block_size rounding
Date: Mon, 28 Oct 2019 17:33:52 +0000	[thread overview]
Message-ID: <157228403288.3489.13752814135679745018@skylake-alporthouse-com> (raw)
In-Reply-To: <20191028164646.GR1208@intel.com>

Quoting Ville Syrjälä (2019-10-28 16:46:46)
> On Mon, Oct 28, 2019 at 04:39:50PM +0000, Matthew Auld wrote:
> > There is nothing to say that the obj->base.size is actually a multiple
> > of the block_size.
> > 
> > Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  drivers/gpu/drm/i915/gem/i915_gem_object_blt.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c b/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c
> > index 516e61e99212..5597f1345a63 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c
> > @@ -30,7 +30,7 @@ struct i915_vma *intel_emit_vma_fill_blt(struct intel_context *ce,
> >       GEM_BUG_ON(intel_engine_is_virtual(ce->engine));
> >       intel_engine_pm_get(ce->engine);
> >  
> > -     count = div_u64(vma->size, block_size);
> > +     count = DIV64_U64_ROUND_UP(vma->size, block_size);
> 
> block_size size look to be u32?

And we can control it to be a pot.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: "Matthew Auld" <matthew.auld@intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/blt: fixup block_size rounding
Date: Mon, 28 Oct 2019 17:33:52 +0000	[thread overview]
Message-ID: <157228403288.3489.13752814135679745018@skylake-alporthouse-com> (raw)
Message-ID: <20191028173352.UMn9d05gP4eL34IXGb7Uo2Fqdj4DV-mjeZsrJOphbnE@z> (raw)
In-Reply-To: <20191028164646.GR1208@intel.com>

Quoting Ville Syrjälä (2019-10-28 16:46:46)
> On Mon, Oct 28, 2019 at 04:39:50PM +0000, Matthew Auld wrote:
> > There is nothing to say that the obj->base.size is actually a multiple
> > of the block_size.
> > 
> > Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  drivers/gpu/drm/i915/gem/i915_gem_object_blt.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c b/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c
> > index 516e61e99212..5597f1345a63 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_object_blt.c
> > @@ -30,7 +30,7 @@ struct i915_vma *intel_emit_vma_fill_blt(struct intel_context *ce,
> >       GEM_BUG_ON(intel_engine_is_virtual(ce->engine));
> >       intel_engine_pm_get(ce->engine);
> >  
> > -     count = div_u64(vma->size, block_size);
> > +     count = DIV64_U64_ROUND_UP(vma->size, block_size);
> 
> block_size size look to be u32?

And we can control it to be a pot.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-10-28 17:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 16:39 [PATCH] drm/i915/blt: fixup block_size rounding Matthew Auld
2019-10-28 16:39 ` [Intel-gfx] " Matthew Auld
2019-10-28 16:46 ` Ville Syrjälä
2019-10-28 16:46   ` [Intel-gfx] " Ville Syrjälä
2019-10-28 17:33   ` Chris Wilson [this message]
2019-10-28 17:33     ` Chris Wilson
2019-10-28 20:10 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-10-28 20:10   ` [Intel-gfx] " Patchwork
2019-10-28 21:55 [PATCH] " Chris Wilson

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=157228403288.3489.13752814135679745018@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=ville.syrjala@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 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.