From patchwork Fri Apr 24 07:43:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Fourdan X-Patchwork-Id: 6266711 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7AE289F1BE for ; Fri, 24 Apr 2015 07:43:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D89D20265 for ; Fri, 24 Apr 2015 07:43:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AC0AC20253 for ; Fri, 24 Apr 2015 07:43:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F9426E868; Fri, 24 Apr 2015 00:43:52 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id EE6166E868 for ; Fri, 24 Apr 2015 00:43:50 -0700 (PDT) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 8166B3C21F for ; Fri, 24 Apr 2015 07:43:50 +0000 (UTC) Received: from t440s.redhat.com (vpn1-6-224.ams2.redhat.com [10.36.6.224]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3O7hm69022918; Fri, 24 Apr 2015 03:43:49 -0400 From: Olivier Fourdan To: intel-gfx@lists.freedesktop.org Date: Fri, 24 Apr 2015 09:43:37 +0200 Message-Id: <1429861417-12285-1-git-send-email-ofourdan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Subject: [Intel-gfx] [RFC PATCH] sna: Fix build with gcc 5.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 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=-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 gcc generates an error at build time because it fails to inline some functions: blt.c: In function 'affine_blt': blt.c:980:1: error: inlining failed in call to always_inline 'bilinear_weight': optimization level attribute mismatch bilinear_weight(pixman_fixed_t x) blt.c:1164:7: error: called from here fy = bilinear_weight(y1); ^ blt.c:980:1: error: inlining failed in call to always_inline 'bilinear_weight': optimization level attribute mismatch bilinear_weight(pixman_fixed_t x) blt.c:1163:7: error: called from here fx = bilinear_weight(x1); ^ blt.c:989:1: error: inlining failed in call to always_inline 'bilinear_interpolation': optimization level attribute mismatch bilinear_interpolation(uint32_t tl, uint32_t tr, ^ blt.c:1207:11: error: called from here b[i] = bilinear_interpolation(tl, tr, bl, br, fx, fy); ^ Do not force inlining of these functions and let the compiler decide to avoid the compilation failure. Signed-off-by: Olivier Fourdan --- Note: It could be a gcc bug, I am not sure, I don't know enough of gcc internals to tell, that's why I post this patch as "RFC". src/sna/blt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sna/blt.c b/src/sna/blt.c index a2472c1..687fb40 100644 --- a/src/sna/blt.c +++ b/src/sna/blt.c @@ -976,7 +976,7 @@ memcpy_xor(const void *src, void *dst, int bpp, } #define BILINEAR_INTERPOLATION_BITS 4 -static force_inline int +static inline int bilinear_weight(pixman_fixed_t x) { return (x >> (16 - BILINEAR_INTERPOLATION_BITS)) & @@ -985,7 +985,7 @@ bilinear_weight(pixman_fixed_t x) #if BILINEAR_INTERPOLATION_BITS <= 4 /* Inspired by Filter_32_opaque from Skia */ -static force_inline uint32_t +static inline uint32_t bilinear_interpolation(uint32_t tl, uint32_t tr, uint32_t bl, uint32_t br, int distx, int disty)