From patchwork Wed Nov 7 18:01:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Engestrom X-Patchwork-Id: 10672817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3B241709 for ; Wed, 7 Nov 2018 18:01:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C286C2CC22 for ; Wed, 7 Nov 2018 18:01:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3E442CC3B; Wed, 7 Nov 2018 18:01:49 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 5E5422CC22 for ; Wed, 7 Nov 2018 18:01:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FAFA6E3A6; Wed, 7 Nov 2018 18:01:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 413016E3A6 for ; Wed, 7 Nov 2018 18:01:42 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2018 10:01:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,476,1534834800"; d="scan'208";a="90222553" Received: from hhalland-mobl1.ger.corp.intel.com (HELO eengestr-dev.ger.corp.intel.com) ([10.252.9.70]) by orsmga008.jf.intel.com with ESMTP; 07 Nov 2018 10:01:22 -0800 From: Eric Engestrom To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 1/2] freedreno: remove always-defined #ifdef Date: Wed, 7 Nov 2018 18:01:12 +0000 Message-Id: <20181107180113.26583-1-eric.engestrom@intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Organization: Intel Corp UK X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 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-Virus-Scanned: ClamAV using ClamSMTP While at it, let's include xf86atomic.h explicitly, instead of relying on some other file accidentally including it before including this file. Signed-off-by: Eric Engestrom --- freedreno/freedreno_ringbuffer.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/freedreno/freedreno_ringbuffer.h b/freedreno/freedreno_ringbuffer.h index bc41a31cd8c5c10a3536..1a1e8425926d0647e358 100644 --- a/freedreno/freedreno_ringbuffer.h +++ b/freedreno/freedreno_ringbuffer.h @@ -29,6 +29,7 @@ #ifndef FREEDRENO_RINGBUFFER_H_ #define FREEDRENO_RINGBUFFER_H_ +#include #include /* the ringbuffer object is not opaque so that OUT_RING() type stuff @@ -83,9 +84,7 @@ struct fd_ringbuffer { * be inlined for performance reasons. */ union { -#ifdef HAS_ATOMIC_OPS atomic_t refcnt; -#endif uint64_t __pad; }; }; From patchwork Wed Nov 7 18:01:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Engestrom X-Patchwork-Id: 10672819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F1F31709 for ; Wed, 7 Nov 2018 18:01:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F42D2CC22 for ; Wed, 7 Nov 2018 18:01:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 522002CC3B; Wed, 7 Nov 2018 18:01:52 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 05D9A2CC22 for ; Wed, 7 Nov 2018 18:01:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D792A6E3C8; Wed, 7 Nov 2018 18:01:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id F35846E3C8 for ; Wed, 7 Nov 2018 18:01:42 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2018 10:01:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,476,1534834800"; d="scan'208";a="90222596" Received: from hhalland-mobl1.ger.corp.intel.com (HELO eengestr-dev.ger.corp.intel.com) ([10.252.9.70]) by orsmga008.jf.intel.com with ESMTP; 07 Nov 2018 10:01:24 -0800 From: Eric Engestrom To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 2/2] xf86atomic: #undef internal define Date: Wed, 7 Nov 2018 18:01:13 +0000 Message-Id: <20181107180113.26583-2-eric.engestrom@intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181107180113.26583-1-eric.engestrom@intel.com> References: <20181107180113.26583-1-eric.engestrom@intel.com> MIME-Version: 1.0 Organization: Intel Corp UK X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 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-Virus-Scanned: ClamAV using ClamSMTP Thanks to the #error just above, any file including this header can only see one state for this macro: defined, with the value `1`. Let's just #undef it once we're done using it in here so that other files don't misconstrue any meaning to it. Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov --- xf86atomic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xf86atomic.h b/xf86atomic.h index 2d733bd53eea3868259c..e268d274f75b0d7e66f2 100644 --- a/xf86atomic.h +++ b/xf86atomic.h @@ -101,6 +101,8 @@ typedef struct { LIBDRM_ATOMIC_TYPE atomic; } atomic_t; #error libdrm requires atomic operations, please define them for your CPU/compiler. #endif +#undef HAS_ATOMIC_OPS + static inline int atomic_add_unless(atomic_t *v, int add, int unless) { int c, old;