Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3924787rwa; Tue, 23 Aug 2022 12:37:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR49d6YVeOTNk9PwNnSnP2vLmu4kdnmLYZDTUgH4byFf9DB+NzlXsd6ob5s0QNvyn4hE0bya X-Received: by 2002:a05:6402:5c9:b0:446:fb0:56bb with SMTP id n9-20020a05640205c900b004460fb056bbmr4979190edx.173.1661283445802; Tue, 23 Aug 2022 12:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661283445; cv=none; d=google.com; s=arc-20160816; b=jhZ5LSaBQ+PrRc/N8XY4HsjxaIT1tT5T2jIlwEFyAmIxWcx4eib0L9HAcp4npd2o6l sgbv38oF3GODgfaFM15j/GMwwWYKh6ZUWi54oqCMFiDGdIUMT//uO9/mXVw+yMARMKp2 Pql80uD8kD0cxnkZJt0XNVavW5KtR3cgPKkyQO7G+/SXjo4YSFVRcK6UHI0fqOsTAnPW U525dJLBpBU6DBIoveoVhQLgGy0UUSEDTjQAjnzB+Xt7yhhe7jZHVmbYqEfP76pCoqng n9A5N81Chpr6bgU0tKTqnX8ybHnpKdIJ3csB2bSElwcpqJ0tx2+ceD3TNwzkduCYhyBm X8ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=7XTGVkMBPLrwjtXxcaOx31Px0tvAGpLY3EuE7oCCnjI=; b=pEoaNbKCLo2Dv5wxLw4m3xbuAKG9qyOA5LYnsQ1oD75Q0LItweCyGFQK7IY4EPlFN2 MGxTGinkU7skEM2WE3/ivONXiw1ZdlvLbLUvfzyB0ZMsVYKTmRoXZNVcwT48u6xg7K0M 93dkgHdBs8ym4YFVF7hvyGOMeFjUlq3p6dT5GgB235XFi2AnbFFk8iAplU2Xly9ROz2R p5ueaU4HD7jPDbQZ0KkNKUBrRrbyYp0z1RtxyB7mE9V4b46tWaljoh45ksWtKcWqVA/e Ugl1l1QJKf/rNuaY5Rqdqj1J9cUkYPqivQmcvNKPLU25IpCRYPNo18bFP8lXZf4MmGJ4 4hjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=QUiNSn91; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020a056402510d00b0044347b22b2bsi3077915edd.354.2022.08.23.12.37.00; Tue, 23 Aug 2022 12:37:25 -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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=QUiNSn91; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229896AbiHWTcg (ORCPT + 99 others); Tue, 23 Aug 2022 15:32:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232328AbiHWTcC (ORCPT ); Tue, 23 Aug 2022 15:32:02 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0358AA59B4 for ; Tue, 23 Aug 2022 11:24:01 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id c2so13555376plo.3 for ; Tue, 23 Aug 2022 11:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=7XTGVkMBPLrwjtXxcaOx31Px0tvAGpLY3EuE7oCCnjI=; b=QUiNSn917AVTIsrzbGnUa617Ladt8vDyJ8nDZLINOxnle2vQeENAUIXJWhCywURT0G i1G8J5GPlHiqJcgXFXfdcXY9pCFt1G7Sxy5zR48Ta0uhJXvosmei+9D2NfxJYTTtHoWc loVF8T5YXKtEapCIn0IWvUJikZ9qqCMJXMbUX7qj6jGbe35rdkghS9lJ+ML1sj2Yy5JP rbkIWnVRIdFuRNiguifR+T4GXjiQWY/6DxPzSfsM+iW6BFnyfudXcg98xH+53Cbe3oQL 3wTI0zpyFmaqgOIt+WsThvYhaKwq3evPe+wEhcOPxL1zQ/i7Ehz9k07ljeYz3B7fKyA/ UOOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=7XTGVkMBPLrwjtXxcaOx31Px0tvAGpLY3EuE7oCCnjI=; b=e/gWbszuSapV+c3vaX1SlUQcpAg19/2U2DTwxdLas6BxE7y9s1DyNo0dxd8/CdjbiD nyCGCgPcanhkDGibt89Am5MQ+ayGisWP6LjA+FkCUVMQAJ2MgB/2izOBnL6AFhxNxPbV mYFvPqWaTEHlg7pqvkDCJeipS40avxeV2con5HttH3vdPd0+Sy9L7kdF/0SzWy//YE6d 2pc7UAmeivPM+aZYEHH0rQSMYw05T9jn9KWa00fTlqWcsVHKFtKIZomLNiNFZDchcUuz 7YMP/9NGFrOSyK8fwDvYGi2Q+Xui2Uepuw+7ieiXdMOOfAFYzv4G3vRm6Mz6EdK7W1u1 twNw== X-Gm-Message-State: ACgBeo320SpmBzEWnZq3nVyUkcfeU0+hn0fCrFaek8lEby1vzD3EKfUo CEqbl2/HdawWAk3dtHbdEj60Gg== X-Received: by 2002:a17:902:e54f:b0:172:ef3e:f725 with SMTP id n15-20020a170902e54f00b00172ef3ef725mr9200223plf.66.1661279040572; Tue, 23 Aug 2022 11:24:00 -0700 (PDT) Received: from localhost ([76.146.1.42]) by smtp.gmail.com with ESMTPSA id h17-20020a170902f55100b0016e808dbe55sm10952991plf.96.2022.08.23.11.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 11:24:00 -0700 (PDT) From: Kevin Hilman To: Oded Gabbay , Dave Airlie , Greg Kroah-Hartman , Yuji Ishikawa , Jiho Chu , Alexandre Bailon Cc: Jason Gunthorpe , Arnd Bergmann , dri-devel , "Linux-Kernel@Vger. Kernel. Org" Subject: Re: New subsystem for acceleration devices In-Reply-To: References: Date: Tue, 23 Aug 2022 11:23:59 -0700 Message-ID: <7hk06ykedc.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi Obed, Oded Gabbay writes: [...] > I want to update that I'm currently in discussions with Dave to figure > out what's the best way to move forward. We are writing it down to do > a proper comparison between the two paths (new accel subsystem or > using drm). I guess it will take a week or so. Any update on the discussions with Dave? and/or are there any plans to discuss this further at LPC/ksummit yet? We (BayLibre) are upstreaming support for APUs on Mediatek SoCs, and are using the DRM-based approach. I'll also be at LPC and happy to discuss in person. For some context on my/our interest: back in Sept 2020 we initially submitted an rpmesg based driver for kernel communication[1]. After review comments, we rewrote that based on DRM[2] and are now using it for some MTK SoCs[3] and supporting our MTK customers with it. Hopefully we will get the kernel interfaces sorted out soon, but next, there's the userspace side of things. To that end, we're also working on libAPU, a common, open userspace stack. Alex Bailon recently presented a proposal earlier this year at Embedded Recipes in Paris (video[4], slides[5].) libAPU would include abstractions of the kernel interfaces for DRM (using libdrm), remoteproc/rpmsg, virtio etc. but also goes farther and proposes an open firmware for the accelerator side using libMetal/OpenAMP + rpmsg for communication with (most likely closed source) vendor firmware. Think of this like sound open firmware (SOF[6]), but for accelerators. We've been using this succesfully for Mediatek SoCs (which have a Cadence VP6 APU) and have submitted/published the code, including the OpenAMP[7] and libmetal[8] parts in addition to the kernel parts already mentioned. We're to the point where we're pretty happy with how this works for MTK SoCs, and wanting to collaborate with folks working on other platforms and to see what's needed to support other kinds of accelerators with a common userspace and open firmware infrastructure. Kevin [1] https://lore.kernel.org/r/20200930115350.5272-1-abailon@baylibre.com [2] https://lore.kernel.org/r/20210917125945.620097-1-abailon@baylibre.com [3] https://lore.kernel.org/r/20210819151340.741565-1-abailon@baylibre.com [4] https://www.youtube.com/watch?v=Uj1FZoF8MMw&t=18211s [5] https://embedded-recipes.org/2022/wp-content/uploads/2022/06/bailon.pdf [6] https://www.sofproject.org/ [7] https://github.com/BayLibre/open-amp/tree/v2021.10-mtk [8] https://github.com/BayLibre/libmetal/tree/v2021.10-mtk