[Intel-gfx] [PATCH 10/11] drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers
Gustavo Padovan
gustavo at padovan.org
Tue Sep 8 11:46:24 PDT 2015
Hi Daniel,
2015-09-08 Daniel Vetter <daniel.vetter at ffwll.ch>:
> Just one special case (since i915 lost its ums code, yay):
> - radeon: Has slots for the old ums ioctls which don't have
> DRM_UNLOCKED, but all filled with drm_invalid_op. So ok to drop it
> everywhere.
>
> Every other kms driver just has DRM_UNLOCKED for all their ioctls, as
> they should.
>
> v2: admgpu happened, include that one too. And i915 lost its UMS
> support which means we can change all the i915 ioctls too.
>
> v3: Rebased on top of new vmwgfx DX interface extensions.
>
> v4: Rebase on top of render-node support in exynos.
>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 24 +++++------
> drivers/gpu/drm/armada/armada_drv.c | 9 ++---
> drivers/gpu/drm/exynos/exynos_drm_drv.c | 20 ++++-----
> drivers/gpu/drm/i915/i915_dma.c | 72 ++++++++++++++++-----------------
> drivers/gpu/drm/msm/msm_drv.c | 14 +++----
> drivers/gpu/drm/nouveau/nouveau_drm.c | 24 +++++------
> drivers/gpu/drm/omapdrm/omap_drv.c | 12 +++---
> drivers/gpu/drm/qxl/qxl_ioctl.c | 14 +++----
> drivers/gpu/drm/radeon/radeon_kms.c | 30 +++++++-------
> drivers/gpu/drm/tegra/drm.c | 28 ++++++-------
> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 54 ++++++++++++-------------
> 11 files changed, 149 insertions(+), 152 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 22367939ebf1..3648fdca6359 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -685,18 +685,18 @@ int amdgpu_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,
> }
>
> const struct drm_ioctl_desc amdgpu_ioctls_kms[] = {
> - DRM_IOCTL_DEF_DRV(AMDGPU_GEM_CREATE, amdgpu_gem_create_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> - DRM_IOCTL_DEF_DRV(AMDGPU_CTX, amdgpu_ctx_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> - DRM_IOCTL_DEF_DRV(AMDGPU_BO_LIST, amdgpu_bo_list_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_GEM_CREATE, amdgpu_gem_create_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_CTX, amdgpu_ctx_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_BO_LIST, amdgpu_bo_list_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> /* KMS */
> - DRM_IOCTL_DEF_DRV(AMDGPU_GEM_MMAP, amdgpu_gem_mmap_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> - DRM_IOCTL_DEF_DRV(AMDGPU_GEM_WAIT_IDLE, amdgpu_gem_wait_idle_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> - DRM_IOCTL_DEF_DRV(AMDGPU_CS, amdgpu_cs_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> - DRM_IOCTL_DEF_DRV(AMDGPU_INFO, amdgpu_info_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> - DRM_IOCTL_DEF_DRV(AMDGPU_WAIT_CS, amdgpu_cs_wait_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> - DRM_IOCTL_DEF_DRV(AMDGPU_GEM_METADATA, amdgpu_gem_metadata_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> - DRM_IOCTL_DEF_DRV(AMDGPU_GEM_VA, amdgpu_gem_va_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> - DRM_IOCTL_DEF_DRV(AMDGPU_GEM_OP, amdgpu_gem_op_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> - DRM_IOCTL_DEF_DRV(AMDGPU_GEM_USERPTR, amdgpu_gem_userptr_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_GEM_MMAP, amdgpu_gem_mmap_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_GEM_WAIT_IDLE, amdgpu_gem_wait_idle_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_CS, amdgpu_cs_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_INFO, amdgpu_info_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_WAIT_CS, amdgpu_cs_wait_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_GEM_METADATA, amdgpu_gem_metadata_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_GEM_VA, amdgpu_gem_va_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_GEM_OP, amdgpu_gem_op_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> + DRM_IOCTL_DEF_DRV(AMDGPU_GEM_USERPTR, amdgpu_gem_userptr_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
> };
> int amdgpu_max_kms_ioctl = ARRAY_SIZE(amdgpu_ioctls_kms);
> diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
> index 225034b74cda..f73b3e2a772b 100644
> --- a/drivers/gpu/drm/armada/armada_drv.c
> +++ b/drivers/gpu/drm/armada/armada_drv.c
> @@ -268,12 +268,9 @@ static void armada_drm_disable_vblank(struct drm_device *dev, int crtc)
> }
>
> static struct drm_ioctl_desc armada_ioctls[] = {
> - DRM_IOCTL_DEF_DRV(ARMADA_GEM_CREATE, armada_gem_create_ioctl,
> - DRM_UNLOCKED),
> - DRM_IOCTL_DEF_DRV(ARMADA_GEM_MMAP, armada_gem_mmap_ioctl,
> - DRM_UNLOCKED),
> - DRM_IOCTL_DEF_DRV(ARMADA_GEM_PWRITE, armada_gem_pwrite_ioctl,
> - DRM_UNLOCKED),
> + DRM_IOCTL_DEF_DRV(ARMADA_GEM_CREATE, armada_gem_create_ioctl,0),
> + DRM_IOCTL_DEF_DRV(ARMADA_GEM_MMAP, armada_gem_mmap_ioctl, 0),
> + DRM_IOCTL_DEF_DRV(ARMADA_GEM_PWRITE, armada_gem_pwrite_ioctl, 0),
> };
>
> static void armada_drm_lastclose(struct drm_device *dev)
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> index 831d2e4cacf9..c1ed308496a2 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> @@ -403,25 +403,25 @@ static const struct vm_operations_struct exynos_drm_gem_vm_ops = {
>
> static const struct drm_ioctl_desc exynos_ioctls[] = {
> DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CREATE, exynos_drm_gem_create_ioctl,
> - DRM_UNLOCKED | DRM_AUTH | DRM_RENDER_ALLOW),
> + DRM_AUTH | DRM_RENDER_ALLOW),
> DRM_IOCTL_DEF_DRV(EXYNOS_GEM_GET, exynos_drm_gem_get_ioctl,
> - DRM_UNLOCKED | DRM_RENDER_ALLOW),
> + DRM_RENDER_ALLOW),
> DRM_IOCTL_DEF_DRV(EXYNOS_VIDI_CONNECTION, vidi_connection_ioctl,
> - DRM_UNLOCKED | DRM_AUTH),
> + DRM_AUTH),
> DRM_IOCTL_DEF_DRV(EXYNOS_G2D_GET_VER, exynos_g2d_get_ver_ioctl,
> - DRM_UNLOCKED | DRM_AUTH | DRM_RENDER_ALLOW),
> + DRM_AUTH | DRM_RENDER_ALLOW),
> DRM_IOCTL_DEF_DRV(EXYNOS_G2D_SET_CMDLIST, exynos_g2d_set_cmdlist_ioctl,
> - DRM_UNLOCKED | DRM_AUTH | DRM_RENDER_ALLOW),
> + DRM_AUTH | DRM_RENDER_ALLOW),
> DRM_IOCTL_DEF_DRV(EXYNOS_G2D_EXEC, exynos_g2d_exec_ioctl,
> - DRM_UNLOCKED | DRM_AUTH | DRM_RENDER_ALLOW),
> + DRM_AUTH | DRM_RENDER_ALLOW),
> DRM_IOCTL_DEF_DRV(EXYNOS_IPP_GET_PROPERTY, exynos_drm_ipp_get_property,
> - DRM_UNLOCKED | DRM_AUTH | DRM_RENDER_ALLOW),
> + DRM_AUTH | DRM_RENDER_ALLOW),
> DRM_IOCTL_DEF_DRV(EXYNOS_IPP_SET_PROPERTY, exynos_drm_ipp_set_property,
> - DRM_UNLOCKED | DRM_AUTH | DRM_RENDER_ALLOW),
> + DRM_AUTH | DRM_RENDER_ALLOW),
> DRM_IOCTL_DEF_DRV(EXYNOS_IPP_QUEUE_BUF, exynos_drm_ipp_queue_buf,
> - DRM_UNLOCKED | DRM_AUTH | DRM_RENDER_ALLOW),
> + DRM_AUTH | DRM_RENDER_ALLOW),
> DRM_IOCTL_DEF_DRV(EXYNOS_IPP_CMD_CTRL, exynos_drm_ipp_cmd_ctrl,
> - DRM_UNLOCKED | DRM_AUTH | DRM_RENDER_ALLOW),
> + DRM_AUTH | DRM_RENDER_ALLOW),
> };
For the exynos part:
Reviewed-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
Gustavo
More information about the dri-devel
mailing list