From patchwork Tue Jul 4 06:44:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Lin X-Patchwork-Id: 699469 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 2B5D7EB64DA for ; Tue, 4 Jul 2023 06:44:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231308AbjGDGor (ORCPT ); Tue, 4 Jul 2023 02:44:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231280AbjGDGoo (ORCPT ); Tue, 4 Jul 2023 02:44:44 -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 19319E75; Mon, 3 Jul 2023 23:44:38 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5577905ef38so1958798a12.0; Mon, 03 Jul 2023 23:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688453078; x=1691045078; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DcZ40MWQA/sGwhBagN40H0eAtoEJbkk8k3AmGaDhT2I=; b=ZJx/7HkmdvbhN+Qd0L29HkPOpLGzpBdWO38R5J3gdG6HKnhGilCnyCXVEtcA2C2j7+ bJm27WmWg+TUGmTps7YOn3/rgZt0pU19yD/Ls4JJMwAI0AsOMI1l+aRT+BfjfhE7JRiw uq3M4Aw0TYMMLj9s2kkNcpaeeGM2uzBOLyCxdfDnQMjFbp2wNNfjM8k6nTLqDoJHBndJ 9QwnX+Zsgmb20QcuwME6HTDco4nJXsr7LxJ0psdUQBE2CIXAulGohRBAFfxo/995ieTi 2QA6pDYc6TV6Ox9VVAGVsRMu8YY8883o5D1Dh5S5bqQABgIjajYmWJjWZR0oH10RD7M9 VPNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688453078; x=1691045078; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DcZ40MWQA/sGwhBagN40H0eAtoEJbkk8k3AmGaDhT2I=; b=fh3CuOmHV+e3qVBI1o6Bm2ou2l+CuAu1RT2VQBR286xlEa1psFWqLv1Y+r8yUCzd+h 53Ma5iyFi8ewJPOxCt/Rg5JpEt0hDjDGrsfEnQ/igbbJ8sfrAQ6VeFo1a21Z2jZZQgCy uMpGeILj8yEgu6B6tLdav5vrcPSjKboQyGavOqbgtPCEQuESrkGxXH6f0/bnfud6D7bn hVT4wa0RGlV6j2sSbXl2MgVNHa+NvuNJg0gzRpcDaE9yVo4hn4hxRaxjFIz45RfiifFU C36VrwqnWVF3R9GkkreBJypDdVV3X4fbI8R5p37tHlfLzYTsKv3R3o/ETx0RxpsqVR3j uYEg== X-Gm-Message-State: ABy/qLbRiEn6SvCUvPfw3sUv+DE4mGogaHKUF04eNiBlIcfM9I2DDTY7 bHmPjvdXbEkM4uMXSYoyoss= X-Google-Smtp-Source: APBJJlEB7m8aC0QWYaE2ZWrz8E6kYFNGm/TKBvDO6OuUBXp5tKhUDas5/worh9gcHWCsIyQfdlkYmQ== X-Received: by 2002:a05:6a21:7889:b0:121:ef3f:ed0b with SMTP id bf9-20020a056a21788900b00121ef3fed0bmr13265318pzc.60.1688453077952; Mon, 03 Jul 2023 23:44:37 -0700 (PDT) Received: from hcdev-d520mt2.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id u2-20020aa78382000000b00668652b020bsm14863429pfm.105.2023.07.03.23.44.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 23:44:37 -0700 (PDT) From: Marvin Lin To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl, avifishman70@gmail.com, tmaimon77@gmail.com, tali.perry1@gmail.com, venture@google.com, yuenn@google.com, benjaminfair@google.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, andrzej.p@collabora.com Cc: devicetree@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, kwliu@nuvoton.com, kflin@nuvoton.com, Marvin Lin , Nicolas Dufresne Subject: [PATCH v13 4/7] media: v4l: Add HEXTILE compressed format Date: Tue, 4 Jul 2023 14:44:09 +0800 Message-Id: <20230704064412.2145181-5-milkfafa@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230704064412.2145181-1-milkfafa@gmail.com> References: <20230704064412.2145181-1-milkfafa@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add HEXTILE compressed format which is defined in Remote Framebuffer Protocol (RFC 6143, chapter 7.7.4 Hextile Encoding) and is used by Encoding Compression Engine (ECE) present on Nuvoton NPCM SoCs. Signed-off-by: Marvin Lin Reviewed-by: Nicolas Dufresne --- 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 58f6ae25b2e7..ac52485252d9 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst @@ -275,6 +275,13 @@ please make a proposal on the linux-media mailing list. Decoder's implementation can be found here, `aspeed_codec `__ + * .. _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 a858acea6547..b67a83e9dd65 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1506,6 +1506,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_QC08C: descr = "QCOM Compressed 8-bit Format"; break; case V4L2_PIX_FMT_QC10C: descr = "QCOM Compressed 10-bit Format"; break; case V4L2_PIX_FMT_AJPG: descr = "Aspeed JPEG"; 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 aee75eb9e686..04aa5f808893 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -800,6 +800,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_QC08C v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */ #define V4L2_PIX_FMT_QC10C v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */ #define V4L2_PIX_FMT_AJPG v4l2_fourcc('A', 'J', 'P', 'G') /* Aspeed JPEG */ +#define V4L2_PIX_FMT_HEXTILE v4l2_fourcc('H', 'X', 'T', 'L') /* Hextile compressed */ /* 10bit raw 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 */