Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2767486pxb; Mon, 25 Apr 2022 01:51:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4TjnewVX1qfTU2IRiu1lcwkWX8hdF87XkmMhYp/3HoYN79+sb/YiBXYmXz4cUg8nAvT9w X-Received: by 2002:a17:902:e84a:b0:15c:e28c:5f7c with SMTP id t10-20020a170902e84a00b0015ce28c5f7cmr11407747plg.94.1650876689455; Mon, 25 Apr 2022 01:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650876689; cv=none; d=google.com; s=arc-20160816; b=1AP9HO4Ppi+MhTAA8+DZclZmUvDVREKktJboAKktMEZpXpybya2cUjmBKoUCDYX7ih Ujo7TgwZseakWYMbd0a/tQxd/9z/ms0sxg3piQSYzmowiMwQ2KqKPYx3aAtmMl58D/hw K4M5jdrnmz/HaZbxBOgEIqAe0RmRq/Rfio7mCvCyrVNcXC/N7HxJGCEe+3ZdnlQNVa09 kVVu/iFt3Z0eK4LURrm+jL0ntA4Ggroew/w1oWHgb+lVa53CqbJmLcsC6t0Eeau1HYJQ 3M8QXoc5pfpn2sLojINfjYbDazLTNiEOcv/TWVNgmhvNRI7YmLazv7t1mcRoUGFQ/LKk 50Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=seq0O/JjDWLm3q7ZpJodrcTjPueq2LdslcJSA34pQRY=; b=oOIVuTCALEmGgxqEFgUHl2KT3KONkVEaQeZSuCZe8wfsOYUwR6kUvDr3FxHbUgV7aE vBd3upqeD40kmD69812ToWYqdrxVBsMzXjkGUR8bufjrcZ2yGxHFkG4pXPwR+tiB2+BK SEjP1ERynuhA5fpoQJsVmxcVcUu1O7tUoLL0RpEFwgGZA0PAjGzdSsPMzLiE/la+Ojmi 9iietg0FYi9yO7ENqOLYa3cpELNMUpDyTTuGUV940c9GupAUSWcB/fHyBaCD8OeVuo6V ZaNx6kMj3Qa1UMz4t1LggWgo2fMBSmyo2U2+H5uWv+a5TQMlw6ckJ+96VidQPlfwFd0l Ksww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=tYJy2nSp; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Yl8NKIDn; 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 r8-20020a1709028bc800b00158897b40e5si14317983plo.48.2022.04.25.01.51.15; Mon, 25 Apr 2022 01:51:29 -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=@sholland.org header.s=fm2 header.b=tYJy2nSp; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Yl8NKIDn; 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 S234694AbiDXQ3s (ORCPT + 99 others); Sun, 24 Apr 2022 12:29:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234474AbiDXQ3m (ORCPT ); Sun, 24 Apr 2022 12:29:42 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD92085653; Sun, 24 Apr 2022 09:26:41 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 3E3525C00D0; Sun, 24 Apr 2022 12:26:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 24 Apr 2022 12:26:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding: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=1650817601; x=1650904001; bh=se q0O/JjDWLm3q7ZpJodrcTjPueq2LdslcJSA34pQRY=; b=tYJy2nSpBs32Gq6YQm daHQeesbmWH+/j2uZEWx8m2EV3CnF3t+ZeTCw0KcaJc0nsrOFdY7BAguoh9FDh0P hS2pRWZFqrdARvVIeuy3rwx4H3nEiK5nDXEI24QQ8AnXpwl7QVQm0xNN+TIpfH08 Iq11aPC8KOvLTdcq65hbI2qS2X+BJSI5uevvtHGkM9W8mczEOSUidU4DrgKJ++II kNtCqSnNDvA3XDVwxqktUS2aI1eLUq6eickIPwlVG4F6yK0QcEHj9RsQoDdT3wFd jzCRlqBTV25SrnQ1bwI7lfXvEbu6tNYuOdx+hDptaFufrGGzID8TcQr7NoyC8t1M nKWQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :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= 1650817601; x=1650904001; bh=seq0O/JjDWLm3q7ZpJodrcTjPueq2LdslcJ SA34pQRY=; b=Yl8NKIDnl2WEafzJhPCOBol8ZFIXmSk8Uw2LO8yF8ksppiZd95B fgcj0Lq927lFyfnO/XaLzeh2ntPS5SWT8dHZGzdEElAQeFGcsaRtaOUh9nB3zXkM ExMuN2Ov9nRm3jVFrqh3TMk3V/BgTlgZ4hB94AjAVh//mmUVHOM93YOEZ3ySq+Wf +zQuOaJZ/2IM2cvXuXxYh7ZOplrgUS5oUkEKJmt12wEnU2MNXPRA8eMMWdZ8WxM2 ouiSYmvATvVXPwjCh1CCJmltZe1Eq9XlX5+7g7BV9lQHLzlpBBmFYEEpAU0rlt8U pU3X4Vo2kvuN+9ByrJBEU2uOnmgLVZD2Ncg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrtdelgddutddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 24 Apr 2022 12:26:40 -0400 (EDT) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , Maxime Ripard Cc: Samuel Holland , Daniel Vetter , David Airlie , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v3 03/14] drm/sun4i: Remove obsolete references to PHYS_OFFSET Date: Sun, 24 Apr 2022 11:26:21 -0500 Message-Id: <20220424162633.12369-4-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220424162633.12369-1-samuel@sholland.org> References: <20220424162633.12369-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, 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 commit b4bdc4fbf8d0 ("soc: sunxi: Deal with the MBUS DMA offsets in a central place") added a platform device notifier that sets the DMA offset for all of the display engine frontend and backend devices. The code applying the offset to DMA buffer physical addresses was then removed from the backend driver in commit 756668ba682e ("drm/sun4i: backend: Remove the MBUS quirks"), but the code subtracting PHYS_OFFSET was left in the frontend driver. As a result, the offset was applied twice in the frontend driver. This likely went unnoticed because it only affects specific configurations (scaling or certain pixel formats) where the frontend is used, on boards with both one of these older SoCs and more than 1 GB of DRAM. In addition, the references to PHYS_OFFSET prevent compiling the driver on architectures where PHYS_OFFSET is not defined. Fixes: b4bdc4fbf8d0 ("soc: sunxi: Deal with the MBUS DMA offsets in a central place") Reviewed-by: Jernej Skrabec Signed-off-by: Samuel Holland --- (no changes since v1) drivers/gpu/drm/sun4i/sun4i_frontend.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.c b/drivers/gpu/drm/sun4i/sun4i_frontend.c index 56ae38389db0..462fae73eae9 100644 --- a/drivers/gpu/drm/sun4i/sun4i_frontend.c +++ b/drivers/gpu/drm/sun4i/sun4i_frontend.c @@ -222,13 +222,11 @@ void sun4i_frontend_update_buffer(struct sun4i_frontend *frontend, /* Set the physical address of the buffer in memory */ paddr = drm_fb_cma_get_gem_addr(fb, state, 0); - paddr -= PHYS_OFFSET; DRM_DEBUG_DRIVER("Setting buffer #0 address to %pad\n", &paddr); regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR0_REG, paddr); if (fb->format->num_planes > 1) { paddr = drm_fb_cma_get_gem_addr(fb, state, swap ? 2 : 1); - paddr -= PHYS_OFFSET; DRM_DEBUG_DRIVER("Setting buffer #1 address to %pad\n", &paddr); regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR1_REG, paddr); @@ -236,7 +234,6 @@ void sun4i_frontend_update_buffer(struct sun4i_frontend *frontend, if (fb->format->num_planes > 2) { paddr = drm_fb_cma_get_gem_addr(fb, state, swap ? 1 : 2); - paddr -= PHYS_OFFSET; DRM_DEBUG_DRIVER("Setting buffer #2 address to %pad\n", &paddr); regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR2_REG, paddr); -- 2.35.1