From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66EF6C05027 for ; Mon, 23 Jan 2023 17:42:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231912AbjAWRmO (ORCPT ); Mon, 23 Jan 2023 12:42:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231609AbjAWRmO (ORCPT ); Mon, 23 Jan 2023 12:42:14 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 779602E0FB for ; Mon, 23 Jan 2023 09:42:08 -0800 (PST) X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="313997889" X-IronPort-AV: E=Sophos;i="5.97,240,1669104000"; d="scan'208";a="313997889" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2023 09:42:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="692308167" X-IronPort-AV: E=Sophos;i="5.97,240,1669104000"; d="scan'208";a="692308167" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP; 23 Jan 2023 09:42:05 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pK0pX-00Dr8K-0m; Mon, 23 Jan 2023 19:42:03 +0200 Date: Mon, 23 Jan 2023 19:42:02 +0200 From: Andy Shevchenko To: Hans de Goede Cc: Mauro Carvalho Chehab , Sakari Ailus , Tsuchiya Yuto , Yury Luneff , Nable , andrey.i.trufanov@gmail.com, Fabio Aiuto , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH 17/57] media: atomisp: Only set default_run_mode on first open of a stream/asd Message-ID: References: <20230123125205.622152-1-hdegoede@redhat.com> <20230123125205.622152-18-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230123125205.622152-18-hdegoede@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Mon, Jan 23, 2023 at 01:51:25PM +0100, Hans de Goede wrote: > Calling v4l2_ctrl_s_ctrl(asd->run_mode, pipe->default_run_mode) when > the stream is already active (through another /dev/video# node) causes > the stream to stop. > > Move the call to set the default run-mode so that it is only done > on the first open of one of the 4 /dev/video# nodes of one of > the 2 streams (atomisp-sub-devices / asd-s). As mentioned before, perhaps move it closer to the beginning of the series? Reviewed-by: Andy Shevchenko > Fixes: 2c45e343c581 ("media: atomisp: set per-device's default mode") > Signed-off-by: Hans de Goede > --- > drivers/staging/media/atomisp/pci/atomisp_fops.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c > index 7f4934ff9cab..78af97a64362 100644 > --- a/drivers/staging/media/atomisp/pci/atomisp_fops.c > +++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c > @@ -764,13 +764,13 @@ static int atomisp_open(struct file *file) > goto done; > > atomisp_subdev_init_struct(asd); + Blank line? > + /* Ensure that a mode is set */ > + v4l2_ctrl_s_ctrl(asd->run_mode, pipe->default_run_mode); > > done: > pipe->users++; > mutex_unlock(&isp->mutex); > > - /* Ensure that a mode is set */ > - v4l2_ctrl_s_ctrl(asd->run_mode, pipe->default_run_mode); > > return 0; > > -- > 2.39.0 > -- With Best Regards, Andy Shevchenko