drm: remove the dma_ioctl special-case
We might as well have a real ioctl function which checks for the callbacks. This seems to be a remnant from back in the days when each drm driver had their own complete ioctl table, with no shared core drm table at all. To make really sure no mis-guided user in a kms driver pops up again explicitly check for that in the new ioctl implementation. v2: Drop the unused variable I've accidentally left in the code, spotted by David Herrmann. Cc: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:

committed by
Dave Airlie

parent
2ba5f7d538
commit
6eb9278ada
@@ -1455,6 +1455,18 @@ int drm_mapbufs(struct drm_device *dev, void *data,
|
||||
return retcode;
|
||||
}
|
||||
|
||||
int drm_dma_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
if (drm_core_check_feature(dev, DRIVER_MODESET))
|
||||
return -EINVAL;
|
||||
|
||||
if (dev->driver->dma_ioctl)
|
||||
return dev->driver->dma_ioctl(dev, data, file_priv);
|
||||
else
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
struct drm_local_map *drm_getsarea(struct drm_device *dev)
|
||||
{
|
||||
struct drm_map_list *entry;
|
||||
|
Reference in New Issue
Block a user