Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp541084pxb; Thu, 2 Sep 2021 09:34:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYbEvFtOFyRW3SxA6poZy2nPXvXOjlxBuVGSdmxiF37slFadkU5HVRqsxXzec5PgDSjPcj X-Received: by 2002:adf:9e0b:: with SMTP id u11mr4796314wre.85.1630600468206; Thu, 02 Sep 2021 09:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630600468; cv=none; d=google.com; s=arc-20160816; b=09XV2Xt/n+5hZKQxbutLYgRT9eEb34fJwUp6YQTe/teYdRvg/uJegtzFA2j4DxTFaO 4Wc4DmUrjw2M82svnw6+vt3v/kW1gTqo0luK2MXkWjbm68mNeD9dmK4XZ8IEatcy2Mjw MNd1Wl0bm8z56POb2+dBZCUHWrIlr1/LvMxXovW/cwFpc4UIXROoNeImp6TraX7s7NqL CUC78WrBxOXkZBZpw0vsDrPj/ftDUGTJFqoCu3bQ168dM9+G/5vFex2swg+ha7ZyQnN5 tFwMn2CuxCAMrQCT9VNQw9QXpp8ao0CpOjYwlb4RWcdQ1+70/9PbjzUFbQ5RlPUa5fKz vxYg== 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=USYcfZjcg7/rxlJ01qDkInwsA0jQO3CoE6DaEmLtMHw=; b=ReUO8x6ymcwwX8KSfDemyOr6WShINwSFQcOY39m1GC5/0Vh+NB7v/PuR9LmVPgifVK hpZAUlMbd4eMrqbCdkusy/QlFL5U4PDgTnobtfrxF2rD7EJu3OCrjFmUuWFs6R0+o/NA rxRahopnV93Ygn9GNwaY3b85QEy/b68+Z6UsoKM+dc/D8EiHy5sWykI1cz4R8dr24OT6 BejszBHHdGRbIWEdes+b6HLmDvXl/QryXcEUtSaZwlaxhUpobnTggV1WLLuX0qJxYYcO nBwta5EGFF6sPksZA9weePP6MrfsFOHwLSFh6GgCI9mzONBMJNSTNkp/OsrJj++Cszmd ZNXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=SDXUXUjm; 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 y17si2468664edc.166.2021.09.02.09.33.37; Thu, 02 Sep 2021 09:34:28 -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=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=SDXUXUjm; 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 S1346297AbhIBQb6 (ORCPT + 99 others); Thu, 2 Sep 2021 12:31:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346145AbhIBQb5 (ORCPT ); Thu, 2 Sep 2021 12:31:57 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C1C0C061575 for ; Thu, 2 Sep 2021 09:30:59 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id z19so3755745edi.9 for ; Thu, 02 Sep 2021 09:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=USYcfZjcg7/rxlJ01qDkInwsA0jQO3CoE6DaEmLtMHw=; b=SDXUXUjmEVYZVRMiOjlF6C4d8OElSn6OzwvpYK2P3+X6vbGGhNs3jl1Ah1E0/7xecX WWKAnRPN44pWc3rcAL4fQhmzfslDo5omfiE/1QZB2cYPVDj2K3bHJezEtHeyfh4cZlHb d8c+n71v8TI/B/n08wsJhylVzu1ptUpffH6Tj9cHySfMqmneUXvCAGax3A+ws/lnAOzo o7vHeWehks3XPV9NwG3j6PWL5/2PsZisukEAt1fEfETB+2q4LMGvOHld5BCtF9YHg0LS +TDuif9usO4s7ySKeqHgR01drPlO+/7cMmNeK7GuHBQiBM6gtzzq7oAPTXu1Grr4gx3+ C2QA== 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=USYcfZjcg7/rxlJ01qDkInwsA0jQO3CoE6DaEmLtMHw=; b=ZJCmkV/gbIUD2/0iAHrdoEovUCjvOR8Y3MvpD3GctSWrJfUfXj6+zUhQWx1mImuKf5 x9Il0MqYtwCsLPKzSVOg7jDDWyXpVyiawGBhNlyQDxkbl/iy4EKBjx0av+lYQKutQALm OqokiLMTDoNiDgoQ+qhl1181g+V/Gtlnb0DqvmIax9JhgdRLgIbF6hIFjAg0fGvkrpgs AQTRndCgOXkc+f9scgv+LHuPayWW+zJYJmtIdyZdXDcrcx6ShCWTcuTUDdy+meGsBByR xmeRRBl+7vg6URVJZLasQpIsed92UqaSvQ0P/16NQbSKACi3N1rUmu9bK/UBViqK2SFF TjbA== X-Gm-Message-State: AOAM533P8mwNCgn6gdvlBrj2mYoF4au77y8i8+ZPvALUkjYXUH696Idt /BsIgLa9DCAJ7WihY8WA/wD/tLwV4+M5PSDFQjOOOQ== X-Received: by 2002:aa7:d157:: with SMTP id r23mr4287441edo.322.1630600257783; Thu, 02 Sep 2021 09:30:57 -0700 (PDT) MIME-Version: 1.0 References: <20210901083215.25984-1-yunfei.dong@mediatek.com> In-Reply-To: <20210901083215.25984-1-yunfei.dong@mediatek.com> From: Ezequiel Garcia Date: Thu, 2 Sep 2021 13:30:46 -0300 Message-ID: Subject: Re: [PATCH v6, 00/15] Using component framework to support multi hardware decode To: Yunfei Dong Cc: 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 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). 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