From patchwork Sat Sep 13 17:45:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sedat Dilek X-Patchwork-Id: 4899801 Return-Path: X-Original-To: patchwork-intel-gfx@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 41B569F32B for ; Sat, 13 Sep 2014 17:41:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64F34201F2 for ; Sat, 13 Sep 2014 17:45:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6EE4E201EF for ; Sat, 13 Sep 2014 17:45:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A11D6E067; Sat, 13 Sep 2014 10:45:14 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com [209.85.216.53]) by gabe.freedesktop.org (Postfix) with ESMTP id 0CE486E067 for ; Sat, 13 Sep 2014 10:45:12 -0700 (PDT) Received: by mail-qa0-f53.google.com with SMTP id n8so2137608qaq.12 for ; Sat, 13 Sep 2014 10:45:12 -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=sDr578o3ckH4v8I6UiuD+fRpjU1kP4D2Xfdp9xwX0AU=; b=wRqKPTsy0KJsjojAbp6SNQNhMScK+y5rwu+ReIKPhrAtWzIY71qfviV+v6LjdvuQdU BmJMf3mYdh9lQ1uqkLVAegIpwTb0tKSPSph70GrhS2R/f2mUDp8yVD9FWkZUgXfIMnxN AfKaO2+Kn69G1agsskSkw2OPjjlxooY/9RMCCbUPGQ4612zI7J4C6BUiCF0uh2wYbkBt uupjrnJeqJgIYF8fLfwKWUVy2wb2udZGgc84NxYolG1U2YbPL/LN1so6kdY9Qe6T6q5V Z661yiCTX7B9G4L8bX65rG/qLqtmxIqAnhqR+ElnIQggjr9wSRyXH9vTU6KAdMU2ApOh FgOg== X-Received: by 10.140.92.199 with SMTP id b65mr23619055qge.86.1410630312197; Sat, 13 Sep 2014 10:45:12 -0700 (PDT) Received: from fambox.fambox-domain (HSI-KBW-109-192-195-091.hsi6.kabel-badenwuerttemberg.de. [109.192.195.91]) by mx.google.com with ESMTPSA id 96sm5656919qgf.20.2014.09.13.10.45.10 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Sep 2014 10:45:11 -0700 (PDT) From: Sedat Dilek To: intel-gfx , Chris Wilson Date: Sat, 13 Sep 2014 19:45:01 +0200 Message-Id: <1410630301-14108-1-git-send-email-sedat.dilek@gmail.com> X-Mailer: git-send-email 2.1.0 Cc: Sedat Dilek Subject: [Intel-gfx] [PATCH] uxa: intel_sync_close() is only available when HAVE_DRI3 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-6.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=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 With LLVM v3.4.2 I got this error reported: ... intel_driver.c:1182:2: error: implicit declaration of function 'intel_sync_close' is invalid in C99 [-Werror,-Wimplicit-function-declaration] intel_sync_close(screen); ^ In file included from intel_uxa.c:44: ./intel_glamor.h:92:1: warning: unused function 'intel_glamor_fd_from_pixmap' [-Wunused-function] intel_glamor_fd_from_pixmap(ScreenPtr screen, ^ intel_driver.c:1182:2: note: did you mean 'intel_mode_close'? ./intel.h:356:13: note: 'intel_mode_close' declared here extern void intel_mode_close(intel_screen_private *intel); ... Looking at intel_sync_close() is only available when DRI3 is supported. 516: #if HAVE_DRI3 517: Bool intel_sync_init(ScreenPtr screen); 518: void intel_sync_close(ScreenPtr screen); 519: #endif Fix the issue by embedding intel_sync_close() with a HAVE_DRI3 ifdef check. Signed-off-by: Sedat Dilek --- src/uxa/intel_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c index f31f7bd..9f527fd 100644 --- a/src/uxa/intel_driver.c +++ b/src/uxa/intel_driver.c @@ -1179,7 +1179,9 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) intel->dri3 = DRI_NONE; } +#if HAVE_DRI3 intel_sync_close(screen); +#endif xf86GARTCloseScreen(scrn->scrnIndex);