From: Jungo Lin <jungo.lin@mediatek.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: "Sean Cheng (鄭昇弘)" <Sean.Cheng@mediatek.com>,
"Frederic Chen" <frederic.chen@mediatek.com>,
"Rynn Wu (吳育恩)" <Rynn.Wu@mediatek.com>,
"Christie Yu (游雅惠)" <christie.yu@mediatek.com>,
srv_heupstream@mediatek.com,
"Holmes Chiou (邱挺)" <holmes.chiou@mediatek.com>,
"Jerry-ch Chen" <Jerry-ch.Chen@mediatek.com>,
yuzhao@chromium.org, "Sj Huang" <sj.huang@mediatek.com>,
"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
linux-mediatek@lists.infradead.org, zwisler@chromium.org,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"list@263.net:IOMMU DRIVERS <iommu@lists.linux-foundation.org>,
Joerg Roedel <joro@8bytes.org>,
" <linux-arm-kernel@lists.infradead.org>,
"Linux Media Mailing List" <linux-media@vger.kernel.org>
Subject: Re: [RFC PATCH V0 7/7] [media] platform: mtk-isp: Add Mediatek ISP Pass 1 driver
Date: Fri, 22 Mar 2019 08:17:57 +0800 [thread overview]
Message-ID: <1553213877.7066.16.camel@mtksdccf07> (raw)
In-Reply-To: <CAAFQd5C=dmoUU9=FdkaeErSFVpA--uFZJ0P1jrb3DTXFZ_tdpg@mail.gmail.com>
On Thu, 2019-03-21 at 12:48 +0900, Tomasz Figa wrote:
> On Tue, Mar 12, 2019 at 5:16 PM Jungo Lin <jungo.lin@mediatek.com> wrote:
> >
> > On Thu, 2019-03-07 at 19:04 +0900, Tomasz Figa wrote:
> [snip]
> > > > +struct mtk_cam_mem2mem2_device {
> > > > + const char *name;
> > > > + const char *model;
> > >
> > > For both of the fields above, they seem to be always
> > > MTK_CAM_DEV_P1_NAME, so we can just use the macro directly whenever
> > > needed. No need for this indirection.
> > >
> >
> > OK. These two fields will be removed in next patch.
> >
> > > > + struct device *dev;
> > > > + int num_nodes;
> > > > + struct mtk_cam_dev_video_device *nodes;
> > > > + const struct vb2_mem_ops *vb2_mem_ops;
> > >
> > > This is always "vb2_dma_contig_memops", so it can be used directly.
> > >
> >
> > Ditto.
> >
> > > > + unsigned int buf_struct_size;
> > >
> > > This is always sizeof(struct mtk_cam_dev_buffer), so no need to save
> > > it in the struct.
> > >
> >
> > Ditto.
> >
> > > > + int streaming;
> > > > + struct v4l2_device *v4l2_dev;
> > > > + struct media_device *media_dev;
> > >
> > > These 2 fields are already in mtk_cam_dev which is a superclass of
> > > this struct. One can just access them from there directly.
> > >
> >
> > Ditto.
> >
> > > > + struct media_pipeline pipeline;
> > > > + struct v4l2_subdev subdev;
> > >
> > > Could you remind me what was the media topology exposed by this
> > > driver? This is already the second subdev I spotted in this patch,
> > > which looks strange.
> > >
> >
> >
> > For sub-device design, we will remove the sub-device for CIO and keep
> > only one sub-device for ISP driver in next patch. We will also provide
> > the media topology in RFC v1 patch to clarify.
> >
> > > > + struct media_pad *subdev_pads;
> > > > + struct v4l2_file_operations v4l2_file_ops;
> > > > + const struct file_operations fops;
> > > > +};
> > >
> > > Given most of the comments above, it looks like the remaining useful
> > > fields in this struct could be just moved to mtk_cam_dev, without the
> > > need for this separate struct.
> > >
> >
> > This is the final revision for these two structures.
> > Do you suggest to merge it to simplify?
> >
> > struct mtk_cam_mem2mem2_device {
> > struct mtk_cam_video_device *nodes;
> > struct media_pipeline pipeline;
> > struct v4l2_subdev subdev;
> > struct media_pad *subdev_pads;
> > };
> >
> > struct mtk_cam_dev {
> > struct platform_device *pdev;
> > struct mtk_cam_video_device mem2mem2_nodes[MTK_CAM_DEV_NODE_MAX];
> > struct mtk_cam_mem2mem2_device mem2mem2;
> > struct mtk_cam_io_connection cio;
> > struct v4l2_device v4l2_dev;
> > struct media_device media_dev;
> > struct mtk_cam_ctx ctx;
> > struct v4l2_async_notifier notifier;
> > };
> >
>
> I feel like there is not much benefit in having this split. Similarly,
> I'm not sure if there is a reason to have separate structs for
> mtk_cam_io_connection and mtk_cam_ctx.
>
> (Sorry, missed this one in previous reply.)
>
> Best regards,
> Tomasz
Ok, agree your comment.
We will remove both mtk_cam_io_connection and mtk_cam_ctx and
merge those fields into mtk_cam_dev.
Thanks for your suggestion.
Best regards,
Jungo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-03-22 0:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-05 6:42 [RFC PATCH V0 0/7] media: platform: Add support for ISP Pass 1 on mt8183 SoC Frederic Chen
2019-02-05 6:42 ` [RFC PATCH V0 1/7] [media] dt-bindings: mt8183: Add binding for ISP Pass 1 shared memory Frederic Chen
2019-02-05 6:42 ` [RFC PATCH V0 2/7] dts: arm64: mt8183: Add ISP Pass 1 shared memory node Frederic Chen
2019-02-05 6:42 ` [RFC PATCH V0 3/7] [media] dt-bindings: mt8183: Added CAM-SMEM dt-bindings Frederic Chen
2019-02-05 6:42 ` [RFC PATCH V0 4/7] [media] dt-bindings: mt8183: Added camera ISP Pass 1 dt-bindings Frederic Chen
2019-02-05 6:42 ` [RFC PATCH V0 5/7] dts: arm64: mt8183: Add ISP Pass 1 nodes Frederic Chen
2019-02-05 6:42 ` [RFC PATCH V0 6/7] media: platform: Add Mediatek ISP Pass 1 driver KConfig Frederic Chen
[not found] ` <1549348966-14451-8-git-send-email-frederic.chen@mediatek.com>
2019-02-13 9:50 ` [RFC PATCH V0 7/7] [media] platform: mtk-isp: Add Mediatek ISP Pass 1 driver Tomasz Figa
2019-02-17 2:56 ` Jungo Lin
2019-02-19 8:51 ` Tomasz Figa
2019-02-20 7:31 ` Jungo Lin
2019-03-21 3:33 ` Tomasz Figa
2019-03-22 0:00 ` Jungo Lin
2019-03-07 10:04 ` Tomasz Figa
2019-03-12 8:16 ` Jungo Lin
2019-03-21 3:45 ` Tomasz Figa
2019-03-22 0:13 ` Jungo Lin
2019-03-21 3:48 ` Tomasz Figa
2019-03-22 0:17 ` Jungo Lin [this message]
2019-03-12 10:04 ` Tomasz Figa
2019-03-13 6:54 ` Jungo Lin
2019-03-21 3:59 ` Tomasz Figa
2019-03-22 2:20 ` Jungo Lin
2019-03-25 7:12 ` Tomasz Figa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1553213877.7066.16.camel@mtksdccf07 \
--to=jungo.lin@mediatek.com \
--cc=Jerry-ch.Chen@mediatek.com \
--cc=Rynn.Wu@mediatek.com \
--cc=Sean.Cheng@mediatek.com \
--cc=christie.yu@mediatek.com \
--cc=frederic.chen@mediatek.com \
--cc=hans.verkuil@cisco.com \
--cc=holmes.chiou@mediatek.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=sj.huang@mediatek.com \
--cc=srv_heupstream@mediatek.com \
--cc=tfiga@chromium.org \
--cc=yuzhao@chromium.org \
--cc=zwisler@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).