linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] media: camss: sm8250: Virtual channels support for SM8250
@ 2022-09-26 14:25 quic_mmitkov
  2022-09-26 14:25 ` [PATCH 1/4] media: camss: sm8250: Virtual channels for CSID quic_mmitkov
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: quic_mmitkov @ 2022-09-26 14:25 UTC (permalink / raw)
  To: linux-media, linux-arm-msm, robert.foss, akapatra, jzala, todor.too
  Cc: agross, bjorn.andersson, konrad.dybcio, mchehab, bryan.odonoghue,
	Milen Mitkov

From: Milen Mitkov <quic_mmitkov@quicinc.com>

These patches add support for multiple CSID virtual channels for 
Qualcomm's SM8250 platform.

Changed for v2:
- code syntax improvements
- The info print for enabled channels was demoted to a dbg print. Can be
  enabled with dynamic debug, e.g.:
echo "file drivers/media/platform/qcom/camss/* +p" > /sys/kernel/debug/dynamic_debug/control

NOTE: These changes depend on the multistream series that as of yet is
still not merged officially upstream. The multistream changes
allow for multiple clients on the same pipeline, which is otherwise not
possible. For development and testing multistream series v14 was used:

https://patchwork.kernel.org/project/linux-media/patch/20220831141357.1396081-2-tomi.valkeinen@ideasonboard.com/

The CSID hardware on SM8250 can demux the input data stream into
maximum of 4 multiple streams depending on virtual channel (vc)
or data type (dt) configuration.

Situations in which this is useful:
- HDR sensors that produce a 2-frame HDR output, e.g. a light and a dark frame
  (the setup we used  for testing, with the imx412 sensor),
  or a 3-frame HDR output - light, medium-lit, dark frame.
- sensors with additional metadata that is streamed over a different
  virtual channel/datatype.
- sensors that stream frames with multiple resolutions in the same pixel
  data stream

With these changes, the CSID entity has, as it did previously, a single
sink port (0), and always exposes 4 source ports (1, 2,3, 4). The
virtual channel configuration is determined by which of the source ports
are linked to an output VFE line. For example, the link below will
configure the CSID driver to enable vc 0 and vc 1:

media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'
media-ctl -l '"msm_csid0":2->"msm_vfe0_rdi1":0[1]'

which will be demuxed and propagated into /dev/video0
and /dev/video1 respectively. With this, the userspace can use
any normal V4L2 client app to start/stop/queue/dequeue from these
video nodes. Tested with the yavta app.

Note also that implicit format propagation has been removed, so format
for the linked source ports has to be set manually, e.g.:

media-ctl -V '"msm_csid0":1[fmt:SRGGB10/3840x2160]'
media-ctl -V '"msm_csid0":2[fmt:SRGGB10/3840x2160]'

Previously setting the format on the sink port of the CSID entity would
set the same format on the source port. However, with CSID demuxing there's
no guarantee that the format on the source ports should be the same,
in fact it can be different for each source port.

Milen Mitkov (4):
  media: camss: sm8250: Virtual channels for CSID
  media: camss: vfe: Reserve VFE lines on stream start and link to CSID
  media: camss: vfe-480: Multiple outputs support for SM8250
  media: camss: sm8250: Pipeline starting and stopping for multiple
    virtual channels

 .../platform/qcom/camss/camss-csid-gen2.c     | 55 +++++++++++------
 .../media/platform/qcom/camss/camss-csid.c    | 41 +++++++------
 .../media/platform/qcom/camss/camss-csid.h    | 11 +++-
 .../media/platform/qcom/camss/camss-vfe-480.c | 61 ++++++++++++-------
 drivers/media/platform/qcom/camss/camss-vfe.c |  7 +++
 .../media/platform/qcom/camss/camss-video.c   | 21 ++++++-
 drivers/media/platform/qcom/camss/camss.c     |  2 +-
 7 files changed, 134 insertions(+), 64 deletions(-)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 0/4] media: camss: sm8250: Virtual channels support for SM8250
@ 2022-09-21 14:10 quic_mmitkov
  2022-09-21 14:10 ` [PATCH 4/4] media: camss: sm8250: Pipeline starting and stopping for multiple virtual channels quic_mmitkov
  0 siblings, 1 reply; 13+ messages in thread
