From patchwork Tue Apr 16 19:32:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 789615 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 2D8451386CF for ; Tue, 16 Apr 2024 19:34:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713296043; cv=none; b=q7f/zj4ZElCOUoQAeGQLRfmC+WZBVszwrnN5l2RdGcI/E5L1ZhH+Kf7esP+mmlS9q7xLVbD4J7ZL4H4aaBkD8T141dfybENf+mPLNPwaDTyyygOun8chJlyBv9T+AgTYaedS7URNdauqxyUr1KrCFCiI+6mVbqGdxEF84+Z7p5A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713296043; c=relaxed/simple; bh=vpcwE7cZ9s+ebaoL4zAMArumxOU1TlbuyHb8WvOI3Cg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q84Fn42S4zwRopQBEfMa3LP52ombv6dbOBEabmND+p9l/Ra1Spqj4AG5rHc81y7ScWNVogSKXTjWr8+vwU/7vIjjMfWVV6VJsvxeyTo/LgvTLFuxpl+A8Y+L9l0mtarC33qv4aoJQPryS3Aij93VipZQqYAeTpvLMGuPbZvZMok= 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=hVO023Ig; arc=none smtp.client-ip=192.198.163.15 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="hVO023Ig" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713296042; x=1744832042; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vpcwE7cZ9s+ebaoL4zAMArumxOU1TlbuyHb8WvOI3Cg=; b=hVO023IgNfqIlEJ/sevEm32uMXHp0PS/vKlXMay+QEW4Gs4qtPgXRTLW EN1WOYT8lZu2ltnTJjNF2FdoQ4jVOvkNoq1whtmOnUvELYT6MJMvtiwya CqSg2U2uKCVbqTFoiedrQkQW21lbjFd+Jihe1Dw97Hz2kIygG47t9bHEe 5ly6waMftc2iY4EPDcl5bijGiHBGLu4oec1Fc014P3ykGBEgKDINCl7AE 0rKWWHZof5nndBdputfa6bOzpEAG30rIBi1PDdKwMF7tltX9dSxD0qnV/ ZeVreaf35N4fW9swL5Gv37WmVncm73b/BMuC4LBR8Ia6p9zgs8bkeiVyb w==; X-CSE-ConnectionGUID: jGbDUDoqRdmVKIF1S6VR7A== X-CSE-MsgGUID: RwPp0z9vTziSHMbkEhVkyw== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="8929820" X-IronPort-AV: E=Sophos;i="6.07,206,1708416000"; d="scan'208";a="8929820" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2024 12:34:02 -0700 X-CSE-ConnectionGUID: dEsacepBTqKbiBKSTA8XIA== X-CSE-MsgGUID: qDGtbrl/RPqTNAGzYVWPNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,206,1708416000"; d="scan'208";a="22380201" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2024 12:33:59 -0700 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 132B41205CF; Tue, 16 Apr 2024 22:33:55 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: Laurent Pinchart , tomi.valkeinen@ideasonboard.com, bingbu.cao@intel.com, hongju.wang@intel.com, hverkuil@xs4all.nl, Andrey Konovalov , Jacopo Mondi , Dmitry Perchanov , "Ng, Khai Wen" , Alain Volmat Subject: [PATCH v9 25/46] media: uapi: v4l: subdev: Enable streams API Date: Tue, 16 Apr 2024 22:32:58 +0300 Message-Id: <20240416193319.778192-26-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240416193319.778192-1-sakari.ailus@linux.intel.com> References: <20240416193319.778192-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 Remove v4l2_subdev_enable_streams_api variable that was used to easily enable streams API for development, and conditions that use the variable. This patch enables the streams API for V4L2 sub-device interface which allows transporting multiple streams on a single MC link. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-subdev.c | 30 --------------------------- 1 file changed, 30 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index e68f16a7c041..caf312e5e0d9 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -26,15 +26,6 @@ #include #include -#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) -/* - * The Streams API is an experimental feature. To use the Streams API, set - * 'v4l2_subdev_enable_streams_api' to 1 below. - */ - -static bool v4l2_subdev_enable_streams_api; -#endif - /* * Maximum stream ID is 63 for now, as we use u64 bitmask to represent a set * of streams. @@ -570,13 +561,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg, V4L2_SUBDEV_CLIENT_CAP_STREAMS; int rval; - /* - * If the streams API is not enabled, remove V4L2_SUBDEV_CAP_STREAMS. - * Remove this when the API is no longer experimental. - */ - if (!v4l2_subdev_enable_streams_api) - streams_subdev = false; - switch (cmd) { case VIDIOC_SUBDEV_QUERYCAP: { struct v4l2_subdev_capability *cap = arg; @@ -918,9 +902,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg, struct v4l2_subdev_krouting krouting = {}; unsigned int i; - if (!v4l2_subdev_enable_streams_api) - return -ENOIOCTLCMD; - if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS)) return -ENOIOCTLCMD; @@ -991,9 +972,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg, struct v4l2_subdev_routing *routing = arg; struct v4l2_subdev_krouting *krouting; - if (!v4l2_subdev_enable_streams_api) - return -ENOIOCTLCMD; - if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS)) return -ENOIOCTLCMD; @@ -1021,14 +999,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg, case VIDIOC_SUBDEV_S_CLIENT_CAP: { struct v4l2_subdev_client_capability *client_cap = arg; - /* - * Clear V4L2_SUBDEV_CLIENT_CAP_STREAMS if streams API is not - * enabled. Remove this when streams API is no longer - * experimental. - */ - if (!v4l2_subdev_enable_streams_api) - client_cap->capabilities &= ~V4L2_SUBDEV_CLIENT_CAP_STREAMS; - /* Filter out unsupported capabilities */ client_cap->capabilities &= (V4L2_SUBDEV_CLIENT_CAP_STREAMS | V4L2_SUBDEV_CLIENT_CAP_INTERVAL_USES_WHICH);