From patchwork Mon Jul 22 17:40:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11053203 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 B9F67912 for ; Mon, 22 Jul 2019 17:40:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9331285AF for ; Mon, 22 Jul 2019 17:40:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D73D285C8; Mon, 22 Jul 2019 17:40:57 +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 39EA3285AF for ; Mon, 22 Jul 2019 17:40:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B241789D73; Mon, 22 Jul 2019 17:40:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0393689D7B; Mon, 22 Jul 2019 17:40:47 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id 31so40344483wrm.1; Mon, 22 Jul 2019 10:40:47 -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=P2u3WVZOxoMXROYBMO+U2l2dAHqPfXIiodrmDPuBaoA=; b=oYy8pYNNA5qaGEXt5oCZIAdqr3gX4rwW+bIQ6ZEwGrel2GlK4OzTbP1PvPDDoPkvI+ yyu+XGFUNa+b9qhanBvm+6mXgq1Gcb8ZHeOwXwhUdhmjk/8qeZfJckzCacR8C/GJZIb/ NZwkqQSdbAlYrBkmTrjeEjMF4el9hBSBLgKsT/U0HElusrUK173L9k12uPeflhZRodLS QUBDHCIDyfqFSJNb+gWc87UrZKMlFRymkRdAa/fT+Y09mmm9ac/1vXi3BxUCXrYDDmEo +oh+eI0U2Cp8fN02NugQ4o6rr2nIZg11CTM0dN4gLOFiV7jf6TJimLOoWNbovEj0FUYF CC2g== X-Gm-Message-State: APjAAAU2bOtBM4y6XyJQ6Tj/cy5dVx/NQrix/+Y1flbbvgyYj+YI6NQp r1Pq/ybwBN7AU2o0vUNBPgS+gK+I X-Google-Smtp-Source: APXvYqxSLq/ocfFfhMUu5nqgr0BqkvzKMrs5ZR52W57Xr5BXHVHN9FqUuvXYxiOGauC4rz0tq4f/Xg== X-Received: by 2002:a5d:63c8:: with SMTP id c8mr35001176wrw.21.1563817246400; Mon, 22 Jul 2019 10:40:46 -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 b2sm51844663wrp.72.2019.07.22.10.40.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 10:40:45 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] drm: drop DRM_AUTH from PRIME_TO/FROM_HANDLE ioctls Date: Mon, 22 Jul 2019 18:40:25 +0100 Message-Id: <20190722174025.9830-3-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190722174025.9830-1-emil.l.velikov@gmail.com> References: <20190722174025.9830-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=P2u3WVZOxoMXROYBMO+U2l2dAHqPfXIiodrmDPuBaoA=; b=m21nKWQoaigxHufx4Hivx5CoDlffm/jmEZSRsvfMtxG2Nr1ChMONnuQVPO2zsPZlsa K5ESmEugZyuJjBzYwYDsfdneOILGmQdawcATeSwz7k67U3fiFmU6K3s/s9Hk8GHYCsNs ceQDBm65b475IHLY9YzU6xBi4kV2v+X5FXHMFQPZlX7RqcGjW8b+tRu/GygKyHZGO2qT +XoXiMOolNLATxqKUC5jYTw+VEbneqWssGxGpHQlmYCoEntRjO8ElM4+f0Vh+MyupNd/ AaLJH9YAZyvWKX+Wo98Q2kGkngu32V6wJX5hV3RH2t45KwXK9rROVkxFAdiLdPELbjw1 rKHA== 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, =?utf-8?q?Christian_K=C3=B6nig?= , 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: Christian König Cc: amd-gfx@lists.freedesktop.org Cc: Daniel Vetter 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 09f7f8e33fa3..a397177af369 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),