Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp331358pxb; Thu, 5 Nov 2020 00:50:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIAO4TLEsVFUf7TR6qvfmkBuVw468npMMNJEMOkHDj8mi/L6+7UFt9fpVaLmuXdrg0mMdL X-Received: by 2002:a05:6402:1112:: with SMTP id u18mr1479031edv.349.1604566249772; Thu, 05 Nov 2020 00:50:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604566249; cv=none; d=google.com; s=arc-20160816; b=nWXxSRwXVEOJKJB3WkHPySesXh1MDgka6f8NECnDdJ6Q1pfijPU4FFnlpTAdi+ukpw UaedEwQRYDlpd7XxZGWrN67yEg+wOW53ceZyGOfFgigSeISAM8xZLYthKHqXwzTTyx5b uJcv6QqvwVJhVbvCftn5p2+j+5KFZ8XkrfiaLkLxKBLSHfYt1SqwvuwM67KGUgJ6J71/ DDpN2pcltoomWz6JXTnIsjR1+bMz4J7czacBtJdioyr/uD5iADRHzzhg8AVbA2/4ja6I eXY3GNifgG936x+TmgkxRovNBhNt6DFTx/ZbbYLbE6hS8B6PWqYDCdDfhDk6KGoCaY0E 720A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :autocrypt:from:references:cc:to:subject:dkim-signature; bh=O5ctiIecOJMj5eydurD3p6Qv3uyEbdZ4aY7Y/2rpsMY=; b=Ldy0tHIZVA97mfv+1QZf+r2lyPmkm7+1TsYUXjeev4Cq9EH7MhRyO+5XxD+atra8HW 3qlrOlInwbAGQw9Ig3bFhedwmP+3Jrxht9LpHt4knQ0Vk8uJCq+QCQr0xmtoVBX1m5lA 88e4zyzQ8dj5egSJGRGWMRxLeonbWJAc+ZeirQDTS/uh1YOPSFabw20RWAOW0gtE21sy sxKRMT4+nLDxFxBiAf1f+hBP5iR+oc89Ygrb2TNK8PZoC6xNCbTkIQZsnCRVWTWtcjyR NkfvA4fHGxhnVf1zPnrU/fFqcc+5GunI5rIJnq6yXetLCo17V0A3lqqAylFZEWKAMKLV ltjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=WT0FzCo+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si787692edm.444.2020.11.05.00.50.26; Thu, 05 Nov 2020 00:50:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=WT0FzCo+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729604AbgKEIsh (ORCPT + 99 others); Thu, 5 Nov 2020 03:48:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725320AbgKEIsg (ORCPT ); Thu, 5 Nov 2020 03:48:36 -0500 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 649A9C0613D2 for ; Thu, 5 Nov 2020 00:48:34 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id a65so400079wme.1 for ; Thu, 05 Nov 2020 00:48:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:autocrypt:organization:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=O5ctiIecOJMj5eydurD3p6Qv3uyEbdZ4aY7Y/2rpsMY=; b=WT0FzCo+BNbA8JWMIpfGgfK7dbc5XyCEqEUvaTcZAjw8FC+egAZ1eLbD7z7HaVbEz4 SO+/Ms0CqzUYHKEZ+WZUCVU7NADftXs1PzSoR9n4DfjJDhcYWtRQ5bFe3kgQ3xO/+JDl 3f4JJOC2eWXem7N3muXa5F+9nMo+QXTxYHsFnl3b3Xhb74I76Y2OZvZdhO2IoG9dyf9d 6N47yxIXeEFJwLOXcLFhCto5GAKej4836DePpJ0KhFIdx0rnoKJsr7X2pzKCpteJv+L2 O1xZH/P0O1KVEacLcO1DiyMcMKBPjHhXzkUQIdminTPPXMfto+/NgnNIQelHpwn0VdJi dAnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=O5ctiIecOJMj5eydurD3p6Qv3uyEbdZ4aY7Y/2rpsMY=; b=S1nCuabLpBgjH+Z7KCz+MsDiJzEMc0uGp5lEHjNWf5Vs31fAHr851msJjg/dNPIfHz GqObKSmNcT1DTCUSqK7YyWRUaXO8tnZ1PmVDGRL0HLvxif1Ov2bqHiYHXfXABhVsrkNg 81VJfLaS9vbxn5B2bXyzjJZI2Y85dDGXIkzOiL5shobch5JvZKZI2C918oFkUSZsnoCC oFmBLOGECaK0Bf38vI04KuoIyKbd2DErg+o++7lLbwgyZqZCIsSaCdnysynu96X4VZil PHxJE2ooTBrCGP1kbdUmGlYkobdjhm1fwmDU1awQbPk1YKTEMYjVgagff4SCj+86TEOX beLw== X-Gm-Message-State: AOAM532v3DRMaf2L7+M+lx9yIguuxxhj1Amo7agfRGZDYAeq3QU7+oAW G94WjwsTUMF3m6175UeCoxwkVQ== X-Received: by 2002:a1c:3846:: with SMTP id f67mr1513384wma.33.1604566112817; Thu, 05 Nov 2020 00:48:32 -0800 (PST) Received: from [192.168.1.47] (home.beaume.starnux.net. [82.236.8.43]) by smtp.gmail.com with ESMTPSA id m14sm1466053wro.43.2020.11.05.00.48.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Nov 2020 00:48:32 -0800 (PST) Subject: Re: [PATCH v2 0/4] media: meson: Add support for the Amlogic GE2D Accelerator Unit To: Linus Walleij , Todd Kjos Cc: Hans Verkuil , Linux Media Mailing List , "open list:ARM/Amlogic Meson..." , Linux ARM , "linux-kernel@vger.kernel.org" , John Stultz , Roman Stratiienko References: <20201030143715.577641-1-narmstrong@baylibre.com> From: Neil Armstrong Autocrypt: addr=narmstrong@baylibre.com; prefer-encrypt=mutual; keydata= mQENBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAG0KE5laWwgQXJtc3Ryb25nIDxuYXJtc3Ryb25nQGJheWxpYnJlLmNvbT6JATsEEwEKACUC GyMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheABQJXDO2CAhkBAAoJEBaat7Gkz/iubGIH/iyk RqvgB62oKOFlgOTYCMkYpm2aAOZZLf6VKHKc7DoVwuUkjHfIRXdslbrxi4pk5VKU6ZP9AKsN NtMZntB8WrBTtkAZfZbTF7850uwd3eU5cN/7N1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pdeSp5K+LdaNyNgaqzMOtt4HYk86LYLSHfFXywdlbGrY9+TqiJ+ZVW4trmui NIJCOku8SYansq34QzYM0x3UFRwff+45zNBEVzctSnremg1mVgrzOfXU8rt+4N1b2MxorPF8 619aCwVP7U16qNSBaqiAJr4e5SNEnoAq18+1Gp8QsFG0ARY8xp+qaKBByWES7lRi3QbqAKZf yOHS6gmYo9gBmuAhc65/VtHMJtxwjpUeN4Bcs9HUpDMDVHdfeRa73wM+wY5potfQ5zkSp0Jp bxnv/cRBH6+c43stTffprd//4Hgz+nJcCgZKtCYIAPkUxABC85ID2CidzbraErVACmRoizhT KR2OiqSLW2x4xdmSiFNcIWkWJB6Qdri0Fzs2dHe8etD1HYaht1ZhZ810s7QOL7JwypO8dscN KTEkyoTGn6cWj0CX+PeP4xp8AR8ot4d0BhtUY34UPzjE1/xyrQFAdnLd0PP4wXxdIUuRs0+n WLY9Aou/vC1LAdlaGsoTVzJ2gX4fkKQIWhX0WVk41BSFeDKQ3RQ2pnuzwedLO94Bf6X0G48O VsbXrP9BZ6snXyHfebPnno/te5XRqZTL9aJOytB/1iUna+1MAwBxGFPvqeEUUyT+gx1l3Acl ZaTUOEkgIor5losDrePdPgE= Organization: Baylibre Message-ID: Date: Thu, 5 Nov 2020 09:46:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On 05/11/2020 08:53, Linus Walleij wrote: > Hi Neil, > > this is just a drive-by question and I'm looping in Todd in the hopes for > a discussion or clarification. > > On Fri, Oct 30, 2020 at 3:37 PM Neil Armstrong wrote: > >> The GE2D is a 2D accelerator with various features like configurable blitter >> with alpha blending, frame rotation, scaling, format conversion and colorspace >> conversion. >> >> The driver implements a Memory2Memory VB2 V4L2 streaming device permitting: >> - 0, 90, 180, 270deg rotation >> - horizontal/vertical flipping >> - source cropping >> - destination compositing >> - 32bit/24bit/16bit format conversion >> >> This adds the support for the GE2D version found in the AXG SoCs Family. > > We are starting to see a bunch of these really nicely abstracted blitters > and other 2D-accelerators now. The actual blitting functionality is limited to non-alpha blitting since no standard CID are available for this, but we could totally try to find common CIDs to describe the possible Alpha Blending properties for these 2D accelerators. > > Is stuff like Android going to pick up and use this to blit and blend > generic buffers? I'm not sure this is Google's plan right now, but maybe it should be doable. > > Or is this in essence a camera and/or video out accelerator thing? No it's really a blitter & scaler, rotate & format converter, like the samsung and rockhip drivers, and somehow the allwinner rotate driver. Amlogic mainly uses it to copy frames beeing displayed for encoding, or to convert frames from the HDMI RX on their TV SoCs. > > The placement of this driver in drivers/media makes me think that > it is for cameras or video output, but the functionality is actually > quite generic. It's really a memory-2-memory driver, like the video codecs, it's a separate class than the camera & video output drivers. > > I've been half-guessing that userspace like Android actually mostly > use GPUs to composit their graphics, but IIUC this can sometimes be > used for 2D compositing, and when used will often be quicker and/or > more energy efficient than using a GPU for the same task. Well drm-hwcomposer can already use the DRM universal planes and the virtual writeback connector when available for compositing. But this kind of driver can be really useful for display rotation for example when the DRM driver doesn't support it. Honestly I don't understand the Android graphics stack enough to formally answer this question, but if it can be used, this kind of driver is much faster and much simpler than a GPU for simple blitting and rotation. And since they support DMA-BUF, they can totally be used in a modern graphics pipeline. Maybe someone could answer ? Maybe drm-hwcomposer could be extended for that ? I know there is an issue opened in GloDroid for that: https://github.com/GloDroid/glodroid_manifest/issues/66 For the record, I use this driver to accelerate the LVGL flush to display on the AXG SoCs lacking a GPU, this by using DMA-BUF and DRM atomic modesetting with the DRM LVGL display driver I submitted (and tweaked for V4L2 M2M): https://github.com/lvgl/lv_drivers/blob/master/display/drm.c Neil > > Yours, > Linus Walleij >