public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2 1/2] lib/intel_bufops: Introduce buffer operations
Date: Tue, 3 Dec 2019 19:46:45 +0200	[thread overview]
Message-ID: <20191203174645.GV1208@intel.com> (raw)
In-Reply-To: <20191203170558.GA4807@zkempczy-mobl2>

On Tue, Dec 03, 2019 at 06:05:58PM +0100, Zbigniew Kempczyński wrote:
> On Tue, Dec 03, 2019 at 10:25:29AM +0100, Katarzyna Dec wrote:
> 
> <cut>
> > > +static void *x_ptr(void *ptr,
> > > +		   unsigned int x, unsigned int y,
> > > +		   unsigned int stride, unsigned int cpp)
> > > +{
> > > +	const int tile_width = 512;
> > > +	const int tile_height = 8;
> > It can be really silly question - are these ^ values always the same?
> 
> Yes.

If you ignore gen2.

> 
> > > +	const int tile_size = tile_width * tile_height;
> > > +	int tile_x, tile_y;
> > > +	int offset_x, offset_y, pos;
> > > +
> > > +	x *= cpp;
> > > +	tile_x = x / tile_width;
> > > +	tile_y = y / tile_height;
> > > +	offset_x = (tile_x * tile_size);
> > > +	offset_y = (tile_y * stride * tile_height);
> > > +
> > > +	pos = offset_y + offset_x +
> > > +			(y % tile_height * tile_width) + (x % tile_width);
> > > +
> > > +	return ptr + pos;
> > > +}
> > > +
> > > +static void *y_ptr(void *ptr,
> > > +		   unsigned int x, unsigned int y,
> > > +		   unsigned int stride, unsigned int cpp)
> > > +{
> > > +	const int tile_width = 128;
> > > +	const int tile_height = 32;
> > > +	const int owords = 16;
> > Similar question. I guess this is something specific either to Intel Gen or to
> > testcases.
> 
> Tile-n where n is X/Y/Yf/Ys/... describe data placement algorithms
> to be CPU/GPU cache-friendly. 

These numbers also only work for i945+.

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-12-03 17:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-01 19:09 [igt-dev] [PATCH i-g-t v2 1/2] lib/intel_bufops: Introduce buffer operations Zbigniew Kempczyński
2019-12-01 19:09 ` [igt-dev] [PATCH i-g-t v2 2/2] tests/gem_render_copy: Add software tiling / detiling support Zbigniew Kempczyński
2019-12-01 19:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,v2,1/2] lib/intel_bufops: Introduce buffer operations Patchwork
2019-12-03  9:25 ` [igt-dev] [PATCH i-g-t v2 1/2] " Katarzyna Dec
2019-12-03  9:41   ` Katarzyna Dec
2019-12-03 17:05   ` Zbigniew Kempczyński
2019-12-03 17:46     ` Ville Syrjälä [this message]
2019-12-10  0:07 ` Dixit, Ashutosh

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=20191203174645.GV1208@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=zbigniew.kempczynski@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