From patchwork Fri Oct 26 12:06:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10657317 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 8754213A9 for ; Fri, 26 Oct 2018 12:07:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D8072C190 for ; Fri, 26 Oct 2018 12:07:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E5452C1A2; Fri, 26 Oct 2018 12:07: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 12B5D2C195 for ; Fri, 26 Oct 2018 12:07:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0096E6E45C; Fri, 26 Oct 2018 12:07:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id D72766E45C for ; Fri, 26 Oct 2018 12:07:54 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id d17-v6so798223wre.11 for ; Fri, 26 Oct 2018 05:07:54 -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:mime-version :content-transfer-encoding; bh=4uKALeQx3Hh6Qe6EvJwoJJ8n6pn/j6+6wLX22UJ/mzE=; b=MngqBct+5lvuVtSH1mLu2A/ICVWbLZlYSqLH47V9NThVcix9iKzAms6XIHcPLyP75J sjvPRUWmOUFBgIVeyxLkX/yJV2t5LFLHSKebFaqsaPDBZFr0sszErr/NRrtfTFq9RBby /StghvpcU/5xcdbKt2DhQ7Qx7KoHDZulqeXr4l+u2z6E8/jbORmLMdA5ktzE3qqh6OFZ /ugV37bo4p+3mzbxoH6Y37fUXb56+xZZ6zZWqszWX7jc6837k/dZPYYYIlv+64HaaHY1 Ex1zAn7h/vtzTG3ffI+1B0wEzMYfEyqvmpsu6IPg/rO4xJoQ5c4kOzZAeNO6IP6/XMvh I4vw== X-Gm-Message-State: AGRZ1gJJ5Imsge4fJVZAbI1goxyK9YpJX4np/qCmmiJJXg/8SF7Nr98J A3YIkHcv3qcy6fpW3aARSCO9+nok X-Google-Smtp-Source: AJdET5fv0BwnUtfbxD4yuB//NiHVd+VRHR94NFRmJylbDS2NVDDar4Mq3wV/sXAG9dypAKhR5vNRIw== X-Received: by 2002:adf:c187:: with SMTP id x7-v6mr5397222wre.233.1540555673227; Fri, 26 Oct 2018 05:07:53 -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 f65-v6sm324887wmd.9.2018.10.26.05.07.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Oct 2018 05:07:52 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/vgem: create a render node for vgem Date: Fri, 26 Oct 2018 13:06:47 +0100 Message-Id: <20181026120647.7528-1-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 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: David Airlie , Daniel Vetter , emil.l.velikov@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov VGEM doesn't do anything modeset specific, so in a way exposing a primary node is 'wrong'. At the same time, we extensively use if for creating dumb buffers, fences, prime fd <> handle imports/exports. To the point that we explicitly annotate the vgem fence ioctls as DRM_RENDER_ALLOW and have an IGT test which opens the render node. close(drm_open_driver_render(DRIVER_VGEM)) Better late than never, let's flip the switch. Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Daniel Vetter --- drivers/gpu/drm/vgem/vgem_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c index f1f7ab9dcdbf..f1d1d9e2c82e 100644 --- a/drivers/gpu/drm/vgem/vgem_drv.c +++ b/drivers/gpu/drm/vgem/vgem_drv.c @@ -431,7 +431,8 @@ static void vgem_release(struct drm_device *dev) } static struct drm_driver vgem_driver = { - .driver_features = DRIVER_GEM | DRIVER_PRIME, + .driver_features = DRIVER_GEM | DRIVER_PRIME | + DRIVER_RENDER; .release = vgem_release, .open = vgem_open, .postclose = vgem_postclose,