18c2ecf20Sopenharmony_ci/** 28c2ecf20Sopenharmony_ci * \file amdgpu_ioc32.c 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * 32-bit ioctl compatibility routines for the AMDGPU DRM. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * \author Paul Mackerras <paulus@samba.org> 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Copyright (C) Paul Mackerras 2005 98c2ecf20Sopenharmony_ci * All Rights Reserved. 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 128c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 138c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation 148c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 158c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 168c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 178c2ecf20Sopenharmony_ci * 188c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice (including the next 198c2ecf20Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the 208c2ecf20Sopenharmony_ci * Software. 218c2ecf20Sopenharmony_ci * 228c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 238c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 248c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 258c2ecf20Sopenharmony_ci * THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 268c2ecf20Sopenharmony_ci * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 278c2ecf20Sopenharmony_ci * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 288c2ecf20Sopenharmony_ci * IN THE SOFTWARE. 298c2ecf20Sopenharmony_ci */ 308c2ecf20Sopenharmony_ci#include <linux/compat.h> 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#include <drm/amdgpu_drm.h> 338c2ecf20Sopenharmony_ci#include <drm/drm_ioctl.h> 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#include "amdgpu_drv.h" 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_cilong amdgpu_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) 388c2ecf20Sopenharmony_ci{ 398c2ecf20Sopenharmony_ci unsigned int nr = DRM_IOCTL_NR(cmd); 408c2ecf20Sopenharmony_ci int ret; 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci if (nr < DRM_COMMAND_BASE) 438c2ecf20Sopenharmony_ci return drm_compat_ioctl(filp, cmd, arg); 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci ret = amdgpu_drm_ioctl(filp, cmd, arg); 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci return ret; 488c2ecf20Sopenharmony_ci} 49