From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 7602B49E5F0 for ; Mon, 14 Sep 2026 20:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789419242; cv=none; b=DfAqLW4lGUIXYJF8xfgS8WktSjBgpj4Rs6dh8bbyjQKB7UvcGPVAoVmKalrhS+LEkjQhQ6+/c47wHgtuoESNtV9Jntj9x1F9i8l4h2docGsYpflrZC7pfZ/SuVJLnmfd44Y85KJwGwGCMAEgTnU5PJwgRKcJv7z9kK7H/p162l0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789419242; c=relaxed/simple; bh=JGCHCPPdQaakfn0aYQL9dybqmmp7+siBaWXaH1ZCUyc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gDFhyFp0LL6YvIeNnTXQvcrXFSD03YxQ9gY9wZlUSTzXVziuFO9kn7Dxe7m5fgarSMiMPwJMIXqt+OL29VQ8whLeP8plaJs4bW/pXl962iiTeLGDCbLnJCHNjV72YqnJAjRLwHbQB9jHnqDlvDv1PMpqgqSe6v1H75U9k37Dh2Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=mAotltRQ; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mAotltRQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1789419242; x=1820955242; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JGCHCPPdQaakfn0aYQL9dybqmmp7+siBaWXaH1ZCUyc=; b=mAotltRQQK53f2rVpBQnu/flgwK34HHt3LtXSnBsZLJNR3fDCkJ3cHYC AS9bSa06MlCv2JutP69SUyULysZuQPLxFUKn5GKkkTacwOB4UuqBb6qUc z7riDhQERrDzohPYxAabO8dquanSP9Vq3K6WkxWKYFy3lHYHrA8xG3fGs nbzJlRE0gA1LUnUj3S7qsEIxMfwOUq81TF0sw1zp5aqIMYj4FtpYVa69z 5RSrWh9bva6l0wP+URAWM8IiRR8VkotEbdqMLLWIJfY5OdInqQhLcREqC SEf7LDYDMY6hM3g4CiWGzHMsu1KFJCk7mq8I/lEV/qtOHYFdlrTpfCwfV Q==; X-CSE-ConnectionGUID: TTnRR5G/QDuPfv9FWt46Qw== X-CSE-MsgGUID: 3R0jekkvSGmnaKp2Fz8OVA== X-IronPort-AV: E=McAfee;i="6800,10657,11905"; a="89984119" X-IronPort-AV: E=Sophos;i="6.27,103,1787036400"; d="scan'208";a="89984119" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2026 13:53:59 -0700 X-CSE-ConnectionGUID: i+jLB6K6RB2jr7B6asncQA== X-CSE-MsgGUID: tirEB6UtQgqutRuHDP09Gg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,103,1787036400"; d="scan'208";a="297760722" Received: from pgcooper-mobl3.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.245.245.173]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2026 13:53:56 -0700 Received: from punajuuri.localdomain (unknown [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 560DA121BBE; Mon, 14 Sep 2026 23:53:59 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.98.2) (envelope-from ) id 1x6Dgc-000000035JD-3SdH; Mon, 14 Sep 2026 23:53:58 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo From: Sakari Ailus To: linux-media@vger.kernel.org Cc: "Yan, Dongcheng" , Mehdi Djait , "Yu, Ong Hock" , "Ng, Khai Wen" , Antti Laakso , "Bajpai, Manik" , Divyamani Tripathi Subject: [PATCH 08/21] media: ipu6: Collect IPU streams into CSI-2 receiver sub-device context Date: Mon, 14 Sep 2026 23:53:45 +0300 Message-ID: <20260914205358.735307-9-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260914205358.735307-1-sakari.ailus@linux.intel.com> References: <20260914205358.735307-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Collect the IPU streams to the CSI-2 receiver sub-device's context. The background is that an IPU stream is bound to a CSI-2 virtual channel but in a V4L2 pipeline there's no such assumption. Therefore a pipeline may contain multiple virtual channels and so multiple IPU streams, too. Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c | 6 ++++++ drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h | 1 + drivers/media/pci/intel/ipu6/ipu6-isys-video.h | 1 + 3 files changed, 8 insertions(+) diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c index 0fd4171b50ac..f92577054d89 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c @@ -457,6 +457,8 @@ static int ipu6_isys_csi2_enable_streams(struct v4l2_subdev *sd, return ret; } + list_add(&av->csi2_entry, &csi2->av_head); + ret = ipu6_isys_start_stream_firmware(av, &bl); if (ret) { dev_err(sd->dev, "start stream of firmware failed\n"); @@ -493,6 +495,7 @@ static int ipu6_isys_csi2_enable_streams(struct v4l2_subdev *sd, ipu6_isys_close_streaming_firmware(av); err_return_buffers: + list_del(&av->csi2_entry); ipu6_isys_buffer_list_queue(&bl, IPU6_ISYS_BUFFER_LIST_FL_INCOMING, 0); return ret; @@ -530,6 +533,8 @@ static int ipu6_isys_csi2_disable_streams(struct v4l2_subdev *sd, ipu6_isys_close_streaming_firmware(av); + list_del(&av->csi2_entry); + return 0; } @@ -675,6 +680,7 @@ int ipu6_isys_csi2_init(struct ipu6_isys_csi2 *csi2, if (ret) goto fail; + INIT_LIST_HEAD(&csi2->av_head); csi2->asd.source = IPU6_FW_ISYS_STREAM_SRC_CSI2_PORT0 + index; csi2->asd.supported_codes = csi2_supported_codes; snprintf(csi2->asd.sd.name, sizeof(csi2->asd.sd.name), diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h index dbaaf00af623..7c936154691e 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h @@ -41,6 +41,7 @@ struct ipu6_isys_csi2 { struct ipu6_isys_subdev asd; struct ipu6_isys *isys; struct ipu6_isys_video av[NR_OF_CSI2_SRC_PADS]; + struct list_head av_head; void __iomem *base; u32 receiver_errors; diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-video.h b/drivers/media/pci/intel/ipu6/ipu6-isys-video.h index 4c890c6af8f5..cb4b45f0dae2 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-video.h +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-video.h @@ -78,6 +78,7 @@ struct video_stream_watermark { struct ipu6_isys_video { struct ipu6_isys_queue aq; + struct list_head csi2_entry; /* Serialise access to other fields in the struct. */ struct mutex mutex; struct media_pad pad; -- 2.47.3