From patchwork Tue Aug 8 07:55:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 712182 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 B4766C001B0 for ; Tue, 8 Aug 2023 16:46:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232586AbjHHQqR (ORCPT ); Tue, 8 Aug 2023 12:46:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233351AbjHHQpW (ORCPT ); Tue, 8 Aug 2023 12:45:22 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E61CA44452 for ; Tue, 8 Aug 2023 08:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691510181; x=1723046181; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zLZsEP9m7c0aA3XJAE3/+rd++V0bB/KkiYVa0+jwjCY=; b=lav3FDk5fkbgipFOb275CmH5ekKZrNM5KUbTW9VP5phtyjch8+dzp9o0 p6l+6cDfeZ7id+SZyLB98W5sPTcpWj1JaQNvqJHLoHUcw2NKA0hmUwrTR AbMHtd7qgsbeRj4cFtG7zzZwONtRvg0iLb9wUWlgUObuQcIQAlDuBSccx aUwo9pNd4X8bAkw1/rIU3msQZuNXXewpK1YSn1rbIcPwsLZ5M8ZPYza9P eosixhGU1TIPWvg1h78mMoEBp5t4j4sTHQI3BVUCNMUz+zDO87YY1kN4q nXCyTrS1XPcS8EvLwsUF9iu5+CO+vjNYH0rL5NJu4d9+jKTZPn1Rh3eWW A==; X-IronPort-AV: E=McAfee;i="6600,9927,10795"; a="369648883" X-IronPort-AV: E=Sophos;i="6.01,263,1684825200"; d="scan'208";a="369648883" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2023 00:56:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="874627392" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2023 00:56:10 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 9E112120AB3; Tue, 8 Aug 2023 10:56:00 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.96) (envelope-from ) id 1qTHZE-00Clsh-0l; Tue, 08 Aug 2023 10:55:48 +0300 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 Subject: [PATCH v3 06/10] media: uapi: Add a macro to tell whether an mbus code is metadata Date: Tue, 8 Aug 2023 10:55:34 +0300 Message-Id: <20230808075538.3043934-7-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808075538.3043934-1-sakari.ailus@linux.intel.com> References: <20230808075538.3043934-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add a macro to tell whether a given mbus code is metadata. Signed-off-by: Sakari Ailus --- include/uapi/linux/media-bus-format.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h index 9ee031397372..2486b4178c5f 100644 --- a/include/uapi/linux/media-bus-format.h +++ b/include/uapi/linux/media-bus-format.h @@ -182,4 +182,7 @@ #define MEDIA_BUS_FMT_META_20 0x8006 #define MEDIA_BUS_FMT_META_24 0x8007 +#define MEDIA_BUS_FMT_IS_META(code) \ + ((code) & 0xf000 == 0x7000 || (code) & 0xf000 == 0x8000) + #endif /* __LINUX_MEDIA_BUS_FORMAT_H */