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=-12.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 A6B39C433EF for ; Fri, 24 Sep 2021 07:55:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F54C60F39 for ; Fri, 24 Sep 2021 07:55:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244532AbhIXH4y (ORCPT ); Fri, 24 Sep 2021 03:56:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244519AbhIXH4u (ORCPT ); Fri, 24 Sep 2021 03:56:50 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5778EC061756 for ; Fri, 24 Sep 2021 00:55:17 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id e15so36898018lfr.10 for ; Fri, 24 Sep 2021 00:55:17 -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=JGmW9C+VJgClTUsrZKCeV0/J9rVWIZQmzpXvw/rQpIk=; b=Ahrt2ozoHr1F1XaGJc8UFWICEWx8gXzt2P8DnqE+76I7f+qcZ4PJLWcuYI7YYLRuRF 295dBHmchEjQ+f5oiSMLwpl0RZfub+JdzvYGDp7mjQ8AaIXLVPfVNgYDTMO7EVOxbxg1 dGIlLtwfrbge+SQVQC4xuZMPe1HxIqWieoegc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JGmW9C+VJgClTUsrZKCeV0/J9rVWIZQmzpXvw/rQpIk=; b=SIEmLVN8bhfaKwOZ6AZ6kAuAWxcet/xskTxEV9uY0chhpky9ymLrfQRCWSZWc406wS ifZ9Gvi3XW+DyC+C+F5vtVQPYwesG76vBnjg8KXo+dpGZ0/mzIJbVAqv2rAsW6dllDSe lv8oo9f0x2Pk0yoVEZnoF9aI4a+lTFudxvZlx7fMpinh5R50HVw8cLcsOb3musk20AcY n8GAquCAZy6HlybNgjeoMOtl7vMNU66gU6O43ZxmS2CB7yZWgOlhwi7UkA8Ap53U7Rcu qc0Hxd1oHgR43iN4kSz8N0UTQ5ah0ycSHFvVKRX4QgXf3nLXJc9Ye0qI9FIu8RZSBSZl nRgQ== X-Gm-Message-State: AOAM533QOw1bscXqIyPBXDhxm9SE1/AUmzWn2D/u6FVvaHvu7JXzVeQD +vqEABz9lDDYrOhdGCtz2n96XslFj/UpH5OBjeF/2g== X-Google-Smtp-Source: ABdhPJzkFv7HLV5oiZBfchGG412aWLIODM5Pu3aEuCwVKvIU5JXdh28L0/JBma6qNUvVyNbpJPJPjk4Mep/rE15SXIc= X-Received: by 2002:a05:651c:1505:: with SMTP id e5mr9964384ljf.9.1632470115670; Fri, 24 Sep 2021 00:55:15 -0700 (PDT) MIME-Version: 1.0 References: <1632469543-27345-1-git-send-email-kyrie.wu@mediatek.com> In-Reply-To: <1632469543-27345-1-git-send-email-kyrie.wu@mediatek.com> From: Chen-Yu Tsai Date: Fri, 24 Sep 2021 15:55:04 +0800 Message-ID: Subject: Re: [PATCH V4,0/5] Support jpeg encoder for MT8195 To: "kyrie.wu" Cc: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Tomasz Figa , Matthias Brugger , Tzung-Bi Shih , Project_Global_Chrome_Upstream_Group , Linux Media Mailing List , Devicetree List , LKML , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "moderated list:ARM/Mediatek SoC support" , xia.jiang@mediatek.com, Maoguang Meng , srv_heupstream , Irui Wang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Fri, Sep 24, 2021 at 3:46 PM kyrie.wu wrote: > > MT8195 has two jpeg encoding HW, each one has its own > power-domain, clock, interrupt, register base. > The two jpeg encoding HW can work together to > achieve higher performance. > > Generally, one HW needs to register one device node, > and the APP operates the HW through the device node. > If there are multiple HWs, the multiple device node > needs to be registered. At this time, the app needs > to design software logic to use multiple HWs in parallel, > which will undoubtedly increase the difficulty of > app development and weaken its compatibility. > > These serial patches use the component framework > to achieve the purpose of using multiple HWs > through only one device node. About the component > framework Block Diagram, please check below: > > Master(device node) > ________|_________________________ > | | | > component0(HW0) component1(HW1) component2(HW2) ...... > > As above, the component framework is similar to a > master-component two level architecture. > Both master and component have the compatible > attribute in the device tree, and the corresponding > platform driver structure is defined in the driver. > Therefore, when the compatible attribute matches, > the corresponding probe function will be called. > > In the probe function of component, operations > such as initialization clock, remmap register base, > registration interrupt will be performed. > And add the component to a component linked > list to find the corresponding master. > > In the probe function of the master, the device > node will be registered, and the master will be > added to a master linked list to find the > corresponding component. > > After the master matches the component, > it will obtain the clock, interrupt, register base > and other resources in the component, > and operate the HW through these resources. > At the same time, multiple HWs software function > interfaces are designed in the master driver. Please include a changelog with your cover letter (or in each patch). This is the fourth version of the series, and it's unclear what has changed between the versions. ChenYu > kyrie.wu (5): > dt-bindings: mediatek: Add mediatek, mt8195-jpgenc compatible > media: mtk-jpegenc: Use component framework to manage each hardware > media: mtk-jpegenc: add jpegenc timeout func interface > media: mtk-jpegenc: add jpeg encode worker interface > media: mtk-jpegenc: add output pic reorder interface > > .../bindings/media/mediatek-jpeg-encoder.yaml | 3 + > drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 395 ++++++++++++++++++--- > drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h | 79 +++++ > drivers/media/platform/mtk-jpeg/mtk_jpeg_enc_hw.c | 298 ++++++++++++++++ > 4 files changed, 730 insertions(+), 45 deletions(-) > > -- > 2.6.4 > > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek