From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 6874F2DCF71 for ; Mon, 25 Aug 2025 09:51:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756115515; cv=none; b=mQmsIZPhABfYJG1jlCFbsL17JTuzoJk6OsGin5Kl1vmuFjoLmVA/pxGk8PJSXqtGy9bG2Dfji8Ov62Cq5HiFqywQxk+kC6FP5kEk2Q8JaUrLV+UwfXZYfhCKnY/eT8fir7NIyOnn1tx5knGU46ovv3P+ADElNi0CC5rLLWDZJjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756115515; c=relaxed/simple; bh=FBy6BciTHuAueDy5+YJlIkge/wfUYMA6PjWInIjYlxs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AKBUiz1i4+rSsGIIZ7qKHoA/rchibaTNCzYtWhAL/hjswGfxtoZdgSKBI42P+c390KopjAUpFLoGcbeiXPWc4LvtUaW2B70F0972sN3D1o84nvzWEMDk3kD3ry9B36yeMYKAbUBKAucFH+Tsht9HvcN2O7qkbnW4emrJeyNu7RM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=b+WJ94jS; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none 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="b+WJ94jS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1756115513; x=1787651513; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FBy6BciTHuAueDy5+YJlIkge/wfUYMA6PjWInIjYlxs=; b=b+WJ94jSe9MB7H06LBVShfiQHEvvoXr3/+1dsVPnKlM2JgA+ot2OaH5M 4qE63s8kkJOVQoWjot6d/oR8ZMHyopwKYHyaGJgEA5XtwujfGfDfgv27Q YvMLNJHAjyO1CN0NNlKCpfRBJJ9KjJPIrDzBugd7MiTp+plRKVhzB9cAJ RzkMBsvP119yF24VbAobfFW951Pe2WCZ2sMUXgJqA1qhVnHDTSyGYFRo9 Uh9lFi+E7/4EsCpz+EGKWwIH384raRQnmpjvL5Q5yd6ZA717Z9ex4OUBN DL52wGVrj0fI3y/x+CAbO7lHpdGJV/yFjOE8x3QrJ8zfyDJ5Yxke0Xg43 A==; X-CSE-ConnectionGUID: qMVqyjTjQ4OtsFtJCQSEFA== X-CSE-MsgGUID: vPDMXLHVThCpyuwZE2RaiQ== X-IronPort-AV: E=McAfee;i="6800,10657,11532"; a="58032272" X-IronPort-AV: E=Sophos;i="6.17,312,1747724400"; d="scan'208";a="58032272" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2025 02:51:45 -0700 X-CSE-ConnectionGUID: b2oLrQSZQF2D3UX+CtPxJg== X-CSE-MsgGUID: OZo37EICRsiV6DxfADoedQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.17,312,1747724400"; d="scan'208";a="173431091" Received: from vpanait-mobl.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.245.245.7]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2025 02:51:38 -0700 Received: from punajuuri.localdomain (unknown [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id D235E122003; Mon, 25 Aug 2025 12:51:08 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.98.2) (envelope-from ) id 1uqTr2-00000005ahJ-3SG0; Mon, 25 Aug 2025 12:51:08 +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: hans@jjverkuil.nl, laurent.pinchart@ideasonboard.com, Prabhakar , Kate Hsuan , Alexander Shiyan , Dave Stevenson , Tommaso Merciai , Umang Jain , Benjamin Mugnier , Sylvain Petinot , Christophe JAILLET , Julien Massot , Naushir Patuck , "Yan, Dongcheng" , "Cao, Bingbu" , "Qiu, Tian Shu" , "Wang, Hongju" , Stefan Klug , Mirela Rabulea , =?UTF-8?q?Andr=C3=A9=20Apitzsch?= , Heimir Thor Sverrisson , Kieran Bingham , Stanislaw Gruszka , Mehdi Djait , Ricardo Ribalda Delgado , Hans de Goede , Jacopo Mondi , Tomi Valkeinen Subject: [PATCH v11 51/66] media: v4l: Add V4L2_SUBDEV_ROUTE_FL_IMMUTABLE sub-device routing flag Date: Mon, 25 Aug 2025 12:50:52 +0300 Message-ID: <20250825095107.1332313-52-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250825095107.1332313-1-sakari.ailus@linux.intel.com> References: <20250825095107.1332313-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 Add a flag to denote immutable routes, V4L2_SUBDEV_ROUTE_FL_IMMUTABLE. Such routes cannot be changed and they're always active. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart --- Documentation/userspace-api/media/v4l/dev-subdev.rst | 4 +++- .../userspace-api/media/v4l/vidioc-subdev-g-routing.rst | 5 +++++ include/uapi/linux/v4l2-subdev.h | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/media/v4l/dev-subdev.rst b/Documentation/userspace-api/media/v4l/dev-subdev.rst index b0774b9a9b71..684ef0844517 100644 --- a/Documentation/userspace-api/media/v4l/dev-subdev.rst +++ b/Documentation/userspace-api/media/v4l/dev-subdev.rst @@ -572,7 +572,9 @@ internal pad always has a single stream only (0). Routes from an internal sink pad to an external source pad are typically not modifiable but they can be activated and deactivated using the :ref:`V4L2_SUBDEV_ROUTE_FL_ACTIVE ` flag, depending -on driver capabilities. +on driver capabilities. The :ref:`V4L2_SUBDEV_ROUTE_FL_IMMUTABLE +` flag indicates that the +``V4L2_SUBDEV_ROUTE_FLAG_ACTIVE`` of the route may not be unset. Interaction between routes, streams, formats and selections ----------------------------------------------------------- diff --git a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst index 15f448664e6b..0b90be43af57 100644 --- a/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst +++ b/Documentation/userspace-api/media/v4l/vidioc-subdev-g-routing.rst @@ -146,6 +146,11 @@ wants to retrieve the missing routes, it can issue a new * - V4L2_SUBDEV_ROUTE_FL_ACTIVE - 0x0001 - The route is enabled. Set by applications. + * - V4L2_SUBDEV_ROUTE_FL_IMMUTABLE + - 0x0002 + - The route is immutable. Set by the driver. Indicates that the + ``V4L2_SUBDEV_ROUTE_FL_ACTIVE`` flag of an immutable route may not be + unset. Return Value ============ diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h index 2347e266cf75..839b1329afb2 100644 --- a/include/uapi/linux/v4l2-subdev.h +++ b/include/uapi/linux/v4l2-subdev.h @@ -204,6 +204,11 @@ struct v4l2_subdev_capability { * on a video node. */ #define V4L2_SUBDEV_ROUTE_FL_ACTIVE (1U << 0) +/* + * Is the route immutable? The ACTIVE flag of an immutable route may not be + * unset. + */ +#define V4L2_SUBDEV_ROUTE_FL_IMMUTABLE (1U << 1) /** * struct v4l2_subdev_route - A route inside a subdev -- 2.47.2