Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1037345rwb; Thu, 19 Jan 2023 06:00:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXt6uwnmU5mVuW01kjzDrms8MkwacOgVZjsTWaYj7UBM9Fg5Q0VyKhYZ5Es3P8igol0lt0kf X-Received: by 2002:a17:907:8744:b0:7c1:435c:d777 with SMTP id qo4-20020a170907874400b007c1435cd777mr11777996ejc.9.1674136851012; Thu, 19 Jan 2023 06:00:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674136850; cv=none; d=google.com; s=arc-20160816; b=Hp0zVVBcsF+5Mvr4GFmFvNI9MeBGEiPJ5r2WDzgGIKMFWpp6jRRoMd2RG8iP+KOnoI FmkfbTCqAUURR7cEE5cPZmgvp9mGYq9q7prXJH1B6mbs3QaLaHEgRKdbxaiWlzXZSqOp 3+PXvrH373mC8helOTFk6stkZv0kQI9aNAznyII+V8iXtcv/B6Ah+0Apus2APpjWAV1U 6D2rkxcXkXifYuQx0xmUOlcqLkpVtVeFQQwZa74su+8Ek9iyv7+w7eOYwAfETZvkJLC1 ThpbqWi84kDI0fQ9mvgkkW5l5L8azFDevr/wEpNiTHbHi3dIisIFkCmcXr1zUbjb4a8Y y5uA== 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; bh=Jivjnyq0RsdNk+dfRSFWoVxnKfMC/ohHGj4x1noVlTU=; b=ZML/otQZ8lwkdW5ZFJ83Vd7kt+nkL+mtOo+E+ZIPFXcPyfZFMHgrJfh++smW2+3Wxc HEmFfvTl3tdSdLnDcbtqycQu2YCSbMxhrrV7VhSOqrb+6v/h1vFxDBPhMGdkkykY0hQ4 UElcijBuPSmYi5qMTuurgxQZbeND/lHt2OvUwHo/t6TPsw9ERbmj3dy9/n7aVKVvoX0l pvjqVcS3TYmaKfVBdbw5k4jWJPj/YdFNBW8k8+oNV97k6e4pvz3QxzE75tagjONx5MJJ Ln2pLLxRKniT4Ps+KibdFxSEMHX+KZGj4pzn6GxAhaj02Tyd2fkvHUAaNm3gzKT6gg9O K4rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kapsi.fi header.s=20161220 header.b=do5zi8kP; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kapsi.fi Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz13-20020a1709077d8d00b008702a59fe03si15766133ejc.548.2023.01.19.06.00.38; Thu, 19 Jan 2023 06:00:50 -0800 (PST) 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=fail header.i=@kapsi.fi header.s=20161220 header.b=do5zi8kP; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kapsi.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231312AbjASNjP (ORCPT + 44 others); Thu, 19 Jan 2023 08:39:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbjASNjM (ORCPT ); Thu, 19 Jan 2023 08:39:12 -0500 Received: from mail.kapsi.fi (mail.kapsi.fi [IPv6:2001:67c:1be8::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 866454A235; Thu, 19 Jan 2023 05:39:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Jivjnyq0RsdNk+dfRSFWoVxnKfMC/ohHGj4x1noVlTU=; b=do5zi8kPg3+yz9iO2RNEZC5DRy q/6ZMZUVkRDm4OHyhEj/qGq7TUlFMxFb0ksOE03w24Sp3iOm/t1a6FEm3gjjoiGOSHT/nQKVnuHVQ 9C7Urg+WgbY1OBj9I33b1ynOFCujBEYj2eMN4cIne5DASGeLbMZWOiAiR5p7in5/zFvnbIWVfKi1d 24FSl0KB0iY807oWSpswDjsRlNa3aNyoG1gbkT/qVjUWpJ3PcSipFL2iuFdwe12V7zfhLvAUhS3Kv 1Y3Xp2DaDoPI2amiicXH4Jt121wEuPY1nQaAWNhbAFWAjqbdGexrPfcqgxE62cAOp9jTF0vj4G02o us5N0HWg==; Received: from 91-158-25-70.elisa-laajakaista.fi ([91.158.25.70] helo=toshino.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pIV8G-0016bd-MF; Thu, 19 Jan 2023 15:39:08 +0200 From: Mikko Perttunen To: Thierry Reding , Jonathan Hunter Cc: Mikko Perttunen , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 2/4] gpu: host1x: Fix mask for syncpoint increment register Date: Thu, 19 Jan 2023 15:38:59 +0200 Message-Id: <20230119133901.1892413-2-cyndis@kapsi.fi> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119133901.1892413-1-cyndis@kapsi.fi> References: <20230119133901.1892413-1-cyndis@kapsi.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 91.158.25.70 X-SA-Exim-Mail-From: cyndis@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 From: Mikko Perttunen On Tegra186+, the syncpoint ID has 10 bits of space. To allow using more than 256 syncpoints, fix the mask. Fixes: 9abdd497cd0a ("gpu: host1x: Tegra234 device data and headers") Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/hw/hw_host1x06_uclass.h | 2 +- drivers/gpu/host1x/hw/hw_host1x07_uclass.h | 2 +- drivers/gpu/host1x/hw/hw_host1x08_uclass.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/host1x/hw/hw_host1x06_uclass.h b/drivers/gpu/host1x/hw/hw_host1x06_uclass.h index 5f831438d19b..50c32de452fb 100644 --- a/drivers/gpu/host1x/hw/hw_host1x06_uclass.h +++ b/drivers/gpu/host1x/hw/hw_host1x06_uclass.h @@ -53,7 +53,7 @@ static inline u32 host1x_uclass_incr_syncpt_cond_f(u32 v) host1x_uclass_incr_syncpt_cond_f(v) static inline u32 host1x_uclass_incr_syncpt_indx_f(u32 v) { - return (v & 0xff) << 0; + return (v & 0x3ff) << 0; } #define HOST1X_UCLASS_INCR_SYNCPT_INDX_F(v) \ host1x_uclass_incr_syncpt_indx_f(v) diff --git a/drivers/gpu/host1x/hw/hw_host1x07_uclass.h b/drivers/gpu/host1x/hw/hw_host1x07_uclass.h index 8cd2ef087d5d..887b878f92f7 100644 --- a/drivers/gpu/host1x/hw/hw_host1x07_uclass.h +++ b/drivers/gpu/host1x/hw/hw_host1x07_uclass.h @@ -53,7 +53,7 @@ static inline u32 host1x_uclass_incr_syncpt_cond_f(u32 v) host1x_uclass_incr_syncpt_cond_f(v) static inline u32 host1x_uclass_incr_syncpt_indx_f(u32 v) { - return (v & 0xff) << 0; + return (v & 0x3ff) << 0; } #define HOST1X_UCLASS_INCR_SYNCPT_INDX_F(v) \ host1x_uclass_incr_syncpt_indx_f(v) diff --git a/drivers/gpu/host1x/hw/hw_host1x08_uclass.h b/drivers/gpu/host1x/hw/hw_host1x08_uclass.h index 724cccd71aa1..4fb1d090edae 100644 --- a/drivers/gpu/host1x/hw/hw_host1x08_uclass.h +++ b/drivers/gpu/host1x/hw/hw_host1x08_uclass.h @@ -53,7 +53,7 @@ static inline u32 host1x_uclass_incr_syncpt_cond_f(u32 v) host1x_uclass_incr_syncpt_cond_f(v) static inline u32 host1x_uclass_incr_syncpt_indx_f(u32 v) { - return (v & 0xff) << 0; + return (v & 0x3ff) << 0; } #define HOST1X_UCLASS_INCR_SYNCPT_INDX_F(v) \ host1x_uclass_incr_syncpt_indx_f(v) -- 2.39.0