Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D907933998 for ; Mon, 14 Oct 2024 11:28:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728905288; cv=none; b=sUo5bQoIQRck933EVUs0NPyxe0MvwBbts9l13cmdzWeQ/rBr0p8rbzbqSVJKlIQUI2NrPHaP8iCp/yhHCUhmWD5u4iFEckD7sA4weOGaPn7UFAs2dAxJlh2PW7U0NSo0qg3Je3P3MbxKhGvThg0SHTmR9i9SYLRl2sIt0kaFlzo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728905288; c=relaxed/simple; bh=kBaIYfBZ+QidaCIsE3lqSK2Wdb/w8hLpwdxiuyil3H0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s5c0x5YwhfpfgOv6aBLcfdrkQWuFf4vaQ6EkMBe0zem6b9IYyksM8GfuzFHu8XUmJ9GR5rnZhLD54tib3NCcdAlyipuUMd3OjaCroyxxqcI/pbP/xUDxYM1H215lnT3SoMjB312twdt6KSJlXrISgiIAflHEqXweGdIrDTF7iKU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=fail smtp.mailfrom=kernel.org; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=kernel.org X-CSE-ConnectionGUID: PxmFgcHOSeqyJIbIKsPLpQ== X-CSE-MsgGUID: JI4yfxboSp+VTG2mMYQcNA== X-IronPort-AV: E=McAfee;i="6700,10204,11224"; a="39631040" X-IronPort-AV: E=Sophos;i="6.11,202,1725346800"; d="scan'208";a="39631040" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2024 04:28:06 -0700 X-CSE-ConnectionGUID: P/K9kgzlQQ6TGlxdgbPlAQ== X-CSE-MsgGUID: LzA7EhDQTRaXwgQo3WxftQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,202,1725346800"; d="scan'208";a="108337808" Received: from smile.fi.intel.com ([10.237.72.154]) by orviesa002.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2024 04:28:04 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1t0JF3-00000002sag-2xAO; Mon, 14 Oct 2024 14:28:01 +0300 Date: Mon, 14 Oct 2024 14:28:01 +0300 From: Andy Shevchenko To: Hans de Goede Cc: Sakari Ailus , Mauro Carvalho Chehab , Kate Hsuan , Robert Mast , linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH 1/4] media: atomisp: Fix WARN_ON() in vb2_start_streaming() triggering Message-ID: References: <20241013154056.12532-1-hdegoede@redhat.com> <20241013154056.12532-2-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241013154056.12532-2-hdegoede@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Sun, Oct 13, 2024 at 05:40:53PM +0200, Hans de Goede wrote: > If atomisp fails to start the stream the buffers must be returned to > the VB2_BUF_STATE_QUEUED state before returning an error from > atomisp_start_streaming(). > > This fixes the following WARN_ON(): > [ 250.313554] WARNING: CPU: 3 PID: 2178 at drivers/media/common/videobuf2/videobuf2-core.c:1801 vb2_start_streaming+0xcb/0x150 [videobuf2_common] ... > if (ret) { > dev_err(isp->dev, "Error starting mc pipeline: %d\n", ret); > + atomisp_flush_video_pipe(pipe, VB2_BUF_STATE_QUEUED, true); > goto out_unlock; > } Seems like error message does not depend on the video pipe. Hence I would first flush the pipe and then print a message. -- With Best Regards, Andy Shevchenko