From patchwork Wed Nov 30 20:35:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 9454879 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF0916074E for ; Wed, 30 Nov 2016 20:35:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D43A528484 for ; Wed, 30 Nov 2016 20:35:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9463284A2; Wed, 30 Nov 2016 20:35:53 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 9ADAD28484 for ; Wed, 30 Nov 2016 20:35:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 030C36E544; Wed, 30 Nov 2016 20:35:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wj0-x241.google.com (mail-wj0-x241.google.com [IPv6:2a00:1450:400c:c01::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7ABC16E542 for ; Wed, 30 Nov 2016 20:35:37 +0000 (UTC) Received: by mail-wj0-x241.google.com with SMTP id kp2so23890072wjc.0 for ; Wed, 30 Nov 2016 12:35:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RAiBsUqq9CfAsooS0c/UtFN6UopCfNBgTPB23duGmyM=; b=Cq8rCvFTFrO2PgAWUkuvnCTTpXFRrGLBSYva+AZHRGKPyHgF0+KN0Oywu227d1fLND iTWd5P092GpWb3iVerJuDV3ATcW34mc/nbOmh/ScQmEVXVDJ2usfcgyN7SH1F0o0x+NZ C5BWcQO7wC+/y0knpm9DNg7bVFFRPhTve6k9ge4JsU3jInEGRSU1JON0uhKx1lzn97VK qJtVUbKcHUr7jRr42O34WMyW0unL0XgXzSBqS/oxjqEg4HPhnuqIjy0lmmvGaZZQoBlt SGZ+GFD+yW7rBXIi2Yvg3TfwHMk/kvgeHzBclUuawPesOTiRp9/o2Z6E//H+pm/iy/7b DhBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RAiBsUqq9CfAsooS0c/UtFN6UopCfNBgTPB23duGmyM=; b=B0CQBAUZVcMLl4/dRSkGl6y8kQ8t8qEUErLJimdhGz3brH6NKUpXPmJ4FryS1eNk9V DPdxIErgM3N2DPW6mAKi7h13VZPo7/AEKhUr2aJGz+Zh/4XKZ21z7yhsTuddNMtjXTrg eG4brCrGe5cNK1Rmzp91rNnQV2SY2lnzc59MBsEtClAWX1EtqTfHGjMlB4RUlfN8Rgmd FNt4IdTuBYMsf0fWkxHA+5Eg+G7cVbTWEr5v1oGgmrUUYjSb+8W2bCX0zKF+4ZGfyLip YXSJ9tHZ1coxmJHmXFx4nZxaboiBGzzRx6gvznmfSYPssL5aGuZ7sD9+OE7vNgcGOSa8 tfLg== X-Gm-Message-State: AKaTC00gY6iinDeKgHrgULN7hqE3bALPiuSod6vo6E2HH0S84QjHSXcvD/LqQEseeybAaQ== X-Received: by 10.194.136.166 with SMTP id qb6mr29206330wjb.42.1480538135834; Wed, 30 Nov 2016 12:35:35 -0800 (PST) Received: from arch-x1c3.cbg.collabora.co.uk ([2a00:1098:5:0:9665:9cff:feee:aa4d]) by smtp.gmail.com with ESMTPSA id ei2sm74572607wjd.47.2016.11.30.12.35.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Nov 2016 12:35:35 -0800 (PST) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 5/5] tests/drmdevice: use drmGetDevice[s]2 Date: Wed, 30 Nov 2016 20:35:11 +0000 Message-Id: <20161130203511.18910-5-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161130203511.18910-1-emil.l.velikov@gmail.com> References: <20161130203511.18910-1-emil.l.velikov@gmail.com> Cc: emil.l.velikov@gmail.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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov ... alongside the DRM_DEVICE_IGNORE_PCI_REVISION flag. Signed-off-by: Emil Velikov --- tests/drmdevice.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/drmdevice.c b/tests/drmdevice.c index 72e7066..dcad527 100644 --- a/tests/drmdevice.c +++ b/tests/drmdevice.c @@ -70,7 +70,7 @@ main(void) drmDevicePtr device; int fd, ret, max_devices; - max_devices = drmGetDevices(NULL, 0); + max_devices = drmGetDevices2(DRM_DEVICE_IGNORE_PCI_REVISION, NULL, 0); if (max_devices <= 0) { printf("drmGetDevices() has returned %d\n", max_devices); @@ -83,7 +83,7 @@ main(void) return -1; } - ret = drmGetDevices(devices, max_devices); + ret = drmGetDevices2(DRM_DEVICE_IGNORE_PCI_REVISION, devices, max_devices); if (ret < 0) { printf("drmGetDevices() returned an error %d\n", ret); free(devices); @@ -102,7 +102,7 @@ main(void) continue; } - if (drmGetDevice(fd, &device) == 0) { + if (drmGetDevice2(fd, DRM_DEVICE_IGNORE_PCI_REVISION, &device) == 0) { print_device_info(device, i); drmFreeDevice(&device); }