From patchwork Wed Jul 5 15:26:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13302349 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32E62EB64DA for ; Wed, 5 Jul 2023 15:26:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B6B010E394; Wed, 5 Jul 2023 15:26:31 +0000 (UTC) Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5486710E38E for ; Wed, 5 Jul 2023 15:26:28 +0000 (UTC) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5979:7b6f:39a:b9cb]) by baptiste.telenet-ops.be with bizsmtp id HTSR2A00G45Xpxs01TSRMZ; Wed, 05 Jul 2023 17:26:25 +0200 Received: from rox.of.borg ([192.168.97.57] helo=rox) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qH4Ob-000ck6-Mx; Wed, 05 Jul 2023 17:26:25 +0200 Received: from geert by rox with local (Exim 4.95) (envelope-from ) id 1qH4Of-00AwXZ-9g; Wed, 05 Jul 2023 17:26:25 +0200 From: Geert Uytterhoeven To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 2/3] util: Add pattern support for DRM_FORMAT_NV{24, 42} Date: Wed, 5 Jul 2023 17:26:16 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-renesas-soc@vger.kernel.org, Laurent Pinchart , Geert Uytterhoeven Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add support for drawing the SMPTE and tiles patterns in buffers using semi-planar YUV formats with non-subsampled chroma planes. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- tests/util/pattern.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/util/pattern.c b/tests/util/pattern.c index 158c0b160a2ee870..f45a26ccec38f202 100644 --- a/tests/util/pattern.c +++ b/tests/util/pattern.c @@ -698,6 +698,8 @@ static void fill_smpte(const struct util_format_info *info, void *planes[3], case DRM_FORMAT_NV21: case DRM_FORMAT_NV16: case DRM_FORMAT_NV61: + case DRM_FORMAT_NV24: + case DRM_FORMAT_NV42: u = info->yuv.order & YUV_YCbCr ? planes[1] : planes[1] + 1; v = info->yuv.order & YUV_YCrCb ? planes[1] : planes[1] + 1; return fill_smpte_yuv_planar(&info->yuv, planes[0], u, v, @@ -1023,6 +1025,8 @@ static void fill_tiles(const struct util_format_info *info, void *planes[3], case DRM_FORMAT_NV21: case DRM_FORMAT_NV16: case DRM_FORMAT_NV61: + case DRM_FORMAT_NV24: + case DRM_FORMAT_NV42: u = info->yuv.order & YUV_YCbCr ? planes[1] : planes[1] + 1; v = info->yuv.order & YUV_YCrCb ? planes[1] : planes[1] + 1; return fill_tiles_yuv_planar(info, planes[0], u, v,