[igt-dev] [PATCH i-g-t 2/7] tests/gem_render_copy: Test Yf tiling
Dhinakaran Pandiyan
dhinakaran.pandiyan at intel.com
Tue Mar 5 01:50:35 UTC 2019
On Mon, 2019-02-25 at 14:49 +0100, Katarzyna Dec wrote:
> On Thu, Feb 21, 2019 at 06:41:04AM -0800, Dhinakaran Pandiyan wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> >
> > Let's test Yf tiling now that rendercopy can handle it.
> >
> > v2: From DK
> > Set bpp for Yf buffer and rebase.
> >
> > Cc: Lukasz Kalamarz <lukasz.kalamarz at intel.com>
> > Cc: Katarzyna Dec <katarzyna.dec at intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> > ---
> > tests/i915/gem_render_copy.c | 246 +++++++++++++++++++++++++++--
> > ------
> > 1 file changed, 195 insertions(+), 51 deletions(-)
> >
> > diff --git a/tests/i915/gem_render_copy.c
> > b/tests/i915/gem_render_copy.c
> > index 0cd4e50f..afe2df05 100644
> > --- a/tests/i915/gem_render_copy.c
> > +++ b/tests/i915/gem_render_copy.c
> > @@ -72,11 +72,85 @@ static const char *make_filename(const char
> > *filename)
> > return buf;
> > }
> >
> > -static void *linear_copy(data_t *data, struct igt_buf *buf)
> > +static void *yf_ptr(void *ptr,
> > + unsigned int x, unsigned int y,
> > + unsigned int stride, unsigned int cpp)
> > {
> > - void *map, *linear;
> > + x *= cpp;
> > +
> > + return ptr +
> > + ((y & ~0x1f) * stride) +
> > + ((y & 0x10) * 64) +
> > + ((y & 0x8) * 32) +
> > + ((y & 0x7) * 16) +
> > + ((x & ~0x3f) * 32) +
> > + ((x & 0x20) * 16) +
> > + ((x & 0x10) * 8) +
> > + (x & 0xf);
>
> It would be nice to have comments on these ^^^ values (e.g. y & ??).
> I have no
> idea what are they. If something goes wrong and less experienced
> person will be
> debugging it can take ages.
It's just the tiling format and is directly available in bspec under
Tile Formats -> Tiling Algorithm
-DK
>
> For more detailed review Lukasz Kalamarz will be better person.
> Kasia :)
> > +}
More information about the igt-dev
mailing list