Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9574427ybl; Fri, 17 Jan 2020 14:37:52 -0800 (PST) X-Google-Smtp-Source: APXvYqwOv/LSUf9meammF2Q4phfkR1ilqOSA6Yt72IqZcpGxgH5UawfptYniwV6BqHtwTb0v9fhd X-Received: by 2002:a9d:d06:: with SMTP id 6mr5081235oti.176.1579300671992; Fri, 17 Jan 2020 14:37:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579300671; cv=none; d=google.com; s=arc-20160816; b=jN23F9t5JpMd4iEwO8FAOn5kAIlmDO8Wx3hHNifUNltpL7BanoMwGmOB3J5pkQlxqO 0CuCcfhR+DYc/bjYMUg1K1wfyTvNqugXgxd4KToyNfOF5FBf0O49dPqvoVCs0fdvEgXL 6nPynXMKKYtNcGIz/t3eUB/F6JPDXfswIgOVfRH4lvsnvtZmvpQ1Kas+ANBReIw3lTs6 /gW99kWwnUbPJJz8M8p9cjSUpDcy9r5/hpyGEhpDQ8xQ2GCjhsVFFqtUMWphDTXYFF3f K0WDKMxk5f7LRxteRAZ9t7ntoyIkmM4aKSezFpSCD0w9gS1dihA8liiZftynr2oRmuy8 REoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=J929h0KZ2ac5S3n4IESBD+8F2tDlpZH15w7wy9ZbFBE=; b=LiGl1xmssnkdn2WuMmZPjDlHtskvP1z0iS88b5Xrg1Gx/4M05EMee8BkrHsRbFQUUY ORtnNzZB9ZEX42AzhV/nDLPPMQI5ToTsSrCTgLllf+6UKxu3Z31r7/1zjBO0q+riJ3Xa OEKEmQpxd7udlVxzOuN8pW/Nwv2lluBJVVe3adiKU34CtXg1y4z6J9E2yv135djQvO+g FiqQ5dYNtHtWsYGjMFYkvifKsELdqv7aH9Bd/H99ayoStIdnktv6GFih18vQag0esYsj Jmslk7qiCUvnaT+hkg9NEAoUDJF7YR5iUriqj/8ZdgjkAd1Nu78gmKorsTUT5qQODG2Y LhVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ragnatech-se.20150623.gappssmtp.com header.s=20150623 header.b=zHl0+Tf9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3si15448395otr.57.2020.01.17.14.37.39; Fri, 17 Jan 2020 14:37:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ragnatech-se.20150623.gappssmtp.com header.s=20150623 header.b=zHl0+Tf9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729016AbgAQWgh (ORCPT + 99 others); Fri, 17 Jan 2020 17:36:37 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:39449 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728596AbgAQWgg (ORCPT ); Fri, 17 Jan 2020 17:36:36 -0500 Received: by mail-lf1-f66.google.com with SMTP id y1so19522748lfb.6 for ; Fri, 17 Jan 2020 14:36:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech-se.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=J929h0KZ2ac5S3n4IESBD+8F2tDlpZH15w7wy9ZbFBE=; b=zHl0+Tf94O4U64JciaHt7bPupk6wRrba61Tv3DOXIKA9MsJadC1+XuT070kINEwHKI 8CceetMF2Ob5U4Ke0uRUf2yc4klg0aH/wMV83GXDe5f0VcyPYRxSyu1jdtT4hwySBm5M kOh+y131rPtacbpAQdI5ACE/WT30G4S799xU4U6Kfdh/hGLdyg//9vpgRwq1QfOeMQsA z3xwmfvhMZC1T+zSSTuBMBmBfMlbcpdPLfvREr9w+orJw1KDxd+Sd9HE5/F4osGAuY1F tearJy60FK29q1Bk/6WxXqdCvcf13h9SSE7SVC6ObNBRqRYAdN6PZMQUUN1i7IjCRdcv QhSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=J929h0KZ2ac5S3n4IESBD+8F2tDlpZH15w7wy9ZbFBE=; b=eHIPl6iNxSyFsjwq2dzEqHZ/ZbhVWHy3wnPQxLIr20i4ZhzPMHz/DXZYF416WwTe1l tj6duOAjO8EFG5DhPLGJf4MEfPIbvlsTTgDjAbLm2EuQ0ZBd6C8MFZLTEOQvd7Wc6gsj 1aK8SO1n2dIRfSBYUBBbUAFHSwEbR+BeFOu/b8doR2FFcVLNUZjpu9VF9FHEzgjXyTYd GqtQAEuPfpEmve6eXccBCWjALRejMXPaq7GzOJxzKcM7SJYxSk8au/YU/R/pL29/xrj9 yqvbzp0KXpyqjYQ/okVYR8RKMkupR7b26HgNea5z5SiEsZIrftCL8FUbLG4qC2Tdnsjk 0+3A== X-Gm-Message-State: APjAAAXP6XOb6QabsqBID4q0FWbEF09tmWUUSwtPexbbePR7NJONT2K6 p46sYCkSzjKQuPnqTWaoP0jwew== X-Received: by 2002:ac2:4884:: with SMTP id x4mr6701991lfc.92.1579300594976; Fri, 17 Jan 2020 14:36:34 -0800 (PST) Received: from localhost (h-93-159.A463.priv.bahnhof.se. [46.59.93.159]) by smtp.gmail.com with ESMTPSA id q13sm15285410ljj.63.2020.01.17.14.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 14:36:34 -0800 (PST) Date: Fri, 17 Jan 2020 23:36:34 +0100 From: Niklas =?iso-8859-1?Q?S=F6derlund?= To: Helen Koike Cc: linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl, kernel@collabora.com, laurent.pinchart@ideasonboard.com, tfiga@chromium.org, Mauro Carvalho Chehab , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH] staging: media: rkisp1: make links immutable by default Message-ID: <20200117223634.GJ1074550@oden.dyn.berto.se> References: <20200117201218.3745311-1-helen.koike@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200117201218.3745311-1-helen.koike@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > --- > 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. With or without this fixed, Reviewed-by: Niklas S?derlund > 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 > -- Regards, Niklas S?derlund