diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile index 63a2f5fc99fc..55b5d11f1938 100644 --- a/drivers/gpu/drm/amd/amdgpu/Makefile +++ b/drivers/gpu/drm/amd/amdgpu/Makefile @@ -326,7 +326,6 @@ include $(FULL_AMD_PATH)/acp/Makefile amdgpu-y += $(AMD_ACP_FILES) endif -amdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o amdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o amdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o amdgpu-$(CONFIG_HMM_MIRROR) += amdgpu_hmm.o diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index d364a9bc04c0..ab6f9131ac11 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -3056,25 +3056,6 @@ static int amdgpu_drm_release(struct inode *inode, struct file *filp) return drm_release(inode, filp); } -long amdgpu_drm_ioctl(struct file *filp, - unsigned int cmd, unsigned long arg) -{ - struct drm_file *file_priv = filp->private_data; - struct drm_device *dev; - long ret; - - dev = file_priv->minor->dev; - ret = pm_runtime_get_sync(dev->dev); - if (ret < 0) - goto out; - - ret = drm_ioctl(filp, cmd, arg); - -out: - pm_runtime_put_autosuspend(dev->dev); - return ret; -} - static const struct dev_pm_ops amdgpu_pm_ops = { .prepare = pm_sleep_ptr(amdgpu_pmops_prepare), .complete = pm_sleep_ptr(amdgpu_pmops_complete), @@ -3107,12 +3088,12 @@ static const struct file_operations amdgpu_driver_kms_fops = { .open = drm_open, .flush = amdgpu_flush, .release = amdgpu_drm_release, - .unlocked_ioctl = amdgpu_drm_ioctl, + .unlocked_ioctl = drm_ioctl, .mmap = drm_gem_mmap, .poll = drm_poll, .read = drm_read, #ifdef CONFIG_COMPAT - .compat_ioctl = amdgpu_kms_compat_ioctl, + .compat_ioctl = drm_compat_ioctl, #endif #ifdef CONFIG_PROC_FS .show_fdinfo = drm_show_fdinfo, diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.h index 2d86cc6f7f4d..6b06c0956e48 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.h @@ -43,10 +43,4 @@ extern const struct drm_driver amdgpu_partition_driver; -long amdgpu_drm_ioctl(struct file *filp, - unsigned int cmd, unsigned long arg); - -long amdgpu_kms_compat_ioctl(struct file *filp, - unsigned int cmd, unsigned long arg); - #endif diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c deleted file mode 100644 index a1cbd7c3deb2..000000000000 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * \file amdgpu_ioc32.c - * - * 32-bit ioctl compatibility routines for the AMDGPU DRM. - * - * \author Paul Mackerras - * - * Copyright (C) Paul Mackerras 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -#include - -#include -#include - -#include "amdgpu_drv.h" - -long amdgpu_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) -{ - unsigned int nr = DRM_IOCTL_NR(cmd); - - if (nr < DRM_COMMAND_BASE) - return drm_compat_ioctl(filp, cmd, arg); - - return amdgpu_drm_ioctl(filp, cmd, arg); -}