Message ID | 20230628-topic-a7xx_drmmsm-v2-0-1439e1b2343f@linaro.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2483257vqr; Tue, 8 Aug 2023 17:43:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwXNsVMTFAvLm4H/xTFK01ICRos/Vel5uqQeEUxZLH6virjrtmYRssmYbgog/SKNQMErL8 X-Received: by 2002:a17:907:7b88:b0:99c:10b5:7650 with SMTP id ne8-20020a1709077b8800b0099c10b57650mr14975677ejc.1.1691541781979; Tue, 08 Aug 2023 17:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691541781; cv=none; d=google.com; s=arc-20160816; b=V/bSsqoqU6PDet6smyxukaBicUO3MPAKb50OYjxKkeUDQ2qhl9XoynD6UdRLN77rHi tCLi5Lb91IAW9+IceTIupmmK2zNrUgnCN48xjmf4QwsYBy97RF1YMU+vQ6FwlusUyDgv Bt+eOChugnFkL83kIi3jw6e56LfZQ6QBOJdqIbN2wKIEuDW9SJbPE/0wcAS4JrE+IvZO /nZbEhlaGnEN+inwMrBdI75PIYYlRzZ96k4t0DrGWkDrevO292yI6AP65nu9qXDXyjfn ekOpXNWTi5pfo5VrmL7eYqPeZdWdc6j3rWaSwwOKmtNxspFDBkBL8rm9MqVqS6V4NSAG H2cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=3P34b/1ma59FLttG1cQJqYU6A3Cv7kli+dnFU1B7pgw=; fh=9CD0fJ3o8j5iop7m89tX0L1dda99RNvV7ijcBF1zkes=; b=dSPomHc2z0e4WG5epu1GuZZ3ZRRtyJmXOJiMQYyRxy20ZyAKLS3jEc+uAobmCc4S3g +etWjG6r/LoxIDTIXUg1yN6meNh5PddJRdfmSZsjLGDgvaVd0RVCGqrbpKwdgrMYjdQT liaBptCgNI+P+IUNSJTngy9Wp7b3TBpESlzRIpo+0dW/AdKw0KcxNoIUYK0ht3UDHS2e o75FWzRkmQcplif2LI93jSFPGxqJ9rOV8JXdp5Ob9fBwv8oI3MclB9E9AVqZIToXiWhQ fnII4R6Qct0k6iKF2cARCSlW+Hs1tgIma/izbbOhIMsrK6USDtMPEB6qLesL1OyrwzHS ynjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SvILppwz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a170906154700b00987e4102ebfsi7204276ejd.993.2023.08.08.17.42.38; Tue, 08 Aug 2023 17:43:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SvILppwz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232310AbjHHVCx (ORCPT <rfc822;aaronkmseo@gmail.com> + 99 others); Tue, 8 Aug 2023 17:02:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231887AbjHHVCw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 8 Aug 2023 17:02:52 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60A721715 for <linux-kernel@vger.kernel.org>; Tue, 8 Aug 2023 14:02:50 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b9cf2b1309so3263711fa.0 for <linux-kernel@vger.kernel.org>; Tue, 08 Aug 2023 14:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691528568; x=1692133368; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=3P34b/1ma59FLttG1cQJqYU6A3Cv7kli+dnFU1B7pgw=; b=SvILppwzHI+9Ubi5q64fEItmP2yIkds1QdhCpbBlvFNhQzLstXUavt86288C4GEyBK rn5WmEo5R6YtwM8F+i1Q+qOJkxcMxHmVafcb6//Ztb7vExgr6jtrj9/kL3RfFA9SrVI/ veNjg4F9psz1PXD4JGEY67UBuEwQCkNY7c0OHD+IU4hPOw6NfrInszz4s+ZnDkQnAB7I b87442JKlQiyWdH5Zg4q8YgzkUmxUW2gIXX8RGhQ13t5W4llS28E/yvK8X1PGtE7V7Bu CNCd32oYEPdNi/2xTTN3z/FLl9+VsByE3RfN5wlklVBSJoLTF1+pScpVZyxhOzXDtip1 9/Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691528568; x=1692133368; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3P34b/1ma59FLttG1cQJqYU6A3Cv7kli+dnFU1B7pgw=; b=dbLyKhHEm/LKYs0MHOh8YoXJYnb52rqKkjbG6PUFMOEotgi65/SUw/Qh06tqqvauPc fVTxbS2QfpJ1vyQGkpgbrLR9twZNBJA/Lxo7gxKJHC+6Hmjyu4ZqQu7z5jyztUfi244J Txr4iQOZEXfZsCe26hpxsDUgKbkrZUMmpcJX07IyuVbUS3eKmPoOFzJRMElRbdX5CVO/ ps5svQiRkYA+NGCPtfPOaQKT+6hOkPNHoNcD3dsVxOlNzvc8FFjW71QNzI939OZLvagM 8n6dTUmg98lz4GUXIL/aKeFOwC241S214zc+6x2bmEkBqJBW7abRcK+Ni85UiVawlbyH 2uWA== X-Gm-Message-State: AOJu0Yyj8s4Mcd+9mhBU+4KP+nLDf2xH91u1QS9kY3pdAcvCJ5dE5EaH uSkY9GKbeCAS9LxwSP8O3SyhDw== X-Received: by 2002:a2e:96d6:0:b0:2b6:cb3f:97e2 with SMTP id d22-20020a2e96d6000000b002b6cb3f97e2mr340774ljj.16.1691528568465; Tue, 08 Aug 2023 14:02:48 -0700 (PDT) Received: from [192.168.1.101] (abxi185.neoplus.adsl.tpnet.pl. [83.9.2.185]) by smtp.gmail.com with ESMTPSA id h11-20020a2eb0eb000000b002b6cc17add3sm2431483ljl.25.2023.08.08.14.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 14:02:47 -0700 (PDT) From: Konrad Dybcio <konrad.dybcio@linaro.org> Subject: [PATCH v2 00/14] A7xx support Date: Tue, 08 Aug 2023 23:02:38 +0200 Message-Id: <20230628-topic-a7xx_drmmsm-v2-0-1439e1b2343f@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAG6t0mQC/32NQQqDMBAAvyI5NyWJom1P/qNIiXGjC5rIxopF/ Hu3PqDHGRhmFwkIIYlHtguCFRPGwGAumXCDDT1I7JiFUSZXpbnJJc7opK227dXRNKVJapP7XHV V6XwluGttAtmSDW7gMrzHkeVM4HE7R8+GecC0RPqc31X/7L/FqqVi4YviXoJy2tQjBkvxGqkXz XEcX/7jt0vIAAAA To: Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Bjorn Andersson <andersson@kernel.org> Cc: Marijn Suijten <marijn.suijten@somainline.org>, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio <konrad.dybcio@linaro.org>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Neil Armstrong <neil.armstrong@linaro.org> X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691528566; l=4016; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=28tVoyoZGi5ChYeTjClZPV9YNYzKToRLj0C2cpckT8w=; b=RgpQP0zsl9mFXTKGli673/415ZK5uFGxg3V/njRZPs5d6JltKmhZpln3HGk20bN8dwDnBAlzi E0GHwdH9KFCC0pEWDcBu8GuAaPMvE/TrGIsCvTwVCALH/HsP/+fbPIf X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773710115111104633 X-GMAIL-MSGID: 1773710115111104633 |
Series |
A7xx support
|
|
Message
Konrad Dybcio
Aug. 8, 2023, 9:02 p.m. UTC
This series attempts to introduce Adreno 700 support (with A730 and A740
found on SM8450 and SM8550 respectively), reusing much of the existing
A6xx code. This submission largely lays the groundwork for expansion and
more or less gives us feature parity (on the kernel side, that is) with
existing A6xx parts.
On top of introducing a very messy set of three (!) separate and
obfuscated deivce identifiers for each 7xx part, this generation
introduces very sophisticated hardware multi-threading and (on some SKUs)
hardware ray-tracing (not supported yet).
After this series, a long-overdue cleanup of drm/msm/adreno is planned
in preparation for adding more features and removing some hardcoding.
The last patch is a hack that may or may not be necessary depending
on your board's humour.. eh.. :/
Developed atop (and hence depends on) [1]
The corresponding devicetree patches are initially available at [2] and
will be posted after this series gets merged. To test it, you'll also need
firmware that you need to obtain from your board (there's none with a
redistributable license, sorry..). Most likely it will be in one of
these directories on your stock android installation:
* /vendor/firmware
* /vendor/firmware_mnt
* /system
..but some vendors make it hard and you have to do some grepping ;)
Requires [3] to work on the userspace side. You'll almost cerainly want
to test it alongside Zink with a lot of debug flags (early impl), like:
TU_DEBUG=sysmem,nolrz,flushall,noubwc MESA_LOADER_DRIVER_OVERRIDE=zink kmscube
[1] https://lore.kernel.org/linux-arm-msm/20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org/
[2] https://github.com/SoMainline/linux/commits/topic/a7xx_dt
[3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Changes in v2:
- Rebase on chipid changes
- Reuse existing description for qcom,aoss in patch 2
- Pick up tags
- Link to v1: https://lore.kernel.org/r/20230628-topic-a7xx_drmmsm-v1-0-a7f4496e0c12@linaro.org
---
Konrad Dybcio (14):
dt-bindings: display/msm/gmu: Add Adreno 7[34]0 GMU
dt-bindings: display/msm/gmu: Allow passing QMP handle
dt-bindings: display/msm/gpu: Allow A7xx SKUs
drm/msm/a6xx: Add missing regs for A7XX
drm/msm/a6xx: Introduce a6xx_llc_read
drm/msm/a6xx: Move LLC accessors to the common header
drm/msm/a6xx: Bail out early if setting GPU OOB fails
drm/msm/a6xx: Add skeleton A7xx support
drm/msm/a6xx: Send ACD state to QMP at GMU resume
drm/msm/a6xx: Mostly implement A7xx gpu_state
drm/msm/a6xx: Add A730 support
drm/msm/a6xx: Add A740 support
drm/msm/a6xx: Vastly increase HFI timeout
drm/msm/a6xx: Poll for GBIF unhalt status in hw_init
.../devicetree/bindings/display/msm/gmu.yaml | 47 +-
.../devicetree/bindings/display/msm/gpu.yaml | 4 +-
drivers/gpu/drm/msm/adreno/a6xx.xml.h | 9 +
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 204 +++++--
drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 3 +
drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h | 8 +
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 667 ++++++++++++++++++---
drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 15 +
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 52 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h | 61 +-
drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 90 ++-
drivers/gpu/drm/msm/adreno/adreno_device.c | 30 +
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 7 +-
drivers/gpu/drm/msm/adreno/adreno_gpu.h | 28 +-
drivers/gpu/drm/msm/msm_ringbuffer.h | 2 +
15 files changed, 1094 insertions(+), 133 deletions(-)
---
base-commit: b30de2c05cf2166f4e2c68850efc8dcea1c89780
change-id: 20230628-topic-a7xx_drmmsm-123f30d76cf7
Best regards,
Comments
On Tue, Aug 8, 2023 at 2:02 PM Konrad Dybcio <konrad.dybcio@linaro.org> wrote: > > This series attempts to introduce Adreno 700 support (with A730 and A740 > found on SM8450 and SM8550 respectively), reusing much of the existing > A6xx code. This submission largely lays the groundwork for expansion and > more or less gives us feature parity (on the kernel side, that is) with > existing A6xx parts. > > On top of introducing a very messy set of three (!) separate and > obfuscated deivce identifiers for each 7xx part, this generation > introduces very sophisticated hardware multi-threading and (on some SKUs) > hardware ray-tracing (not supported yet). tbf most of this para above is describing choices kgsl made, and not really relevant upstream.. really the only thing that matters for the upstream kernel is that chip-id becomes "just a number" ;-) If you want to mention why we align chip-id with kgsl, it is (a) mesa needs to deal with both upstream and kgsl, and (b) future things we'll read this from hw/fw BR, -R > After this series, a long-overdue cleanup of drm/msm/adreno is planned > in preparation for adding more features and removing some hardcoding. > > The last patch is a hack that may or may not be necessary depending > on your board's humour.. eh.. :/ > > Developed atop (and hence depends on) [1] > > The corresponding devicetree patches are initially available at [2] and > will be posted after this series gets merged. To test it, you'll also need > firmware that you need to obtain from your board (there's none with a > redistributable license, sorry..). Most likely it will be in one of > these directories on your stock android installation: > > * /vendor/firmware > * /vendor/firmware_mnt > * /system > > ..but some vendors make it hard and you have to do some grepping ;) > > Requires [3] to work on the userspace side. You'll almost cerainly want > to test it alongside Zink with a lot of debug flags (early impl), like: > > TU_DEBUG=sysmem,nolrz,flushall,noubwc MESA_LOADER_DRIVER_OVERRIDE=zink kmscube > > [1] https://lore.kernel.org/linux-arm-msm/20230517-topic-a7xx_prep-v4-0-b16f273a91d4@linaro.org/ > [2] https://github.com/SoMainline/linux/commits/topic/a7xx_dt > [3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23217 > > Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> > --- > Changes in v2: > - Rebase on chipid changes > - Reuse existing description for qcom,aoss in patch 2 > - Pick up tags > - Link to v1: https://lore.kernel.org/r/20230628-topic-a7xx_drmmsm-v1-0-a7f4496e0c12@linaro.org > > --- > Konrad Dybcio (14): > dt-bindings: display/msm/gmu: Add Adreno 7[34]0 GMU > dt-bindings: display/msm/gmu: Allow passing QMP handle > dt-bindings: display/msm/gpu: Allow A7xx SKUs > drm/msm/a6xx: Add missing regs for A7XX > drm/msm/a6xx: Introduce a6xx_llc_read > drm/msm/a6xx: Move LLC accessors to the common header > drm/msm/a6xx: Bail out early if setting GPU OOB fails > drm/msm/a6xx: Add skeleton A7xx support > drm/msm/a6xx: Send ACD state to QMP at GMU resume > drm/msm/a6xx: Mostly implement A7xx gpu_state > drm/msm/a6xx: Add A730 support > drm/msm/a6xx: Add A740 support > drm/msm/a6xx: Vastly increase HFI timeout > drm/msm/a6xx: Poll for GBIF unhalt status in hw_init > > .../devicetree/bindings/display/msm/gmu.yaml | 47 +- > .../devicetree/bindings/display/msm/gpu.yaml | 4 +- > drivers/gpu/drm/msm/adreno/a6xx.xml.h | 9 + > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 204 +++++-- > drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 3 + > drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h | 8 + > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 667 ++++++++++++++++++--- > drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 15 + > drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 52 +- > drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h | 61 +- > drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 90 ++- > drivers/gpu/drm/msm/adreno/adreno_device.c | 30 + > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 7 +- > drivers/gpu/drm/msm/adreno/adreno_gpu.h | 28 +- > drivers/gpu/drm/msm/msm_ringbuffer.h | 2 + > 15 files changed, 1094 insertions(+), 133 deletions(-) > --- > base-commit: b30de2c05cf2166f4e2c68850efc8dcea1c89780 > change-id: 20230628-topic-a7xx_drmmsm-123f30d76cf7 > > Best regards, > -- > Konrad Dybcio <konrad.dybcio@linaro.org> >