From: Dan Carpenter <dan.carpenter@linaro.org>
To: Changhuang Liang <changhuang.liang@starfivetech.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Ming Qian <ming.qian@nxp.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Benjamin Gaignard <benjamin.gaignard@collabora.com>,
Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>,
Mingjia Zhang <mingjia.zhang@mediatek.com>,
Jack Zhu <jack.zhu@starfivetech.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: Re: [PATCH v2 08/13] staging: media: starfive: Add for StarFive ISP 3A SC
Date: Thu, 11 Jan 2024 14:04:53 +0300 [thread overview]
Message-ID: <a761d936-4f46-41c8-b6f8-c1761eddd42f@moroto.mountain> (raw)
In-Reply-To: <20240111084120.16685-9-changhuang.liang@starfivetech.com>
On Thu, Jan 11, 2024 at 12:41:15AM -0800, Changhuang Liang wrote:
> Register ISP 3A "capture_scd" video device to receive statistics
> collection data.
>
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
> ---
> .../staging/media/starfive/camss/stf-buffer.h | 1 +
> .../staging/media/starfive/camss/stf-camss.c | 8 +
> .../media/starfive/camss/stf-capture.c | 21 ++-
> .../media/starfive/camss/stf-isp-hw-ops.c | 66 ++++++++
> .../staging/media/starfive/camss/stf-isp.h | 23 +++
> .../staging/media/starfive/camss/stf-video.c | 143 +++++++++++++++++-
> .../staging/media/starfive/camss/stf-video.h | 1 +
> 7 files changed, 254 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/media/starfive/camss/stf-buffer.h b/drivers/staging/media/starfive/camss/stf-buffer.h
> index 9d1670fb05ed..727d00617448 100644
> --- a/drivers/staging/media/starfive/camss/stf-buffer.h
> +++ b/drivers/staging/media/starfive/camss/stf-buffer.h
> @@ -23,6 +23,7 @@ enum stf_v_state {
> struct stfcamss_buffer {
> struct vb2_v4l2_buffer vb;
> dma_addr_t addr[2];
> + void *vaddr;
> struct list_head queue;
> };
>
> diff --git a/drivers/staging/media/starfive/camss/stf-camss.c b/drivers/staging/media/starfive/camss/stf-camss.c
> index a587f860101a..3175d0d9a05c 100644
> --- a/drivers/staging/media/starfive/camss/stf-camss.c
> +++ b/drivers/staging/media/starfive/camss/stf-camss.c
> @@ -126,6 +126,7 @@ static int stfcamss_of_parse_ports(struct stfcamss *stfcamss)
> static int stfcamss_register_devs(struct stfcamss *stfcamss)
> {
> struct stf_capture *cap_yuv = &stfcamss->captures[STF_CAPTURE_YUV];
> + struct stf_capture *cap_scd = &stfcamss->captures[STF_CAPTURE_SCD];
> struct stf_isp_dev *isp_dev = &stfcamss->isp_dev;
> int ret;
>
> @@ -150,6 +151,13 @@ static int stfcamss_register_devs(struct stfcamss *stfcamss)
>
> cap_yuv->video.source_subdev = &isp_dev->subdev;
>
> + ret = media_create_pad_link(&isp_dev->subdev.entity, STF_ISP_PAD_SRC_SCD,
> + &cap_scd->video.vdev.entity, 0, 0);
> + if (ret)
> + goto err_cap_unregister;
> +
Don't we need to do something like
media_entity_remove_links(&cap_yuv->video.vdev.entity);
as part of the cleanup? Also where do we clean up this new call to
media_create_pad_link() in the unregister process?
> + cap_scd->video.source_subdev = &isp_dev->subdev;
> +
> return ret;
>
> err_cap_unregister:
regards,
dan carpenter
next prev parent reply other threads:[~2024-01-11 11:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 8:41 [PATCH v2 00/13] Add ISP 3A for StarFive Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 01/13] media: starfive: Add JH7110 ISP module definitions Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 02/13] media: Documentation: Add description for StarFive ISP metadata formats Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 03/13] media: videodev2.h, v4l2-ioctl: Add StarFive ISP meta buffer format Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 04/13] staging: media: starfive: Add a params sink pad and a scd source pad for ISP Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 05/13] staging: media: starfive: Separate buffer from ISP hardware operation Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 06/13] staging: media: starfive: Separate buffer be a common file Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 07/13] staging: media: starfive: Separate ISP hardware from capture device Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 08/13] staging: media: starfive: Add for StarFive ISP 3A SC Changhuang Liang
2024-01-11 11:04 ` Dan Carpenter [this message]
2024-01-12 1:30 ` 回复: " Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 09/13] staging: media: starfive: Update ISP initialise config for 3A Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 10/13] staging: media: starfive: Add V4L2_CAP_IO_MC capability Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 11/13] staging: media: starfive: Add ISP params video device Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 12/13] staging: media: starfive: Add ISP parameters hardware configure Changhuang Liang
2024-01-11 8:41 ` [PATCH v2 13/13] admin-guide: media: Update documents for StarFive Camera Subsystem Changhuang Liang
2024-01-29 2:16 ` 回复: [PATCH v2 00/13] Add ISP 3A for StarFive Changhuang Liang
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=a761d936-4f46-41c8-b6f8-c1761eddd42f@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=benjamin.gaignard@collabora.com \
--cc=changhuang.liang@starfivetech.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jack.zhu@starfivetech.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=ming.qian@nxp.com \
--cc=mingjia.zhang@mediatek.com \
--cc=nicolas.dufresne@collabora.com \
--cc=tomi.valkeinen+renesas@ideasonboard.com \
/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
all inboxes | Powered by JetHome®