From patchwork Thu May 28 08:53:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jammy Zhou X-Patchwork-Id: 6496771 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E5B359F38C for ; Thu, 28 May 2015 08:54:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12A492068F for ; Thu, 28 May 2015 08:54:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BA08F20678 for ; Thu, 28 May 2015 08:54:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BFEFF6E1B8; Thu, 28 May 2015 01:54:10 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0114.outbound.protection.outlook.com [207.46.100.114]) by gabe.freedesktop.org (Postfix) with ESMTP id AF0656E1B8 for ; Thu, 28 May 2015 01:54:09 -0700 (PDT) Received: from BLUPR0201CA0032.namprd02.prod.outlook.com (25.163.116.42) by BN3PR02MB1110.namprd02.prod.outlook.com (25.162.168.140) with Microsoft SMTP Server (TLS) id 15.1.172.22; Thu, 28 May 2015 08:54:08 +0000 Received: from BN1AFFO11FD011.protection.gbl (2a01:111:f400:7c10::153) by BLUPR0201CA0032.outlook.office365.com (2a01:111:e400:52e7::42) with Microsoft SMTP Server (TLS) id 15.1.172.17 via Frontend Transport; Thu, 28 May 2015 08:54:08 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp01.amd.com (165.204.84.221) by BN1AFFO11FD011.mail.protection.outlook.com (10.58.52.71) with Microsoft SMTP Server id 15.1.184.11 via Frontend Transport; Thu, 28 May 2015 08:54:07 +0000 X-WSS-ID: 0NP1Y25-07-XT6-02 X-M-MSG: Received: from satlvexedge01.amd.com (satlvexedge01.amd.com [10.177.96.28]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 29B9CCAE64B; Thu, 28 May 2015 04:54:04 -0400 (EDT) Received: from SATLEXDAG03.amd.com (10.181.40.7) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 28 May 2015 03:54:24 -0500 Received: from SCYBEXDAG01.amd.com (10.34.11.11) by satlexdag03.amd.com (10.181.40.7) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 28 May 2015 04:54:03 -0400 Received: from SCYBEXDAG04.amd.com ([169.254.4.81]) by SCYBEXDAG01.amd.com ([169.254.1.190]) with mapi id 14.03.0195.001; Thu, 28 May 2015 16:53:59 +0800 From: "Zhou, Jammy" To: Joonyoung Shim , "dri-devel@lists.freedesktop.org" Subject: RE: [PATCH] xf86drm: fix build error by udev dependency Thread-Topic: [PATCH] xf86drm: fix build error by udev dependency Thread-Index: AQHQmOEyFWL0ZjwuFEWjPyL/eIW9y52RFZjA Date: Thu, 28 May 2015 08:53:59 +0000 Message-ID: References: <1432774606-9640-1-git-send-email-jy0922.shim@samsung.com> In-Reply-To: <1432774606-9640-1-git-send-email-jy0922.shim@samsung.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.237.168.199] MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD011; 1:WI5F/aAc99uMZ6Ml1GFxstSClxr0VIF3/UzqAZaegLLk/aFPSO6FJSmKjeo3C7reS++COwuXCwX1eVz1Z09dc9/WQSpZEJ2oBcwyC/9NStiMCPOCVcxrfldM9FJ5dI6ajel+ORaxu4OIq2X5FrVTV4cjhUGeBCnicI/Oph64jJkAvPw1q5vZqbRooyUD8tc/qBTIh0A50zRz7u2J9YKGL4pr0VYBW/YvRcO9CfPycguH6f9A3WqyxDG8q7Ut9TdkDpvfob0gfG9NtL2Gfh73f7BphYmhFGIgOdXPrxWMXqYY1g5N1ao73Mwu7ve8LEhC X-Forefront-Antispam-Report: CIP:165.204.84.221; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(199003)(13464003)(52604005)(377454003)(189002)(97756001)(101416001)(2501003)(53416004)(102836002)(97736004)(5001770100001)(68736005)(54356999)(5001860100001)(4001540100001)(46406003)(19580405001)(19580395003)(50466002)(5001830100001)(64706001)(33656002)(106466001)(47776003)(76176999)(77156002)(106116001)(23726002)(46102003)(2656002)(2900100001)(86362001)(2920100001)(50986999)(55846006)(189998001)(92566002)(105586002)(87936001)(2950100001)(85806002)(62966003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR02MB1110; H:atltwp01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:3; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR02MB1110; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(520003)(5005006)(3002001); SRVR:BN3PR02MB1110; BCL:0; PCL:0; RULEID:; SRVR:BN3PR02MB1110; X-Forefront-PRVS: 0590BBCCBC X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2015 08:54:07.0185 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96; Ip=[165.204.84.221]; Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR02MB1110 Cc: "Deucher, Alexander" , "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: , 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=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 Thanks for catching this. Patch is Reviewed-by: Jammy Zhou Regards, Jammy -----Original Message----- From: Joonyoung Shim [mailto:jy0922.shim@samsung.com] Sent: Thursday, May 28, 2015 8:57 AM To: dri-devel@lists.freedesktop.org Cc: emil.l.velikov@gmail.com; Zhou, Jammy; Deucher, Alexander; jy0922.shim@samsung.com Subject: [PATCH] xf86drm: fix build error by udev dependency The build error is introduced by commit fde496917682 ("Add device enumeration interface (v4)") if don't enable udev. Can solve as check UDEV dependency. CC libdrm_la-xf86drm.lo xf86drm.c:66:21: fatal error: libudev.h: No such file or directory #include "libudev.h" ^ compilation terminated. make[2]: *** [libdrm_la-xf86drm.lo] Error 1 Signed-off-by: Joonyoung Shim --- xf86drm.c | 4 ++++ 1 file changed, 4 insertions(+) +#if defined(UDEV) /** * Enumerate the GPU devices on the system * @@ -2917,3 +2920,4 @@ int drmGetPciDevices(drmPciDevicePtr devSet, uint16_t vendorId) return drmDevCount; } +#endif -- 1.9.1 diff --git a/xf86drm.c b/xf86drm.c index b5a174b..4a31019 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -63,7 +63,9 @@ #include "xf86drm.h" #include "libdrm_macros.h" +#if defined(UDEV) #include "libudev.h" +#endif #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) #define DRM_MAJOR 145 @@ -2819,6 +2821,7 @@ char *drmGetRenderDeviceNameFromFd(int fd) return drmGetMinorNameForFD(fd, DRM_NODE_RENDER); }