Commit 8e194bbf authored by Daniel Vetter's avatar Daniel Vetter Committed by Dave Airlie

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: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 3d914e83
...@@ -87,6 +87,9 @@ int drm_sg_alloc(struct drm_device *dev, void *data, ...@@ -87,6 +87,9 @@ int drm_sg_alloc(struct drm_device *dev, void *data,
DRM_DEBUG("\n"); DRM_DEBUG("\n");
if (drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;
if (!drm_core_check_feature(dev, DRIVER_SG)) if (!drm_core_check_feature(dev, DRIVER_SG))
return -EINVAL; return -EINVAL;
...@@ -197,6 +200,9 @@ int drm_sg_free(struct drm_device *dev, void *data, ...@@ -197,6 +200,9 @@ int drm_sg_free(struct drm_device *dev, void *data,
struct drm_scatter_gather *request = data; struct drm_scatter_gather *request = data;
struct drm_sg_mem *entry; struct drm_sg_mem *entry;
if (drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;
if (!drm_core_check_feature(dev, DRIVER_SG)) if (!drm_core_check_feature(dev, DRIVER_SG))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment