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=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 09BAFC433FE for ; Fri, 24 Sep 2021 07:55:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E6D6360F39 for ; Fri, 24 Sep 2021 07:55:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244513AbhIXH4z (ORCPT ); Fri, 24 Sep 2021 03:56:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244518AbhIXH4u (ORCPT ); Fri, 24 Sep 2021 03:56:50 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47533C061574 for ; Fri, 24 Sep 2021 00:55:17 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id i25so37194159lfg.6 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=lhonrOMKuxjqRlUDSf53Xo2jkNDRShggXzlh2WF5FV0s/PEfXNlfymEWqFd8UwEVyN Ag4EODKR5x11n/O6BCB71jCRj4tX+H9Sh2l/Xa9s46GzJHBi26wcY6iHGp/geV0D740X sl70D0/N1xPl07ujWaxjRvklMUs5zrT83n1ZzVl/2j9zJVTg9XDPbB0KVp1dpNA2gTGH TzY4ky40srrfTkpgMncASu1uiTd+wX8QLgjTb79MwWe217L0z5pBA6vpa3u1RkSwQ7E1 elFRkPlQ42f1i3NQNvl1PsbfbZAU0nbXfEuV5e9jwI6qlr301xaNck34wyHCG6/2xc6Y VMdw== X-Gm-Message-State: AOAM533XT3VG5hidywiH4qF1BWrOKuiWAlVazOdn9bvWVL7VutZOtx1Z 9GsXDOEybqGc76+fjVEMqkJtGQduS3fkw1cCvv/pS4TabYo= 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: linux-kernel@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 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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 99CAEC433F5 for ; Fri, 24 Sep 2021 07:55:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5995060E08 for ; Fri, 24 Sep 2021 07:55:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5995060E08 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=m/PTxQ/JpEwMdVhXgzhj65R0BC4Xau+rskLiHFZFEQw=; b=ySfE/Q1xdp257L demzPrwkJL4/fVOKZfa+44kncNVdNYZShbK+uyk7/78j5P18tpbtc0m8VSztCKY/zpwO2kO9ohsf/ e8/sKFTLGB5PEOS0prUa3G2L91vSuoNp5QOGrDDYHIDpCxlLgFCXJqFqzD5ZzNPH5QSFUED5ElUvm BsrttSUhPrfHjkeWJT/WE8fRIGwDAQTccTRuA3iQvXvbvZ4Y742OhKuoS4Ihhyw8w+Nt5DgVIFL7D 1hloedZeEjlWoPg1fTneNziLYSUpbG5MvVOQOD8KnlXT5DwR5XXF3NqBWY52Bd5r/2xPHJUe4bNUO JWqnu2X3RphjHmWPaiTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTg3G-00DQ1V-HD; Fri, 24 Sep 2021 07:55:22 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTg3C-00DPzc-MM for linux-mediatek@lists.infradead.org; Fri, 24 Sep 2021 07:55:20 +0000 Received: by mail-lf1-x12a.google.com with SMTP id x27so36922595lfu.5 for ; Fri, 24 Sep 2021 00:55:16 -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=JWbG+TGHYOHT229MnuTix3PywKrbeUDt3jNITWJLcbyQg0dw5s3PM2hsbJdhHMrBHC +OEIlthUVX/Wp6uSTIT1ey8e2yXUqIYur9Ucn/aN+MiVd2ivmFMu7VyPSr+fUMRAr56l 5wFDd93PgpCsgLDQA9yd14jgl5zAAuF70kQHniXNjLpyY86Cc36UGgqht+WnCOuowsiI 3w9aUx6Yj4LVBpBcx4/9qIL9QZTmnX3CdoQjYjpFM+tGoGyyMqMFi5wGTkbVdAONE36G BSDuqShBsfM/mTElyIoP2kTG3iLrc2oOkybW9vD848rujwicgWeayeeFINwu6NJTgNk0 VnvA== X-Gm-Message-State: AOAM532UEJR94wZQl8b4iTNsxurLgZS1y2K5xz6gAtmlrmo5hjJV+gHS wmz23vsp6fipxQ0AuVj3egphCoQPLFcRQEWhRmclMg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210924_005518_737753_D9A87B67 X-CRM114-Status: GOOD ( 25.22 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.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 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek 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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 41AD3C433F5 for ; Fri, 24 Sep 2021 07:56:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 F210360F13 for ; Fri, 24 Sep 2021 07:56:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F210360F13 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+lvNhiKUn2OKAx2h1tjCmzd5J3+7qkpWhJXmOQLGsV4=; b=il9rTdJyR638Oj RPZfrUQcJ8kLA/fFVFnx45qYPcrnRWj50UJCEWY8rD8NziwbPae7gAxoq7iZ4KLVSa8+lU6+LVEer Drq8g/4EkaMWdV1zQiKC0QA906ax5lWOL6xmJNeyUgkexbDEtV8yPmEMDoeDSgropepUQSwhnM8hK yaOakAMSH0Q7NGw9oa2YAIaAVE/oH4oiGNX7XzUlmRvAfX3uUMrdZYmG7dLO4J2TN1K5oBh3aLD0g UqlfpzZyRnoH8rbXOmRx2J0nPFkcCOkrvj1wWMklWZXnMB58AaTKO4h143Gw8DmPHCeV50UE6WP8O 2QZpeDQVUjqjC5fgFO4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTg3I-00DQ1o-Go; Fri, 24 Sep 2021 07:55:24 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTg3D-00DQ0Z-PX for linux-arm-kernel@lists.infradead.org; Fri, 24 Sep 2021 07:55:21 +0000 Received: by mail-lf1-x12f.google.com with SMTP id t10so36877492lfd.8 for ; Fri, 24 Sep 2021 00:55:19 -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=xee5fdu6MBxoJwu9gRXg6hsM7ip+4Shxs/3MPDGfhCY8pvvVYmnZ5uKzlgmPHlx3GG xo1ZSX+gfnldGpl4Q6G7R/kKuJpxuPOeQL5r9Fe9sGyUYcsTJRyzfopyKk3d3ZLeGD/u Ir1NtgZsyn4FpdH/G7ujNw936/GufdMPmo6smREHwpdUm+7FRIJai4ad8EuDquKdfxdS UiaffDoT92xFKY2Rbc1qbMdBi2LJWPwlav2pxfxpsc+SQ2pYWKxMwHi9tn6w8k02c6P/ MqGQLnA6bswx5zmpWLeqo/L7TTEk//LBR/h8CrUPgoNBgaSE+hBp6lkHjU1moT+f56kQ zQpA== X-Gm-Message-State: AOAM532X1jEwXNSoLXopYG8L6RMk7Fz8Dt+Pt9gq2y+xPV00+l3UN8CD /9IoW82HXx1Vxq8d0HXZSDWm3FLDl3TVN5rKdUO8Nw== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210924_005519_838370_B2AF32F6 X-CRM114-Status: GOOD ( 26.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel