Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp159888pxb; Mon, 8 Nov 2021 11:26:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdZFC5OBtSnRG6c2YuTDQWlOmn8aoJjLemdd9spcW+KkXRF95O9MXL9NwmRO6NhZsZhsXO X-Received: by 2002:a05:6602:2d8e:: with SMTP id k14mr582746iow.18.1636399578656; Mon, 08 Nov 2021 11:26:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636399578; cv=none; d=google.com; s=arc-20160816; b=tgS32C2oYVfdg8kjgI7gV5+WAJsxeBT5ttqk5LlniHIPjU4MHchBxTsYtx8JPC1js0 fiQikLJSpwJAwJGXXv7YAkmFJbMRQoVZUvylrvRfGYNAVtwGPCj8RU9DpwNde12h6/tg aVXpJcBfgAVOoWj+/UxBIfkokr6aAWtZ6eGg2WCog0eTpRGypefp0fhC/JwdZxt1k9lR hMKj9OcwBUY70ZwPU5T3CE9FCMZl1Y4ASMSoSx/5S9Vb69CI4xm4XB2+NvuWuYfd4vJ9 eGNjndBnnHMMLYR8Tdyt/Epa9seVBk+Zog+eyO0t7L028N8i09nOqfq4tV0hamUXLG/1 uF3g== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=JirAXSflDjIcMAeazdVpY/4xA41IlCAY04BXmE2ZYQM=; b=l9jfD+7sWKKDzej89heDxofa8gTeB4y5KQepVlp0Pbf155lKwx/gqokmTyJS+L0f58 RK/CmGJD8v+7pd+Vkf7qWfE7jhkvxr7+wDpzIUUgUkV1qzrAnF0c/YphB1cCeXzHnB+S +XqwxLn58i6JjkgM/He3kdI5HndGBoZNseyPIDkcWR/c2RSDhiDlmDtyKuiGK+Wmj9XQ 4InvRKutxZwmoW78pxdH+Djt3NWNBK8ceM0DYnCEfBy/XNhc8NQKUgA1vAdY8nxOJC2M ql9U7y7obw0gLRC2WjBgQfiJIYal6KtyKsbFK8yDxVWgK+t+3ND+9s+TkmOB13HQC31o rg5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20210112.gappssmtp.com header.s=20210112 header.b=HLXr25pR; 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 n13si26448714ili.85.2021.11.08.11.26.05; Mon, 08 Nov 2021 11:26:18 -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=@ndufresne-ca.20210112.gappssmtp.com header.s=20210112 header.b=HLXr25pR; 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 S239779AbhKHOB5 (ORCPT + 99 others); Mon, 8 Nov 2021 09:01:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235902AbhKHOB4 (ORCPT ); Mon, 8 Nov 2021 09:01:56 -0500 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D3C1C061714 for ; Mon, 8 Nov 2021 05:59:12 -0800 (PST) Received: by mail-qk1-x72f.google.com with SMTP id bi29so15502767qkb.5 for ; Mon, 08 Nov 2021 05:59:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=JirAXSflDjIcMAeazdVpY/4xA41IlCAY04BXmE2ZYQM=; b=HLXr25pRJ7+E8lT4ABwhuNFkxRYpRCgr7hswcSp5Lz4N+xi7/whjxmtqYGZ7KbEIEw Fcup+X6OvBpYzpNUAh6zyT5/m3AeG+K+iHjJJKNEWzKsYf8PqPGhUHfyUuESlLkiSda6 rMA9QOjK3uybOhJ3DKPAODHNWZQv0Y4hHdUTqW3DB7U7vLEYxfmp1SYgVU0MraHxjcFz 46eeeNtdwLRH2bFiCb2W/gNK7T99wdZm8vPf/VunOX7XX9iHY9N5ju5ZC+DVLn0Ps7nO jH1fVjmkejbUkdA4z95OSyqwjq127ae5Jja/zWqxhVrkP0wZUUrUATNA+nEQ352/GE/l Ud3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=JirAXSflDjIcMAeazdVpY/4xA41IlCAY04BXmE2ZYQM=; b=p6KEr3BVOflEIRLuJvs1z7sFSEiNVtRycpoBfLo+IyvIR82sKGo/CXQHvtmN7CVCRx keyys4lPZt9sUCbVBNHrNukm7RqpU8aQxmg0eDQPn7WkwxkgQbCLjv0udbHhrwio149X oIeQSA/jcqKMr+R0vFmRcQeL4vGNIXjyBOU1ZJE1XkqqklYSDGxEnlSkpvxy1hm1XBy3 fgkPHSsKQ8q15H91+kIwDtdifNjPlG1+2Ghrm0yQuIp/I3aBrOQYJaDh0osimsR3aBLJ WQGwksxHkOyE3X7S/QgfkQLeUEf5yHdGXWAdzyGKCK1+tT/aG/AYMAylRMoVTQolpg8Q HtTA== X-Gm-Message-State: AOAM530oXUhL6Bosi/BCK6Bwxn4XpeFxTXNR4H37DDLiYMKtS/XWsEKs nh5UAaVC+htad1aUwl5VAooHVg== X-Received: by 2002:a05:620a:448b:: with SMTP id x11mr39558492qkp.286.1636379951308; Mon, 08 Nov 2021 05:59:11 -0800 (PST) Received: from nicolas-tpx395.localdomain (173-246-12-168.qc.cable.ebox.net. [173.246.12.168]) by smtp.gmail.com with ESMTPSA id f7sm10082091qkp.107.2021.11.08.05.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 05:59:10 -0800 (PST) Message-ID: <718f7f6d6cd564d031c1963f1590c62d549ae725.camel@ndufresne.ca> Subject: Re: [RFC 0/5] arm64: imx8mm: Enable Hantro VPUs From: Nicolas Dufresne To: Adam Ford , linux-media@vger.kernel.org Cc: tharvey@gateworks.com, frieder.schrempf@kontron.de, marek.vasut@gmail.com, jagan@amarulasolutions.com, aford@beaconembedded.com, cstevens@beaconembedded.com, Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Greg Kroah-Hartman , Heiko Stuebner , Lucas Stach , Joakim Zhang , Alice Guo , Peng Fan , "open list:HANTRO VPU CODEC DRIVER" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , open list , "open list:STAGING SUBSYSTEM" Date: Mon, 08 Nov 2021 08:59:09 -0500 In-Reply-To: <20211106183802.893285-1-aford173@gmail.com> References: <20211106183802.893285-1-aford173@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.0 (3.42.0-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Adam, thanks for you work, I'll try and reply about the GStreamer questions below, if you have further question feel free to ask. Le samedi 06 novembre 2021 à 13:37 -0500, Adam Ford a écrit : > The i.MX8M has two Hantro video decoders, called G1 and G2 which appear > to be related to the video decoders used on the i.MX8MQ, but because of > how the Mini handles the power domains, the VPU driver does not need to > handle all the functions, so a new compatible flag is required. > > This is an RFC because I don't have functional video on my system yet, > and I'm hoping there might be people who do and can help test this. > I have only tested this far enough to see they enumerate and appear > as /dev/videoX and /dev/mediaX devices. I will check the patchset, but you need in the mini-variant to disable the G1 post processor, because this block was fused out. We didn't make it optional from the start as according to the V1 of the TRM it was there, but that error was corrected in V3. > > I am also curious to know if/what gstreamer plugins are necessary. In > NXP's custom kernel, there are IMX-specific plugins, and I was hoping there > would be more generic plugins that I can use to test. I am hoping some > of the linux-media experts might chime in on how to best test. I will recommend using GStreamer 1.19.3 or main branch (GStreamer is now a single git repo). You will then be able to test Hantro G1 decoding of MPEG2, H264 and VP8. Remember that the related plugin depends on libgudev (a glib binding of udev). For the encoder, I believe only JPEG maybe supported, since this is all there is mainline for RK3288 (and perhaps other RK). But this will need testing and debugging as the G1 version is slightly newer on NXP SoC. > > Lastly, I didn't update any device tree binding YAML files, because > I know there have been some discussions about the power domains on the > imx8mq, and I wasn't sure if the imx8mm should get a separate YAML file > or if the existing one for te imx8mq should just be modified. > > This will likely require the following series in order to apply correctly: > https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=576407 > > Adam Ford (5): > media: hantro: Add support for i.MX8M Mini > arm64: dts: imx8mm: Enable VPU-G1 and VPU-G2 > media: hantro: Rename ROCKCHIP_VPU_ENC_FMT to HANTRO_VPU_ENC_FMT > media: hantro: Add H1 encoder support on i.MX8M Mini > arm64: dts: imx8mm: Enable Hantro H1 Encoder > > arch/arm64/boot/dts/freescale/imx8mm.dtsi | 61 ++++++++ > drivers/staging/media/hantro/hantro_drv.c | 3 + > drivers/staging/media/hantro/hantro_hw.h | 19 ++- > drivers/staging/media/hantro/imx8m_vpu_hw.c | 143 ++++++++++++++++++ > .../staging/media/hantro/rockchip_vpu_hw.c | 26 ++-- > 5 files changed, 231 insertions(+), 21 deletions(-) >