Re: [PATCH] intel: Set bo size from lseek if kernel supports it

2013-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2013 at 03:07:01PM -0700, Kristian Høgsberg wrote: > The various create and open functions set the buffer size, but > drm_intel_bo_gem_create_from_prime() is an exception. In the 3.12 kernel > we can now use lseek on the prime fd to determine the size of the bo. > Use that and over

[PATCH] intel: Set bo size from lseek if kernel supports it

2013-10-10 Thread Kristian Høgsberg
The various create and open functions set the buffer size, but drm_intel_bo_gem_create_from_prime() is an exception. In the 3.12 kernel we can now use lseek on the prime fd to determine the size of the bo. Use that and override the userprovided size. If the kernel doesn't support this, we get an