linux/drivers/gpu
Chris Wilson 8ffc024681 drm/i915: Defend against userspace creating a gem object with size==0
We currently only round up the userspace size to the next page. We
assume that userspace hasn't made a mistake and requested a zero-length
gem object and all through our internal code we then presume that every
object is backed by at least a single page. Fix that oversight and
report EINVAL back to userspace if they try to create a zero length
object.

[danvet: This fixes tests/gem_bad_length]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-20 14:11:19 -07:00
..
drm drm/i915: Defend against userspace creating a gem object with size==0 2011-10-20 14:11:19 -07:00
stub i915: select VIDEO_OUTPUT_CONTROL for ACPI_VIDEO 2011-04-13 09:10:25 +10:00
vga drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possible 2011-07-25 20:57:13 -07:00
Makefile gpu: Add Intel GMA500(Poulsbo) Stub Driver 2010-10-26 11:00:13 +10:00