From patchwork Fri May 14 13:53:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 438906 Delivered-To: patch@linaro.org Received: by 2002:a02:b78d:0:0:0:0:0 with SMTP id f13csp365315jam; Fri, 14 May 2021 06:54:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAG2OtIzMLerRqVPrhNIoPzDnMbuCD+VFaNlzyaTnMNTWMRk3p6rDcsWkHXX7g8ipbQmGw X-Received: by 2002:a63:344c:: with SMTP id b73mr3995589pga.79.1621000460756; Fri, 14 May 2021 06:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621000460; cv=none; d=google.com; s=arc-20160816; b=F0OTTAvP1ED3cX4z6PPo/ZyWBHYQadelylqAFUA2RJer9U1wJs5c6k8ZPnleLrwESV xml0f+DCXkPopGBWfV9tcPQgyjSxaiaQV4z1hijW0GIYn2b28GWlSTX+6ZG4cOKS7HWp qlAB8xxiq2j3CR5rlW8JQQeG4gmm8rOdPKnV8kC2G/czCPE5+k3KbPWSicN7+RRFQPjU Xu/2zWIhIL8Q+xK6vGjboy7CPlY+zOxL7Eo3WxJm3/aij6Qo+TsIhjxGrro6yVG1wQYS V5P36ToQgERbP44LNGF23ajOol+1pDn2cZ5Piw/QAtpc/+Q50Qrkb8X2gqY+Mlhg6ikO RfiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :delivered-to; bh=3YNnnShjbkPIbeAiXdB1OtgdR+9M3Q5vuvjtDNwcMds=; b=xOMF6+CWgTuEPu4hEAN/xJ3p3kWNr9foGs6Apd02rUrg5Rjj68HUqqOjxkgapbMhZU oY+rVCQpdHwZPeiPoGISHi7t8OHJS/YG48IzCjynbicOAM59L4ssCuIaiVdQu5xV2W9Y BEs8r5QqdTrfzQ58/rU3M15k/frkEAXLpLsW6f7jREbAsCCuOhZ4e0SSJDJPoBc8ngjE 2gBmrq2JVV0fBiXz6c3M7OzKm8FCUf1rFRwi9BpvHy1L17CZMqu6uRaPgOzxbX8Ttn6P iCHB1H6PuE6wtCRhEGUPsGQ11x9JLPZSgZkOfZv2TU6vNECIxBPqp6GPZLUzARml6Xgj OCIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=JITqAa6P; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id q5si8309761pgg.397.2021.05.14.06.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 06:54:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=JITqAa6P; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E45C36EE8C; Fri, 14 May 2021 13:54:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1A5276EE8C for ; Fri, 14 May 2021 13:54:19 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id B88A96145D; Fri, 14 May 2021 13:54:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621000458; bh=haYYppupxvHuhUIKA3QMcFKRuxX9YTEisX5WRN7glNs=; h=From:To:Cc:Subject:Date:From; b=JITqAa6PVGHDm2jgSPG4RO7XwojkLMDFukp6ytGeWwTHklP1fCLIetId/duPWnh3C xJTMtQwZ4ujnRrTZiCIEoTPGJv4HWvsYzcO79j2k5r3gvyD4CCcvLQD59snvjDXDOQ H/+XhRIEMe+puYhqVqT5RwqZHhzB6jaSiIF4IfertEVkeRzeT0cdf5XlQVW9GM2uki ICnmPEpnJEDSYPQvcYytX1c4PB7sJnJ1m8e3IJGkP70Tm3v1OtaOM932QMdPVSeOry PFK4dkmjRhJOclJA0yXO4GVSAideUMgDD0qOuB5RWxUma9iMaFxM5KBGAlP1h5TNWh 7sU3Qi+fEoAfg== From: Arnd Bergmann To: Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter Subject: [PATCH] drm/tegra: fix 32-bit DMA address calculation Date: Fri, 14 May 2021 15:53:18 +0200 Message-Id: <20210514135328.2543521-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Maxime Ripard , Thomas Zimmermann , linux-tegra@vger.kernel.org, Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann gcc points out an invalid bit shift operation on 32-bit architectures with 64-bit dma_addr_t: drivers/gpu/drm/tegra/hub.c: In function 'tegra_shared_plane_atomic_update': include/vdso/bits.h:7:40: error: left shift count >= width of type [-Werror=shift-count-overflow] 7 | #define BIT(nr) (UL(1) << (nr)) | ^~ drivers/gpu/drm/tegra/hub.c:513:25: note: in expansion of macro 'BIT' 513 | base |= BIT(39); | ^~~ Use the correct BIT_ULL() macro to always generate a 64-bit mask. Fixes: 7b6f846785f4 ("drm/tegra: Support sector layout on Tegra194") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/tegra/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2 diff --git a/drivers/gpu/drm/tegra/hub.c b/drivers/gpu/drm/tegra/hub.c index 79bff8b48271..bfae8a02f55b 100644 --- a/drivers/gpu/drm/tegra/hub.c +++ b/drivers/gpu/drm/tegra/hub.c @@ -510,7 +510,7 @@ static void tegra_shared_plane_atomic_update(struct drm_plane *plane, * dGPU sector layout. */ if (tegra_plane_state->tiling.sector_layout == TEGRA_BO_SECTOR_LAYOUT_GPU) - base |= BIT(39); + base |= BIT_ULL(39); #endif tegra_plane_writel(p, tegra_plane_state->format, DC_WIN_COLOR_DEPTH);