Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3140935pxk; Mon, 28 Sep 2020 09:17:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4j66wqnPgZj+aC91lAj1P+7tz5ium8kBFz0w0ZE4SZVzy2GYn3aKczNJtZkitq5Oteqt4 X-Received: by 2002:a17:906:829a:: with SMTP id h26mr2483535ejx.11.1601309876085; Mon, 28 Sep 2020 09:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601309876; cv=none; d=google.com; s=arc-20160816; b=C6dgAJMlCL/Xuf+s5DodKmyc1yNk4hUz75C6HPz0BF2W5GGZoH2xJvECCj5qz1l2Rw Hh8hnCpyAany44uCnwKXIrzfO6+5XBndmMFUGi4n/F5LuW7bPIeHIdyxCefjVEjfmdZb MEoyoHr3sWq2svzOfBVyanbH+FI1gRxetWIIBeY3s2rxbxsnFQb03Fr+JWGGUyOC0tt9 3lHVhvOBmYfGcEwTml/2Fhx+OtgW4uC1xzXRV/oCO/e02LgPaPs4SebVkkfJ5GalLp0m y1AtU3JXUte5D61jUP47K/0vEQC4K4MqR5SBqMt131FZSqFx4meuFUdDsT9yl88MNpc9 MghA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dmarc-filter:sender:dkim-signature; bh=qlHI/nzxGlqO3ivL/08aAXl4gpk3ZpfV/C8I5k69Mz0=; b=RJdw6NAQ5T6PO2MFgTPFcJmXVtR1FpFkjmVe+Y+V1QwJqBfj6/25UMYSe4dFdoq3c0 j1A3c2B8Sk6OxfFmJ2XQRmvfi1m/i8zlhWdejDa0fUpj1P4gxelCxYs7TJx+ZhrfXej8 /N2ayco3wZsNq9H2UEM8kNYQ+XWk/UTbig/aL3BCE+TO4HL8jIG7Id45TBHo6uNdLPxz dJQgN2FrWsrPIiicO39ocOMxUzU2rxLz/92MmB8L8KrjJFnUP6lH64irylGK6OMdIGLI v2Hs8YAE/HQ22clAIbimxrAKRZ7QO+1tXLhK7ON3y73NEhKDTHjS6pYveSjap9aSJvqD cQnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=RYTIzt46; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v2si915938edx.402.2020.09.28.09.17.33; Mon, 28 Sep 2020 09:17:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=RYTIzt46; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726638AbgI1QP7 (ORCPT + 99 others); Mon, 28 Sep 2020 12:15:59 -0400 Received: from z5.mailgun.us ([104.130.96.5]:49632 "EHLO z5.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbgI1QP7 (ORCPT ); Mon, 28 Sep 2020 12:15:59 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1601309758; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=qlHI/nzxGlqO3ivL/08aAXl4gpk3ZpfV/C8I5k69Mz0=; b=RYTIzt46Sn1RnCwg8yWimPaxqB1e8CON46gIq7pm+2Fq3A6NQuWCchwiA8gUQ+LPBXXRwNnB KnYByjKEpWBtXzKPszlcMt9Hxf2WiBUrziYy+90pmJ8PXP6EBg+MECxiOLpPfhsEQz+cJg43 s0T2f4jqiGgDYR864ULWPoWfDzo= X-Mailgun-Sending-Ip: 104.130.96.5 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-east-1.postgun.com with SMTP id 5f720c38e6be23d0df59be48 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 28 Sep 2020 16:15:52 GMT Sender: jcrouse=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id DF307C4339C; Mon, 28 Sep 2020 16:15:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from jcrouse1-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse) by smtp.codeaurora.org (Postfix) with ESMTPSA id 330C4C433CB; Mon, 28 Sep 2020 16:15:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 330C4C433CB Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=jcrouse@codeaurora.org Date: Mon, 28 Sep 2020 10:15:46 -0600 From: Jordan Crouse To: kholk11@gmail.com Cc: robdclark@gmail.com, sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch, konradybcio@gmail.com, marijns95@gmail.com, martin.botka1@gmail.com, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/7] drm/msm/a5xx: Fix VPC protect value in gpu_write() Message-ID: <20200928161546.GB29832@jcrouse1-lnx.qualcomm.com> Mail-Followup-To: kholk11@gmail.com, robdclark@gmail.com, sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch, konradybcio@gmail.com, marijns95@gmail.com, martin.botka1@gmail.com, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200926125146.12859-1-kholk11@gmail.com> <20200926125146.12859-6-kholk11@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200926125146.12859-6-kholk11@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 26, 2020 at 02:51:44PM +0200, kholk11@gmail.com wrote: > From: Konrad Dybcio > > The upstream API for some reason uses logbase2 instead of > just passing the argument as-is, whereas downstream CAF > kernel does the latter. > > Hence, a mistake has been made when porting: > 4 is the value that's supposed to be passed, but > log2(4) = 2. Changing the value to 16 (= 2^4) fixes > the issue. FWIW I think downstream is wrong. Its a lot more intuitive to pass the number of registers that should be protected than to force a human to do math. Jordan > Signed-off-by: Konrad Dybcio > Signed-off-by: AngeloGioacchino Del Regno > --- > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c > index 00df5de3c8e3..b2670af638a3 100644 > --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c > +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c > @@ -789,7 +789,7 @@ static int a5xx_hw_init(struct msm_gpu *gpu) > > /* VPC */ > gpu_write(gpu, REG_A5XX_CP_PROTECT(14), ADRENO_PROTECT_RW(0xE68, 8)); > - gpu_write(gpu, REG_A5XX_CP_PROTECT(15), ADRENO_PROTECT_RW(0xE70, 4)); > + gpu_write(gpu, REG_A5XX_CP_PROTECT(15), ADRENO_PROTECT_RW(0xE70, 16)); > > /* UCHE */ > gpu_write(gpu, REG_A5XX_CP_PROTECT(16), ADRENO_PROTECT_RW(0xE80, 16)); > -- > 2.28.0 > -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project