From patchwork Wed Jan 14 14:07:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Binns X-Patchwork-Id: 5631741 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9A12FC058D for ; Wed, 14 Jan 2015 14:08:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C75920272 for ; Wed, 14 Jan 2015 14:08:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A5C6A20266 for ; Wed, 14 Jan 2015 14:08:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0CBEA6E38A; Wed, 14 Jan 2015 06:08:17 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C1106E38A for ; Wed, 14 Jan 2015 06:08:15 -0800 (PST) Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id D5108C6EA1C82 for ; Wed, 14 Jan 2015 14:08:10 +0000 (GMT) Received: from frankbinns-dev.kl.imgtec.org (192.168.169.99) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 14 Jan 2015 14:08:12 +0000 From: Frank Binns To: Subject: [PATCH libdrm 1/2] Rename DRM_NODE_RENDER to DRM_NODE_PRIMARY Date: Wed, 14 Jan 2015 14:07:50 +0000 Message-ID: <1421244471-31081-1-git-send-email-frank.binns@imgtec.com> X-Mailer: git-send-email 1.8.5.4.gfdaaaa2 MIME-Version: 1.0 X-Originating-IP: [192.168.169.99] Cc: rufus.hamade@imgtec.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 Now that there are render nodes it doesn't seem appropriate for the type of the card nodes to be DRM_NODE_RENDER. For this reason, rename this type to DRM_NODE_PRIMARY as this name better represents the purpose of these nodes. Signed-off-by: Frank Binns Reviewed-by: Rob Clark --- tests/dristat.c | 2 +- xf86drm.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/dristat.c b/tests/dristat.c index 4f2ee80..449aa24 100644 --- a/tests/dristat.c +++ b/tests/dristat.c @@ -268,7 +268,7 @@ int main(int argc, char **argv) for (i = 0; i < 16; i++) if (!minor || i == minor) { sprintf(buf, DRM_DEV_NAME, DRM_DIR_NAME, i); - fd = drmOpenMinor(i, 1, DRM_NODE_RENDER); + fd = drmOpenMinor(i, 1, DRM_NODE_PRIMARY); if (fd >= 0) { printf("%s\n", buf); if (mask & DRM_BUSID) getbusid(fd); diff --git a/xf86drm.c b/xf86drm.c index d900b4b..a23d029 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -86,7 +86,7 @@ #define DRM_MSG_VERBOSITY 3 #define DRM_NODE_CONTROL 0 -#define DRM_NODE_RENDER 1 +#define DRM_NODE_PRIMARY 1 static drmServerInfoPtr drm_server_info; @@ -444,7 +444,7 @@ int drmAvailable(void) int retval = 0; int fd; - if ((fd = drmOpenMinor(0, 1, DRM_NODE_RENDER)) < 0) { + if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) { #ifdef __linux__ /* Try proc for backward Linux compatibility */ if (!access("/proc/dri/0", R_OK)) @@ -485,7 +485,7 @@ static int drmOpenByBusid(const char *busid) drmMsg("drmOpenByBusid: Searching for BusID %s\n", busid); for (i = 0; i < DRM_MAX_MINOR; i++) { - fd = drmOpenMinor(i, 1, DRM_NODE_RENDER); + fd = drmOpenMinor(i, 1, DRM_NODE_PRIMARY); drmMsg("drmOpenByBusid: drmOpenMinor returns %d\n", fd); if (fd >= 0) { /* We need to try for 1.4 first for proper PCI domain support @@ -547,7 +547,7 @@ static int drmOpenByName(const char *name) * already in use. If it's in use it will have a busid assigned already. */ for (i = 0; i < DRM_MAX_MINOR; i++) { - if ((fd = drmOpenMinor(i, 1, DRM_NODE_RENDER)) >= 0) { + if ((fd = drmOpenMinor(i, 1, DRM_NODE_PRIMARY)) >= 0) { if ((version = drmGetVersion(fd))) { if (!strcmp(version->name, name)) { drmFreeVersion(version); @@ -591,7 +591,7 @@ static int drmOpenByName(const char *name) if (*pt) { /* Found busid */ return drmOpenByBusid(++pt); } else { /* No busid */ - return drmOpenDevice(strtol(devstring, NULL, 0),i, DRM_NODE_RENDER); + return drmOpenDevice(strtol(devstring, NULL, 0),i, DRM_NODE_PRIMARY); } } }