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=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 027F2C433DB for ; Mon, 22 Feb 2021 13:12:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A508364E29 for ; Mon, 22 Feb 2021 13:12:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230071AbhBVNL5 (ORCPT ); Mon, 22 Feb 2021 08:11:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbhBVNKg (ORCPT ); Mon, 22 Feb 2021 08:10:36 -0500 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEBBBC061574 for ; Mon, 22 Feb 2021 05:09:54 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id s11so21837711edd.5 for ; Mon, 22 Feb 2021 05:09:54 -0800 (PST) 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=NlW7XnTvf80UJ2UJ2BIr+dCpf/fNb2YhvZlxuKGK+8w=; b=iXJHz8iNMrs+0cRv74pIBMAisNBBDsB/6Sih+cPhatxrsQG8p2Y35qB/kZrmUNVj/b R3LDmXnBr4iWvHf7dvG6C30ShvtlOGvIZLdLdSVTCJ1KdsbXhAyU06fI1ccJnwV5wO4H xidhvUyRAPY8lDEH6+GQ2WFuFuxJAjORo0r/E= 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=NlW7XnTvf80UJ2UJ2BIr+dCpf/fNb2YhvZlxuKGK+8w=; b=hY4qs8QVxTEwLiphSocTgmw9VdwUFG6PBQZJ1gpqIoKHLCetB0PKV5f0/1IwFDjWu4 tDygv7rij+3AUFxMr824Tc0EW0a1pLYFqwDXlNIPP3jzwOVJbVt9IpK0S+suV3osS2KC 8nZpk/Ztwz9zOtiGECFHV9Eg9iZBiNHwRF0xEicIKmICJT3hGw/mE+qjmBp8yqp7qO94 oyGuOccu2Q5LR8ifHaNxF2jJxRjBhOUiPUDKU/Unw2imQ7X2RUdkv5nj8Wv/1lmDARpR ML50dMjg7+xhvZCrDLscbpw/hWFXzMQhebnfwOkp/IQQk6lbXlrNATSR6lUKLXltStUF iI/w== X-Gm-Message-State: AOAM532UTFgrjbFLzBOgNeikMHACXcpkHT1SbxVYm9sg36PgfB37Pn75 VOyMEbbIyxkN8/KdqONMSjEY1ilKP9goYA== X-Google-Smtp-Source: ABdhPJwemd2BKMwhjBtn8KBIv+d26G8PnzVHtMc8xlgUBgaf1yQHGhNRwVeQsTRKJz2Kpk37bRQIKQ== X-Received: by 2002:a50:da8b:: with SMTP id q11mr22912221edj.352.1613999393346; Mon, 22 Feb 2021 05:09:53 -0800 (PST) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com. [209.85.221.44]) by smtp.gmail.com with ESMTPSA id s18sm10313725ejc.79.2021.02.22.05.09.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Feb 2021 05:09:53 -0800 (PST) Received: by mail-wr1-f44.google.com with SMTP id l12so19024490wry.2 for ; Mon, 22 Feb 2021 05:09:53 -0800 (PST) X-Received: by 2002:a05:6402:445:: with SMTP id p5mr23004309edw.20.1613999018242; Mon, 22 Feb 2021 05:03:38 -0800 (PST) MIME-Version: 1.0 References: <20210121061804.26423-1-irui.wang@mediatek.com> <20210121061804.26423-3-irui.wang@mediatek.com> <1613804103.896.27.camel@mhfsdcap03> In-Reply-To: <1613804103.896.27.camel@mhfsdcap03> From: Alexandre Courbot Date: Mon, 22 Feb 2021 22:03:02 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] media: mtk-vcodec: Separating mtk encoder driver To: Irui Wang Cc: Hans Verkuil , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa , Hsin-Yi Wang , Maoguang Meng , Longfei Wang , Yunfei Dong , Linux Media Mailing List , devicetree , LKML , "moderated list:ARM/Mediatek SoC support" , srv_heupstream@mediatek.com, "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Sat, Feb 20, 2021 at 3:56 PM Irui Wang wrote: > > On Wed, 2021-02-03 at 19:44 +0900, Alexandre Courbot wrote: > > Hi Irui, > > > > Thanks for pushing this forward. I had two small conflicts when > > applying this patch to the media tree, so you may want to rebase > > before sending the next version. Please see the comments inline. > > > > On Thu, Jan 21, 2021 at 3:18 PM Irui Wang wrote: > > > > > > MTK H264 Encoder(VENC_SYS) and VP8 Encoder(VENC_LT_SYS) are two > > > independent hardware instance. They have their owner interrupt, > > > register mapping, and special clocks. > > > > > > This patch seperates them into two drivers: > > > > seperates -> separates > > > > Also the patch does not result in two drivers, but two devices. > > > > > User Call "VIDIOC_QUERYCAP": > > > H264 Encoder return driver name "mtk-vcodec-enc"; > > > VP8 Encoder return driver name "mtk-venc-vp8. > > > > I wonder if we need to use two different names? The driver is the > > same, so it makes sense to me that both devices return > > "mtk-vcodec-enc". Userspace can then list the formats on the CAPTURE > > queue in order to query the supported codecs. > > > I'm afraid we can't, there is a symlink when chrome use the > encoder(50-media.rules): > ATTR{name} == "mtk-vcodec-enc", SYMLINK+="video-enc" > ATTR{name} == "mtk-venc-vp8", SYMLINK+="video-enc0" > if we use the same name,how userspace access the encoder? maybe there > will be some modifications are needed in VEA(for example)? Chrome OS can use a different udev rule to differentiate the two nodes. Actually I already have a CL to support this: https://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/2673592 So both nodes being named the same won't be a problem for Chrome OS, and makes more sense for an upstream merge anyway. Cheers, Alex.