Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2465249iob; Fri, 20 May 2022 09:57:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjwwW3qR3qxeOYv1810kqL7/bZV7MJbvZjCLiRInJKbP5rfVLlIgx2KoCTMGfCOGSowD5m X-Received: by 2002:a63:1943:0:b0:3f2:638f:9123 with SMTP id 3-20020a631943000000b003f2638f9123mr9078923pgz.304.1653065830811; Fri, 20 May 2022 09:57:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653065830; cv=none; d=google.com; s=arc-20160816; b=PSr8iS+l7UJwR+l2tGkADVfPRHz1ykWJ1weCtwfVttIXpp4F1WTSOcCsC0xr0bHVRb 9Ngef2ksLU+snwhz14Rwr0EzQivpwiiQBLYITRbVWt4EOMqa27Qmu1gdA0FXlnPN0wom QGcLbUS97h5/QGp/MrBkfy/m/J6FDKParruSIszeVxjWqvBL6BsFom7E8BvJoeVdC3zr YtoyK2eWLDJ30rQD55Pxc5ENIagriIZ0ONJWzhLT+tMNLr9acFxxcEf3bMl6QLqAf681 cX75yjLoEXMEqY3+La2GjeaUVnMHN8ubTSSJ+5NA6mSZsg06BrRLQwYl+zhuNi1Ha2cW pnLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=Aut+o9rfvWHqOONG13fN766+RLiN2j4Zswig8lgnh6A=; b=VtNA1tda+4U0w5wyeRItPrFduNbLgAH50jE08iUt0ifj4kwUzcuIDK59uqdUl5H2Gt vZ60mHb91Nl+FtzVGED6YjUkDsyCiMHZhGmlATcoUm7yM+kyjdty+t7PAo59UzQZ84bC pKIX3inQk99sylMg4XtGrOtSopMFMXxCgGqYdoo/oxXCQNRvpVRMmnMeJCJdbum3Rxib NfCWCWt/la0umbqskRsH3qfjVLXeXmn6s66Wv1wvOiiFZ2VViJK9V0jfqxU79ux+zznt EySny1mCEx+p/cmiGKxNWMWfm+8yjpmHaPQ/T3R7CxmFAnxQqqh1wY10TrcveousOAgr SqrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mt0Bm0NW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a17090a005500b001dbe2b6c4f3si4069255pjb.140.2022.05.20.09.56.58; Fri, 20 May 2022 09:57:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mt0Bm0NW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344883AbiETCsR (ORCPT + 99 others); Thu, 19 May 2022 22:48:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344843AbiETCsL (ORCPT ); Thu, 19 May 2022 22:48:11 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90348149153; Thu, 19 May 2022 19:48:06 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id 137so6629025pgb.5; Thu, 19 May 2022 19:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Aut+o9rfvWHqOONG13fN766+RLiN2j4Zswig8lgnh6A=; b=mt0Bm0NWZ0PpZvy9PgPLDCWxkjLZm2wOIINCQ4B9h8CUWDJOQ9YHY9Gaqwkbvq1cX9 Bo5zEjnm5PDzWqJnC5hyRCBkLlmdgIx63wzMCajrcNHyynpk/R5xblBQDA4RQRlQ6EPG 0bi9uhu1NJt18engeMoepVNDUhPQLtuBKsQskN28wsoWcJ/HGW0DkVO1E6uIYrmPYotI 5plUpuP3az6oDYE/c33NDpUafbTuwbt2/35I5jqIQOWQ2gYCQmdmkO5vfyPwOaO4MhtP EKD33M4M/3Vsgw3VH0fbOgSrMVmAe9fds9+vNcpL9JYrCeyAYYn3Y7RwRCYce29YQDUq bJwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Aut+o9rfvWHqOONG13fN766+RLiN2j4Zswig8lgnh6A=; b=FlShGaTkeEHGF1wf0FG6Uu9v5lJzKmASDvQFIt1ICLMsQp9ZGscN1vN15u7kIr6t1Z THNmpPwSeWRYLDR6E0UBJy51lqn7wuJym2cQyQ8nqp+p5QQxhT7iEVjcf8X9dScCXlas vkE3drXI5Cu2IpUjt2ke3m3Jt7OSDel+iUbFt2puSxuF+7+AMQX5wxd7YtB3TS7+wupr b7XTKt7qvfeR73NFqCcFgHQBSO6ER/pCdaZw7jxEGVXREWhxVDKZ8Ul12do/yGjHB6zK jtGrEEZm3bsPPBGVX1mT39lDCbHl7YUYV/ark/DKmf77ogi4xZ/ZVzEiNS24YUmF4gBT nUtQ== X-Gm-Message-State: AOAM530pPUXWlQyygA5P0wwLFW6B8StD9k4A9kztRy1lLlnyUz/WG4DX +z8EzgrQrnNK1DlZK46kLj8= X-Received: by 2002:a05:6a00:24cc:b0:50d:58bf:5104 with SMTP id d12-20020a056a0024cc00b0050d58bf5104mr7716956pfv.36.1653014886022; Thu, 19 May 2022 19:48:06 -0700 (PDT) Received: from localhost.localdomain (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id n9-20020a629709000000b0050df474e4d2sm379406pfe.218.2022.05.19.19.48.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 19:48:05 -0700 (PDT) From: Marvin Lin To: mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: openbmc@lists.ozlabs.org, avifishman70@gmail.com, tmaimon77@gmail.com, tali.perry1@gmail.com, kwliu@nuvoton.com, kflin@nuvoton.com, Marvin Lin Subject: [PATCH v3 4/5] media: Add HEXTILE compressed format Date: Fri, 20 May 2022 10:47:43 +0800 Message-Id: <20220520024744.25655-5-milkfafa@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220520024744.25655-1-milkfafa@gmail.com> References: <20220520024744.25655-1-milkfafa@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add HEXTILE compressed format. This format is defined in Remote Framebuffer Protocol (RFC 6143) and is used by Encoding Compression Engine present on Nuvoton NPCM SoCs. Signed-off-by: Marvin Lin --- 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 cabfa34b7db5..bad2b9a2f16e 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst @@ -239,6 +239,13 @@ please make a proposal on the linux-media mailing list. It remains 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-HEXTILE: + + - ``V4L2_PIX_FMT_HEXTILE`` + - 'HXTL' + - Compressed format used by Nuvoton NPCM video driver. This format is + defined in Remote Framebuffer Protocol (RFC 6143, chapter 7.7.4 Hextile + Encoding). .. raw:: latex \normalsize diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 96e307fe3aab..9365519d65bb 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1441,6 +1441,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_SE401: descr = "GSPCA SE401"; break; case V4L2_PIX_FMT_S5C_UYVY_JPG: descr = "S5C73MX interleaved UYVY/JPEG"; break; case V4L2_PIX_FMT_MT21C: descr = "Mediatek Compressed Format"; break; + case V4L2_PIX_FMT_HEXTILE: descr = "Hextile Compressed Format"; break; default: if (fmt->description[0]) return; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 3768a0a80830..1c7af015b43b 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -746,6 +746,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */ #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */ +#define V4L2_PIX_FMT_HEXTILE v4l2_fourcc('H', 'X', 'T', 'L') /* Hextile compression */ /* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ #define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */ -- 2.17.1