From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Martina Krasteva <martinax.krasteva@linux.intel.com>
Cc: linux-media@vger.kernel.org, mchehab@kernel.org,
robh+dt@kernel.org, devicetree@vger.kernel.org,
daniele.alessandrelli@linux.intel.com,
paul.j.murphy@linux.intel.com,
gjorgjix.rosikopulos@linux.intel.com
Subject: Re: [PATCH 06/10] media: Keem Bay Camera: Add ISP sub-device
Date: Fri, 9 Apr 2021 11:31:49 +0300 [thread overview]
Message-ID: <20210409083149.GF3@paasikivi.fi.intel.com> (raw)
In-Reply-To: <20210319180632.585-7-martinax.krasteva@linux.intel.com>
Hi Martina,
On Fri, Mar 19, 2021 at 06:06:28PM +0000, Martina Krasteva wrote:
...
> +/**
> + * kmb_cam_xlink_alloc_channel - Allocate xlink camera channel id
> + * @xlink_cam: Pointer to xlink camera handle
> + *
> + * Each xlink channel (except main control) should have unieque id
> + *
> + * Return: Channel id, negative error otherwise
> + */
> +int kmb_cam_xlink_alloc_channel(struct kmb_xlink_cam *xlink_cam)
> +{
> + int chan_id;
> +
> + chan_id = ida_alloc_range(&xlink_cam->channel_ids,
> + KMB_CAM_XLINK_CHAN_ID_BASE,
> + U16_MAX, GFP_KERNEL);
return ida_alloc_range(...);
> +
> + return chan_id;
> +}
...
> +
> +/**
> + * struct kmb_video_fh - KMB video file handler
> + * @fh: V4L2 file handler
> + * @kmb_vid: Pointer to KMB video device
> + * @lock: Mutex serializing access to fh
> + * @vb2_lock: Mutex serializing access to vb2 queue
> + * @vb2_q: Video buffer queue
> + * @active_fmt: Active format
> + @pix: Mplane active pixel format
> + @info: Active kmb format info
@active_fmt.info: ...
etc.
> + * @contiguous_memory: Flag to enable contiguous memory allocation
> + * @dma_queue: DMA buffers queue
> + * @thread: Pointer to worker thread data
> + */
> +struct kmb_video_fh {
> + struct v4l2_fh fh;
> + struct kmb_video *kmb_vid;
> + struct mutex lock; /* Lock protecting fh operations */
> + struct mutex vb2_lock; /* Lock protecting video buffer queue */
> + struct vb2_queue vb2_q;
> + struct {
> + struct v4l2_pix_format_mplane pix;
> + const struct kmb_video_fmt_info *info;
> + } active_fmt;
> + bool contiguous_memory;
> + struct list_head dma_queue;
> + struct task_struct *thread;
> +};
> +
> +int kmb_video_init(struct kmb_video *kmb_vid, const char *name);
> +void kmb_video_cleanup(struct kmb_video *kmb_vid);
> +
> +int kmb_video_register(struct kmb_video *kmb_vid,
> + struct v4l2_device *v4l2_dev);
> +void kmb_video_unregister(struct kmb_video *kmb_vid);
> +
> +#endif /* KEEMBAY_VIDEO_H */
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2021-04-09 8:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 18:06 [PATCH 00/10] Keem Bay Camera Subsystem Martina Krasteva
2021-03-19 18:06 ` [PATCH 01/10] dt-bindings: media: Add bindings for Keem Bay Camera Martina Krasteva
2021-03-19 21:49 ` Rob Herring
2021-03-19 18:06 ` [PATCH 02/10] media: Keem Bay Camera: Keem Bay camera driver Martina Krasteva
2021-03-19 18:06 ` [PATCH 03/10] media: Keem Bay Camera: Add VPU camera interface Martina Krasteva
2021-04-09 12:01 ` Sakari Ailus
2021-04-09 14:39 ` Martina Krasteva
2021-03-19 18:06 ` [PATCH 04/10] uapi: Keem Bay ISP Parameters data types Martina Krasteva
2021-03-19 20:58 ` kernel test robot
2021-03-22 13:32 ` Sakari Ailus
2021-03-19 18:06 ` [PATCH 05/10] media: v4l: Add Keem Bay Camera meta buffer formats Martina Krasteva
2021-03-22 18:27 ` Sakari Ailus
2021-03-24 17:20 ` Rosikopulos, GjorgjiX
2021-03-24 17:23 ` Rosikopulos, GjorgjiX
2021-03-19 18:06 ` [PATCH 06/10] media: Keem Bay Camera: Add ISP sub-device Martina Krasteva
2021-04-09 8:31 ` Sakari Ailus [this message]
2021-04-09 10:17 ` Martina Krasteva
2021-03-19 18:06 ` [PATCH 07/10] media: Keem Bay Camera: Add pipeline support Martina Krasteva
2021-03-19 18:06 ` [PATCH 08/10] media: Keem Bay Camera: Add capture video node Martina Krasteva
2021-04-09 14:32 ` Sakari Ailus
2021-03-19 18:06 ` [PATCH 09/10] media: Keem Bay Camera: Add metadata " Martina Krasteva
2021-04-09 10:24 ` Sakari Ailus
2021-04-09 14:19 ` Martina Krasteva
2021-04-09 14:36 ` 'Sakari Ailus'
2021-03-19 18:06 ` [PATCH 10/10] media: admin-guide: Add documentation for Keem Bay Camera Martina Krasteva
2021-04-16 9:37 ` [PATCH 00/10] Keem Bay Camera Subsystem Laurent Pinchart
2021-04-16 11:20 ` Rosikopulos, GjorgjiX
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=20210409083149.GF3@paasikivi.fi.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=daniele.alessandrelli@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=gjorgjix.rosikopulos@linux.intel.com \
--cc=linux-media@vger.kernel.org \
--cc=martinax.krasteva@linux.intel.com \
--cc=mchehab@kernel.org \
--cc=paul.j.murphy@linux.intel.com \
--cc=robh+dt@kernel.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).