Re: [Intel-gfx] [PATCH 1/2] drm/i915: Document our internal limit on object size

2016-10-14 Thread Chris Wilson
On Fri, Oct 14, 2016 at 05:03:39PM +0100, Chris Wilson wrote: > > We could try to future proof more maybe like > > sizeof(typeof(obj->base.size)), is typeof can be used like that? > > Something similar for sg API if possible. But then again, it could > > be better future proofing to be hardcoded

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Document our internal limit on object size

2016-10-14 Thread Chris Wilson
On Fri, Oct 14, 2016 at 04:49:33PM +0100, Tvrtko Ursulin wrote: > > On 14/10/2016 16:18, Chris Wilson wrote: > >In many places, we try to count pages using a 32 bit integer. That > >implies if we are asked to create an object larger than 43bits, we will > >subtly crash much later. Catch this on

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Document our internal limit on object size

2016-10-14 Thread Tvrtko Ursulin
On 14/10/2016 16:18, Chris Wilson wrote: In many places, we try to count pages using a 32 bit integer. That implies if we are asked to create an object larger than 43bits, we will subtly crash much later. Catch this on the boundary, and add a warning to remind ourselves later on our exabyte

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Document our internal limit on object size

2016-10-14 Thread Tvrtko Ursulin
On 14/10/2016 16:24, Chris Wilson wrote: On Fri, Oct 14, 2016 at 04:18:10PM +0100, Chris Wilson wrote: In many places, we try to count pages using a 32 bit integer. That implies if we are asked to create an object larger than 43bits, we will subtly crash much later. Catch this on the boundary,

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Document our internal limit on object size

2016-10-14 Thread Chris Wilson
On Fri, Oct 14, 2016 at 04:18:10PM +0100, Chris Wilson wrote: > In many places, we try to count pages using a 32 bit integer. That > implies if we are asked to create an object larger than 43bits, we will > subtly crash much later. Catch this on the boundary, and add a warning > to remind

[Intel-gfx] [PATCH 1/2] drm/i915: Document our internal limit on object size

2016-10-14 Thread Chris Wilson
In many places, we try to count pages using a 32 bit integer. That implies if we are asked to create an object larger than 43bits, we will subtly crash much later. Catch this on the boundary, and add a warning to remind ourselves later on our exabyte systems. Signed-off-by: Chris Wilson