From patchwork Fri Sep 6 11:55:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Courbot X-Patchwork-Id: 11135075 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 50FD21395 for ; Fri, 6 Sep 2019 11:55:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F29E206CD for ; Fri, 6 Sep 2019 11:55:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TbtjB2b2"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="c0lVH9cO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F29E206CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AvPiznvitHwIHnM48dtUt3Vm2F4GRueu4Fa6XDL3xiM=; b=TbtjB2b20sUsCH qSU8pOtSvky6FTDLes/H2vJnVVj9KuiXZ4Nm4POzHheTPMTTlI71E9sIReDlj+Q7CJcjgOFwXuIEx ezQgq0FKCvYjnXOvjWA4f91ZsLw1d+Bs3rKdQwSJnTVAra+C/vGk9nJ+18qIEW7f+d7jYYgDzPYn9 eq2w6ZERcyWkld6DTvHgSHKeuExMGjFsGypaHpKGScWF/8S06qc3gsgfuRwu5HtQeK5QmTvIXQlp+ qtAaVnFylMkNESXHATtrHQBOJNHAqdgh/dY9rVDOq1EiJWCL19fRgfH8+5zkkQYXkgCJC461AMwCr ZqJpEUgR7PDS8ilRja8w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i6CqJ-00047b-R8; Fri, 06 Sep 2019 11:55:55 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i6CqH-00042A-Bf for linux-mediatek@lists.infradead.org; Fri, 06 Sep 2019 11:55:54 +0000 Received: by mail-pf1-x444.google.com with SMTP id q10so4325352pfl.0 for ; Fri, 06 Sep 2019 04:55:52 -0700 (PDT) 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=Dv10oi4TdbY6GR7F0KvTrO/w4iPoPdTVV/y/o4NNX6o=; b=c0lVH9cOm3zHz4NMOBRVGBZoCbDf8i3w3fPDv5bdKxyWiMxaom7gCnLiER203ZATFJ aL4zQq8tRMEIY9ub5UVH65YMzfAinCgXvY7e6DW4yszEo7z9k8jCSN9i8i1ZjzEvi5ae p9x4crPH7IoNeuVl4uIU0aWCAPlQxyzZDWJ+U= 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=Dv10oi4TdbY6GR7F0KvTrO/w4iPoPdTVV/y/o4NNX6o=; b=hQ/WKrc9vh31ph5F2lpaQ001CCUaY52aBx5G0O9Z9Z24P/I43UrW5Bwf/v2ba4MKgz V72ERiqWcbbJMNZ5n2jMd9ceWNCTAsLu1W/RAqu0vHF6hX9yKVpPfNixYEHsTGyMdIR8 0J9Z9QDWrKMRKxLK+Vv587kt+9s2RyEkVsuFZ2QgyhVMdxGDGywELF1SpIG9zfwpi42W E5AglIOCWI98Nmdzp4IVhL1b6wvEdEoJnPkP9W1hTVb1H0tD7lXi7bTghcVCHGlusF1Z EybivZFFqevlO+Tj/k+XNvG2yqBb8uTK5sjltfYVaw6Zfu2siWg1m1S3iYl/7BmFTX9l YSdA== X-Gm-Message-State: APjAAAWeq5rzmz4wXJwgeFQfSG3slaT8TuhfbeQYoBg5afvSztKAiUbS zJYtCmS5aHTl1S6F1CTn4nzsrw== X-Google-Smtp-Source: APXvYqyME97NICevcotb4UXynBjruBzW7ohMgRIdClQ531LCsicIQ9luh+MM35ZK2xOCnemHLa0siQ== X-Received: by 2002:a63:5f09:: with SMTP id t9mr7631568pgb.351.1567770952532; Fri, 06 Sep 2019 04:55:52 -0700 (PDT) Received: from acourbot.tok.corp.google.com ([2401:fa00:4:4:9712:8cf1:d0f:7d33]) by smtp.gmail.com with ESMTPSA id o22sm3667394pjq.21.2019.09.06.04.55.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2019 04:55:51 -0700 (PDT) From: Alexandre Courbot To: Yunfei Dong , Tiffany Lin , Andrew-CT Chen , Hans Verkuil , Mauro Carvalho Chehab Subject: [RFC PATCH v2 08/13] media: add Mediatek's MM21 format Date: Fri, 6 Sep 2019 20:55:08 +0900 Message-Id: <20190906115513.159705-9-acourbot@chromium.org> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog In-Reply-To: <20190906115513.159705-1-acourbot@chromium.org> References: <20190906115513.159705-1-acourbot@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190906_045553_396380_18A0A26C X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Courbot , linux-media@vger.kernel.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.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 with the MDP3 component. Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 51b912743f0f..666d90a71f41 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1330,6 +1330,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_META_FMT_VSP1_HGT: descr = "R-Car VSP1 2-D Histogram"; break; case V4L2_META_FMT_UVC: descr = "UVC Payload Header Metadata"; break; case V4L2_META_FMT_D4XX: descr = "Intel D4xx UVC Metadata"; break; + case V4L2_PIX_FMT_MM21: descr = "Mediatek 8-bit block format"; break; default: /* Compressed formats */ diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 530638dffd93..e0db23e655bf 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -724,6 +724,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 */