From patchwork Thu Nov 30 20:35:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 172112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp669248vqy; Thu, 30 Nov 2023 12:36:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBu9ONlgj8oEg+5xlmsNTqWJgf+Plb3ugsIGy63En/2pZN+4rY+JzxD3MKFor65Q67dZVK X-Received: by 2002:a17:902:f64d:b0:1cf:61c8:73e9 with SMTP id m13-20020a170902f64d00b001cf61c873e9mr30999166plg.50.1701376610314; Thu, 30 Nov 2023 12:36:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701376610; cv=none; d=google.com; s=arc-20160816; b=DAggmzNL+GbFbQ1NHc+1nNIIgEp/lIdF2tSmUkOGe0qxLH4pEKysHiXEFyPc0WDrJg W10ZjrIk7J4AaYoGYMEDG1fPAEX0b9htIG5FNRumevhLurooD72J1WEs9AgmcQgrXuA0 t9wAwWpJ5h8IcSVB8Oo68OmgzGoaOcXQtSulpTcyEtD13JEsdl7AwRTD9CqEKnuVOhWy 1u2qFXgMJkaPVSDgaS42XeFDNPjz5Cy5sjAblPdmb/NdmsCirq4DXgQ3B0VKU/pmMWS6 iJxA2GXz97IeEvqnC+lPw6r3Mik6E4SuhMwAh8johsgHr/cyBvGP8+/ZbKvFEYbDUh4T Ps/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=9EU66GYy5ZBFOeEcthIESEZ7vSqktBg9m/tw4RZXAyg=; fh=+SRI1VeKmVaGGYxg8slCD/uOQWHdJo2H6VxeCiWFGUw=; b=hIdNvTN7wGkJQoVAUs67y1zEBqSR9DlogSY4nO2nr1zS860mgXAq23JnD+ofqG0e/m 3Sv8tUyfqv52rrEVOvCWVKb8MAR4khTuqs9QHG5AZhJFe6ty0nPhgjwOMJnyRvNOPa/S /LYSQTaswLpEmqkyQ7wYhRHwgfW33tkndMo1mYnx10/S4hZDtRhjNRW5lXHiMNeNE2Xs PU3izDUW9pU0+Nn9h4MMz5HfZmlcqFEN1EYbLRnFXkYFh4/MFW90jKQUVFEIGtw1qGRg XQmy/Te3amCwdIG+45cjTS3MlnSmeqbzz4P4s81wNVqDJF/GDs6HHuskk31rewHEcGzl niMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=HjoylWL5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id c3-20020a170902aa4300b001cfe52e0208si1791241plr.538.2023.11.30.12.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 12:36:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=HjoylWL5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 635D580264B8; Thu, 30 Nov 2023 12:36:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346798AbjK3UgT (ORCPT + 99 others); Thu, 30 Nov 2023 15:36:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235230AbjK3UgR (ORCPT ); Thu, 30 Nov 2023 15:36:17 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C28151711; Thu, 30 Nov 2023 12:36:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1701376551; bh=nY/0hZ0vbbp5essvoHc9RPwquuPPV/hhuX4M/ILLoBg=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=HjoylWL56fHHxWhyiE7ZatEflLDYE4QsowWU8OQQByvLS/vnmDZ0VIGOgIsPaGPL0 cJEG5wgLZuddVrH1fFnuwGNgjOHJnOhCiMEV4MO5Z5mka3D9r+tr8HxqQPNnAAHtEO KXYc/ByGmHEHY3/FC9x2HWY4HxA9oNqra8gGFijA= From: Luca Weiss Date: Thu, 30 Nov 2023 21:35:18 +0100 Subject: [PATCH 1/3] dt-bindings: display/msm: gpu: Allow multiple digits for patchid MIME-Version: 1.0 Message-Id: <20231130-msm8226-gpu-v1-1-6bb2f1b29e49@z3ntu.xyz> References: <20231130-msm8226-gpu-v1-0-6bb2f1b29e49@z3ntu.xyz> In-Reply-To: <20231130-msm8226-gpu-v1-0-6bb2f1b29e49@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1601; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=nY/0hZ0vbbp5essvoHc9RPwquuPPV/hhuX4M/ILLoBg=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBlaPIjw29rzB3cz5ouVOoxkcS+NBvkjHoAp+gt2 UWmf44YseaJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZWjyIwAKCRBy2EO4nU3X VpRID/9+c4nm+yEPLys+ExztX9UG058g7gQqCt53lQE5FB/PKvaSLDVkOGSFQ/YEP6ok1b6z4cn gWaVQgcYEuHW0tQRsnQt50QtnAZjwrl0jUADvprNfgwYm+IPtBJJ09uD5SZ2jvwdIV2yRnPyH2R ixuEe3WettFHn2yC4f6l17IprAkqX/8oKuXPWfP7DbJBHQpgjPZjyN9x45cQdhkxgd0RuW2rXMf 9hbn4wb1Gx5/4azzPUuY292RseAgLJ8kd4w+AFYMOlRQGLhrLtSQrchzPiObWOtRykWuOSD5ACA pSXDusC6eaQGDwUhe6ISkYP0yTvWH5lPVXKYJFnpYZcqSbh2OkGs6OUkU9xZFsmxsuUKlTJNuhD V67dBM0bM8oSKXRxxD1OyYjSU2oT3kuWPoTffUBJA8zcghR3hGnmxzpIUcwxz+ktTCABxeIOACI W+M5QnzVB5LvGe8HNuCQ4n4Qb6dkM9v7KXdm17EP4rfJ+XmjILliMLWghEGb4sDxTZmvHJpsxRj A+37XigPxizhtjjtlTmcDNTZsJPBREmtUXD0cEzASfzUT/NyJA1uPK1KdC7sklaawoCUj6F86Vq hjI61KS8/Q6RWBp8ozsnNi9AcwyfFZH0Ex2Dc1C02iuyxI9VhZlrpjBAibX3Zj8vEfkvGMx+pOP xkgm7dBT3u91FuA== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 30 Nov 2023 12:36:47 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784022680413152934 X-GMAIL-MSGID: 1784022680413152934 Some GPUs like the Adreno A305B has a patchid higher than 9, in this case 18. Make sure the regexes can account for that. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/display/msm/gpu.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/display/msm/gpu.yaml b/Documentation/devicetree/bindings/display/msm/gpu.yaml index b019db954793..40b5c6bd11f8 100644 --- a/Documentation/devicetree/bindings/display/msm/gpu.yaml +++ b/Documentation/devicetree/bindings/display/msm/gpu.yaml @@ -23,7 +23,7 @@ properties: The driver is parsing the compat string for Adreno to figure out the gpu-id and patch level. items: - - pattern: '^qcom,adreno-[3-7][0-9][0-9]\.[0-9]$' + - pattern: '^qcom,adreno-[3-7][0-9][0-9]\.[0-9]+$' - const: qcom,adreno - description: | The driver is parsing the compat string for Imageon to @@ -127,7 +127,7 @@ allOf: properties: compatible: contains: - pattern: '^qcom,adreno-[3-5][0-9][0-9]\.[0-9]$' + pattern: '^qcom,adreno-[3-5][0-9][0-9]\.[0-9]+$' then: properties: @@ -203,7 +203,7 @@ allOf: properties: compatible: contains: - pattern: '^qcom,adreno-[67][0-9][0-9]\.[0-9]$' + pattern: '^qcom,adreno-[67][0-9][0-9]\.[0-9]+$' then: # Starting with A6xx, the clocks are usually defined in the GMU node properties: From patchwork Thu Nov 30 20:35:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 172111 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp669193vqy; Thu, 30 Nov 2023 12:36:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMeqPGvQAb96B1gZjR+CIlis0lBcHeJw3mDIvAfEB7nNqUaIhekAhwo8oTeT1//xZezBRd X-Received: by 2002:a17:90b:1a8a:b0:286:5742:dfce with SMTP id ng10-20020a17090b1a8a00b002865742dfcemr55527pjb.4.1701376601839; Thu, 30 Nov 2023 12:36:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701376601; cv=none; d=google.com; s=arc-20160816; b=aqU9mguJhJLAdjR7B/9PZGKoEZFthSjT9Ve/n8AJpyfYCABfq/omSZ2De2H2d+jxio 4nlnVc8D7c1PIO+jqApNIdExSFzPqjUf7O0vPWiuO/+0l9PMlX1eKjpilmpJ0STSCx2i LYecL9w2R0dvp5AKSQ1PdWsSVnZHCrMDJcUdXI5MKo3ry+zqwC7rvX1cH6Wxf0zS/zf9 CUEFbgCUykBj/bi73l7y8VEdoK6lKvJoV/42IE/KMdiECFDsKjuwsAlFFsY6S/vHMvlv JMiSohNUYjvHr6E3bLgH7LRye0ACVb+if4fYo2tRXKnwop08U4BzTHdsNr2aZaaS1qif 6RDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=4iQptKxcNIiNkqrqhi7z4/UOckQVe/JV7w10oraFId8=; fh=+SRI1VeKmVaGGYxg8slCD/uOQWHdJo2H6VxeCiWFGUw=; b=obGtDByHhrIAF8ruU6nchjXaFWo0DI/dynetmxDzob4OePSMbe8IWRoOSXPgOglpXJ 3A4ZAYXdZcvGWm3XJE45d6ICDenIx+7jStMUoH8MBPCMV+su+koLDK9LE+YPnlLNnwpu PU4/8guEHtkCKsfve5KrYcL1RkRw/3Frml9CAPVPdbI4iyrUpBt3jxHEbC0MtYlCvSNN uSoeAptM+QPqsymSTTBFU4Jtb7HXBSwt51Rn2F+/sVMJ2sZkIn/r6dRX+GCUn1VD55c/ biujWGWF6N2W+E29P7LfUZt2jgGsMJkbyDK1z/PMVyKYJeuAfPUO90bM2JPGwgTC51wK thKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=cOpvtJKu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id si7-20020a17090b528700b0027d088ae385si2122941pjb.96.2023.11.30.12.36.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 12:36:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=cOpvtJKu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1C15282DDFA9; Thu, 30 Nov 2023 12:36:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376372AbjK3UgV (ORCPT + 99 others); Thu, 30 Nov 2023 15:36:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbjK3UgS (ORCPT ); Thu, 30 Nov 2023 15:36:18 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C2BD10FF; Thu, 30 Nov 2023 12:36:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1701376552; bh=WseaproAPlHcyZYH4LuAiRPthwckItsf2rlGuhoBAh8=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=cOpvtJKuilyla47tGgvTTWgfpd0VCC+MIMo9DAl/plG1RVcsxd4vHcfSVGsxB9+mj RllPTYEwkI+A3aF1OjOu4JlVJZsvIt7zlIwMXLqYyCM1N/SugtUh/V3nYUq+YxisdK WQBqDJRvLyad5tHm3acbVhDN/4Yy4sxoSeZLCMGI= From: Luca Weiss Date: Thu, 30 Nov 2023 21:35:19 +0100 Subject: [PATCH 2/3] drm/msm/adreno: Add A305B support MIME-Version: 1.0 Message-Id: <20231130-msm8226-gpu-v1-2-6bb2f1b29e49@z3ntu.xyz> References: <20231130-msm8226-gpu-v1-0-6bb2f1b29e49@z3ntu.xyz> In-Reply-To: <20231130-msm8226-gpu-v1-0-6bb2f1b29e49@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=4468; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=WseaproAPlHcyZYH4LuAiRPthwckItsf2rlGuhoBAh8=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBlaPIkxK4kOIZXeKxvYESMbmponpLhfG0XOxOuS f9QheSROLCJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZWjyJAAKCRBy2EO4nU3X Von4EAC25Q0VcH3QjuMCivMXLTNFnrhN96a2vx+oqUCbN7/zF9InDFWexqp1j6KNjymyzDaPn1u TH/pPQYdPomSWvfQf0PifhbuMpFIv5lLz4/S+zRuXlp9h761AaZPJAH8rd9LJ0Ap1cDbYQ6Ra68 10qWUxhCUb8o/0uWdK9O8SSj6bJPEKgE0y82mnDBtm3w5cXCQLarZ8ykOa/vV6LRHhXNqSQBhtJ okGnrxbTxkoEsiGQTx9BTE/ih3ozm8rrdE+NuLfP2aU+RAySf0VFeka1iikvbFF4caVR6zduTWD AprMyCx79y7asW01ReTs5TqB/qg7B0m8ERLbDbCQX8quHiEKJBZ2zKwg3J2O4YBPvENbyH/lW6v zYA2PFu/Xpd+pXcJJ6r6Sc41ZPKyjcIWLjpg5V/luLEvwFscRNCnr+ejIXnazy7d0jv+k5oJOLw gAuepPv+bf0ZC0rYqOGC46L7xhlcuE14/bRdVP8znEB6SC3MmwWlTi5i7jm1JsYP5h34IMkmYKE HVR4y4/mte9ZwZwHO/z9z9m2IXguI6u3lOqjY31hjNq0n55Oq/xETklMaG+5V2OEyxyFzyOmHGs BjBqtZuhGw42ZGeUrDgm1nMFnsjm43aM24Ui742aSRj/Ck6clTfT8rlliikr4Yl7z8I22Iw9x/X j7BGDmGW4nDx/IA== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 12:36:38 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784022671553023203 X-GMAIL-MSGID: 1784022671553023203 Add support for the Adreno 305B GPU that is found in MSM8226(v2) SoC. Previously this was mistakenly claimed to be supported but using wrong a configuration. In MSM8226v1 there's also a A305B but with chipid 0x03000510 which should work with the same configuration but due to lack of hardware for testing this is not added. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 15 ++++++++++++--- drivers/gpu/drm/msm/adreno/adreno_device.c | 15 +++++++++++---- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 +++++ 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c index c86b377f6f0d..5fc29801c4c7 100644 --- a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c @@ -134,6 +134,13 @@ static int a3xx_hw_init(struct msm_gpu *gpu) /* Set up AOOO: */ gpu_write(gpu, REG_A3XX_VBIF_OUT_AXI_AOOO_EN, 0x0000003c); gpu_write(gpu, REG_A3XX_VBIF_OUT_AXI_AOOO, 0x003c003c); + } else if (adreno_is_a305b(adreno_gpu)) { + gpu_write(gpu, REG_A3XX_VBIF_IN_RD_LIM_CONF0, 0x00181818); + gpu_write(gpu, REG_A3XX_VBIF_IN_WR_LIM_CONF0, 0x00181818); + gpu_write(gpu, REG_A3XX_VBIF_OUT_RD_LIM_CONF0, 0x00000018); + gpu_write(gpu, REG_A3XX_VBIF_OUT_WR_LIM_CONF0, 0x00000018); + gpu_write(gpu, REG_A3XX_VBIF_DDR_OUT_MAX_BURST, 0x00000303); + gpu_write(gpu, REG_A3XX_VBIF_ROUND_ROBIN_QOS_ARB, 0x0003); } else if (adreno_is_a306(adreno_gpu)) { gpu_write(gpu, REG_A3XX_VBIF_ROUND_ROBIN_QOS_ARB, 0x0003); gpu_write(gpu, REG_A3XX_VBIF_OUT_RD_LIM_CONF0, 0x0000000a); @@ -230,7 +237,9 @@ static int a3xx_hw_init(struct msm_gpu *gpu) gpu_write(gpu, REG_A3XX_UCHE_CACHE_MODE_CONTROL_REG, 0x00000001); /* Enable Clock gating: */ - if (adreno_is_a306(adreno_gpu)) + if (adreno_is_a305b(adreno_gpu)) + gpu_write(gpu, REG_A3XX_RBBM_CLOCK_CTL, 0xaaaaaaaa); + else if (adreno_is_a306(adreno_gpu)) gpu_write(gpu, REG_A3XX_RBBM_CLOCK_CTL, 0xaaaaaaaa); else if (adreno_is_a320(adreno_gpu)) gpu_write(gpu, REG_A3XX_RBBM_CLOCK_CTL, 0xbfffffff); @@ -333,7 +342,7 @@ static int a3xx_hw_init(struct msm_gpu *gpu) AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START(2) | AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START(6) | AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START(14)); - } else if (adreno_is_a330(adreno_gpu)) { + } else if (adreno_is_a330(adreno_gpu) || adreno_is_a305b(adreno_gpu)) { /* NOTE: this (value take from downstream android driver) * includes some bits outside of the known bitfields. But * A330 has this "MERCIU queue" thing too, which might @@ -559,7 +568,7 @@ struct msm_gpu *a3xx_gpu_init(struct drm_device *dev) goto fail; /* if needed, allocate gmem: */ - if (adreno_is_a330(adreno_gpu)) { + if (adreno_is_a330(adreno_gpu) || adreno_is_a305b(adreno_gpu)) { ret = adreno_gpu_ocmem_init(&adreno_gpu->base.pdev->dev, adreno_gpu, &a3xx_gpu->ocmem); if (ret) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index f62ab5257e66..7028d5449956 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -55,10 +55,17 @@ static const struct adreno_info gpulist[] = { .inactive_period = DRM_MSM_INACTIVE_PERIOD, .init = a2xx_gpu_init, }, { - .chip_ids = ADRENO_CHIP_IDS( - 0x03000512, - 0x03000520 - ), + .chip_ids = ADRENO_CHIP_IDS(0x03000512), + .family = ADRENO_3XX, + .fw = { + [ADRENO_FW_PM4] = "a330_pm4.fw", + [ADRENO_FW_PFP] = "a330_pfp.fw", + }, + .gmem = SZ_128K, + .inactive_period = DRM_MSM_INACTIVE_PERIOD, + .init = a3xx_gpu_init, + }, { + .chip_ids = ADRENO_CHIP_IDS(0x03000520), .family = ADRENO_3XX, .revn = 305, .fw = { diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h index 80b3f6312116..c654f21499bb 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h @@ -247,6 +247,11 @@ static inline bool adreno_is_a305(const struct adreno_gpu *gpu) return adreno_is_revn(gpu, 305); } +static inline bool adreno_is_a305b(const struct adreno_gpu *gpu) +{ + return gpu->info->chip_ids[0] == 0x03000512; +} + static inline bool adreno_is_a306(const struct adreno_gpu *gpu) { /* yes, 307, because a305c is 306 */ From patchwork Thu Nov 30 20:35:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 172110 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp669050vqy; Thu, 30 Nov 2023 12:36:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdnmQ5tj5SPREPoCd4yzUl6lMsEMlNUYyT9z5kkxRRXcySiUy1VhehsPdgkDHr0eKr5J4p X-Received: by 2002:a17:90b:4f4e:b0:285:b67b:f435 with SMTP id pj14-20020a17090b4f4e00b00285b67bf435mr15877827pjb.41.1701376583784; Thu, 30 Nov 2023 12:36:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701376583; cv=none; d=google.com; s=arc-20160816; b=bHKy9JBorgCHKpFK5LMPvbUE2YXvUBIWFjS4dwxbFhQqG5OEpD81i2G3o1t4pTP5XX ssQkLefFh7pYu9Q15ATMI7rgftVHU9eHH4wQ08BtTLWFagqUEZKI7IGix5YU1J90cOq9 Kal4X5+KPFnXuf+QrdK5B917EK8KsNzPkOXg/7IoSh79mlkLEBl0MEYmYRworJTEW0bP 8jOSNTGOyuF6Kh8y5yy2h1UTBzyOLtKO/zb1+7tn6MHHedkHEeKRdTFIPQZrelFTFREJ rg6LtoD60KG/gkHc/NkTjdY65D6VahJ7NdM3qzJezt6WS2Ld652U4iHz9CnHTxPjEAkM RRZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ugxJo2yfRgEiHbUgqJrylbP9E2IaEyYoDtE2IxOKJ9A=; fh=+SRI1VeKmVaGGYxg8slCD/uOQWHdJo2H6VxeCiWFGUw=; b=RjObXWBAZL9osqTQOL/CU3WvW71knJdnoJT8ieMjeXSK1ecpAVmWvX2PbFp/qpjkVr oiDJ6gpOMxeBPpgG4T4vy8rXGc9y95C0Jk4oZm+QBKAcGFlupwYf+f+xuYR6ZF76Ng2J qowZ3b/zVD6JPGO7FW9A8n5V90t8fbHyVB9oHKM4QRiPHbdjkglw5Q61hwJlh215+Qyg P9RXIZiZhtsaG4IVW5B2Xig8gApaOuXZjrw3u79g7FJuPIuoqP4LK2DJTNknY5IYwbBm TnHO7viv1wQnMa5WKl2fvb/jPRT6aenpZ54aDzbj/Lk4T5aBJKnHcI9HivZtPIxo1A9H UZQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=LHvHwkM+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id lr10-20020a17090b4b8a00b002859a8aee84si2079663pjb.172.2023.11.30.12.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 12:36:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=LHvHwkM+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 43501802691C; Thu, 30 Nov 2023 12:36:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376755AbjK3Ufv (ORCPT + 99 others); Thu, 30 Nov 2023 15:35:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376379AbjK3Ufs (ORCPT ); Thu, 30 Nov 2023 15:35:48 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E845A170D; Thu, 30 Nov 2023 12:35:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1701376553; bh=dIpkZwLcU5LO2iRQ3FvNUd54eLsB8oPxrLiyGCwvIk0=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=LHvHwkM+dXQfRQrcZqNmeRe/WEqzq/9iDRtfutrR/NE0ybkVqggRDkNbZhCVwzReN ef+shYUnwWGlgWkwlRuTBYDEn5SjuLj+Efr6aWub7cOUNEZCNreSbVMNaleD81Lauh Z0iKXz4W+gT1Hz88O6VlmdqZEqJfnO/ulCHVqHRo= From: Luca Weiss Date: Thu, 30 Nov 2023 21:35:20 +0100 Subject: [PATCH 3/3] ARM: dts: qcom: msm8226: Add GPU MIME-Version: 1.0 Message-Id: <20231130-msm8226-gpu-v1-3-6bb2f1b29e49@z3ntu.xyz> References: <20231130-msm8226-gpu-v1-0-6bb2f1b29e49@z3ntu.xyz> In-Reply-To: <20231130-msm8226-gpu-v1-0-6bb2f1b29e49@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1540; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=dIpkZwLcU5LO2iRQ3FvNUd54eLsB8oPxrLiyGCwvIk0=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBlaPIlnpx7RKRqFvmDkHiyz3LX+JZOWvUXys5LH u+C4lYbvniJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZWjyJQAKCRBy2EO4nU3X VrgND/9nZ8rJNVtr/QjArZe3c3cRpOuXXFaFMZrWx8Wru4JrOcqubLb3fcvQ/mvnH4vKkvTpdxL m00Xh5X8lgMIYWzqbW+W2Zid0JsoST7c6cZXezgAleXkXPvFJb/gf+ExtL68MmQu/tAdzRblYW4 aiYY6LrBZ3u7+XRk+Vez2qUzhZYOiolCTq5li/rAdDzZuQbA4lQaj3TzBjnZaYbEFQTQiMuHaCO iGW7ZQTCKPhcGMA2RXEfD+t4Ns8/L6EHRV//Jhs9TTOWk3xktSdAWRgzOS6ffRJ6fso54txIiFx stqfeXeBPDakjtq25ynw+ULehXb7JxlTm9DlcRZHjZ9B1Q5ixfIzdaitG6SEUFEFkIEFLOU+p3t Zaf0SA8thvQ5SgFIyrTsjpekMABAPfe5GmKBWDpAIW4UTQb/lFOJ5bFw+T7ulcd64u0snYVfU5R 61bXapRbk6tXDNoW7/01/oGtot+dUOVoronedMMy2DgQiYH6PtTCYtxf/zYr/2mLbc/oqBmA4Ht D6LF9rVI1mlUR7qb4l91ZWAZIKnEwC6Au5FywG2q/P9HZzoWXymbcdjjLtJ0xXHDliEdqExEVhX VSDPGXqDamO4aFncQhIMlQFdkXmWiQeklCGb+DYvLGzcFGkR1C+Xi/W8eEmU3xkf2RSlyWrArvu ReX1PTtBVBAGqkg== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 30 Nov 2023 12:36:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784022652888490932 X-GMAIL-MSGID: 1784022652888490932 The msm8226 SoC contains an Adreno 305B. Add a node to configure it. Signed-off-by: Luca Weiss --- arch/arm/boot/dts/qcom/qcom-msm8226.dtsi | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi index 5cd03ea7b084..9b43766df8f8 100644 --- a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi @@ -1006,6 +1006,46 @@ mdss_dsi0_phy: phy@fd922a00 { "ref"; }; }; + + gpu: adreno@fdb00000 { + compatible = "qcom,adreno-305.18", "qcom,adreno"; + reg = <0xfdb00000 0x10000>; + reg-names = "kgsl_3d0_reg_memory"; + + interrupts = ; + interrupt-names = "kgsl_3d0_irq"; + + clocks = <&mmcc OXILI_GFX3D_CLK>, + <&mmcc OXILICX_AHB_CLK>, + <&mmcc OXILICX_AXI_CLK>; + clock-names = "core", "iface", "mem_iface"; + + sram = <&gmu_sram>; + power-domains = <&mmcc OXILICX_GDSC>; + operating-points-v2 = <&gpu_opp_table>; + + status = "disabled"; + + gpu_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-450000000 { + opp-hz = /bits/ 64 <450000000>; + }; + + opp-320000000 { + opp-hz = /bits/ 64 <320000000>; + }; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + }; + + opp-19000000 { + opp-hz = /bits/ 64 <19000000>; + }; + }; + }; }; thermal-zones {