Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp121683pxb; Thu, 2 Sep 2021 21:11:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBiLpwlrwpY4iINqmykdVHUYzw3IN3u7w0sTthN950w9XnAOgj4g+Y6wz3p7Avwzeq+GJa X-Received: by 2002:a6b:e410:: with SMTP id u16mr1496159iog.38.1630642316963; Thu, 02 Sep 2021 21:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630642316; cv=none; d=google.com; s=arc-20160816; b=rWgGX5tFHGXSqduT34vn3RSXHzS+aLgVQLbA7d7B1znyF+U66bTcHqpLj+9OdDPFBD ey9SF6hQKmwPRLbqGlv5dp/C6DB1yTCetzeyv/TXwfEYv4Xa0s6OSpAJXHk0bUkKyMoN 5o1RgExuizAXAH07bX1UmvlHlL4q+ezDLT7i0Ryz4P0TKudiEC45hM1eQ0vNb4c42rvq w/J0eCqeBFJMPAnLFPBQcn8p7aXQK9LhKiiOpNsR2HbcDtWd9AR56OAOH/lVgyYQ7dlf P53jFgi69+Sh+VDQvw0m7U3fFmkIZ+ygitBp5g1dyqJX7eaj4W04duvvqJi8745eJfT/ Jz5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=joW/G6DY+txuyPmVNEIlO2p6pd362DkeC8kCVshvDTc=; b=ZZpSdsg2t7cZbR6ZHYHpu3R6/YPz+ObNMqwGtBQo6cjcCxZDbNjl4jXP7pHPm1otJk hVmOIO3bHnEBC0QpmrqKT4lFRyRy9o1ihUcBL/NtZ1K8StCC5rBpjg/v/cKBlTJA9Zjj E5t6gfmaRJ9gpUsFfyIz/KndKMGxUGagGThVkYp8VYMBCm+bwUmCeXTv99TjAxTr9fDS 6fjC1GATzM/TbW9cXIPrya2kjSdheL9pFYK/K8XIQrx/D7bzmtDfyKfpCfYvPk2W8T5E JNO+JG+93Tdj1y1AHZqfBPbyFYzOJRAUpi9YKu3PkQ84tTYgN4XirSCX9N7PTgkUrlhB cE6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZIbvv2Mo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s11si3620967jat.52.2021.09.02.21.11.45; Thu, 02 Sep 2021 21:11:56 -0700 (PDT) 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=@chromium.org header.s=google header.b=ZIbvv2Mo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbhICEKr (ORCPT + 99 others); Fri, 3 Sep 2021 00:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbhICEKr (ORCPT ); Fri, 3 Sep 2021 00:10:47 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6C57C061757 for ; Thu, 2 Sep 2021 21:09:47 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id q21so7530641ljj.6 for ; Thu, 02 Sep 2021 21:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=joW/G6DY+txuyPmVNEIlO2p6pd362DkeC8kCVshvDTc=; b=ZIbvv2MoZCfOXe6LWEUxhC8fScArp+zt/1ot3m7EM6GACqj9dlCM7f5i4DhEqn8uYH d74b3ix3sflk7mxX6JPQVLBF7rgk4eCJy+wgpyUBhPBMnDB49i8UHC6Gxp//bkLuZ6OW 8hfk1vHOiK1XmbwACEuRIqpduzex9euGg7Wkg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=joW/G6DY+txuyPmVNEIlO2p6pd362DkeC8kCVshvDTc=; b=WDO/SXhmN66WiTQpvffqQJ5fKKaSYA2tClumCK7rGvrxrXAU7PYr17Er1iiOc3oseJ yp8DoHmfvrA7k3DUooGrNj1Mm/hKEwWD463PF4dusTjPtl8XFUyyPFTiYx2fRmfjSXL2 P/ntLbnJuV9ZJfPkUXqP8vHQCChMf8R71lVpVzM8E8yyIszQvPg03ohZcUmzceV+6SBY i2FD8QmAY8Bo8phN27t++zee7WvzwdrWM3NfkyGgHOVwrqJjekoGxnsh2riCOLymsqP0 MvFR811KSyi8VPuHc26hLsYEgpqMh80pK0Ro5b51xQ3zsxisloXl84HC5uI5aZIkwTBj DCrA== X-Gm-Message-State: AOAM530aK24AHV3qzHpC6d0teyafAMZRTQBPcNy3cQKqSKGNAy6nZReu JCiLu2adDUWu+Ypm2za7NWXyUCF41ESMIUno0vRUSw== X-Received: by 2002:a2e:b16a:: with SMTP id a10mr1352765ljm.18.1630642185751; Thu, 02 Sep 2021 21:09:45 -0700 (PDT) MIME-Version: 1.0 References: <20210901083215.25984-1-yunfei.dong@mediatek.com> In-Reply-To: From: Chen-Yu Tsai Date: Fri, 3 Sep 2021 12:09:34 +0800 Message-ID: Subject: Re: [PATCH v6, 00/15] Using component framework to support multi hardware decode To: Ezequiel Garcia Cc: Yunfei Dong , Alexandre Courbot , Hans Verkuil , Tzung-Bi Shih , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa , Laurent Pinchart , Daniel Vetter , dri-devel , Hsin-Yi Wang , Fritz Koenig , Irui Wang , linux-media , devicetree , Linux Kernel Mailing List , linux-arm-kernel , srv_heupstream , "moderated list:ARM/Mediatek SoC support" , Project_Global_Chrome_Upstream_Group Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 3, 2021 at 12:31 AM Ezequiel Garcia wrote: > > On Wed, 1 Sept 2021 at 05:32, Yunfei Dong wrote: > > > > This series adds support for multi hardware decode into mtk-vcodec, by first > > adding component framework to manage each hardware information: interrupt, > > clock, register bases and power. Secondly add core thread to deal with core > > hardware message, at the same time, add msg queue for different hardware > > share messages. Lastly, the architecture of different specs are not the same, > > using specs type to separate them. > > > > This series has been tested with both MT8183 and MT8173. Decoding was working > > for both chips. > > > > Patches 1~3 rewrite get register bases and power on/off interface. > > > > Patch 4 add component framework to support multi hardware. > > > > Patch 5 separate video encoder and decoder document > > > > Patches 6-15 add interfaces to support core hardware. > > ---- > > This patch dependents on : "media: mtk-vcodec: support for MT8183 decoder"[1] and > > "Mediatek MT8192 clock support"[2]. > > > > 1: Multi hardware decode is based on stateless decoder, MT8183 is the first time > > to add stateless decoder. Otherwise it will cause conflict. This patch will be > > accepted in 5.15[1]. > > > > 2: The definition of decoder clocks are in mt8192-clk.h, this patch already in clk tree[2]. > > > > [1]https://patchwork.linuxtv.org/project/linux-media/list/?series=5826 > > [2]https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/commit/?h=clk-next&id=f35f1a23e0e12e3173e9e9dedbc150d139027189 > > ---- > > Changes compared with v5: > > -Add decoder hardware block diagram for patch 13/15 > > > > > The discussion on v5 was still on-going, so sending this v6 > is not helpful. The context for v5's discussion is now harder to find. > > Please avoid sending a new version without properly > discussing all the feedback, and without reaching consensus. > This is very important, please keep it in mind. > > Specifically, the feedback on v5 was NAK, with the request to avoid > using any async framework, and instead try to find a simpler solution. > > For instance, you can model things with a bus-like pattern, > which ties all the devices together, under a parent node. > This pattern is common in the kernel, the parent > node can use of_platform_populate or similar > (git grep of_platform_populate, you will see plenty of examples). > > You will still have to do some work to have the proper > regs resources, but this is doable. Each child is a device, > so it can have its own resources (clocks, interrupts, iommus). AFAIK of_platform_populate doesn't guarantee the drivers actually probed (modules loaded late, missing modules, deferred probe, etc.), only that the devices are created, so you still need some sort of (async) mechanism to wait for the subdevices to be in operational state. Most of the examples using of_platform_populate are there to ensure that the parent device is operational before creating the sub-devices, not the other way around. ChenYu > You don't need any async framework. > > vcodec_dec: vcodec_dec@16000000 { > compatible = "mediatek,mt8192-vcodec-dec"; > reg = ; > mediatek,scp = <&scp>; > iommus = <&iommu0 M4U_PORT_L4_VDEC_MC_EXT>; > dma-ranges = <0x1 0x0 0x0 0x40000000 0x0 0xfff00000>; > > vcodec_lat@0x10000 { > compatible = "mediatek,mtk-vcodec-lat"; > reg = <0x10000 0x800>; /* VDEC_MISC */ > interrupts = ; > // etc > }; > > vcodec_core@0x25000 { > compatible = "mediatek,mtk-vcodec-core"; > reg = <0x25000 0x1000>; /* VDEC_CORE_MISC */ > interrupts = ; > // etc > }; > }; > > Thanks, > Ezequiel > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek