From patchwork Fri Aug 2 17:01:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11073923 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D7F0746 for ; Fri, 2 Aug 2019 17:02:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31208286E0 for ; Fri, 2 Aug 2019 17:02:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2579F288B6; Fri, 2 Aug 2019 17:02:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A1A29288B7 for ; Fri, 2 Aug 2019 17:02:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 995956EEF7; Fri, 2 Aug 2019 17:02:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5301E6EEF2; Fri, 2 Aug 2019 17:01:59 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id g17so77895851wrr.5; Fri, 02 Aug 2019 10:01:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VY2A6whCZJMFwm69hfn5FnK7Z+9ydQLngkA0tgQebjc=; b=EaM+Vae5Pn6zTmcZwugfyMQkLZudQD1JtjpechP6u3b9SGXuAEXTlua8APst/dhwr8 ZzLh336ykO2dvOvcnhapdR0E9qg0T7jq45Tb1a2q+d7fAUYPSM1bltDPZI+I6q2aYYMa 5Dnm/gSKQn3/xciZURZYOva6G96Qs/ewr8wigM8vRqw4lcIF19B8D8+AV6fenQ3px3PH Eh9V3vThjVKvUI1KnPk8nkbiYcpWYvMNBB3LgOSKt3ty2Qu9g02fk0pkKadlJMM5YGdN TDAdtdXOVUJ3Te7gaxBEmNNT6M+t3kpcIw2cCjLBMVaDcCpych3jyh89FA0TIDBW2de0 uNFw== X-Gm-Message-State: APjAAAXJfzPt839fBb4tTfjXDUXRu+3j1k9fXHAGa8V8dc5d85a1d9CD iwTkinbpGDlvc0UubQFbdHJBN3zb X-Google-Smtp-Source: APXvYqxkfTtOZg0YEisbE5loyC6VE5Wup6Ka0ZkHIbVmtziWpXVacIxM0nmTnQyGEAqrtt4oIYHGzw== X-Received: by 2002:adf:e941:: with SMTP id m1mr8210167wrn.279.1564765317696; Fri, 02 Aug 2019 10:01:57 -0700 (PDT) Received: from arch-x1c3.cbg.collabora.co.uk ([2a00:5f00:102:0:9665:9cff:feee:aa4d]) by smtp.gmail.com with ESMTPSA id f12sm82823008wrg.5.2019.08.02.10.01.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 10:01:57 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 2/2] drm: drop DRM_AUTH from PRIME_TO/FROM_HANDLE ioctls Date: Fri, 2 Aug 2019 18:01:17 +0100 Message-Id: <20190802170117.10942-2-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190802170117.10942-1-emil.l.velikov@gmail.com> References: <20190802170117.10942-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VY2A6whCZJMFwm69hfn5FnK7Z+9ydQLngkA0tgQebjc=; b=cPgyjXpu/Nxra3FuO0krVazInkbV12FW0ll5EtiGHDrC9hnPhNN5BcIAkjiajvxI21 H2gOy9PfuGSUU4QBuLQ2ymvvDO0tcK6ydvBlFFakYmmxl4rp7bJbUv1cUnIPvK8TzeJq U/uygpjAjLilJnl1QLdGe+45KWW6HRGnSH6AJkKaj1a/ulSuRS/g5CBhqRe+RFdccPd2 Ya+2N0HuvcjAZYOFcyyuYEcH5uu4QOKWnft9biCCfbVOTLmaSnAnn75QNuF9DrqoK9jY fNUyMvm9nWlNft+Delho7tvQoxCWcO/znEwK8q6UV2tI8CwKc4vvpjO93kDLhQtrOtvD qUxw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Deucher , emil.l.velikov@gmail.com, amd-gfx@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov As mentioned by Christian, for drivers which support only primary nodes this changes the returned error from -EACCES into -EOPNOTSUPP/-ENOSYS. For others, this check in particular will be a noop. So let's remove it as suggested by Christian. Cc: Alex Deucher Cc: amd-gfx@lists.freedesktop.org Cc: Daniel Vetter Acked-by: Christian König Signed-off-by: Emil Velikov --- drivers/gpu/drm/drm_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index f675a3bb2c88..867ab4e50374 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -647,8 +647,8 @@ static const struct drm_ioctl_desc drm_ioctls[] = { DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, 0), - DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), - DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), + DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_RENDER_ALLOW), + DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_RENDER_ALLOW), DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPLANERESOURCES, drm_mode_getplane_res, 0), DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, 0),