From patchwork Tue Dec 27 09:51:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Lin X-Patchwork-Id: 36801 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1311675wrt; Tue, 27 Dec 2022 01:54:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuEjHZ9WANJJbWgBz97kWhZDUuAhRe8erbF7dgzZ1J92n57MQlDRqHEu8fkqlJwo1bxbJct X-Received: by 2002:a17:906:9f28:b0:7c1:5b5e:4d85 with SMTP id fy40-20020a1709069f2800b007c15b5e4d85mr17253210ejc.51.1672134852658; Tue, 27 Dec 2022 01:54:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672134852; cv=none; d=google.com; s=arc-20160816; b=eXThF1vwUlh8jbGWJVX7TFFLfOKQ1n+C9uMEXFduzyISKiBTNZl/QGHeKrVoBPiRdo dbkdXuOaWoCG6MbssL6oYBbYVINZ6Ksg3Zef980F6T9cxnerj9JeuVNQHX59eufPhhvw 59SSe1pGJPM3AfqsGre+81ucQvRv0MbNiXG+vnKB+qcyAVmbJXuilaeayfCzhArXbZ2W umAEokCS5n7Chc6y6zJm/5ocsGExsnZX0XfcORA5RhoQozYndaWVQyB4rYSx5MNIj9or 94faLietrmewgfYL78kw15+AvWx5dtPCWJ8Voe4Q3NTxU85Fgc2JuKX8q5+vll+c2FjD 3uAw== 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=g/uLvTJmmBzuds9Az0fvihrnUknv2MS6FQWlRinADjY=; b=jfeEidzLjMYs7PynL0GRSC0NbUcD7BrDz0aHdlgSttGhwijCAWM4zZE4PsuunrIVjD RIbC0281xRTXN73lVip1NgmCfAplZDrUGZoCtFBw5PIBNAbOAjiW0TbzDzFUj4yHZNYK e84+UHE5r56jcn2UNiEJA/cNwCtfYttjTBxubME6wp3Kwtrjyw8o1+HMFWlEX/VlxaGK Frf7EsXp7o1w2GG2VpSDIpRtF92dy5nNaiEDrHTSS88PShB+2d0jOVnm8ZtFUd+MtKZJ UfF/MjdJtLVofNppJapm+W26v/aveWzx8MXnKr/7tNbol94sHFsO1a3oEM9BGYoZSh2W tyxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nN0K55Cw; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wu2-20020a170906eec200b00840f80a0b03si9405591ejb.118.2022.12.27.01.53.49; Tue, 27 Dec 2022 01:54:12 -0800 (PST) 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=nN0K55Cw; 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 S231332AbiL0JwU (ORCPT + 99 others); Tue, 27 Dec 2022 04:52:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231374AbiL0JwJ (ORCPT ); Tue, 27 Dec 2022 04:52:09 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A89B4A19F; Tue, 27 Dec 2022 01:52:03 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id z7so2888189pfq.13; Tue, 27 Dec 2022 01:52:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=g/uLvTJmmBzuds9Az0fvihrnUknv2MS6FQWlRinADjY=; b=nN0K55Cwt0ZufGIqodSrPZyy1QnTmi5nmzDp7pVA8UtSvdu9HCMs4UXQjciAQpP2sN LQDvOFv4Vb570I0VdTl+W6MO1Ok5Eh+402oKKV08jpEVQydwlI+DApXCNqagXhUKzRaY clcwfEEwZ6ciLKgqK4p8TR1mHIGIahoMZ7u2ERP8ANyNe4hZF4/7Tk3pUSnoI2fOHKV0 QqCBvRgCR/8B40O1gIEaJleiTs3FE/HYM9EtJ67fLSIu9tj1tk6nuR/Eitf9a6flCU+d 8t3XTtdy4kvrF72mF6CaQJ53sfk2fOh6HDfVq3vgHLh5Qjyvv6LIH6TyZg/9iswmzrGl gliw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=g/uLvTJmmBzuds9Az0fvihrnUknv2MS6FQWlRinADjY=; b=ASKMhqwIM/BRgCEC4+bkUPFeXtvo0jJTpWMaK5MyGoXoo796EbQb7xkWevWTEEfFus MoRB/vHc+mE8Ydoph7LXo2tCg816g+v5F6mmMmuyIjKAYmf3wWXsnJmyRR6XmJ6P8IYT ZQPF3fa28FNJsSPUmyeybuB6CYIJb5d5mtlQ/4HElgX6TghVRwk1E1Wjc14/xXXSPEKK UdN7DIHiyvubY02lxBFzZgDFIm4p8hTCy/32j4RAGM+4T2pCEJLr2QeWE2S1jQzm+Jp1 JXJV13iPRwio8aZeCqL067Hs6DAxeHy8isSG6pFNsy2pWCkROqtDvd92J18RUji0gwo9 V1Jw== X-Gm-Message-State: AFqh2kqW3Kft5tkzjVDwSGOPmapK1bSY/CTc6iCg7aAslPQBWZ4+CjxU XrbhsbC5nA0gLb82kobH0dU= X-Received: by 2002:a62:184c:0:b0:581:1e00:beeb with SMTP id 73-20020a62184c000000b005811e00beebmr8322309pfy.15.1672134722984; Tue, 27 Dec 2022 01:52:02 -0800 (PST) Received: from hcdev-d520mt2.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id 21-20020a621515000000b005813aec74bdsm2619052pfv.139.2022.12.27.01.51.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Dec 2022 01:52:02 -0800 (PST) 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 v10 4/7] media: v4l: Add HEXTILE compressed format Date: Tue, 27 Dec 2022 17:51:20 +0800 Message-Id: <20221227095123.2447948-5-milkfafa@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221227095123.2447948-1-milkfafa@gmail.com> References: <20221227095123.2447948-1-milkfafa@gmail.com> MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753360475571211512?= X-GMAIL-MSGID: =?utf-8?q?1753360475571211512?= 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 73cd99828010..e6ee0eebe691 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 8e0a0ff62a70..a0e387335139 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1494,6 +1494,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 1befd181a4cc..1ce21cc4fbf1 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -778,6 +778,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 */