Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27851824rwd; Tue, 4 Jul 2023 08:43:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7U79BkXutK+dUFJAkVRarh1h5i/HbyI4HW7tmgejhl/qYK3nP78c1dlZvvGwfeodVmbaYF X-Received: by 2002:a05:6a20:7487:b0:11f:33da:56ec with SMTP id p7-20020a056a20748700b0011f33da56ecmr15948099pzd.27.1688485437020; Tue, 04 Jul 2023 08:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688485437; cv=none; d=google.com; s=arc-20160816; b=gZfSLT378bhrHB1zk+XFB5konSSj6SlERERGdo/E5k/W2JcK61Wh/65mcQGam191c4 Om7cb8pDUSd/ctduINK5eLY+gR0mSFLjsk0ygA77YbTh/v/Z+1HzWZZaOfnH9An2k3j/ hBwGHtILl9lyU+beMr+Bg7WAMd7A34dH7K5peM/4UVJRH55SVsYt4ZdQt7rIAVTFuV+X Bc6sFUYkcwhmIeKhkW9RYGYkHNoqOw4jM2R7e57MlVHYFcPmx9qSPxVcrQR0cdcWfdkE zHFz4IbxO0A77Sn3S+lJkT/WMgRCJHG+syA5irFAfh+8gZxsAEMS0uTuV6IG7yhFf0lk x4tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=FXe15dxw2eFgPSPM36BqwI66nkQYl/9quUwAMMjIMFE=; fh=voWAzoFLoQ9WUd6RGNmf9xaoCFAt1UP34Vzy2Zr7zLg=; b=pGwoHA+o08uLquzsBzhJ67h3zEwkvBu+d3VX+uYgOlk7CRuJCepmDDd7Ozy1cR7Wxb T3V312yeLvd3yUvkKkjXlXIGlyxtcMgX7TMHGp95SJhZ+8TqRotD4SknM1f7tOC2/9TD bLxnt7pHfunl48sbC3UitSIsybIoOYKosc0wbDf5iUR4EYdBpJG7vFPx5n92hsX95lDN hcO60oSSCZk2QWsFRnL9e0KTDhFR6FpfTvnq4T5ppODYPucTbNsLCBMG/vAF2//s1IyZ 8kQFGxlbvgMidqhgzcW71mqIyrkRai669+LmQpStqbz75iODU5H5BohseD8pSA6cGWO0 VoHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=JvFLQMO5; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Czaof1iv; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t6-20020a17090340c600b001b6b08f03ccsi12211188pld.345.2023.07.04.08.43.41; Tue, 04 Jul 2023 08:43:56 -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=@arndb.de header.s=fm2 header.b=JvFLQMO5; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Czaof1iv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230349AbjGDPZQ (ORCPT + 99 others); Tue, 4 Jul 2023 11:25:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230200AbjGDPZO (ORCPT ); Tue, 4 Jul 2023 11:25:14 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D8F710CF for ; Tue, 4 Jul 2023 08:25:11 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 0CD3B5C0249; Tue, 4 Jul 2023 11:25:11 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Tue, 04 Jul 2023 11:25:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding: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=fm2; t= 1688484311; x=1688570711; bh=FXe15dxw2eFgPSPM36BqwI66nkQYl/9quUw AMMjIMFE=; b=JvFLQMO5JNMwLSZ/OQFor6bgUfFIJX9OqLmR8ixESZDtO77uACV oOerV31F+dAq7gzTumYj1kctdHh5EAkN5+g0T9BSUXQt7g3/eQ97jwONwtcOq0ex fQbEcjXwLvyS6oD/yZ6gSIqEJT3nOA6eFx+B7ThNgORgQ2VyJU1RtF8+M7xRUrXQ K5W/s/KV8CD4BYEIID/j5ZXrvy28TAksnIU0TBeQ4uiYKeGEbv/DnHcddmF+oOo9 LwtX/PDSL83az+09o3c57dNul83+nDBezRS0/HMsaHAwJcP4tOQIeWkKf4/xwm3t kaMbmXeu4init/ytdnmt7RPj+qZ4Rfsrppg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm2; t= 1688484311; x=1688570711; bh=FXe15dxw2eFgPSPM36BqwI66nkQYl/9quUw AMMjIMFE=; b=Czaof1ivS+YXaRXgZUUOXVXVw0pvLLS7gie8KOAZGkreqkin56f IhV0gueOTbxKn8BJGhjzndv0Ou7Tc2poh7PlXltQfDJ95sfaOVb3NsMaH/8zCUtI ErdQbV7/cOmJuBTzEcTLt1DQD7W/PI18Lxh61fbIEumLhO/nbfJcDMZpZn0YGvzw oMbZ1amym4RgQ4NPpzyqsvt7CR4oOZ01tEWhFVRz9bk+iQY1mGPLMc4xo5/4sQxa e3JPIv3TJeJyO2IqiiRpDlGcok9mdZ4UwnykbSCsANLXFC4qKR5A3audgoM1fHp+ m4ML/ID2e/T2it5ylh4lFY83h7jciYvaejQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeggdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepgeefjeehvdelvdffieejieejiedvvdfhleeivdelveehjeelteegudektdfg jeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id C33BCB60089; Tue, 4 Jul 2023 11:25:10 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-527-gee7b8d90aa-fm-20230629.001-gee7b8d90 Mime-Version: 1.0 Message-Id: <2dff4d81-9b45-4d69-9e30-972f2c9318d9@app.fastmail.com> In-Reply-To: <7b55040f-f2d2-372e-cf8a-5ac4a456fdb1@amd.com> References: <20230703123557.3355657-1-arnd@kernel.org> <788147c6-defd-496a-8174-1571b73d1a71@app.fastmail.com> <9b03246d-b46e-4b91-968a-e9ffc2fc26db@app.fastmail.com> <7b55040f-f2d2-372e-cf8a-5ac4a456fdb1@amd.com> Date: Tue, 04 Jul 2023 17:24:49 +0200 From: "Arnd Bergmann" To: =?UTF-8?Q?Christian_K=C3=B6nig?= , "Arnd Bergmann" , "Alex Deucher" , "Pan, Xinhui" , "Dave Airlie" , "Daniel Vetter" Cc: "Hawking Zhang" , "Lijo Lazar" , "Mario Limonciello" , "YiPeng Chai" , "Le Ma" , "Bokun Zhang" , "Srinivasan Shanmugam" , "Shiwu Zhang" , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/amdgpu: avoid integer overflow warning in amdgpu_device_resize_fb_bar() Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 4, 2023, at 16:51, Christian K=C3=B6nig wrote: > Am 04.07.23 um 16:31 schrieb Arnd Bergmann: >> On Tue, Jul 4, 2023, at 14:33, Christian K=C3=B6nig wrote: >>> >>> Modern AMD GPUs have 16GiB of local memory (VRAM), making those >>> accessible to a CPU which can only handle 32bit addresses by resizing >>> the BAR is impossible to begin with. >>> >>> But going a step further even without resizing it is pretty hard to = get >>> that hardware working on such an architecture. >> I'd still like to understand this part better, as we have a lot of >> arm64 chips with somewhat flawed PCIe implementations, often with >> a tiny 64-bit memory space, but otherwise probably capable of >> using a GPU. > > Yeah, those are unfortunately very well known to us :( > >> What exactly do you expect to happen here? >> >> a) Use only part of the VRAM but otherwise work as expected >> b) Access all of the VRAM, but at a performance cost for >> bank switching? > > We have tons of x86 systems where we can't resize the BAR (because of=20 > lack of BIOS setup of the root PCIe windows). So bank switching is sti= ll=20 > perfectly supported. Ok, good. > After investigating (which sometimes even includes involving engineers=20 > from ARM) we usually find that those boards doesn't even remotely comp= ly=20 > to the PCIe specification, both regarding power as well as functional=20 > things like DMA coherency. Makes sense, the power usage is clearly going to make this impossible on a lot of boards. I would have expected noncoherent DMA to be a solvable problem, since that generally works with all drivers that use the dma-mapping interfaces correctly, but I understand that drivers/gpu/* often does its own thing here, which may make that harder. Arnd