Skip to content

Commit

Permalink
drm: disallow legacy sg ioctls for modesetting drivers
Browse files Browse the repository at this point in the history
Only the radeon/r128/ati ums drivers use this. Furthermore the cleanup
was already only done for UMS drivers. Also a quick check of the ATI
ddx git history shows that only the UMS code ever used this facility.

So we can safely disallow these pair of ioctls for modesetting
drivers.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Daniel Vetter authored and Dave Airlie committed Aug 19, 2013
1 parent 3d914e8 commit 8e194bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/drm_scatter.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ int drm_sg_alloc(struct drm_device *dev, void *data,

DRM_DEBUG("\n");

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

if (!drm_core_check_feature(dev, DRIVER_SG))
return -EINVAL;

Expand Down Expand Up @@ -197,6 +200,9 @@ int drm_sg_free(struct drm_device *dev, void *data,
struct drm_scatter_gather *request = data;
struct drm_sg_mem *entry;

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

if (!drm_core_check_feature(dev, DRIVER_SG))
return -EINVAL;

Expand Down

0 comments on commit 8e194bb

Please sign in to comment.