Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3153927rdb; Sat, 9 Dec 2023 13:56:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5LNTfnsXqNLcYKGV7mAPLGfofC1rvFhCmZMuBJarts6uH7ehZQ0a37afEgqrfJZQFr32N X-Received: by 2002:a17:902:c94d:b0:1d0:6ffd:e2bc with SMTP id i13-20020a170902c94d00b001d06ffde2bcmr2332413pla.86.1702159001640; Sat, 09 Dec 2023 13:56:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702159001; cv=none; d=google.com; s=arc-20160816; b=viwmRcSk1lRgdlRi174Y67hDLMrNJNRZhGVCjEzvqM5xE1m/CzICz9kgtPJ+5nRSYP aHRgCD9AT2xdhPfmUNuqGxhmRhjoMM3TjexQrj3h+X+7C/opjayKUac6+ImH9RjiaJS0 /QPrv5AmTbxM/NxOvvlX+VY1eDwXJe+mMhQnZEJZIX0GkXPVqPg67CsrImjYueqEZGP2 KeK1CUfoHn1bzRte97Zdu1MsLxie52brD+xHS9eSpKdnIFKlIB1YyXDX6/4FrCNKPVzt CGgt0FtXGOUlPp0Yui76tZQ1Tb4aOztTlaMHGCErdSCRJYtcDw8zHDpj9kwoKJ0WusOh 16jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=We6kY3gAvHmi9sxQSDSEwapFQp49viPEwJBBDd9ci5w=; fh=FmaHtC0LtNIpium8mv6NujC9dwLCclKd5SgS8nf4pP0=; b=TX0rBOzepFA6c1E3UgPzlegHIQrO9M+fXyNhSs6diqdloX1e6qZ7eK05t4zZR2x0oP 3A+XtYtjd3aVdAbFTfLbjz+ww6IldxgVfl32+ObG2sMGmnMCLMr0sesU/iEFBHIY77FU 1859cVaWQJyJfuywxdCsBfp4rUdEnhUyT0CwMNFnqAHQp6hke0gdwclUYOnrDm0u0HOz BnREv8EWaA/Qvfd+Jut5wgsdpuQNQXUdtelmnGQ/Zk1TuC+v98i1UrC2qBKv7tpZpBnE ujJDilQyDbNfDSzfiQMzjrSInKjtpVbDlnoLRHXHo0xHqqNqy/mID8iKKLTrdsjLRSVj YDow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=cvHA9bOc; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=JLgUH7wa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id h14-20020a17090a604e00b0028679c85a9dsi4890359pjm.87.2023.12.09.13.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 13:56:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=cvHA9bOc; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=JLgUH7wa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id B0CC3805F2FB; Sat, 9 Dec 2023 13:56:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229518AbjLIVnw (ORCPT + 99 others); Sat, 9 Dec 2023 16:43:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjLIVnv (ORCPT ); Sat, 9 Dec 2023 16:43:51 -0500 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A16A8C1 for ; Sat, 9 Dec 2023 13:43:57 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id D4D73320046E; Sat, 9 Dec 2023 16:43:53 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Sat, 09 Dec 2023 16:43:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1702158233; x=1702244633; bh=We 6kY3gAvHmi9sxQSDSEwapFQp49viPEwJBBDd9ci5w=; b=cvHA9bOcnXtURsTD7h hQIwOkrnSC/IEaopUb7jcU3SO71P2HglKc/Uf/tbOJgiQdVvBbYUi5wIeI/SuHdN yihGgZozlJtPuOEBXBUtit4VmIrrw4iI9wyvOpZtesme/XJI4CB73j6HIO/29i2g J9jzcjTXS3e2q7va1k83+YbmF98nTRA9aZv5rVUKh4ua+HV757M6xE1l6PExeBOH 4AkKpOCn6h7HzggQz1bKkZ1QqQEmo4X7lqBxD3JHribrEUCKyubmKlBs8AncEceS WsxBv/4g9Tsa57PG4+KEQ8Z9hREEBU5ah1hjoC1XZRXhc0YlNTK5bJ/RHhiFPZSQ R4MQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1702158233; x=1702244633; bh=We6kY3gAvHmi9 sxQSDSEwapFQp49viPEwJBBDd9ci5w=; b=JLgUH7waXEbUzBEVje+yS8gqR3UZv 0CffHOWY0+Z+wwB+vW7KwAu70naHiDTc5u+OYzUVLCv0unDsrJpC93z3zETAGff7 e0/T0GRtbRg0+VnKpUtTWPl/Q4nlGcTAyPFjPNVovSCRC1cUnlcC3O2I04IH5cok MESfiIG+6tt4R9ba3Gg9/9KnbqSVFlntTrRNLbzBRy93epWnYX5VTNrGGgOaENLy XlEPzcvCm3VRq9ydeqbEFCF21r5ibe7XRlynlw5bEBTNt50vdbXTP7QJa37rnJfz NT1ZcZ4nx6pbp3NiCJ8HgiHHtOAi3T7I/d1Ju8OBaYA2CHgazdrnZNtIw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekkedgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeevhfffledtgeehfeffhfdtgedvheejtdfgkeeuvefgudffteettdekkeeu feehudenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id A87CDB60089; Sat, 9 Dec 2023 16:43:52 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1178-geeaf0069a7-fm-20231114.001-geeaf0069 MIME-Version: 1.0 Message-Id: <7996d21a-3e97-408b-82a3-3bad432095a2@app.fastmail.com> In-Reply-To: <07d27191-12b6-4c84-b80e-75c618df9de4@sifive.com> References: <20231122030621.3759313-1-samuel.holland@sifive.com> <20231122030621.3759313-4-samuel.holland@sifive.com> <20231123-headdress-mold-0dd7a74477f7@wendy> <20231130004224.GE2513828@dev-arch.thelio-3990X> <4f277982-fffb-4fe1-bc02-007633400f31@sifive.com> <5090a015-5b6f-44be-bb25-d2ca3fdf5d40@app.fastmail.com> <07d27191-12b6-4c84-b80e-75c618df9de4@sifive.com> Date: Sat, 09 Dec 2023 22:42:56 +0100 From: "Arnd Bergmann" To: "Samuel Holland" , "Nathan Chancellor" , "Conor.Dooley" Cc: "Palmer Dabbelt" , "Harry Wentland" , "Leo Li" , "Rodrigo Siqueira" , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Dave Airlie" , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Alex Deucher" , "Pan Xinhui" , "Daniel Vetter" , amd-gfx@lists.freedesktop.org, llvm@lists.linux.dev Subject: Re: [PATCH 3/3] drm/amd/display: Support DRM_AMD_DC_FP on RISC-V Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sat, 09 Dec 2023 13:56:37 -0800 (PST) On Sat, Dec 9, 2023, at 22:29, Samuel Holland wrote: > On 2023-12-09 2:38 PM, Arnd Bergmann wrote: >> On Fri, Dec 8, 2023, at 06:04, Samuel Holland wrote: >>> On 2023-11-29 6:42 PM, Nathan Chancellor wrote: >>>> >>>> https://lore.kernel.org/20231019205117.GA839902@dev-arch.thelio-3990X/ >>> >>> I also see one of these with clang 17 even with KASAN disabled: >>> >>> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:37:6: >>> warning: stack frame size (2208) exceeds limit (2048) in 'dml32_recalculate' >>> [-Wframe-larger-than] >>> void dml32_recalculate(struct display_mode_lib *mode_lib) >>> >>> ^ >>> 1532/2208 (69.38%) spills, 676/2208 (30.62%) variables >>> >>> So I'm in favor of just raising the limit for these files for clang, like you >>> suggested in the linked thread. >> >> How about just adding a BUG_ON(IS_ENABLED(CONFIG_RISCV)) >> in that function? That should also avoid the build failure >> but give a better indication of where the problem is >> if someone actually runs into that function and triggers >> a runtime stack overflow. > > Won't that break actual users of the driver, trading an unlikely but > theoretically possible stack overflow for a guaranteed crash? The intent of this > series is that I have one of these GPUs plugged in to a RISC-V board, and I want > to use it. Ah, I thought you just wanted to get it to compile cleanly so you could use some of the more common cards. If you are trying to run the dcn32 code specifically, then you should definitely fix the stack usage of that function instead. Arnd