From patchwork Mon Mar 27 18:42:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Van Assche X-Patchwork-Id: 7286 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1723880vqo; Mon, 27 Mar 2023 11:59:53 -0700 (PDT) X-Google-Smtp-Source: AKy350aUVdtqds4Dt8coqNSW/bgnhpoAdINb4h502AWQSv+vK8meUcLa1fjiIsnZoL1WYBsdzN+v X-Received: by 2002:a17:902:a416:b0:19b:107b:698e with SMTP id p22-20020a170902a41600b0019b107b698emr10861052plq.14.1679943593373; Mon, 27 Mar 2023 11:59:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679943593; cv=none; d=google.com; s=arc-20160816; b=f6jRS83GzOxeKodgpspM+cgQa71wHUSfscnvAyc7yQDrj3djGdKWaVqL2T2qkED+5m eR6CvogTAV+gUcFPOWgNF45GNhA7mvPUSW30Xjy52HIsNCIrFAHCPjyMa6CA8AX59feF wWzh4AMNM7uplbhbPj5f6yhkBlY5tAxxT98Ay1glPimTFwIBLCCGqlRPBldGU8L37IAr N5oj/pwAPF8Qn3UHa9w2rw792F4QdM2IUVbEX1vmLmj7CZ44OPaaPtSQ2TdMJMKE7WTM 5NVrrZJ9qkex09FW987fXTb6mFRFF3rJCR/tqiMdjKTBeHQ/zm9BpFV5eNB68Vdnh+dy HONA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=UPeTkvVxhkyl7K0E/zp4aqMcr8drNcpWwqSgEpn+bfk=; b=ywIaFakNLeNs4WPq4BW5SKEXXnKXO0AorTRmmMguXhIXL+4+aqWHqKZ3ghHnkyhHKC lG/lo+mgeR7flfbY8PC9DyULOqQiwFUX3NilGjM4e3dfo7ZujJ3uI6wCSxa3Oet4GVD3 ASZQL30STE0MF5tNFDksfg83e3GVs+o+aP0vyPNroMm6myrxNUT71FL5JPcMtovba5uL 5/YSIMTFjk4yAjHWDzEYFZUnrLsVZGs782lTER7Of7ilLZINsLXg1/TGP8L9ZlNdrmRT WLrQGJe2+HuNj8kXNy5kdJmu0YSKiigPOqU7qE6pCqb9ny8qtdpWkYo4DVeY5yO4xukX aQUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=MBO0001 header.b=iSoRZEYq; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k19-20020a170902ba9300b0019a78d4c761si6828031pls.93.2023.03.27.11.59.39; Mon, 27 Mar 2023 11:59:53 -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=@dylanvanassche.be header.s=MBO0001 header.b=iSoRZEYq; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232663AbjC0SnS (ORCPT + 99 others); Mon, 27 Mar 2023 14:43:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232631AbjC0SnM (ORCPT ); Mon, 27 Mar 2023 14:43:12 -0400 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36F363C31; Mon, 27 Mar 2023 11:42:38 -0700 (PDT) Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4PlhWF1Wnfz9sZg; Mon, 27 Mar 2023 20:42:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dylanvanassche.be; s=MBO0001; t=1679942537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=UPeTkvVxhkyl7K0E/zp4aqMcr8drNcpWwqSgEpn+bfk=; b=iSoRZEYqu+i9PpKIV/3nTTBHt/NNwPyAyaqBulyRkAa9Bw2pBuvlm+mDUIgjEdIjWeQ/Jn 1ChAFTC5HZIY6Ti5RU93CYxlQ2DaFnyfbhGl8bG+TeFsXpMZrrjAxxvqCBALdIWE0UZjFb x8bqMEzjrsOLxaZCcFu/wmn9LeIauknnI6wvg8bI1TXxg94pz3vt9NfCIZzNSYmHCCPkjK CxqtQeFTy4Bdz2hZukGca8h03bbEio4Eqkh/6uzqeiwzQDRZkDCuzBrY/HVzQZlc2iMgx4 ubY++yMjQ4T+cvMuSlWIx1Z1i1B/YOo61EG68TQaTf13YeNNDIoH04QR6fDuwg== From: Dylan Van Assche To: Srinivas Kandagatla , Amol Maheshwari Cc: Arnd Bergmann , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Dylan Van Assche Subject: [PATCH v2 0/2] misc: fastrpc: FastRPC reserved memory assignment for SDM845 SLPI Date: Mon, 27 Mar 2023 20:42:02 +0200 Message-Id: <20230327184204.498032-1-me@dylanvanassche.be> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761548532949915291?= X-GMAIL-MSGID: =?utf-8?q?1761548532949915291?= * About * The Qualcomm SDM845 SoC has a separate SLPI (Sensor Low Power Island) DSP for sensors connected to the SoC which is responsible for exposing sensors to userspace, power saving, and other features. While sensors are connected to GPIOs of the SoC, they cannot be used because the hypervisor blocks direct access to the sensors, thus the DSP must be used to access any sensor on this SoC. The SLPI DSP uses a GLink edge (dsps) to communicate with the host and has a FastRPC interface to load files from the host filesystem such as sensor configuration files. The FastRPC interface does not use regular FastRPC Compute Banks but instead uses an allocated CMA region through which communication happens. * Changes * This patchseries add support to the FastRPC for assigning a coherent memory region to a DSP via the hypervisor with the correct permissions. This is necessary to support the SLPI found in the Qualcomm SDM845 SoC which does not have dedicated FastRPC Compute Banks, in contrast to newer SoCs, but uses a memory region instead when allocating buffers. * Related patches * 1. Remoteproc changes to support the SLPI DSP in SDM845: https://lore.kernel.org/linux-remoteproc/20230325132117.19733-1-me@dylanvanassche.be/ 2. DTS changes (v1): https://lore.kernel.org/linux-devicetree/20230325135114.21688-1-me@dylanvanassche.be/ This serie does not depend on any serie, but all of them are necessary to enable the feature in the end. * Changelog * Changes in v2: - Removed double blank lines - Dropped dt-bindings property as it is not needed for driver behavior - Add additional patch to allocate buffers via CMA memory for DSPs without dedicated FastRPC Compute Banks. Kind regards, Dylan Van Assche Dylan Van Assche (2): misc: fastrpc: support complete DMA pool access to the DSP misc: fastrpc: use coherent pool for untranslated Compute Banks drivers/misc/fastrpc.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)