From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.49 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796252611; b=opuFsUItjIF3nH3a4g+jZh0ibf5krR4qz56PIFbX4dOEa+mwgIA7qE6obyFTRH9HFhOa qWHSD4nsskYdzwkRV/DbUZgXCYEoK99JdwNx3jOyvEO9Q4TP7shHakCvBmu9GjyxqhK6T f9frSKdXHfyCf8HKljZaY4Ac1A9YmsV/GxUWHxCMwykte6e1XcXUYVt3BDyWUubTH5rNY TdZisJMl/Z22vBkgZ/hEM2y+u/jcAC9pnipKV5tn+JAL+TADbESkQuwa5cvm8w4G703md UpbOyp1EE25Z4TEjdRs7VwIO/HOqZ/GN8GAAUa1Ex0rQjBKdmucHFyUhueh01GLa3GA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796252611; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=Qt6FpgVhtq8bWY4WaFvek0WId5PZ3GtllPvitMx419E=; b=hgtMB23H01e5XSOIZ3gMPQfz0J3I2UgBNFM0lrBhTsFI3x+9/rtwJWZuIQDJfNa54ESz UwNIy+1MqizCuOakgTqDZMxylTWU/TEDjMBeQK0SQGIaDsZm/AxjQ/zaArXz8G11A66/+ UKfUV4oXL2AsPbRNloPRYIrXlyKwEm7A9VA5njh9dfEyfRUxyyTEPEkfygrQdZemCAnMY lDzzKuepGbvIGZ+EteH6WWHfhwZI0NdMrXUDuF3kJ9+XMD8Eq/bedQorHLo9Ie3shYn9e UZHeX5gnWUy+g3BRBmlREXar9EpKI8VkHos8vaPSvuUzkP1inptHN7y1Xr1TNiap+hQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=RnWx4CeQ; arc=none smtp.remote-ip=209.85.221.49 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33536606A685 for ; Wed, 2 Dec 2026 23:03:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 33536606A685 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=RnWx4CeQ Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-4a5024b3c28so181626f8f.0 for ; Wed, 02 Dec 2026 15:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796252609; x=1796857409; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Qt6FpgVhtq8bWY4WaFvek0WId5PZ3GtllPvitMx419E=; b=RnWx4CeQQIrJJ8biiei3cF4Cb6HeAiOqwdvURFOshL/36q7khLRlr1v6f0BVZHqflT OilQ+dh9x29vRD4QgSqimX7ly+n79P8Nz7Z3+Q8JJJ3wQgRS3x/GAUzmMJZVJrk0StRI e4vnOMHaIa7nRvf2C9kSFsxa65Pl+BRRvcqHkHZrH50v7JdSHlR5EHWRW1jDUIvBIlf+ lSKK7QA8xsTQ1yLZzlnDl1qJXjXPIz28s3hrHa4BR7uVfGvBwFzpi6iMiBrh0aZcWpQR wel5/QAsJxNvgBRZ+CaNfoQ9ixT1nQyaWX1LwnLSSLH7mXMT02GVZJo5bIHjk/mUKns7 Z1tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796252609; x=1796857409; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Qt6FpgVhtq8bWY4WaFvek0WId5PZ3GtllPvitMx419E=; b=GF3r5bL6o3JtjXSI4yGqbo9H7EIL3VACltJurjl5jEMiFCdiXWypLZyNiu0bYcZfuh CsAQwgMkQ8tihSpsWRrgEor8Hu2XyVgeSoOCwUqedmMG5qLQbALudXBo3FFjI1CyD5oy LosbFGMjh4KEC0k35MuqSA7tZbnpjW7EgzPMQQi4CuDpjdQI2k7BaGDLgdh287ZrECGs Akb4mzyoG1qvXNkdg1kp35aTnluriTOsgIy48+oKRkEh/nlyb+05moHEXeNSXnDNPlzf olm8cQ5uwy9bKnWpyVRAP0YOaDG6+QplQuqZ4f5mCtzRRJr/+zTHcea2dtDr00EU8MqS G6kQ== X-Forwarded-Encrypted: i=1; AL+hErHb1hthF+EeVPTSwDcG3wCo/lVD9PN098iG3v32qbKK8uVNYqMrkUYRsXM48lgjyGJR75VcP4Ju8VCA1kc=@vger.kernel.org X-Gm-Message-State: APuU4Z8s8lq8PYPHPZnPdH8aKt81xGWBnaGdY4gDrgwS4BGfW5if9nik 6eIwNtkEPDpHmfhetwrjQTHv48qHv3cKJQgMkUzIrGROPH0cbRqb3Mm/ X-Gm-Gg: AZFdTZf18cfxMMukuVWARwC5ytbdpKM8MQ6hCp/3S43LYbReykpeqmd0qaMCtkkgkB1 I+OnSTPyoDptBj3dzVNwprpKG2F6ZGARG5Zm7m9OIvkF6atWm3yQRXsZ8Wo+wEQbj7K9G/19+ge +OILpM44K0dtGQsaeYnb5FJyuaV2HUqmOvrKqyd0A8UJcY0EMY5its5VW2UOfpdRd5Rwm9qnqxk zZAz9j+zm8cIFrnfpRb9fuOsl3u3gzINYvaSgeQOclnpKwn6X0OSzM7WPfvqfnuQcDrhNOI77v8 GJsAmfZLVtcjj9LpRJgDlkq8JKYxVCKaErZZuxNlxWOGd1A6DAw+0IruZMWP7JL23FUhfmuSoOc c51rIyk0PYE1iONT+nfn9lPfqkk5cDQzoEF4B97dsW/si46LVWiG/mrx9dXRkQf/SbE3pqbcfRU s/zy1K19kr5LlQyL2gD5LujlzBVtPU70re5zcQJtu8S9n+DbEo7KWKDdosqJnF1YN5cVPEXJ0Ix 8IGnupu+vk6wc5I4yC2xk96afBX+xlVXajMNTdMWtpsUrzb051YUVhqy1YufTU/1hIT/tMzf3qu Rw+iPDaiZayTTNrbVrUstmz42c0PHU5oqlGOIaoE X-Received: by 2002:a5d:5955:0:b0:493:72f7:1d5b with SMTP id ffacd0b85a97d-4cf4c994b17mr220536f8f.29.1796252608615; Wed, 02 Dec 2026 15:03:28 -0800 (PST) Received: from unknown.m0rf30.ray ([2a02:b021:8011:256b:d13a:b0f2:c168:28e9]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-4ab658e2c8csm81180838f8f.2.2026.12.02.15.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 15:03:28 -0800 (PST) From: Gianluca Boiano To: Bryan O'Donoghue , Vladimir Zapolskiy , Loic Poulain , Mauro Carvalho Chehab , Sakari Ailus Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, David Heidelberg , stable@vger.kernel.org, Gianluca Boiano Subject: [PATCH v2 1/5] media: qcom: camss: Don't stream sub-devices upstream of the sensor Date: Thu, 3 Dec 2026 00:02:58 +0100 Message-ID: <26622f24a0976cffcba708f78dff43c5e733554c.1796251498.git.morf3089@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit video_start_streaming() and video_stop_streaming() walk the media pipeline from the video node upstream and call s_stream on every sub-device they find, including every sub-device behind the one that is linked to the CSIPHY. That is fine for a sensor that is a single sub-device, but a sensor that consists of several sub-devices gets s_stream called on each of them, not just on the one that is linked to the CSIPHY. The MIPI CCS driver is such a sensor: it exposes a pixel array, a binner and a scaler sub-device, and the scaler (or the binner when there is no scaler) is the one linked to the CSIPHY. Streaming is started by that sub-device and covers the whole sensor. Calling s_stream also on the binner and on the pixel array is at best redundant and, as the CCS enable_streams operation only accepts the sensor's source pad, makes the pixel array fail with -EINVAL, so streaming cannot be started. This is not specific to CCS. Other drivers that have a sensor on one end of a pipeline, e.g. ipu3-cio2, rkisp1, ti-cal, ipu6 and rcar-vin, start only the sub-device that is directly connected to them and leave propagating the start request upstream to that sub-device. Do the same in CAMSS: after the first sub-device that is not part of CAMSS (i.e. the one that was bound by the async notifier, which is the one whose host private data points to the CSIPHY), stop walking the pipeline. Signed-off-by: Gianluca Boiano --- drivers/media/platform/qcom/camss/camss-video.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss-video.c b/drivers/media/platform/qcom/camss/camss-video.c index 0852eb6f1..93fb9b933 100644 --- a/drivers/media/platform/qcom/camss/camss-video.c +++ b/drivers/media/platform/qcom/camss/camss-video.c @@ -284,6 +284,14 @@ static int video_start_streaming(struct vb2_queue *q, unsigned int count) ret = v4l2_subdev_call(subdev, video, s_stream, 1); if (ret < 0 && ret != -ENOIOCTLCMD) goto error; + + /* + * Only the sub-device bound to CAMSS has host private data set + * (to the CSIPHY). It is responsible for starting whatever is + * upstream of it, e.g. the other sub-devices of a CCS sensor. + */ + if (v4l2_get_subdev_hostdata(subdev)) + break; } return 0; @@ -325,6 +333,9 @@ static void video_stop_streaming(struct vb2_queue *q) dev_err(video->camss->dev, "Video pipeline stop failed: %d\n", ret); return; } + + if (v4l2_get_subdev_hostdata(subdev)) + break; } video_device_pipeline_stop(vdev); -- 2.56.1