From: Helen Koike <helen.koike@collabora.com>
To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl,
kernel@collabora.com, laurent.pinchart@ideasonboard.com,
tfiga@chromium.org, Mauro Carvalho Chehab <mchehab@kernel.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] staging: media: rkisp1: make links immutable by default
Date: Sun, 19 Jan 2020 12:14:10 -0300 [thread overview]
Message-ID: <8011cc70-a32c-efe3-817d-6a17ae672fd4@collabora.com> (raw)
In-Reply-To: <20200117223634.GJ1074550@oden.dyn.berto.se>
On 1/17/20 8:36 PM, Niklas Söderlund wrote:
> Hi Helen,
>
> Thanks for your work.
>
> On 2020-01-17 17:12:18 -0300, Helen Koike wrote:
>> The only places which make sese to allow users to enable or disable
>> links are:
>>
>> * between sensors and isp:
>> So users can select which sensor should be used while streaming
>>
>> * between isp and the resizers:
>> |
>> v here
>> rkisp1_isp:2 -> rkisp1_resizer_mainpath -> rkisp1_mainpath (capture)
>> \-> rkisp1_resizer_selfpath -> rkisp1_selfpath (capture)
>> ^ here
>> |
>>
>> So users can disable one of the capture paths when unused, to avoid
>> worring about matching formats.
>>
>> Make the following links immutable to simplify userspace:
>>
>> rkisp1_resizer_mainpath -> rkisp1_mainpath
>> rkisp1_resizer_selfpath -> rkisp1_selfpath
>> rkisp1_params -> rkisp1_isp
>> rkisp1_isp -> rkisp1_stats
>>
>> Signed-off-by: Helen Koike <helen.koike@collabora.com>
>>
>> ---
>> This is the topology graph after disabling all the links with
>> media -r
>> http://col.la/rkisp1immutable
>>
>> Dashed links are the only one can can be enabled/disabled, the others
>> are immutable.
>>
>> drivers/staging/media/rkisp1/rkisp1-dev.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c b/drivers/staging/media/rkisp1/rkisp1-dev.c
>> index 558126e66465..4030d5e71af1 100644
>> --- a/drivers/staging/media/rkisp1/rkisp1-dev.c
>> +++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
>> @@ -145,14 +145,15 @@ static int rkisp1_create_links(struct rkisp1_device *rkisp1)
>> flags = 0;
>> }
>>
>> - flags = MEDIA_LNK_FL_ENABLED;
>> + flags = MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE;
>>
>> /* create ISP->RSZ->CAP links */
>> for (i = 0; i < 2; i++) {
>> source = &rkisp1->isp.sd.entity;
>> sink = &rkisp1->resizer_devs[i].sd.entity;
>
> nit: To keep with the style of the rest of the function I would set
> flags here and once more bellow in the same loop.
Do you mean this: http://ix.io/27Pm ?
hmm, I don't see why to assign flags inside the loop.
the previous loop is a different case, since it sets the link
to the first sensor as enabled, but the other sensor links are disabled
(in case there are more then one link).
>
> With or without this fixed,
>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Thanks,
Helen
>
>> ret = media_create_pad_link(source, RKISP1_ISP_PAD_SOURCE_VIDEO,
>> - sink, RKISP1_RSZ_PAD_SINK, flags);
>> + sink, RKISP1_RSZ_PAD_SINK,
>> + MEDIA_LNK_FL_ENABLED);
>> if (ret)
>> return ret;
>>
>> --
>> 2.24.0
>>
>
prev parent reply other threads:[~2020-01-19 15:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 20:12 Helen Koike
2020-01-17 22:36 ` Niklas Söderlund
2020-01-19 15:14 ` Helen Koike [this message]
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=8011cc70-a32c-efe3-817d-6a17ae672fd4@collabora.com \
--to=helen.koike@collabora.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel@collabora.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=niklas.soderlund@ragnatech.se \
--cc=tfiga@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
all inboxes | Powered by JetHome®