Message ID | 20230524191955.252212-1-hamza.mahfooz@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp141143vqr; Wed, 24 May 2023 12:44:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5rVRnBmHQBEbBHBojQI/CqO19dWtCZNKMoOgbZq/4sj/jglFkTHiWPeWkhbvvHGZTDXWAk X-Received: by 2002:a05:6a21:78a7:b0:10a:dafc:aef5 with SMTP id bf39-20020a056a2178a700b0010adafcaef5mr19106075pzc.34.1684957477352; Wed, 24 May 2023 12:44:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684957477; cv=pass; d=google.com; s=arc-20160816; b=BI1p2wb6uafR7BFOqsF8M3yLsHGQ7jkjRTcB4iRGQAYd+CrnRUne8wC75PPhUlgIjb aqv1Nq3je5ILQitpgZg27HhEau2HlvCamDLEjKvy9fEBQlgnwGA0s2R6bo6JQCSHw55D pwYkNlTvqKp4yVUUzyvXHU/Li5hQ7COGcCMDJF+zdtqK7VCzVAgdYlnqRuCv2GA85vBU K6Namw7ew3eoA8KndUeVtXZmYjWfuS0PZudXBVHFMWdL5fXwPmVwZ4PI5RtNgVyd+ZDN kY7bMbgArbogcbs+LoszP1pD5ZIKfMZ6D43qxL0nr5pLDRNVXFMtoa/cwtw6JUmHZoSy z98g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZswGC+wvdudFGf0pzc33Yee4KSj208EDmKA9pMngpTw=; b=WCfN7jPKX9eEjbhLw7U2uwsIcgdWN/w+K3UvdcQpXk4bawRtMdeJjdAjPKmFELG7ZE 02+LSqR1v12nvmRBZnuW8R/wGkFhuofuqi1V+2M84DC75Oow7UkMRIibzMafonzVxALW hbbWilKsJEYtsc5RbumRUcZg417BY91qO3AOuMmG3WQmrJ6re9MtnjR8da6Yuvds38IS jV1LpAmNAh7RFeT0H3wpphjwlvgrpqKh0+fMp/XvMed1uPw112UVbTEr+Y3t72ErZ+39 fQhABJARpQ4ECIgIMG3A2eAfciEKfFz8STG8FiTmgDiDWzWkuQg/4yOzfD6ULZRK6WQR V42w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=d2YmpN+X; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l192-20020a6391c9000000b00524fcd54553si1636734pge.485.2023.05.24.12.44.22; Wed, 24 May 2023 12:44:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=d2YmpN+X; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235170AbjEXTUc (ORCPT <rfc822;jian.xie.xdx@gmail.com> + 99 others); Wed, 24 May 2023 15:20:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234897AbjEXTUa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 24 May 2023 15:20:30 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2069.outbound.protection.outlook.com [40.107.243.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AED7199 for <linux-kernel@vger.kernel.org>; Wed, 24 May 2023 12:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L6hl9HkoCSsdJGQHncFeBSZctBjWNEM7bliR2oPxuzCTzFarwEBz1eWshUiyuZ9yq81yfsx0QLii+muS+X0nM0MQXD6rkgMXhSKrOL75/CDiiBuefTohHZXsH/WJ2awqGAh06w2deoh5LlNMefyvqBCmt/la8SMxkeD4vNBHWc47W82sCEZkrShWanFhBIvawCfS+XNeHJKx2TIgeDtfCTwBQf/CL7eXnI0tULtSwLRBnsuw7425cNJNFf4Sz4rgiK6JfTCI/aNxGV9dfhXYJChVNH2XlrYkpDFGfkyscIYo5JENByu7aLMimeu26W9UOiGEYXnuHEwkoLM8NUJUBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZswGC+wvdudFGf0pzc33Yee4KSj208EDmKA9pMngpTw=; b=kqN/CUvocJhURwRWT+bUKmU+xN6F429Q209YMspgrhurk6yHD94LEpYU2dBbY0YMSNxpu1/NyJWYWiicRWsbGzOCkNLd+HaVksJLboFl3qDl3UO8V1y3gQGHNckBFsb+bsbQZxUO/YVq8JHBPFZy8A+PKynI+OFPi0Q/7YWvI6LGSn1KDP+he2M3sJ3bVDe7NLxuhbVSvm4//4lA6KoDJK5N4D4Zq0CxM9UBCwHdf8C/xHcpLAc/iVicpqEq/paLhvTCNqGn4q3F/GQloIQpi/69vSav7fT9cSn4K/jdSMpb2KQbrZcyOMfHpmbBRItoBYSlUADWRsrxLSlW1D8mgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZswGC+wvdudFGf0pzc33Yee4KSj208EDmKA9pMngpTw=; b=d2YmpN+XR2uYvJePrJFgT5YxPApzPa3bk97eaB+oE8t1oFJid8Sh2ZnoRW2epOlxGRTrU7JymdJD/RaVuMP5bVuQXNHetFdUA82Std0DSE0+Dxn3WA8I6RnpqSs5U8kllG1WU/4aWraErdH2Z1ijZAnuRozAKLBiZ7Bjrxw/0FU= Received: from BN9PR03CA0892.namprd03.prod.outlook.com (2603:10b6:408:13c::27) by IA0PR12MB8896.namprd12.prod.outlook.com (2603:10b6:208:493::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Wed, 24 May 2023 19:20:22 +0000 Received: from BN8NAM11FT070.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13c:cafe::cd) by BN9PR03CA0892.outlook.office365.com (2603:10b6:408:13c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15 via Frontend Transport; Wed, 24 May 2023 19:20:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT070.mail.protection.outlook.com (10.13.177.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6411.30 via Frontend Transport; Wed, 24 May 2023 19:20:21 +0000 Received: from hamza-pc.localhost (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 24 May 2023 14:20:19 -0500 From: Hamza Mahfooz <hamza.mahfooz@amd.com> To: <amd-gfx@lists.freedesktop.org> CC: Hamza Mahfooz <hamza.mahfooz@amd.com>, Alex Deucher <alexander.deucher@amd.com>, Harry Wentland <harry.wentland@amd.com>, "Kenny Ho" <kenny.ho@amd.com>, Leo Li <sunpeng.li@amd.com>, Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, "Pan, Xinhui" <Xinhui.Pan@amd.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v2] drm/amd/display: enable more strict compile checks Date: Wed, 24 May 2023 15:19:55 -0400 Message-ID: <20230524191955.252212-1-hamza.mahfooz@amd.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT070:EE_|IA0PR12MB8896:EE_ X-MS-Office365-Filtering-Correlation-Id: 1fafae1b-0ffb-4b47-7c61-08db5c8beb3b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RhlbLYYZOr6VDKctTL0Demh9i8rKVzJozIhBGO3yhpkfJm4TcvBL6Olnrx3A5pkZjjWRNJwi+tlYKlNiOtRRn+mY493DlDjdwrOy4ycallu/tf6K2BB87o4xlCMR5twoQweAmh7VnKR0D+vk3u74XIko4nvMGYHAZ1YwDXVXomDnd60qBQj7tmacd2C+9iokbgaf5JAHk59csNSk0rb3E7qSxTJuYrNlJtgk0dcEBIZNwq/gv/NXUC0IWfoPrbP+88R2UMhZaR0BFEaS1OPV+m4IFH+vnWm8lnX8sVcpVsjdrnrf0xXlxYSCHe3QVDxBpvi4EBGuB0wE7HOeNqf2yXJaLuI3N/ehLmktFNrDCU8eoZ5XYP3+mmK1K+I+69BA+JD22ili9m3ZsSvvY7i0s8O1qSKzjqpl8nMdPCzCwromV4zvhHX8RdL3SPHU8U7qaqVDbMGqHInUf7Y0pZCYB1mkMn0vrqrpoESFdvOkgRewBBKMgOslssPlaVbj5HHHT0AyRsE/zgsp1WCu/mWScf+TTP6L2eQKBV9tAHusyzteBFJj5bpEi1eAIY6HrC+KmdRp7gFxyuT/nZ0ONaB1oXJRbX2NAcO729PT/T+z2lMGwsyfbYvDfni+xPDVLYqxt/Ne4oiCtE7ctWkSmmQtHxtBCWYUGmZcNwFmb0FaJfjOwMVHWaPukV139z2l7hzn5GHKSecTxr7Ksgbdq9WXNRJ1Md1jp3Rw38qYJIEn7Led/c3ddTW62xHV1m2PXa+DsMWhXirIm6GgvKvgCT3xSVO8bEX/vM+FClQu8w+TglAGap+aWmR9jG0/FtUfsVWK X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(346002)(376002)(39860400002)(136003)(396003)(451199021)(46966006)(40470700004)(36840700001)(40460700003)(6666004)(41300700001)(86362001)(2616005)(336012)(82310400005)(426003)(26005)(44832011)(16526019)(1076003)(186003)(36756003)(2906002)(82740400003)(81166007)(83380400001)(47076005)(356005)(36860700001)(40480700001)(8936002)(8676002)(5660300002)(6916009)(4326008)(70206006)(70586007)(478600001)(316002)(54906003)(36900700001)(16060500005);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 19:20:21.9498 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1fafae1b-0ffb-4b47-7c61-08db5c8beb3b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT070.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8896 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766805509602266206?= X-GMAIL-MSGID: =?utf-8?q?1766805971790263537?= |
Series |
[v2] drm/amd/display: enable more strict compile checks
|
|
Commit Message
Hamza Mahfooz
May 24, 2023, 7:19 p.m. UTC
Currently, there are quite a number of issues that are quite easy for
the CI to catch, that slip through the cracks. Among them, there are
unused variable and indentation issues. Also, we should consider all
warnings to be compile errors, since the community will eventually end
up complaining about them. So, enable -Werror, -Wunused and
-Wmisleading-indentation for all kernel builds.
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Kenny Ho <kenny.ho@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
---
v2: fix grammatical error
---
drivers/gpu/drm/amd/display/Makefile | 2 ++
1 file changed, 2 insertions(+)
Comments
Sure, I think we tried enabling warnings as errors before and had to revert it because of weird compiler quirks or the variety of compiler versions that need to be supported. Alex, are you planning to upstream this, or is this only to enforce more internal discipline about not ignoring warnings? Regards, Felix On 2023-05-24 15:41, Russell, Kent wrote: > > [AMD Official Use Only - General] > > > (Adding Felix in CC) > > I’m a fan of adding it to KFD as well. Felix, can you foresee any > issues here? > > Kent > > *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> *On Behalf Of > *Ho, Kenny > *Sent:* Wednesday, May 24, 2023 3:23 PM > *To:* Alex Deucher <alexdeucher@gmail.com>; Mahfooz, Hamza > <Hamza.Mahfooz@amd.com> > *Cc:* Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry > <Harry.Wentland@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, > Rodrigo <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org; > dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; Daniel > Vetter <daniel@ffwll.ch>; Deucher, Alexander > <Alexander.Deucher@amd.com>; David Airlie <airlied@gmail.com>; Koenig, > Christian <Christian.Koenig@amd.com> > *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile > checks > > [AMD Official Use Only - General] > > [AMD Official Use Only - General] > > (+ Felix) > > Should we do the same for other modules under amd (amdkfd)? I was > going to enable full kernel werror in the kconfig used by my CI but > this is probably better. > > Kenny > > ------------------------------------------------------------------------ > > *From:*Alex Deucher <alexdeucher@gmail.com> > *Sent:* Wednesday, May 24, 2023 3:22 PM > *To:* Mahfooz, Hamza <Hamza.Mahfooz@amd.com> > *Cc:* amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; > Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Ho, Kenny <Kenny.Ho@amd.com>; > Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, Rodrigo > <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org > <linux-kernel@vger.kernel.org>; dri-devel@lists.freedesktop.org > <dri-devel@lists.freedesktop.org>; Daniel Vetter <daniel@ffwll.ch>; > Deucher, Alexander <Alexander.Deucher@amd.com>; David Airlie > <airlied@gmail.com>; Wentland, Harry <Harry.Wentland@amd.com>; Koenig, > Christian <Christian.Koenig@amd.com> > *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile > checks > > On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz <hamza.mahfooz@amd.com> > wrote: > > > > Currently, there are quite a number of issues that are quite easy for > > the CI to catch, that slip through the cracks. Among them, there are > > unused variable and indentation issues. Also, we should consider all > > warnings to be compile errors, since the community will eventually end > > up complaining about them. So, enable -Werror, -Wunused and > > -Wmisleading-indentation for all kernel builds. > > > > Cc: Alex Deucher <alexander.deucher@amd.com> > > Cc: Harry Wentland <harry.wentland@amd.com> > > Cc: Kenny Ho <kenny.ho@amd.com> > > Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> > > --- > > v2: fix grammatical error > > --- > > drivers/gpu/drm/amd/display/Makefile | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/display/Makefile > b/drivers/gpu/drm/amd/display/Makefile > > index 0d610cb376bb..3c44162ebe21 100644 > > --- a/drivers/gpu/drm/amd/display/Makefile > > +++ b/drivers/gpu/drm/amd/display/Makefile > > @@ -26,6 +26,8 @@ > > > > AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH) > > > > +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation > > + > > Care to enable this for the rest of amdgpu as well? Or send out an > additional patch to do that? Either way: > Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > Alex > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr > > -- > > 2.40.1 > > >
On Wed, May 24, 2023 at 3:46 PM Felix Kuehling <felix.kuehling@amd.com> wrote: > > Sure, I think we tried enabling warnings as errors before and had to > revert it because of weird compiler quirks or the variety of compiler > versions that need to be supported. > > Alex, are you planning to upstream this, or is this only to enforce more > internal discipline about not ignoring warnings? I'd like to upstream it. Upstream already has CONFIG_WERROR as a config option, but it's been problematic to enable in CI because of various breakages outside of the driver and in different compilers. That said, I don't know how much trouble enabling it will cause with various compilers in the wild. Alex > > Regards, > Felix > > > On 2023-05-24 15:41, Russell, Kent wrote: > > > > [AMD Official Use Only - General] > > > > > > (Adding Felix in CC) > > > > I’m a fan of adding it to KFD as well. Felix, can you foresee any > > issues here? > > > > Kent > > > > *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> *On Behalf Of > > *Ho, Kenny > > *Sent:* Wednesday, May 24, 2023 3:23 PM > > *To:* Alex Deucher <alexdeucher@gmail.com>; Mahfooz, Hamza > > <Hamza.Mahfooz@amd.com> > > *Cc:* Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry > > <Harry.Wentland@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, > > Rodrigo <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org; > > dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; Daniel > > Vetter <daniel@ffwll.ch>; Deucher, Alexander > > <Alexander.Deucher@amd.com>; David Airlie <airlied@gmail.com>; Koenig, > > Christian <Christian.Koenig@amd.com> > > *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile > > checks > > > > [AMD Official Use Only - General] > > > > [AMD Official Use Only - General] > > > > (+ Felix) > > > > Should we do the same for other modules under amd (amdkfd)? I was > > going to enable full kernel werror in the kconfig used by my CI but > > this is probably better. > > > > Kenny > > > > ------------------------------------------------------------------------ > > > > *From:*Alex Deucher <alexdeucher@gmail.com> > > *Sent:* Wednesday, May 24, 2023 3:22 PM > > *To:* Mahfooz, Hamza <Hamza.Mahfooz@amd.com> > > *Cc:* amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; > > Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Ho, Kenny <Kenny.Ho@amd.com>; > > Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, Rodrigo > > <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org > > <linux-kernel@vger.kernel.org>; dri-devel@lists.freedesktop.org > > <dri-devel@lists.freedesktop.org>; Daniel Vetter <daniel@ffwll.ch>; > > Deucher, Alexander <Alexander.Deucher@amd.com>; David Airlie > > <airlied@gmail.com>; Wentland, Harry <Harry.Wentland@amd.com>; Koenig, > > Christian <Christian.Koenig@amd.com> > > *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile > > checks > > > > On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz <hamza.mahfooz@amd.com> > > wrote: > > > > > > Currently, there are quite a number of issues that are quite easy for > > > the CI to catch, that slip through the cracks. Among them, there are > > > unused variable and indentation issues. Also, we should consider all > > > warnings to be compile errors, since the community will eventually end > > > up complaining about them. So, enable -Werror, -Wunused and > > > -Wmisleading-indentation for all kernel builds. > > > > > > Cc: Alex Deucher <alexander.deucher@amd.com> > > > Cc: Harry Wentland <harry.wentland@amd.com> > > > Cc: Kenny Ho <kenny.ho@amd.com> > > > Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> > > > --- > > > v2: fix grammatical error > > > --- > > > drivers/gpu/drm/amd/display/Makefile | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/amd/display/Makefile > > b/drivers/gpu/drm/amd/display/Makefile > > > index 0d610cb376bb..3c44162ebe21 100644 > > > --- a/drivers/gpu/drm/amd/display/Makefile > > > +++ b/drivers/gpu/drm/amd/display/Makefile > > > @@ -26,6 +26,8 @@ > > > > > > AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH) > > > > > > +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation > > > + > > > > Care to enable this for the rest of amdgpu as well? Or send out an > > additional patch to do that? Either way: > > Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > > > Alex > > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr > > > -- > > > 2.40.1 > > > > >
On 5/24/23 15:27, Hamza Mahfooz wrote: > On 5/24/23 15:22, Alex Deucher wrote: >> On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz <hamza.mahfooz@amd.com> wrote: >>> >>> Currently, there are quite a number of issues that are quite easy for >>> the CI to catch, that slip through the cracks. Among them, there are >>> unused variable and indentation issues. Also, we should consider all >>> warnings to be compile errors, since the community will eventually end >>> up complaining about them. So, enable -Werror, -Wunused and >>> -Wmisleading-indentation for all kernel builds. >>> >>> Cc: Alex Deucher <alexander.deucher@amd.com> >>> Cc: Harry Wentland <harry.wentland@amd.com> >>> Cc: Kenny Ho <kenny.ho@amd.com> >>> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> >>> --- >>> v2: fix grammatical error >>> --- >>> drivers/gpu/drm/amd/display/Makefile | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/amd/display/Makefile b/drivers/gpu/drm/amd/display/Makefile >>> index 0d610cb376bb..3c44162ebe21 100644 >>> --- a/drivers/gpu/drm/amd/display/Makefile >>> +++ b/drivers/gpu/drm/amd/display/Makefile >>> @@ -26,6 +26,8 @@ >>> >>> AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH) >>> >>> +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation >>> + >> >> Care to enable this for the rest of amdgpu as well? Or send out an >> additional patch to do that? Either way: >> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > As far as I can tell, if `CONFIG_DRM_AMD_DC` is set it will run these > checks on at least the base driver code. > It's probable best to put that into amdgpu/Makefile in that case. Harry >> >> Alex >> >>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ >>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw >>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr >>> -- >>> 2.40.1 >>>
[AMD Official Use Only - General] I ran some experiment yesterday to turn on CONFIG_WERROR and here are some results (summary: gcc 12 seems ok but gcc 13 gives a lot more error, but not necessarily in our module.) Build with gcc13 using Fedora 38: http://zuul.linux.amd.com/t/osg/build/722ad77affed4f988d72051a84979e9f/log/job-output.txt#2924 Build with gcc12 using Fedora 37: http://zuul.linux.amd.com/t/osg/build/9e90f08bbeb044a2997a41b6cdc13f29/log/job-output.txt#7534 Kenny ======================== From: Alex Deucher <alexdeucher@gmail.com> Sent: Wednesday, May 24, 2023 3:50 PM To: Kuehling, Felix <Felix.Kuehling@amd.com> Cc: Russell, Kent <Kent.Russell@amd.com>; Ho, Kenny <Kenny.Ho@amd.com>; Mahfooz, Hamza <Hamza.Mahfooz@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Daniel Vetter <daniel@ffwll.ch>; Deucher, Alexander <Alexander.Deucher@amd.com>; David Airlie <airlied@gmail.com>; Koenig, Christian <Christian.Koenig@amd.com> Subject: Re: [PATCH v2] drm/amd/display: enable more strict compile checks On Wed, May 24, 2023 at 3:46 PM Felix Kuehling <felix.kuehling@amd.com> wrote: > > Sure, I think we tried enabling warnings as errors before and had to > revert it because of weird compiler quirks or the variety of compiler > versions that need to be supported. > > Alex, are you planning to upstream this, or is this only to enforce more > internal discipline about not ignoring warnings? I'd like to upstream it. Upstream already has CONFIG_WERROR as a config option, but it's been problematic to enable in CI because of various breakages outside of the driver and in different compilers. That said, I don't know how much trouble enabling it will cause with various compilers in the wild. Alex > > Regards, > Felix > > > On 2023-05-24 15:41, Russell, Kent wrote: > > > > [AMD Official Use Only - General] > > > > > > (Adding Felix in CC) > > > > I’m a fan of adding it to KFD as well. Felix, can you foresee any > > issues here? > > > > Kent > > > > *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> *On Behalf Of > > *Ho, Kenny > > *Sent:* Wednesday, May 24, 2023 3:23 PM > > *To:* Alex Deucher <alexdeucher@gmail.com>; Mahfooz, Hamza > > <Hamza.Mahfooz@amd.com> > > *Cc:* Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry > > <Harry.Wentland@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, > > Rodrigo <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org; > > dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; Daniel > > Vetter <daniel@ffwll.ch>; Deucher, Alexander > > <Alexander.Deucher@amd.com>; David Airlie <airlied@gmail.com>; Koenig, > > Christian <Christian.Koenig@amd.com> > > *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile > > checks > > > > [AMD Official Use Only - General] > > > > [AMD Official Use Only - General] > > > > (+ Felix) > > > > Should we do the same for other modules under amd (amdkfd)? I was > > going to enable full kernel werror in the kconfig used by my CI but > > this is probably better. > > > > Kenny > > > > ------------------------------------------------------------------------ > > > > *From:*Alex Deucher <alexdeucher@gmail.com> > > *Sent:* Wednesday, May 24, 2023 3:22 PM > > *To:* Mahfooz, Hamza <Hamza.Mahfooz@amd.com> > > *Cc:* amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; > > Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Ho, Kenny <Kenny.Ho@amd.com>; > > Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, Rodrigo > > <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org > > <linux-kernel@vger.kernel.org>; dri-devel@lists.freedesktop.org > > <dri-devel@lists.freedesktop.org>; Daniel Vetter <daniel@ffwll.ch>; > > Deucher, Alexander <Alexander.Deucher@amd.com>; David Airlie > > <airlied@gmail.com>; Wentland, Harry <Harry.Wentland@amd.com>; Koenig, > > Christian <Christian.Koenig@amd.com> > > *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile > > checks > > > > On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz <hamza.mahfooz@amd.com> > > wrote: > > > > > > Currently, there are quite a number of issues that are quite easy for > > > the CI to catch, that slip through the cracks. Among them, there are > > > unused variable and indentation issues. Also, we should consider all > > > warnings to be compile errors, since the community will eventually end > > > up complaining about them. So, enable -Werror, -Wunused and > > > -Wmisleading-indentation for all kernel builds. > > > > > > Cc: Alex Deucher <alexander.deucher@amd.com> > > > Cc: Harry Wentland <harry.wentland@amd.com> > > > Cc: Kenny Ho <kenny.ho@amd.com> > > > Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> > > > --- > > > v2: fix grammatical error > > > --- > > > drivers/gpu/drm/amd/display/Makefile | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/amd/display/Makefile > > b/drivers/gpu/drm/amd/display/Makefile > > > index 0d610cb376bb..3c44162ebe21 100644 > > > --- a/drivers/gpu/drm/amd/display/Makefile > > > +++ b/drivers/gpu/drm/amd/display/Makefile > > > @@ -26,6 +26,8 @@ > > > > > > AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH) > > > > > > +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation > > > + > > > > Care to enable this for the rest of amdgpu as well? Or send out an > > additional patch to do that? Either way: > > Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > > > Alex > > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr > > > -- > > > 2.40.1 > > > > >
On 5/24/23 15:54, Harry Wentland wrote: > > > On 5/24/23 15:27, Hamza Mahfooz wrote: >> On 5/24/23 15:22, Alex Deucher wrote: >>> On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz <hamza.mahfooz@amd.com> wrote: >>>> >>>> Currently, there are quite a number of issues that are quite easy for >>>> the CI to catch, that slip through the cracks. Among them, there are >>>> unused variable and indentation issues. Also, we should consider all >>>> warnings to be compile errors, since the community will eventually end >>>> up complaining about them. So, enable -Werror, -Wunused and >>>> -Wmisleading-indentation for all kernel builds. >>>> >>>> Cc: Alex Deucher <alexander.deucher@amd.com> >>>> Cc: Harry Wentland <harry.wentland@amd.com> >>>> Cc: Kenny Ho <kenny.ho@amd.com> >>>> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> >>>> --- >>>> v2: fix grammatical error >>>> --- >>>> drivers/gpu/drm/amd/display/Makefile | 2 ++ >>>> 1 file changed, 2 insertions(+) >>>> >>>> diff --git a/drivers/gpu/drm/amd/display/Makefile b/drivers/gpu/drm/amd/display/Makefile >>>> index 0d610cb376bb..3c44162ebe21 100644 >>>> --- a/drivers/gpu/drm/amd/display/Makefile >>>> +++ b/drivers/gpu/drm/amd/display/Makefile >>>> @@ -26,6 +26,8 @@ >>>> >>>> AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH) >>>> >>>> +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation >>>> + >>> >>> Care to enable this for the rest of amdgpu as well? Or send out an >>> additional patch to do that? Either way: >>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> >> >> As far as I can tell, if `CONFIG_DRM_AMD_DC` is set it will run these >> checks on at least the base driver code. >> > > It's probable best to put that into amdgpu/Makefile in that case. I tried the following, but it doesn't seem to work: diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile index 74a9aa6fe18c..d97bde0796dc 100644 --- a/drivers/gpu/drm/amd/amdgpu/Makefile +++ b/drivers/gpu/drm/amd/amdgpu/Makefile @@ -39,6 +39,8 @@ ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \ -I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm \ -I$(FULL_AMD_PATH)/amdkfd +ccflags-y += -Werror -Wunused -Wmisleading-indentation + amdgpu-y := amdgpu_drv.o # add KMS driver > > Harry > >>> >>> Alex >>> >>>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ >>>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw >>>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr >>>> -- >>>> 2.40.1 >>>> >
+ Kees On 5/24/23 15:50, Alex Deucher wrote: > On Wed, May 24, 2023 at 3:46 PM Felix Kuehling <felix.kuehling@amd.com> wrote: >> >> Sure, I think we tried enabling warnings as errors before and had to >> revert it because of weird compiler quirks or the variety of compiler >> versions that need to be supported. >> >> Alex, are you planning to upstream this, or is this only to enforce more >> internal discipline about not ignoring warnings? > > I'd like to upstream it. Upstream already has CONFIG_WERROR as a > config option, but it's been problematic to enable in CI because of > various breakages outside of the driver and in different compilers. > That said, I don't know how much trouble enabling it will cause with > various compilers in the wild. > > Alex > >> >> Regards, >> Felix >> >> >> On 2023-05-24 15:41, Russell, Kent wrote: >>> >>> [AMD Official Use Only - General] >>> >>> >>> (Adding Felix in CC) >>> >>> I’m a fan of adding it to KFD as well. Felix, can you foresee any >>> issues here? >>> >>> Kent >>> >>> *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> *On Behalf Of >>> *Ho, Kenny >>> *Sent:* Wednesday, May 24, 2023 3:23 PM >>> *To:* Alex Deucher <alexdeucher@gmail.com>; Mahfooz, Hamza >>> <Hamza.Mahfooz@amd.com> >>> *Cc:* Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry >>> <Harry.Wentland@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, >>> Rodrigo <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org; >>> dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; Daniel >>> Vetter <daniel@ffwll.ch>; Deucher, Alexander >>> <Alexander.Deucher@amd.com>; David Airlie <airlied@gmail.com>; Koenig, >>> Christian <Christian.Koenig@amd.com> >>> *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile >>> checks >>> >>> [AMD Official Use Only - General] >>> >>> [AMD Official Use Only - General] >>> >>> (+ Felix) >>> >>> Should we do the same for other modules under amd (amdkfd)? I was >>> going to enable full kernel werror in the kconfig used by my CI but >>> this is probably better. >>> >>> Kenny >>> >>> ------------------------------------------------------------------------ >>> >>> *From:*Alex Deucher <alexdeucher@gmail.com> >>> *Sent:* Wednesday, May 24, 2023 3:22 PM >>> *To:* Mahfooz, Hamza <Hamza.Mahfooz@amd.com> >>> *Cc:* amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; >>> Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Ho, Kenny <Kenny.Ho@amd.com>; >>> Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, Rodrigo >>> <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org >>> <linux-kernel@vger.kernel.org>; dri-devel@lists.freedesktop.org >>> <dri-devel@lists.freedesktop.org>; Daniel Vetter <daniel@ffwll.ch>; >>> Deucher, Alexander <Alexander.Deucher@amd.com>; David Airlie >>> <airlied@gmail.com>; Wentland, Harry <Harry.Wentland@amd.com>; Koenig, >>> Christian <Christian.Koenig@amd.com> >>> *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile >>> checks >>> >>> On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz <hamza.mahfooz@amd.com> >>> wrote: >>>> >>>> Currently, there are quite a number of issues that are quite easy for >>>> the CI to catch, that slip through the cracks. Among them, there are >>>> unused variable and indentation issues. Also, we should consider all >>>> warnings to be compile errors, since the community will eventually end >>>> up complaining about them. So, enable -Werror, -Wunused and >>>> -Wmisleading-indentation for all kernel builds. >>>> >>>> Cc: Alex Deucher <alexander.deucher@amd.com> >>>> Cc: Harry Wentland <harry.wentland@amd.com> >>>> Cc: Kenny Ho <kenny.ho@amd.com> >>>> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> >>>> --- >>>> v2: fix grammatical error >>>> --- >>>> drivers/gpu/drm/amd/display/Makefile | 2 ++ >>>> 1 file changed, 2 insertions(+) >>>> >>>> diff --git a/drivers/gpu/drm/amd/display/Makefile >>> b/drivers/gpu/drm/amd/display/Makefile >>>> index 0d610cb376bb..3c44162ebe21 100644 >>>> --- a/drivers/gpu/drm/amd/display/Makefile >>>> +++ b/drivers/gpu/drm/amd/display/Makefile >>>> @@ -26,6 +26,8 @@ >>>> >>>> AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH) >>>> >>>> +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation >>>> + >>> >>> Care to enable this for the rest of amdgpu as well? Or send out an >>> additional patch to do that? Either way: >>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> >>> >>> Alex >>> >>>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ >>>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw >>>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr >>>> -- >>>> 2.40.1 >>>> >>>
On Wed, 24 May 2023, Hamza Mahfooz <hamza.mahfooz@amd.com> wrote: > + Kees > > On 5/24/23 15:50, Alex Deucher wrote: >> On Wed, May 24, 2023 at 3:46 PM Felix Kuehling <felix.kuehling@amd.com> wrote: >>> >>> Sure, I think we tried enabling warnings as errors before and had to >>> revert it because of weird compiler quirks or the variety of compiler >>> versions that need to be supported. >>> >>> Alex, are you planning to upstream this, or is this only to enforce more >>> internal discipline about not ignoring warnings? >> >> I'd like to upstream it. Upstream already has CONFIG_WERROR as a >> config option, but it's been problematic to enable in CI because of >> various breakages outside of the driver and in different compilers. >> That said, I don't know how much trouble enabling it will cause with >> various compilers in the wild. FWIW, I think it's a bit scary to enable -Werror unconditionally. You'll then need to take into account *all* compilers the kernel build supports. I'd hate to fail the build for someone trying out a new compiler that has some new warnings. In i915, we've added our own kconfig for this that we tell our developers to use and have enabled in our CI. It also depends on !COMPILE_TEST to not get enabled by allmodconfig/allyesconfig configs. The Makefile then has: subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror On a somewhat related side note, it would be great to be able to enable the equivalent of W=1 on a subdir level. Now we need to add basically the same stuff one by one. Cc: Masahiro. BR, Jani. >> >> Alex >> >>> >>> Regards, >>> Felix >>> >>> >>> On 2023-05-24 15:41, Russell, Kent wrote: >>>> >>>> [AMD Official Use Only - General] >>>> >>>> >>>> (Adding Felix in CC) >>>> >>>> I’m a fan of adding it to KFD as well. Felix, can you foresee any >>>> issues here? >>>> >>>> Kent >>>> >>>> *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> *On Behalf Of >>>> *Ho, Kenny >>>> *Sent:* Wednesday, May 24, 2023 3:23 PM >>>> *To:* Alex Deucher <alexdeucher@gmail.com>; Mahfooz, Hamza >>>> <Hamza.Mahfooz@amd.com> >>>> *Cc:* Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry >>>> <Harry.Wentland@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, >>>> Rodrigo <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org; >>>> dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; Daniel >>>> Vetter <daniel@ffwll.ch>; Deucher, Alexander >>>> <Alexander.Deucher@amd.com>; David Airlie <airlied@gmail.com>; Koenig, >>>> Christian <Christian.Koenig@amd.com> >>>> *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile >>>> checks >>>> >>>> [AMD Official Use Only - General] >>>> >>>> [AMD Official Use Only - General] >>>> >>>> (+ Felix) >>>> >>>> Should we do the same for other modules under amd (amdkfd)? I was >>>> going to enable full kernel werror in the kconfig used by my CI but >>>> this is probably better. >>>> >>>> Kenny >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> *From:*Alex Deucher <alexdeucher@gmail.com> >>>> *Sent:* Wednesday, May 24, 2023 3:22 PM >>>> *To:* Mahfooz, Hamza <Hamza.Mahfooz@amd.com> >>>> *Cc:* amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; >>>> Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Ho, Kenny <Kenny.Ho@amd.com>; >>>> Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, Rodrigo >>>> <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org >>>> <linux-kernel@vger.kernel.org>; dri-devel@lists.freedesktop.org >>>> <dri-devel@lists.freedesktop.org>; Daniel Vetter <daniel@ffwll.ch>; >>>> Deucher, Alexander <Alexander.Deucher@amd.com>; David Airlie >>>> <airlied@gmail.com>; Wentland, Harry <Harry.Wentland@amd.com>; Koenig, >>>> Christian <Christian.Koenig@amd.com> >>>> *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile >>>> checks >>>> >>>> On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz <hamza.mahfooz@amd.com> >>>> wrote: >>>>> >>>>> Currently, there are quite a number of issues that are quite easy for >>>>> the CI to catch, that slip through the cracks. Among them, there are >>>>> unused variable and indentation issues. Also, we should consider all >>>>> warnings to be compile errors, since the community will eventually end >>>>> up complaining about them. So, enable -Werror, -Wunused and >>>>> -Wmisleading-indentation for all kernel builds. >>>>> >>>>> Cc: Alex Deucher <alexander.deucher@amd.com> >>>>> Cc: Harry Wentland <harry.wentland@amd.com> >>>>> Cc: Kenny Ho <kenny.ho@amd.com> >>>>> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> >>>>> --- >>>>> v2: fix grammatical error >>>>> --- >>>>> drivers/gpu/drm/amd/display/Makefile | 2 ++ >>>>> 1 file changed, 2 insertions(+) >>>>> >>>>> diff --git a/drivers/gpu/drm/amd/display/Makefile >>>> b/drivers/gpu/drm/amd/display/Makefile >>>>> index 0d610cb376bb..3c44162ebe21 100644 >>>>> --- a/drivers/gpu/drm/amd/display/Makefile >>>>> +++ b/drivers/gpu/drm/amd/display/Makefile >>>>> @@ -26,6 +26,8 @@ >>>>> >>>>> AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH) >>>>> >>>>> +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation >>>>> + >>>> >>>> Care to enable this for the rest of amdgpu as well? Or send out an >>>> additional patch to do that? Either way: >>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> >>>> >>>> Alex >>>> >>>>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ >>>>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw >>>>> subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr >>>>> -- >>>>> 2.40.1 >>>>> >>>>
> +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation
We have a config option for -Werror. Blindly adding this will create
problems with too new (or sometimes too old, or just too weird)
compilers all the time. Don't do this.
Hi! On Wed, May 24, 2023 at 04:27:31PM -0400, Hamza Mahfooz wrote: > + Kees > > On 5/24/23 15:50, Alex Deucher wrote: > > On Wed, May 24, 2023 at 3:46 PM Felix Kuehling <felix.kuehling@amd.com> wrote: > > > > > > Sure, I think we tried enabling warnings as errors before and had to > > > revert it because of weird compiler quirks or the variety of compiler > > > versions that need to be supported. > > > > > > Alex, are you planning to upstream this, or is this only to enforce more > > > internal discipline about not ignoring warnings? > > > > I'd like to upstream it. Upstream already has CONFIG_WERROR as a > > config option, but it's been problematic to enable in CI because of > > various breakages outside of the driver and in different compilers. > > That said, I don't know how much trouble enabling it will cause with > > various compilers in the wild. -Wmisleading-indentation is already part of -Wall, so this is globally enabled already. -Wunused is enabled under W=1, and it's pretty noisy still. If you can get builds clean in drm, that'll be a good step towards getting it enabled globally. (A middle ground with less to clean up might be -Wunused-but-set-variable) I agree about -Werror: just stick with CONFIG_WERROR instead. -Kees > > > > Alex > > > > > > > > Regards, > > > Felix > > > > > > > > > On 2023-05-24 15:41, Russell, Kent wrote: > > > > > > > > [AMD Official Use Only - General] > > > > > > > > > > > > (Adding Felix in CC) > > > > > > > > I’m a fan of adding it to KFD as well. Felix, can you foresee any > > > > issues here? > > > > > > > > Kent > > > > > > > > *From:* amd-gfx <amd-gfx-bounces@lists.freedesktop.org> *On Behalf Of > > > > *Ho, Kenny > > > > *Sent:* Wednesday, May 24, 2023 3:23 PM > > > > *To:* Alex Deucher <alexdeucher@gmail.com>; Mahfooz, Hamza > > > > <Hamza.Mahfooz@amd.com> > > > > *Cc:* Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry > > > > <Harry.Wentland@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, > > > > Rodrigo <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org; > > > > dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; Daniel > > > > Vetter <daniel@ffwll.ch>; Deucher, Alexander > > > > <Alexander.Deucher@amd.com>; David Airlie <airlied@gmail.com>; Koenig, > > > > Christian <Christian.Koenig@amd.com> > > > > *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile > > > > checks > > > > > > > > [AMD Official Use Only - General] > > > > > > > > [AMD Official Use Only - General] > > > > > > > > (+ Felix) > > > > > > > > Should we do the same for other modules under amd (amdkfd)? I was > > > > going to enable full kernel werror in the kconfig used by my CI but > > > > this is probably better. > > > > > > > > Kenny > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > *From:*Alex Deucher <alexdeucher@gmail.com> > > > > *Sent:* Wednesday, May 24, 2023 3:22 PM > > > > *To:* Mahfooz, Hamza <Hamza.Mahfooz@amd.com> > > > > *Cc:* amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; > > > > Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Ho, Kenny <Kenny.Ho@amd.com>; > > > > Pan, Xinhui <Xinhui.Pan@amd.com>; Siqueira, Rodrigo > > > > <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org > > > > <linux-kernel@vger.kernel.org>; dri-devel@lists.freedesktop.org > > > > <dri-devel@lists.freedesktop.org>; Daniel Vetter <daniel@ffwll.ch>; > > > > Deucher, Alexander <Alexander.Deucher@amd.com>; David Airlie > > > > <airlied@gmail.com>; Wentland, Harry <Harry.Wentland@amd.com>; Koenig, > > > > Christian <Christian.Koenig@amd.com> > > > > *Subject:* Re: [PATCH v2] drm/amd/display: enable more strict compile > > > > checks > > > > > > > > On Wed, May 24, 2023 at 3:20 PM Hamza Mahfooz <hamza.mahfooz@amd.com> > > > > wrote: > > > > > > > > > > Currently, there are quite a number of issues that are quite easy for > > > > > the CI to catch, that slip through the cracks. Among them, there are > > > > > unused variable and indentation issues. Also, we should consider all > > > > > warnings to be compile errors, since the community will eventually end > > > > > up complaining about them. So, enable -Werror, -Wunused and > > > > > -Wmisleading-indentation for all kernel builds. > > > > > > > > > > Cc: Alex Deucher <alexander.deucher@amd.com> > > > > > Cc: Harry Wentland <harry.wentland@amd.com> > > > > > Cc: Kenny Ho <kenny.ho@amd.com> > > > > > Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> > > > > > --- > > > > > v2: fix grammatical error > > > > > --- > > > > > drivers/gpu/drm/amd/display/Makefile | 2 ++ > > > > > 1 file changed, 2 insertions(+) > > > > > > > > > > diff --git a/drivers/gpu/drm/amd/display/Makefile > > > > b/drivers/gpu/drm/amd/display/Makefile > > > > > index 0d610cb376bb..3c44162ebe21 100644 > > > > > --- a/drivers/gpu/drm/amd/display/Makefile > > > > > +++ b/drivers/gpu/drm/amd/display/Makefile > > > > > @@ -26,6 +26,8 @@ > > > > > > > > > > AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH) > > > > > > > > > > +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation > > > > > + > > > > > > > > Care to enable this for the rest of amdgpu as well? Or send out an > > > > additional patch to do that? Either way: > > > > Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > > > > > > > Alex > > > > > > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ > > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw > > > > > subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr > > > > > -- > > > > > 2.40.1 > > > > > > > > > > -- > Hamza >
On Thu, May 25, 2023 at 08:37:07AM -0700, Kees Cook wrote: > Hi! > > On Wed, May 24, 2023 at 04:27:31PM -0400, Hamza Mahfooz wrote: > > + Kees > > > > On 5/24/23 15:50, Alex Deucher wrote: > > > On Wed, May 24, 2023 at 3:46 PM Felix Kuehling <felix.kuehling@amd.com> wrote: > > > > > > > > Sure, I think we tried enabling warnings as errors before and had to > > > > revert it because of weird compiler quirks or the variety of compiler > > > > versions that need to be supported. > > > > > > > > Alex, are you planning to upstream this, or is this only to enforce more > > > > internal discipline about not ignoring warnings? > > > > > > I'd like to upstream it. Upstream already has CONFIG_WERROR as a > > > config option, but it's been problematic to enable in CI because of > > > various breakages outside of the driver and in different compilers. > > > That said, I don't know how much trouble enabling it will cause with > > > various compilers in the wild. > > -Wmisleading-indentation is already part of -Wall, so this is globally > enabled already. > > -Wunused is enabled under W=1, and it's pretty noisy still. If you can > get builds clean in drm, that'll be a good step towards getting it > enabled globally. (A middle ground with less to clean up might be > -Wunused-but-set-variable) > > I agree about -Werror: just stick with CONFIG_WERROR instead. There is also W=e, added by commit c77d06e70d59 ("kbuild: support W=e to make build abort in case of warning") in 5.19, which works well for building with configurations that do not have CONFIG_WERROR enabled and avoiding dipping into menuconfig. Unconditionally enabling -Werror with no way to turn it off is just asking for problems over time with new compiler versions, either due to new warnings in -Wall or warnings that have been improved or changed. Should that still be desired, consider doing what i915 and PowerPC have done and add a Kconfig option that can be disabled. Cheers, Nathan
Hi Hamza, kernel test robot noticed the following build errors: [auto build test ERROR on drm-misc/drm-misc-next] [also build test ERROR on linus/master v6.4-rc3 next-20230525] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Hamza-Mahfooz/drm-amd-display-enable-more-strict-compile-checks/20230525-034537 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20230524191955.252212-1-hamza.mahfooz%40amd.com patch subject: [PATCH v2] drm/amd/display: enable more strict compile checks config: x86_64-allyesconfig compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/19bf85960032f3841215917e04659a6cc259dbcc git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Hamza-Mahfooz/drm-amd-display-enable-more-strict-compile-checks/20230525-034537 git checkout 19bf85960032f3841215917e04659a6cc259dbcc # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 olddefconfig make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202305261236.NDPNwMNA-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:67: >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:325:9: note: in expansion of macro 'link_regs' 325 | link_regs(0, A), | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[0].TMDS_CTL_BITS') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:325:9: note: in expansion of macro 'link_regs' 325 | link_regs(0, A), | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:325:9: note: in expansion of macro 'link_regs' 325 | link_regs(0, A), | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[0].DP_DPHY_INTERNAL_CTRL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:325:9: note: in expansion of macro 'link_regs' 325 | link_regs(0, A), | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:326:9: note: in expansion of macro 'link_regs' 326 | link_regs(1, B), | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[1].TMDS_CTL_BITS') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:326:9: note: in expansion of macro 'link_regs' 326 | link_regs(1, B), | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:326:9: note: in expansion of macro 'link_regs' 326 | link_regs(1, B), | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[1].DP_DPHY_INTERNAL_CTRL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:326:9: note: in expansion of macro 'link_regs' 326 | link_regs(1, B), | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:327:9: note: in expansion of macro 'link_regs' 327 | link_regs(2, C), | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[2].TMDS_CTL_BITS') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:327:9: note: in expansion of macro 'link_regs' 327 | link_regs(2, C), | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:327:9: note: in expansion of macro 'link_regs' 327 | link_regs(2, C), | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[2].DP_DPHY_INTERNAL_CTRL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:327:9: note: in expansion of macro 'link_regs' 327 | link_regs(2, C), | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:328:9: note: in expansion of macro 'link_regs' 328 | link_regs(3, D), | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[3].TMDS_CTL_BITS') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:328:9: note: in expansion of macro 'link_regs' 328 | link_regs(3, D), | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:328:9: note: in expansion of macro 'link_regs' 328 | link_regs(3, D), | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[3].DP_DPHY_INTERNAL_CTRL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:328:9: note: in expansion of macro 'link_regs' 328 | link_regs(3, D), | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:329:9: note: in expansion of macro 'link_regs' 329 | link_regs(4, E), | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[4].TMDS_CTL_BITS') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:329:9: note: in expansion of macro 'link_regs' 329 | link_regs(4, E), | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:329:9: note: in expansion of macro 'link_regs' 329 | link_regs(4, E), | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[4].DP_DPHY_INTERNAL_CTRL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:329:9: note: in expansion of macro 'link_regs' 329 | link_regs(4, E), | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:330:9: note: in expansion of macro 'link_regs' 330 | link_regs(5, F) | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[5].TMDS_CTL_BITS') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:207:9: note: in expansion of macro 'SRI' 207 | SRI(TMDS_CTL_BITS, DIG, id), \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:238:9: note: in expansion of macro 'DPCS_DCN2_CMN_REG_LIST' 238 | DPCS_DCN2_CMN_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:320:9: note: in expansion of macro 'DPCS_DCN2_REG_LIST' 320 | DPCS_DCN2_REG_LIST(id), \ | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:330:9: note: in expansion of macro 'link_regs' 330 | link_regs(5, F) | ^~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:330:9: note: in expansion of macro 'link_regs' 330 | link_regs(5, F) | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'link_enc_regs[5].DP_DPHY_INTERNAL_CTRL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:321:9: note: in expansion of macro 'SRI' 321 | SRI(DP_DPHY_INTERNAL_CTRL, DP, id) \ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:330:9: note: in expansion of macro 'link_regs' 330 | link_regs(5, F) | ^~~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:70: >> drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_0_0_sh_mask.h:39978:111: error: initialized field overwritten [-Werror=override-init] 39978 | #define DIG0_TMDS_CTL_BITS__TMDS_CTL0__SHIFT 0x0 | ^~~ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_0_0_sh_mask.h:39978:111: note: in definition of macro 'DIG0_TMDS_CTL_BITS__TMDS_CTL0__SHIFT' 39978 | #define DIG0_TMDS_CTL_BITS__TMDS_CTL0__SHIFT 0x0 | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:184:9: note: in expansion of macro 'LE_SF' 184 | LE_SF(DIG0_TMDS_CTL_BITS, TMDS_CTL0, mask_sh), \ | ^~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:334:9: note: in expansion of macro 'LINK_ENCODER_MASK_SH_LIST_DCN20' 334 | LINK_ENCODER_MASK_SH_LIST_DCN20(__SHIFT),\ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_0_0_sh_mask.h:39978:111: note: (near initialization for 'le_shift.TMDS_CTL0') 39978 | #define DIG0_TMDS_CTL_BITS__TMDS_CTL0__SHIFT 0x0 | ^~~ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_0_0_sh_mask.h:39978:111: note: in definition of macro 'DIG0_TMDS_CTL_BITS__TMDS_CTL0__SHIFT' 39978 | #define DIG0_TMDS_CTL_BITS__TMDS_CTL0__SHIFT 0x0 | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:184:9: note: in expansion of macro 'LE_SF' 184 | LE_SF(DIG0_TMDS_CTL_BITS, TMDS_CTL0, mask_sh), \ | ^~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:334:9: note: in expansion of macro 'LINK_ENCODER_MASK_SH_LIST_DCN20' 334 | LINK_ENCODER_MASK_SH_LIST_DCN20(__SHIFT),\ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_0_0_sh_mask.h:39982:111: error: initialized field overwritten [-Werror=override-init] 39982 | #define DIG0_TMDS_CTL_BITS__TMDS_CTL0_MASK 0x00000001L | ^~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_0_0_sh_mask.h:39982:111: note: in definition of macro 'DIG0_TMDS_CTL_BITS__TMDS_CTL0_MASK' 39982 | #define DIG0_TMDS_CTL_BITS__TMDS_CTL0_MASK 0x00000001L | ^~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:184:9: note: in expansion of macro 'LE_SF' 184 | LE_SF(DIG0_TMDS_CTL_BITS, TMDS_CTL0, mask_sh), \ | ^~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:339:9: note: in expansion of macro 'LINK_ENCODER_MASK_SH_LIST_DCN20' 339 | LINK_ENCODER_MASK_SH_LIST_DCN20(_MASK),\ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_0_0_sh_mask.h:39982:111: note: (near initialization for 'le_mask.TMDS_CTL0') 39982 | #define DIG0_TMDS_CTL_BITS__TMDS_CTL0_MASK 0x00000001L | ^~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dcn/dcn_2_0_0_sh_mask.h:39982:111: note: in definition of macro 'DIG0_TMDS_CTL_BITS__TMDS_CTL0_MASK' 39982 | #define DIG0_TMDS_CTL_BITS__TMDS_CTL0_MASK 0x00000001L | ^~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_link_encoder.h:184:9: note: in expansion of macro 'LE_SF' 184 | LE_SF(DIG0_TMDS_CTL_BITS, TMDS_CTL0, mask_sh), \ | ^~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:339:9: note: in expansion of macro 'LINK_ENCODER_MASK_SH_LIST_DCN20' 339 | LINK_ENCODER_MASK_SH_LIST_DCN20(_MASK),\ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:67: >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:181:9: note: in expansion of macro 'SRI' 181 | SRI(CURSOR_CONTROL, CURSOR0_, id),\ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:423:9: note: in expansion of macro 'tf_regs' 423 | tf_regs(0), | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'tf_regs[0].CURSOR_CONTROL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:181:9: note: in expansion of macro 'SRI' 181 | SRI(CURSOR_CONTROL, CURSOR0_, id),\ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:423:9: note: in expansion of macro 'tf_regs' 423 | tf_regs(0), | ^~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:183:9: note: in expansion of macro 'SRI' 183 | SRI(DSCL_MEM_PWR_CTRL, DSCL, id) | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:423:9: note: in expansion of macro 'tf_regs' 423 | tf_regs(0), | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'tf_regs[0].DSCL_MEM_PWR_CTRL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:183:9: note: in expansion of macro 'SRI' 183 | SRI(DSCL_MEM_PWR_CTRL, DSCL, id) | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:423:9: note: in expansion of macro 'tf_regs' 423 | tf_regs(0), | ^~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:181:9: note: in expansion of macro 'SRI' 181 | SRI(CURSOR_CONTROL, CURSOR0_, id),\ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:424:9: note: in expansion of macro 'tf_regs' 424 | tf_regs(1), | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'tf_regs[1].CURSOR_CONTROL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:181:9: note: in expansion of macro 'SRI' 181 | SRI(CURSOR_CONTROL, CURSOR0_, id),\ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:424:9: note: in expansion of macro 'tf_regs' 424 | tf_regs(1), | ^~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:183:9: note: in expansion of macro 'SRI' 183 | SRI(DSCL_MEM_PWR_CTRL, DSCL, id) | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:424:9: note: in expansion of macro 'tf_regs' 424 | tf_regs(1), | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'tf_regs[1].DSCL_MEM_PWR_CTRL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:183:9: note: in expansion of macro 'SRI' 183 | SRI(DSCL_MEM_PWR_CTRL, DSCL, id) | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:424:9: note: in expansion of macro 'tf_regs' 424 | tf_regs(1), | ^~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:181:9: note: in expansion of macro 'SRI' 181 | SRI(CURSOR_CONTROL, CURSOR0_, id),\ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:425:9: note: in expansion of macro 'tf_regs' 425 | tf_regs(2), | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'tf_regs[2].CURSOR_CONTROL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:181:9: note: in expansion of macro 'SRI' 181 | SRI(CURSOR_CONTROL, CURSOR0_, id),\ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:425:9: note: in expansion of macro 'tf_regs' 425 | tf_regs(2), | ^~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:183:9: note: in expansion of macro 'SRI' 183 | SRI(DSCL_MEM_PWR_CTRL, DSCL, id) | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:425:9: note: in expansion of macro 'tf_regs' 425 | tf_regs(2), | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'tf_regs[2].DSCL_MEM_PWR_CTRL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:183:9: note: in expansion of macro 'SRI' 183 | SRI(DSCL_MEM_PWR_CTRL, DSCL, id) | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:425:9: note: in expansion of macro 'tf_regs' 425 | tf_regs(2), | ^~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:181:9: note: in expansion of macro 'SRI' 181 | SRI(CURSOR_CONTROL, CURSOR0_, id),\ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:426:9: note: in expansion of macro 'tf_regs' 426 | tf_regs(3), | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'tf_regs[3].CURSOR_CONTROL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:181:9: note: in expansion of macro 'SRI' 181 | SRI(CURSOR_CONTROL, CURSOR0_, id),\ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:426:9: note: in expansion of macro 'tf_regs' 426 | tf_regs(3), | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:183:9: note: in expansion of macro 'SRI' 183 | SRI(DSCL_MEM_PWR_CTRL, DSCL, id) | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:426:9: note: in expansion of macro 'tf_regs' 426 | tf_regs(3), | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: note: (near initialization for 'tf_regs[3].DSCL_MEM_PWR_CTRL') 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:183:9: note: in expansion of macro 'SRI' 183 | SRI(DSCL_MEM_PWR_CTRL, DSCL, id) | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:426:9: note: in expansion of macro 'tf_regs' 426 | tf_regs(3), | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:269:52: error: initialized field overwritten [-Werror=override-init] 269 | #define DCN_BASE__INST0_SEG2 0x000034C0 | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:127:25: note: in expansion of macro 'DCN_BASE__INST0_SEG2' 127 | #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:129:19: note: in expansion of macro 'BASE_INNER' 129 | #define BASE(seg) BASE_INNER(seg) | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:136:21: note: in expansion of macro 'BASE' 136 | .reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \ | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp.h:181:9: note: in expansion of macro 'SRI' 181 | SRI(CURSOR_CONTROL, CURSOR0_, id),\ | ^~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:418:9: note: in expansion of macro 'TF_REG_LIST_DCN20' 418 | TF_REG_LIST_DCN20(id),\ .. vim +269 drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h 33934b3576b0ef Hawking Zhang 2019-03-04 266 33934b3576b0ef Hawking Zhang 2019-03-04 267 #define DCN_BASE__INST0_SEG0 0x00000012 33934b3576b0ef Hawking Zhang 2019-03-04 268 #define DCN_BASE__INST0_SEG1 0x000000C0 33934b3576b0ef Hawking Zhang 2019-03-04 @269 #define DCN_BASE__INST0_SEG2 0x000034C0 33934b3576b0ef Hawking Zhang 2019-03-04 270 #define DCN_BASE__INST0_SEG3 0x00009000 33934b3576b0ef Hawking Zhang 2019-03-04 271 #define DCN_BASE__INST0_SEG4 0 33934b3576b0ef Hawking Zhang 2019-03-04 272 #define DCN_BASE__INST0_SEG5 0 33934b3576b0ef Hawking Zhang 2019-03-04 273
diff --git a/drivers/gpu/drm/amd/display/Makefile b/drivers/gpu/drm/amd/display/Makefile index 0d610cb376bb..3c44162ebe21 100644 --- a/drivers/gpu/drm/amd/display/Makefile +++ b/drivers/gpu/drm/amd/display/Makefile @@ -26,6 +26,8 @@ AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH) +subdir-ccflags-y += -Werror -Wunused -Wmisleading-indentation + subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr