diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-08 15:41:18 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-08-19 02:04:06 +0200 |
commit | 8e194bbf96d81c651c52b82e125be1264db0cd4e (patch) | |
tree | 2469ac9f56922bb9a33af856fcd7fc710bf7eb71 /drivers/gpu/drm/drm_scatter.c | |
parent | drm: hide legacy sg cleanup better from common code (diff) | |
download | linux-8e194bbf96d81c651c52b82e125be1264db0cd4e.tar.xz linux-8e194bbf96d81c651c52b82e125be1264db0cd4e.zip |
drm: disallow legacy sg ioctls for modesetting drivers
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>
Diffstat (limited to 'drivers/gpu/drm/drm_scatter.c')
-rw-r--r-- | drivers/gpu/drm/drm_scatter.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_scatter.c b/drivers/gpu/drm/drm_scatter.c index dd8a6480065c..1c78406f6e71 100644 --- a/drivers/gpu/drm/drm_scatter.c +++ b/drivers/gpu/drm/drm_scatter.c @@ -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; @@ -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; |