Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1086694pxb; Fri, 26 Feb 2021 02:05:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8Vpjrktjol+hNxJxUgjd6vqC/5RPAWpTlL0Rx3a6G0e7R3PSrWHhDFxfCUAZt3AnC3xUv X-Received: by 2002:a50:f284:: with SMTP id f4mr2460707edm.90.1614333949335; Fri, 26 Feb 2021 02:05:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614333949; cv=none; d=google.com; s=arc-20160816; b=lh2znwTM49Sgaev/s5JK2DzOp6BjgJxsaZ1Cujkb7hr+Tkkc5o1Bxk4wR0hrxaKzxd 6HnUddtFo5qRNu1WHMyPya+vEjESNEPDajD5aNMLEHFbOqR0drRvl84qLFIWBAvU11ht ur05VmCWx2b8H1hGOQY75ejMcwi6tzqwAkQGBWTS6DT+oP7YeVK+GniD0FQKPTRz7dcx ZJWOmfsDvu9RN/YTZ4ubc2pbiieQ1E5Edcd+7JshGgwzCLHkY4EYnJnpNI9CX9PmQi5S JEqUuU3qAFE0miGxT08MTZYeXq+CIqP8Xtj42Rvt2tKy9aGCdBqMz9gawjPIiyTf8Q1l GopQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6/Bo4By7p3IUz3tjBrdPpIJAcax042CocWRAmdAp4Ks=; b=ne/jWsCmyEhkfTNb5bLq611G5ZMRcHYvuypblrDL6zoIgytLqw7l/S5jWudxlq2J+i DB0d3D52Rpeeh1yc78dGMT31O7XULwGh9hmRw27oUFwRfvX7DfoPXOO2T8vGklXCjkLf 4DNKk6DbUUFt/fp33U5wXy9P9e3sIBnKmPY+XRI2i+QiwdUc5/XIr4MXlckmRr29iHH0 By2XEE5TZq+1Onb4Ri5ZoGRM70n9HiUchkg/9cs8GEgpUQpDne4izmL2UDeqnD6mAISD uvlcw5BNL9NhlrtA9mqAYOwSPZMfxLutcCGExr24R62Rc40MUuBZ2jImJWoFkX1BIDkH eb9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VYBMbiSQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si5010425edn.536.2021.02.26.02.05.27; Fri, 26 Feb 2021 02:05:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VYBMbiSQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230452AbhBZKDx (ORCPT + 99 others); Fri, 26 Feb 2021 05:03:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230433AbhBZKDW (ORCPT ); Fri, 26 Feb 2021 05:03:22 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CDEBC061793 for ; Fri, 26 Feb 2021 02:02:12 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id b8so2229407plh.0 for ; Fri, 26 Feb 2021 02:02:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6/Bo4By7p3IUz3tjBrdPpIJAcax042CocWRAmdAp4Ks=; b=VYBMbiSQNniHtWFP82fU0Kr7M8kPq1JBFTFWg8ZGcG28lnshC+I3gymdEwzZrg5tPW f4Djm++OaK6QO1G7R1x3utmR+TIDcHCEr/Uf84tet6accRFMq40NbGwgE7u3b5f0pgK9 uSGdPTTTiQSdPNf9Z8ElVnJZA5KUg8O2qaXIA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6/Bo4By7p3IUz3tjBrdPpIJAcax042CocWRAmdAp4Ks=; b=DzedAjQUJHulSLYDgruu9MipIJN7Rsn4k1qp+uXivJYrTsJdwgzV2JN6yFbifem4Yi lga8LNSH0RAF/y6dJ6ZHlPVqoLsh74C3jxzhmz8jZephkSTbop7x8ZU7TxJlbNsNms/Z OwA6fZjtrxjBTwh4Pb3L5VzXBhdqHgf9zv/hLGPI9/ztmuSeFPbXTRWja8qcxSgzefWX ZACSUdmvPdohrUYvMvGelLndn8OS0ZE0lqy78pW8m8dwE8hw67sfJvIvf5duvvR+gJ1y u5OhNyDqcw16tjEa6Q/r+u/clvcNxQPrq5DMZBVdDyMpq5lI8Qbi3qhCG9sXMx/bXlTP mK7A== X-Gm-Message-State: AOAM532JiBWsloPN4dwTI158mIzBWQ39SI2JuPq6vx8c6wx7s0eSfJzw pAAs552+CPSi8tokNhroV7rc5Q== X-Received: by 2002:a17:90a:2e89:: with SMTP id r9mr2623085pjd.95.1614333731638; Fri, 26 Feb 2021 02:02:11 -0800 (PST) Received: from acourbot.tok.corp.google.com ([2401:fa00:8f:203:5c91:233c:dd5b:b1b0]) by smtp.gmail.com with ESMTPSA id o23sm9201565pfp.89.2021.02.26.02.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 02:02:11 -0800 (PST) From: Alexandre Courbot To: Tiffany Lin , Andrew-CT Chen , Rob Herring , Yunfei Dong Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Courbot Subject: [PATCH v3 04/15] media: add Mediatek's MM21 format Date: Fri, 26 Feb 2021 19:01:37 +0900 Message-Id: <20210226100148.1663389-5-acourbot@chromium.org> X-Mailer: git-send-email 2.30.1.766.gb4fecdf3b7-goog In-Reply-To: <20210226100148.1663389-1-acourbot@chromium.org> References: <20210226100148.1663389-1-acourbot@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add Mediatek's non-compressed 8 bit block video mode. This format is produced by the MT8183 codec and can be converted to a non-proprietary format by the MDP3 component. Signed-off-by: Alexandre Courbot --- Documentation/userspace-api/media/v4l/pixfmt-reserved.rst | 7 +++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 9 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst index c9231e18859b..187ea89f7a25 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst @@ -242,6 +242,13 @@ please make a proposal on the linux-media mailing list. It is an opaque intermediate format and the MDP hardware must be used to convert ``V4L2_PIX_FMT_MT21C`` to ``V4L2_PIX_FMT_NV12M``, ``V4L2_PIX_FMT_YUV420M`` or ``V4L2_PIX_FMT_YVU420``. + * .. _V4L2-PIX-FMT-MM21: + + - ``V4L2_PIX_FMT_MM21`` + - 'MM21' + - Non-compressed, tiled two-planar format used by Mediatek MT8183. + This is an opaque intermediate format and the MDP3 hardware can be + used to convert it to other formats. * .. _V4L2-PIX-FMT-SUNXI-TILED-NV12: - ``V4L2_PIX_FMT_SUNXI_TILED_NV12`` diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 31d1342e61e8..0b85b2bbc628 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1384,6 +1384,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_TM6000: descr = "A/V + VBI Mux Packet"; break; case V4L2_PIX_FMT_CIT_YYVYUY: descr = "GSPCA CIT YYVYUY"; break; case V4L2_PIX_FMT_KONICA420: descr = "GSPCA KONICA420"; break; + case V4L2_PIX_FMT_MM21: descr = "Mediatek 8-bit block format"; break; case V4L2_PIX_FMT_HSV24: descr = "24-bit HSV 8-8-8"; break; case V4L2_PIX_FMT_HSV32: descr = "32-bit XHSV 8-8-8-8"; break; case V4L2_SDR_FMT_CU8: descr = "Complex U8"; break; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 79dbde3bcf8d..e6890dae76ec 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -731,6 +731,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_Y12I v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */ #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */ #define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ +#define V4L2_PIX_FMT_MM21 v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two non-contiguous planes */ #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ #define V4L2_PIX_FMT_SUNXI_TILED_NV12 v4l2_fourcc('S', 'T', '1', '2') /* Sunxi Tiled NV12 Format */ #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */ -- 2.30.1.766.gb4fecdf3b7-goog