From patchwork Tue Apr 27 12:45:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 12226673 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79BB5C43600 for ; Tue, 27 Apr 2021 12:46:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48384613BD for ; Tue, 27 Apr 2021 12:46:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237809AbhD0MrC (ORCPT ); Tue, 27 Apr 2021 08:47:02 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:45230 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237549AbhD0MrB (ORCPT ); Tue, 27 Apr 2021 08:47:01 -0400 Received: from deskari.lan (91-157-208-71.elisa-laajakaista.fi [91.157.208.71]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 90DBDAF3; Tue, 27 Apr 2021 14:46:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1619527577; bh=wUtER6y/muvjECE+juvtSzRao4tXrA1xMUhhM/8/SIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xk7Mrs6aaBqxJkPnf2/aZWi9RzSUGAmeM+6VmM/VoSwpFFT3bqwOIHiUOVqwWkHGe pG5r+e52zJe1WesQJidkKdoYpF2LdRlqS09nV7quF4boFFmeSBZ2lAqfmu4mr1vTB0 IzDTCQd56iuHOpmc89AcYvDLdym8oQiXK3dHrPtY= From: Tomi Valkeinen To: linux-media@vger.kernel.org, sakari.ailus@linux.intel.com, Jacopo Mondi , Laurent Pinchart , niklas.soderlund+renesas@ragnatech.se Cc: Mauro Carvalho Chehab , Hans Verkuil , Tomi Valkeinen Subject: [PATCH v6 15/24] v4l: Add bus type to frame descriptors Date: Tue, 27 Apr 2021 15:45:14 +0300 Message-Id: <20210427124523.990938-16-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210427124523.990938-1-tomi.valkeinen@ideasonboard.com> References: <20210427124523.990938-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add the media bus type to the frame descriptor. CSI-2 specific information will be added in next patch to the frame descriptor. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund - Make the bus type a named enum Signed-off-by: Jacopo Mondi Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- include/media/v4l2-subdev.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index d0e9a5bdb08b..ac531b752028 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -340,12 +340,31 @@ struct v4l2_mbus_frame_desc_entry { #define V4L2_FRAME_DESC_ENTRY_MAX 4 +/** + * enum v4l2_mbus_frame_desc_type - media bus frame description type + * + * @V4L2_MBUS_FRAME_DESC_TYPE_PLATFORM: + * Platform specific frame desc type for backwards compatibility. + * @V4L2_MBUS_FRAME_DESC_TYPE_PARALLEL: + * Parallel media bus. + * @V4L2_MBUS_FRAME_DESC_TYPE_CSI2: + * CSI-2 media bus. Frame desc parameters must be set in + * &struct v4l2_mbus_frame_desc_entry->csi2. + */ +enum v4l2_mbus_frame_desc_type { + V4L2_MBUS_FRAME_DESC_TYPE_PLATFORM, + V4L2_MBUS_FRAME_DESC_TYPE_PARALLEL, + V4L2_MBUS_FRAME_DESC_TYPE_CSI2, +}; + /** * struct v4l2_mbus_frame_desc - media bus data frame description + * @type: type of the bus (enum v4l2_mbus_frame_desc_type) * @entry: frame descriptors array * @num_entries: number of entries in @entry array */ struct v4l2_mbus_frame_desc { + enum v4l2_mbus_frame_desc_type type; struct v4l2_mbus_frame_desc_entry entry[V4L2_FRAME_DESC_ENTRY_MAX]; unsigned short num_entries; };