Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3527253pxf; Mon, 15 Mar 2021 11:32:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXVkONKISG2xoUJLkCzN+iwhJYTjydgpdxZHixigfsyL75Cixvn0ENcz39Q3AkuAM5Mlry X-Received: by 2002:a17:906:b14b:: with SMTP id bt11mr26034789ejb.162.1615833145263; Mon, 15 Mar 2021 11:32:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833145; cv=none; d=google.com; s=arc-20160816; b=e90jXSh8U/AWPC4SXJv8pW2sc/lTvNipXMcmM/VEvidLkCARiHOeRsr+tJD7yB8TtG G6FijG8x5zNzQpuTtBV3C3pg7z1a+FOg1zF/HuL1cJjiAipBuOrHwNPbc7/UMwCw0b9H LhnBwq0FZ77ce7vMIDlwceVAYVtDOEJVVe7btlqJXB1iKA8SzvQUgPCUVDpWIO/MLNbp 8HB3OYvn3gWWRWq/aBzL0OPzD6xBi7hwHzoHNqaE1IsLeugBaQPKWvS2st8cdMKpIC4D b7ltBFbj+EbK2GLfHdEsNhZUqOuaxLkiovLgVIhARuvP9g+9pdR/Uj5/fkkdETMlIvvr BXhQ== 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=lNIBBLiK+rCNoewCTuAq9B6O+7ZBM29uf4IhARGkEhx5w/PFFWg8znKjNGIlX52oMu NMlreepSytmv1DEpqiXhS6zZyYN6xrwZ7qVyuJ2mrbxCPOIc2EU9s0zYrQJrVumYKi6V qoq/k7XMA90cY7YM+dHRhQtfWACn8chD884bWyGg6WVnDDpQKL8PmosSAq7sMRCFlkcq Ng1y0vkZdiifycpRnMLsyFX6EaQt2SSXSMYaPqE5lh5tX/T37pUqbT7PtJlP2dsd9IxO AdQE/rhDUUYnsG6Uzb6fpBt/l2mSeItzdZP/fW2/xURf0We05PHgVn7/YNMRv/rwD/a8 2drg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ueK3nLGs; 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 y18si11965768ejp.482.2021.03.15.11.32.02; Mon, 15 Mar 2021 11:32:25 -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=ueK3nLGs; 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 S240283AbhCOOh3 (ORCPT + 99 others); Mon, 15 Mar 2021 10:37:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:36594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233328AbhCOOB3 (ORCPT ); Mon, 15 Mar 2021 10:01:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9D04F64F33; Mon, 15 Mar 2021 14:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816854; bh=tHm/Kk0U1CPkbj8AoDeHlXex1E0wOapV0Zh4pO31GUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ueK3nLGseAo8inWVMj2UnWMCxAfEeWLB0vA+ZE2c19c1lCw/YE5HjftRQQFIY4F3P YFpfeW6BJO2/RwtDFTEVj6KrbJ6w59uoPRMihGP7Yz8Hm1LG3LHneECHi3Sb/WRCg+ JjawxtShchzLdzDCCgejpjnDuUTIV9T+9N5OSJgM= 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.11 163/306] clk: qcom: gpucc-msm8998: Add resets, cxc, fix flags on gpu_gx_gdsc Date: Mon, 15 Mar 2021 14:53:46 +0100 Message-Id: <20210315135513.143280861@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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