From patchwork Mon Oct 28 09:55:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 3101411 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D7A3D9F432 for ; Mon, 28 Oct 2013 10:08:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB86D202C7 for ; Mon, 28 Oct 2013 10:08:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6A57E2024A for ; Mon, 28 Oct 2013 10:08:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6717FE779B for ; Mon, 28 Oct 2013 03:08:07 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ea0-f176.google.com (mail-ea0-f176.google.com [209.85.215.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D121E73B4 for ; Mon, 28 Oct 2013 02:56:09 -0700 (PDT) Received: by mail-ea0-f176.google.com with SMTP id q16so2027993ead.7 for ; Mon, 28 Oct 2013 02:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=G9wMM3jDV8GVtrKQa4TvL2mhf52WcYVb+FL+lJRpsSA=; b=w9g8Ks9HcBRjV7ZOeCWSo/niKxkipXUc4Z1eJ/oTzPtV8/4FYkJZoVOMHVBZWSdYor EoxX+8hpEpopbF1Voad5uC6N4E3u043Fs55tzsDjDVar+NtDOS+2wS8SdgoE5qeuCEN4 JGRpWj3szIoDl99GD6YyKBHQeVCGacjoiUVgA6vnG9yAQ2kakcDLTi2fHTzIewvqszhl YCr4BoaPkFHb31TzltyJFdHmsffol9icfDKvhkXjBXF5Qbfj2wg9jaWDbcIkld7SAs03 PPP79D7K/6opx3+Ai+V6BVPcYnPHJ30Ds3Zhmqt2euyU+U0WD/alsIYpEsztyJb6zwJS e5gA== X-Received: by 10.15.53.132 with SMTP id r4mr21373682eew.5.1382954166971; Mon, 28 Oct 2013 02:56:06 -0700 (PDT) Received: from localhost.localdomain (stgt-5f71adc5.pool.mediaWays.net. [95.113.173.197]) by mx.google.com with ESMTPSA id u46sm55125721eep.17.2013.10.28.02.56.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Oct 2013 02:56:05 -0700 (PDT) From: David Herrmann To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: allow DRM_IOCTL_VERSION on render-nodes Date: Mon, 28 Oct 2013 10:55:49 +0100 Message-Id: <1382954149-2682-1-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.4.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DRM_IOCTL_VERSION is a reliable way to get the driver-name and version information. It's not related to the interface-version (SET_VERSION ioctl) so we can safely enable it on render-nodes. Note that gbm uses udev-BUSID to load the correct mesa driver. However, the VERSION ioctl should be the more reliable way to do this (in case we add new DRM-bus drivers which have no BUSID or similar). Signed-off-by: David Herrmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 21cd5f5..e01168b 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -61,7 +61,7 @@ static int drm_version(struct drm_device *dev, void *data, /** Ioctl table */ static const struct drm_ioctl_desc drm_ioctls[] = { - DRM_IOCTL_DEF(DRM_IOCTL_VERSION, drm_version, DRM_UNLOCKED), + DRM_IOCTL_DEF(DRM_IOCTL_VERSION, drm_version, DRM_UNLOCKED|DRM_RENDER_ALLOW), DRM_IOCTL_DEF(DRM_IOCTL_GET_UNIQUE, drm_getunique, 0), DRM_IOCTL_DEF(DRM_IOCTL_GET_MAGIC, drm_getmagic, 0), DRM_IOCTL_DEF(DRM_IOCTL_IRQ_BUSID, drm_irq_by_busid, DRM_MASTER|DRM_ROOT_ONLY),