From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CF57C433E9 for ; Thu, 14 Jan 2021 23:06:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 598D923A5C for ; Thu, 14 Jan 2021 23:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730953AbhANXG2 (ORCPT ); Thu, 14 Jan 2021 18:06:28 -0500 Received: from relay08.th.seeweb.it ([5.144.164.169]:39841 "EHLO relay08.th.seeweb.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725863AbhANXG2 (ORCPT ); Thu, 14 Jan 2021 18:06:28 -0500 Received: from IcarusMOD.eternityproject.eu (unknown [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 801033F0AF; Fri, 15 Jan 2021 00:05:45 +0100 (CET) Subject: Re: [PATCH v2 05/11] clk: qcom: gcc-msm8998: Mark gpu_cfg_ahb_clk as critical To: Jeffrey Hugo Cc: MSM , konrad.dybcio@somainline.org, marijn.suijten@somainline.org, martin.botka@somainline.org, phone-devel@vger.kernel.org, lkml , Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , linux-clk@vger.kernel.org, DTML References: <20210114221059.483390-1-angelogioacchino.delregno@somainline.org> <20210114221059.483390-6-angelogioacchino.delregno@somainline.org> From: AngeloGioacchino Del Regno Message-ID: <25d40e7d-fbd6-697f-7d4d-a7233aeb652c@somainline.org> Date: Fri, 15 Jan 2021 00:05:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 14/01/21 23:37, Jeffrey Hugo ha scritto: > On Thu, Jan 14, 2021 at 3:13 PM AngeloGioacchino Del Regno > wrote: >> >> The GPU IOMMU depends on this clock and the hypervisor will crash >> the SoC if this clock gets disabled because the secure contexts >> that have been set on this IOMMU by the bootloader will become >> unaccessible (or they get reset). >> Mark this clock as critical to avoid this issue when the Adreno >> GPU is enabled. >> > > You should go review the last attempt to do this - > https://lkml.org/lkml/2019/12/17/881 > Thanks for the tip, but unfortunately this isn't possible on the gpu_cfg_ahb_clk, as it is also needed for the Adreno IOMMU, which has secure contexts that are set up from one of the bootloader stages and if you reset/"mess up" one of them (by - in this case - un-clocking the MMU), then the hypervisor will kick in and generate a fault, rebooting the SoC. Of course, this scenario is for the case in which you want to boot the device without any gpucc nor any runtime pm user of that.. and the aforementioned issue makes that solution not really usable. Again, unfortunately.