From patchwork Tue Oct 3 12:08:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 729121 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 147E8E75426 for ; Tue, 3 Oct 2023 12:08:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232168AbjJCMIi (ORCPT ); Tue, 3 Oct 2023 08:08:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232136AbjJCMIh (ORCPT ); Tue, 3 Oct 2023 08:08:37 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3125BB8 for ; Tue, 3 Oct 2023 05:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696334915; x=1727870915; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JUyhVFl4xUivp4dSpuOIWT5iT7J/6k8bI34Dl5If6vo=; b=NYMph/daMJH5Z2yjpUneGzISE1yWCPW/6KAwWhUvBTJeAxAdCX7o7VNK 0goni80+Q63N3yBBQvPc2lu8KTN53r8Xb4KRjoesFDFvFWVyem7ypZAl9 A5py8dFSlpuSJDu2joTjT/eEqs1tm3BYpWIzoabwbG8mhDmxy8LPqlHrz Z0emGdHYfLDlJFf2NvgjxKD9htYyUdqH3D+NZbIAjSQx9rwfo1yg462mE +Nla+w6U7A0VPVNnUUP90nuirOHL1B3OQC5ba4fBs34dlawnB9OfeuZ62 04D+Z0vMnWoYZ5BcjL3U//ep5+mqu5CCnK4GzEJjmoeHTMrpPTqK4RXY7 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="385681546" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="385681546" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 05:08:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="780285930" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="780285930" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 05:08:32 -0700 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id DFC8C120797; Tue, 3 Oct 2023 15:08:28 +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" Subject: [PATCH v6 20/28] media: uapi: v4l: subdev: Enable streams API Date: Tue, 3 Oct 2023 15:08:05 +0300 Message-Id: <20231003120813.77726-11-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003115237.76828-1-sakari.ailus@linux.intel.com> References: <20231003115237.76828-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 7d7028de581a..5e24a638bdba 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. @@ -897,9 +888,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg, if (!v4l2_subdev_has_op(sd, pad, set_routing)) goto do_vidioc_subdev_g_routing; - if (!v4l2_subdev_enable_streams_api) - return -ENOIOCTLCMD; - if (!(sd->flags & V4L2_SUBDEV_FL_STREAMS)) return -ENOIOCTLCMD; @@ -951,9 +939,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; @@ -981,14 +966,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;