Skip to content

Commit

Permalink
drm/i915: disallow gem ums init ioctl for kms
Browse files Browse the repository at this point in the history
This ioctl used in a kms driver is only useful to create massive
havoc.

v2: Bail out with -ENODEV as suggested by Chris Wilson.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Daniel Vetter committed May 3, 2012
1 parent 1cff8f6 commit 7bb6fb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ i915_gem_init_ioctl(struct drm_device *dev, void *data,
{
struct drm_i915_gem_init *args = data;

if (drm_core_check_feature(dev, DRIVER_MODESET))
return -ENODEV;

if (args->gtt_start >= args->gtt_end ||
(args->gtt_end | args->gtt_start) & (PAGE_SIZE - 1))
return -EINVAL;
Expand Down

0 comments on commit 7bb6fb8

Please sign in to comment.