Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1806423pxk; Sat, 26 Sep 2020 05:53:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8ATO7WCeHKtVfSJx989PDDo1jD8XAjSEKPg6Q4eRtuqWOA/E7WBGx+8vlsue09ElDMGl+ X-Received: by 2002:a17:906:cf8b:: with SMTP id um11mr7669769ejb.540.1601124829949; Sat, 26 Sep 2020 05:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601124829; cv=none; d=google.com; s=arc-20160816; b=HiHKD0Tsjo4b3oPIoKqFKB8nwbickZczYhAxO8/JHlT3ckDqYRJYqwKyP+05whAWKb Cpa7lNuJAGwJBpYciOMQ8Otrj7E1KfpdoSk9ErSym5wfetSjwQpL7wqL1iSZDMdyCeIw nUcMqzSj75l/3Cov7hq5jztbcO2ibh8MLRY9XY0pDCBv78YCOT2lAGXmkSrIO3nVfUtA IAficH30mxReCtWQZTN9O3M3g8e3Bg5LHUqi2lJhnggTlgQuxRD0kBi523l9UwUKGZKS 2u3XEDldpA8FM/I3JQi6uKG7ca7C+FfZ9ZXj0W3CGUEOuYDUrqCGbT9+7DVbeKpCTRiM N3kg== 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=ScwFgjf4CVFLL0QbktoshjK86UH6jL1pgVGi1tkj42M=; b=eezR4iaHJKyMxCQafjnuq31eV1/CLI/h1txw09+RL795GPLPpgryAjL+rHZVKLEf3W /FCWeXvgDC6MNeenDfAIgvX3lRpto8yIZpYuTgEpCAv5Ij0cjd2o1cqxnR0hjETqkDHY UQuxM6fGqaKoJ1yVOtNR2SHn71SD3QtYVJUR4PP8Y0d/YgzY/qIkLDxFurDMwf5/njB+ +p0CfiQZ9ttTeWiQ8vs6ytDb/KNd0H3Sft+3HREIx9G7AXVvOMzJdAC5ia39efuD/h2r rAAIj23HoIFuNX6xgKZ0uenMEbVh3/yIdF5Bor91CcvE8yXgusMBdQ789Uy1+H6UEyZ3 OOPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FCm0rhLw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pg2si3885222ejb.328.2020.09.26.05.53.27; Sat, 26 Sep 2020 05:53:49 -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=@gmail.com header.s=20161025 header.b=FCm0rhLw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729505AbgIZMwE (ORCPT + 99 others); Sat, 26 Sep 2020 08:52:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729391AbgIZMwB (ORCPT ); Sat, 26 Sep 2020 08:52:01 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 969FBC0613D5; Sat, 26 Sep 2020 05:52:00 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id s12so6820252wrw.11; Sat, 26 Sep 2020 05:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ScwFgjf4CVFLL0QbktoshjK86UH6jL1pgVGi1tkj42M=; b=FCm0rhLweV4v32CvpTVH22mVrlTllzq3je8W8VDTa7EwNOCixcG+mM6SoFBejJ4VnP 6jIINolttCNWgAhQxEvNE5kMtet6duC+LkCoOhgyN8XtXQjcQ1qhurpJHEgulFtln4XD /JQ5GMSFBIeUxS28yJLRp3qzyjALaujMXWJW8oO8vyI1NKEmCjY6YbJ9Wfv1sYUdSdA1 MxFieGfCBIaWcXwAdHQnO1a88HlaA5qol3fTTOm3eCTyZfAIRPuVX/nFYiYfvEQ1TvbZ +CJyFxzVk7/jiR/5p16X2SVQQImY8+I3Pp0EdojZTsZKTgwgpEtCSw8EodOmNyJuwh99 qdnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ScwFgjf4CVFLL0QbktoshjK86UH6jL1pgVGi1tkj42M=; b=gTVTnMc8RY4CyCD+z3y5qs1ExbVnw6ZvC59KK+yj0JyjSKYQ6rHpSiS549YnJsIKHB VtaIb+0UxbZ3TbWiVmjMCOPDKo3YbqXHJyThvIppkQtQ81TnYPYgZezug+CEGykKiXnQ PReUZp/b0FblMkLAGpouuABoIirObIi6ZCk7W3IGDmSZo39ZiXCMId0RFfpHcE/yCeik T947Hfuz7D0nw0dUWFs+s7UapKJ6tBXiTD1r/Sg8TF7YYyjcN9Abmt6rAznSL5YZ2NFv YtrQnK1MnZt5nXtbN7JEfUeb0Z4ukUQe59uIWg/xhksqnEBYVwupkIj9TXqzg3txIZqo g4Jw== X-Gm-Message-State: AOAM5304qu25aoTsfYJlXStpPRrKs2M1w+zZqIjUq5ut0JpcNfR5IFVK YIgko7u2ulSxBrVcGvstJws= X-Received: by 2002:adf:f80a:: with SMTP id s10mr9908215wrp.351.1601124719194; Sat, 26 Sep 2020 05:51:59 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu ([2.237.20.237]) by smtp.gmail.com with ESMTPSA id a10sm2520451wmj.38.2020.09.26.05.51.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Sep 2020 05:51:58 -0700 (PDT) From: kholk11@gmail.com To: robdclark@gmail.com Cc: sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch, jcrouse@codeaurora.org, konradybcio@gmail.com, kholk11@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: [PATCH 5/7] drm/msm/a5xx: Fix VPC protect value in gpu_write() Date: Sat, 26 Sep 2020 14:51:44 +0200 Message-Id: <20200926125146.12859-6-kholk11@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200926125146.12859-1-kholk11@gmail.com> References: <20200926125146.12859-1-kholk11@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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