From: quic_mmitkov @ 2022-09-21 14:10 UTC (permalink / raw)
  To: linux-media, linux-arm-msm, robert.foss, akapatra, jzala, todor.too
  Cc: agross, bjorn.andersson, konrad.dybcio, mchehab, bryan.odonoghue,
	Milen Mitkov

From: Milen Mitkov <quic_mmitkov@quicinc.com>

(Resent with hopefully the correct recipients this time)

These patches add support for multiple CSID virtual channels for Qualcomm's SM8250
platform.

NOTE: These changes depend on the multistream series that as of yet is
still not merged officially upstream. The multistream changes
allow for multiple clients on the same pipeline, which is otherwise not
possible. For development and testing multistream series v14 was used:

https://patchwork.kernel.org/project/linux-media/patch/20220831141357.1396081-2-tomi.valkeinen@ideasonboard.com/

The CSID hardware on SM8250 can demux the input data stream into
maximum of 4 multiple streams depending on virtual channel (vc)
or data type (dt) configuration.

Situations in which this is useful:
- HDR sensors that produce a 2-frame HDR output, e.g. a light and a dark frame
  (the setup we used  for testing, with the imx412 sensor),
  or a 3-frame HDR output - light, medium-lit, dark frame.
- sensors with additional metadata that is streamed over a different
  virtual channel/datatype.
- sensors that stream frames with multiple resolutions in the same pixel
  data stream

With these changes, the CSID entity has, as it did previously, a single
sink port (0), and always exposes 4 source ports (1, 2,3, 4). The
virtual channel configuration is determined by which of the source ports
are linked to an output VFE line. For example, the link below will
configure the CSID driver to enable vc 0 and vc 1:

media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'
media-ctl -l '"msm_csid0":2->"msm_vfe0_rdi1":0[1]'

which will be demuxed and propagated into /dev/video0
and /dev/video1 respectively. With this, the userspace can use
any normal V4L2 client app to start/stop/queue/dequeue from these
video nodes. Tested with the yavta app.

Note also that implicit format propagation has been removed, so format
for the linked source ports has to be set manually, e.g.:

media-ctl -V '"msm_csid0":1[fmt:SRGGB10/3840x2160]'
media-ctl -V '"msm_csid0":2[fmt:SRGGB10/3840x2160]'

Previously setting the format on the sink port of the CSID entity would
set the same format on the source port. However, with CSID demuxing there's
no guarantee that the format on the source ports should be the same,
in fact it can be different for each source port.

Milen Mitkov (4):
  media: camss: sm8250: Virtual channels for CSID
  media: camss: vfe: Reserve VFE lines on stream start and link to CSID
  media: camss: vfe-480: Multiple outputs support for SM8250
  media: camss: sm8250: Pipeline starting and stopping for multiple
    virtual channels

 .../platform/qcom/camss/camss-csid-gen2.c     | 55 ++++++++++-------
 .../media/platform/qcom/camss/camss-csid.c    | 41 +++++++------
 .../media/platform/qcom/camss/camss-csid.h    | 11 +++-
 .../media/platform/qcom/camss/camss-vfe-480.c | 60 ++++++++++++-------
 drivers/media/platform/qcom/camss/camss-vfe.c |  7 +++
 .../media/platform/qcom/camss/camss-video.c   | 21 ++++++-
 drivers/media/platform/qcom/camss/camss.c     |  2 +-
 7 files changed, 133 insertions(+), 64 deletions(-)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 0/4] media: camss: sm8250: Virtual channels support for SM8250
