From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE007C00A89 for ; Thu, 5 Nov 2020 08:49:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5F0EC2080D for ; Thu, 5 Nov 2020 08:49:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LXE2vlK0"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="WT0FzCo+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F0EC2080D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=H6iDLv+ECPYuXApXrTPN1hWlRdtMrtpADQvsOJlIXqs=; b=LXE2vlK0DIMyI3rpSiyaTqEZ9 RVV2K+gtg0FXnbJkfrrvFyBJ6Y5N+DGaIGkh0HeGSnCqcKsdAfr6eq0m8TPd/goqhh9k7dfxbhMan gymKu06/+pCG017eJE6ORR/oyLz0SDJ8+0DqU9d0lrqutkaLMag0hj7VwUecBDBZWQg7bX+fW5X5j X6mJqdZhGbDYz9zsZTzvuXx3Znt7fj7mnAEOzJbdpZTtQlTcxA8MpvZw0lyqGFSZF8AzUvaj65RKf PLIL7Jx+aDkgHqy5QP2PGdQgtzubQQw3jzmBcuR3K+02vJ+Pch9pEwXgLrJv02PWJuntvDNeztK/N KmeHrCaXQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaawm-0004kT-MU; Thu, 05 Nov 2020 08:48:44 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaawh-0004hu-Q8 for linux-arm-kernel@lists.infradead.org; Thu, 05 Nov 2020 08:48:41 +0000 Received: by mail-wm1-x344.google.com with SMTP id c9so724460wml.5 for ; Thu, 05 Nov 2020 00:48:33 -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=GIreJS+YijushVm7WuAGSjj2emj+eYQOkNEBH+2kRJFNUq/z/seiSJs1mf4VBNRf/w o4Js6CfDzDZdvs+dSJhZocI1Ru3Czra+rF/hrNeG1gBw+3E/RpZ3vzPXnZ0wV1cLsx+u Z2iTgcMnJizFlLQYhv+t0v/QtG42Ho+5RgPrjizUTjSjPVdtWYhYIJKeBGtiudeVzgf8 Ixb7Qpcx4QX72ZWUgqJpdvfNGj7t2Jw3m2PWip/Pji+3TRkiTC8ezljVrTt97zf5OE2h Ip2IgbQ6CjynZoHstX9O58gCJSMLRsBeWPo0LySg3ipP9TRribf22MH4QWPEoV8Io+m/ MXrA== X-Gm-Message-State: AOAM531DOE6AtUNGJ/kyfyWeMs8euMJ1Hr+aJbxvz1/A86KAM9/XGJFc GVrf6B0QouKwoE2HLKo/90Vwhw== X-Google-Smtp-Source: ABdhPJxR2MQzc0ZU6rTFw6KfIuUQz6VyBpLGVhqsuUKIQyoeReigUQZtyw2H7rWk9P1FJua3X/S1VQ== 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 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/7N1Q6g0JQihE7w4GlIkEpQ8vwSg5W7hkx3yQ6 2YzrUZh/b7QThXbNZ7xOeSEms014QXazx8+txR7jrGF3dYxBsCkotO/8DNtZ1R+aUvRfpKg5 ZgABTC0LmAQnuUUf2PHcKFAHZo5KrdO+tyfL+LgTUXIXkK+tenkLsA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QsFG0ARY8xp+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-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201105_034839_930197_789DFB86 X-CRM114-Status: GOOD ( 31.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-kernel@vger.kernel.org" , Hans Verkuil , John Stultz , "open list:ARM/Amlogic Meson..." , Roman Stratiienko , Linux ARM , Linux Media Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel