Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3525563pxf; Mon, 15 Mar 2021 11:30:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvUw/sLOlX1NMKQCpIRAQ8KHQVqXJbX6HrGWELaSNYh1HkHjxP2yVgvOXljl3HFdv6LOYv X-Received: by 2002:a17:906:6c93:: with SMTP id s19mr24934581ejr.151.1615833013632; Mon, 15 Mar 2021 11:30:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833013; cv=none; d=google.com; s=arc-20160816; b=NrAVPrp4843KTzlOff+pHnw43qGs4/55hXdqJxHwVVsRkcQ87tzqfEpUWaUU2RWgjo i4c0ougERE5toECo2oSZQZnjo5O3WfmR0HviWChSu/CZLHnkfVaPczqYqF6GSxfSq6u5 NJJ03jbsh0BF2b5iTIUBKtzgQ1maA/qxf6pZmKTRJ7jM0rQtF9f24ie18qQADCtxVBYR Nnhn0quUSd/RHfPupU/mHnwz8tO4oI8vEs44Lrsa1+hqCmnSm5k3u1CTTQF5eZ1pIcwX 4bUbogA6Q5F1GFTO+0zdGo3v9qxQEs+bG+aeihV+pr5AIB06k2Jp3XOwhc6deQXU/3xX AtNQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n+QgOOii/wy7pGU1YWZHGMV7gy6IO1oDEe10Jxajixo=; b=Dbaghzd1jpLlDFDq18yLLDlgsr/Lx7atSowLU8rwbWJ3R3CYQAnSk/+TOXtJdZrhUo W+yuOgCE1nFvNDtCzXoM/RLl7UmNQmOg4PSPA0JgTFkc3h4kM7XTxE7p/rMHipn7qBAc qDrTj96gBCNN7u3XhjIck8UfvAkkCrPkVyFQ1+nUe/btVTqQqm7EnaqqFNtYFtzszK/T l8KxFCzqw2zFUYAYmANZl6kNBTsUf/cJ4mtAnM4xZ5lJGegdqwg16Jwu9ijzdsaJcmYb 91BGCHr3s5dwRrL/ZGnYmKnuQvsa8zoKjIiBlDa058pHl3FMw0L0v13WBtLu0RE7hCLa rE+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CYF061Rh; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si11688240edv.329.2021.03.15.11.29.51; Mon, 15 Mar 2021 11:30:13 -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=@linuxfoundation.org header.s=korg header.b=CYF061Rh; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237030AbhCOOgH (ORCPT + 99 others); Mon, 15 Mar 2021 10:36:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:37670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233431AbhCOOBk (ORCPT ); Mon, 15 Mar 2021 10:01:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F145464F8E; Mon, 15 Mar 2021 14:01:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816881; bh=tHm/Kk0U1CPkbj8AoDeHlXex1E0wOapV0Zh4pO31GUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CYF061RhxIqccrBHZOYqRLw3BSpcSl6AuykdeQU4YzA/PZpFy4RRjb7tvnzCREbc0 nmG0QR/WWi4o+Ptru7opO9gzNV9NDpv0n7WB+Pzw+ELYXch08fuo8NVROLHTV+rs6z HKhhj71uY7S3YgE0jhdXbIKvLq4ggtI87W3ghcNc= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, AngeloGioacchino Del Regno , Stephen Boyd , Sasha Levin Subject: [PATCH 5.10 166/290] clk: qcom: gpucc-msm8998: Add resets, cxc, fix flags on gpu_gx_gdsc Date: Mon, 15 Mar 2021 14:54:19 +0100 Message-Id: <20210315135547.511249559@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: AngeloGioacchino Del Regno [ Upstream commit a59c16c80bd791878cf81d1d5aae508eeb2e73f1 ] The GPU GX GDSC has GPU_GX_BCR reset and gfx3d_clk CXC, as stated on downstream kernels (and as verified upstream, because otherwise random lockups happen). Also, add PWRSTS_RET and NO_RET_PERIPH: also as found downstream, and also as verified here, to avoid GPU related lockups it is necessary to force retain mem, but *not* peripheral when enabling this GDSC (and, of course, the inverse on disablement). With this change, the GPU finally works flawlessly on my four different MSM8998 devices from two different manufacturers. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20210114221059.483390-11-angelogioacchino.delregno@somainline.org Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/qcom/gpucc-msm8998.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/gpucc-msm8998.c b/drivers/clk/qcom/gpucc-msm8998.c index 9b3923af02a1..1a518c4915b4 100644 --- a/drivers/clk/qcom/gpucc-msm8998.c +++ b/drivers/clk/qcom/gpucc-msm8998.c @@ -253,12 +253,16 @@ static struct gdsc gpu_cx_gdsc = { static struct gdsc gpu_gx_gdsc = { .gdscr = 0x1094, .clamp_io_ctrl = 0x130, + .resets = (unsigned int []){ GPU_GX_BCR }, + .reset_count = 1, + .cxcs = (unsigned int []){ 0x1098 }, + .cxc_count = 1, .pd = { .name = "gpu_gx", }, .parent = &gpu_cx_gdsc.pd, - .pwrsts = PWRSTS_OFF_ON, - .flags = CLAMP_IO | AON_RESET, + .pwrsts = PWRSTS_OFF_ON | PWRSTS_RET, + .flags = CLAMP_IO | SW_RESET | AON_RESET | NO_RET_PERIPH, }; static struct clk_regmap *gpucc_msm8998_clocks[] = { -- 2.30.1