Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * \file amdgpu_ioc32.c
0003  *
0004  * 32-bit ioctl compatibility routines for the AMDGPU DRM.
0005  *
0006  * \author Paul Mackerras <paulus@samba.org>
0007  *
0008  * Copyright (C) Paul Mackerras 2005
0009  * All Rights Reserved.
0010  *
0011  * Permission is hereby granted, free of charge, to any person obtaining a
0012  * copy of this software and associated documentation files (the "Software"),
0013  * to deal in the Software without restriction, including without limitation
0014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0015  * and/or sell copies of the Software, and to permit persons to whom the
0016  * Software is furnished to do so, subject to the following conditions:
0017  *
0018  * The above copyright notice and this permission notice (including the next
0019  * paragraph) shall be included in all copies or substantial portions of the
0020  * Software.
0021  *
0022  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0023  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0024  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
0025  * THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0026  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
0027  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
0028  * IN THE SOFTWARE.
0029  */
0030 #include <linux/compat.h>
0031 
0032 #include <drm/amdgpu_drm.h>
0033 #include <drm/drm_ioctl.h>
0034 
0035 #include "amdgpu_drv.h"
0036 
0037 long amdgpu_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
0038 {
0039     unsigned int nr = DRM_IOCTL_NR(cmd);
0040 
0041     if (nr < DRM_COMMAND_BASE)
0042         return drm_compat_ioctl(filp, cmd, arg);
0043 
0044     return amdgpu_drm_ioctl(filp, cmd, arg);
0045 }