Re: [Intel-gfx] [PATCH i-g-t v5 3/6] lib: Add function to hash a framebuffer

2019-01-16 Thread Chris Wilson
Quoting Liviu Dudau (2019-01-16 11:20:09) > On Tue, Jan 15, 2019 at 06:47:47PM +, Chris Wilson wrote: > > Quoting Liviu Dudau (2019-01-15 17:47:44) > > > +int igt_fb_get_crc(struct igt_fb *fb, igt_crc_t *crc) > > > +{ > > > +#define FNV1a_OFFSET_BIAS 2166136261 > > > +#define FNV1a_PRIME

Re: [Intel-gfx] [PATCH i-g-t v5 3/6] lib: Add function to hash a framebuffer

2019-01-16 Thread Liviu Dudau
On Tue, Jan 15, 2019 at 06:47:47PM +, Chris Wilson wrote: > Quoting Liviu Dudau (2019-01-15 17:47:44) > > +int igt_fb_get_crc(struct igt_fb *fb, igt_crc_t *crc) > > +{ > > +#define FNV1a_OFFSET_BIAS 2166136261 > > +#define FNV1a_PRIME 16777619 > > + uint32_t hash; > > + void *map;

Re: [Intel-gfx] [PATCH i-g-t v5 3/6] lib: Add function to hash a framebuffer

2019-01-15 Thread Chris Wilson
Quoting Liviu Dudau (2019-01-15 17:47:44) > +int igt_fb_get_crc(struct igt_fb *fb, igt_crc_t *crc) > +{ > +#define FNV1a_OFFSET_BIAS 2166136261 > +#define FNV1a_PRIME 16777619 > + uint32_t hash; > + void *map; > + char *ptr, *line = NULL; > + int x, y, cpp =