@ 2022-09-20 14:32 quic_mmitkov
  2022-09-20 14:33 ` [PATCH 4/4] media: camss: sm8250: Pipeline starting and stopping for multiple virtual channels quic_mmitkov
  0 siblings, 1 reply; 13+ messages in thread
From: quic_mmitkov @ 2022-09-20 14:32 UTC (permalink / raw)
  To: linux-media; +Cc: akapatra, jzala, Milen Mitkov

From: Milen Mitkov <quic_mmitkov@quicinc.com>

These patches add support for multiple CSID virtual channels for Qualcomm's SM8250
platform.

NOTE: These changes depend on the multistream series that as of yet is
still not merged officially upstream. The multistream changes
allow for multiple clients on the same pipeline, which is otherwise not
possible. For development and testing multistream series v14 was used:

https://patchwork.kernel.org/project/linux-media/patch/20220831141357.1396081-2-tomi.valkeinen@ideasonboard.com/

The CSID hardware on SM8250 can demux the input data stream into
maximum of 4 multiple streams depending on virtual channel (vc)
or data type (dt) configuration.

Situations in which this is useful:
- HDR sensors that produce a 2-frame HDR output, e.g. a light and a dark frame
  (the setup we used  for testing, with the imx412 sensor),
  or a 3-frame HDR output - light, medium-lit, dark frame.
- sensors with additional metadata that is streamed over a different
  virtual channel/datatype.
- sensors that stream frames with multiple resolutions in the same pixel
  data stream

With these changes, the CSID entity has, as it did previously, a single
sink port (0), and always exposes 4 source ports (1, 2,3, 4). The
virtual channel configuration is determined by which of the source ports
are linked to an output VFE line. For example, the link below will
configure the CSID driver to enable vc 0 and vc 1:

media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'
media-ctl -l '"msm_csid0":2->"msm_vfe0_rdi1":0[1]'

which will be demuxed and propagated into /dev/video0
and /dev/video1 respectively. With this, the userspace can use
any normal V4L2 client app to start/stop/queue/dequeue from these
video nodes. Tested with the yavta app.

Note also that implicit format propagation has been removed, so format
for the linked source ports has to be set manually, e.g.:

media-ctl -V '"msm_csid0":1[fmt:SRGGB10/3840x2160]'
media-ctl -V '"msm_csid0":2[fmt:SRGGB10/3840x2160]'

Previously setting the format on the sink port of the CSID entity would
set the same format on the source port. However, with CSID demuxing there's
no guarantee that the format on the source ports should be the same,
in fact it can be different for each source port.

Milen Mitkov (4):
  media: camss: sm8250: Virtual channels for CSID
  media: camss: vfe: Reserve VFE lines on stream start and link to CSID
  media: camss: vfe-480: Multiple outputs support for SM8250
  media: camss: sm8250: Pipeline starting and stopping for multiple
    virtual channels

 .../platform/qcom/camss/camss-csid-gen2.c     | 55 ++++++++++-------
 .../media/platform/qcom/camss/camss-csid.c    | 41 +++++++------
 .../media/platform/qcom/camss/camss-csid.h    | 11 +++-
 .../media/platform/qcom/camss/camss-vfe-480.c | 60 ++++++++++++-------
 drivers/media/platform/qcom/camss/camss-vfe.c |  7 +++
 .../media/platform/qcom/camss/camss-video.c   | 21 ++++++-
 drivers/media/platform/qcom/camss/camss.c     |  2 +-
 7 files changed, 133 insertions(+), 64 deletions(-)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-10-04  9:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 14:25 [PATCH v2 0/4] media: camss: sm8250: Virtual channels support for SM8250 quic_mmitkov
2022-09-26 14:25 ` [PATCH 1/4] media: camss: sm8250: Virtual channels for CSID quic_mmitkov
2022-10-04  9:33   ` Robert Foss
2022-09-26 14:25 ` [PATCH 2/4] media: camss: vfe: Reserve VFE lines on stream start and link to CSID quic_mmitkov
2022-10-04  9:38   ` Robert Foss
2022-09-26 14:25 ` [PATCH 3/4] media: camss: vfe-480: Multiple outputs support for SM8250 quic_mmitkov
2022-10-04  9:45   ` Robert Foss
2022-09-26 14:25 ` [PATCH 4/4] media: camss: sm8250: Pipeline starting and stopping for multiple virtual channels quic_mmitkov
2022-09-28  2:44   ` Bryan O'Donoghue
2022-09-28 11:35     ` Milen Mitkov (Consultant)
2022-09-28 11:53       ` Bryan O'Donoghue
  -- strict thread matches above, loose matches on Subject: below --
2022-09-21 14:10 [PATCH 0/4] media: camss: sm8250: Virtual channels support for SM8250 quic_mmitkov
2022-09-21 14:10 ` [PATCH 4/4] media: camss: sm8250: Pipeline starting and stopping for multiple virtual channels quic_mmitkov
2022-09-20 14:32 [PATCH 0/4] media: camss: sm8250: Virtual channels support for SM8250 quic_mmitkov
2022-09-20 14:33 ` [PATCH 4/4] media: camss: sm8250: Pipeline starting and stopping for multiple virtual channels quic_mmitkov

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).