From patchwork Wed Mar 6 20:03:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Grillo X-Patchwork-Id: 13584607 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 D4EEDC5475B for ; Wed, 6 Mar 2024 20:03:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 033DC1134FC; Wed, 6 Mar 2024 20:03:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; secure) header.d=riseup.net header.i=@riseup.net header.b="KBUssgDW"; dkim-atps=neutral Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by gabe.freedesktop.org (Postfix) with ESMTPS id 601961134F9 for ; Wed, 6 Mar 2024 20:03:51 +0000 (UTC) Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4Tqk063sk5zDqKS; Wed, 6 Mar 2024 20:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1709755431; bh=59X3+X8y6CRkn1d/16QLRYbU3Gb1zh88V0W6zGldVwE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KBUssgDWvwO9q+Gyw3HMYjgIM0oUz4Z4asd7o11r9o4zGCFdblqryU2gx7x8V81z2 kOpIk+hRxkw7eCFKbyMVZNdx8Gh1VR2BuUxu0yi2kgu69UCAAUH68c/n13pYgyxF4T DcnFyDwhSPa4wEalA6KhGslmAeaYJnK3jpRmsi0w= X-Riseup-User-ID: 6CED4191914E2568ECF5ECDD7B8DA489F5CCA88F9C04B501EB2B99EDD3282301 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4Tqk014150zFvsZ; Wed, 6 Mar 2024 20:03:45 +0000 (UTC) From: Arthur Grillo Date: Wed, 06 Mar 2024 17:03:11 -0300 Subject: [PATCH 4/7] drm/vkms: Fix compilation issues MIME-Version: 1.0 Message-Id: <20240306-louis-vkms-conv-v1-4-5bfe7d129fdd@riseup.net> References: <20240306-louis-vkms-conv-v1-0-5bfe7d129fdd@riseup.net> In-Reply-To: <20240306-louis-vkms-conv-v1-0-5bfe7d129fdd@riseup.net> To: Rodrigo Siqueira , Melissa Wen , =?utf-8?q?Ma=C3=ADra_Canal?= , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , arthurgrillo@riseup.net, Jonathan Corbet , pekka.paalanen@haloniitty.fi, Louis Chauvet Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com, seanpaul@google.com, marcheu@google.com, nicolejadeyee@google.com 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Arthur Grillo --- drivers/gpu/drm/vkms/tests/vkms_format_test.c | 2 +- drivers/gpu/drm/vkms/vkms_drv.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/tests/vkms_format_test.c b/drivers/gpu/drm/vkms/tests/vkms_format_test.c index 4636b013602f..3522ecee960f 100644 --- a/drivers/gpu/drm/vkms/tests/vkms_format_test.c +++ b/drivers/gpu/drm/vkms/tests/vkms_format_test.c @@ -113,7 +113,7 @@ static void vkms_format_test_yuv_u8_to_argb_u16(struct kunit *test) for (size_t i = 0; i < param->n_colors; i++) { const struct format_pair *color = ¶m->colors[i]; - const struct conversion_matrix *matrix = get_conversion_matrix_to_argb_u16 + struct conversion_matrix *matrix = get_conversion_matrix_to_argb_u16 (DRM_FORMAT_NV12, param->encoding, param->range); argb = argb_u16_from_yuv888(color->yuv.y, color->yuv.u, color->yuv.v, matrix); diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h index 393b76e7c694..3d62578499ab 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.h +++ b/drivers/gpu/drm/vkms/vkms_drv.h @@ -47,6 +47,10 @@ struct pixel_argb_u16 { u16 a, r, g, b; }; +struct pixel_yuv_u8 { + u8 y, u, v; +}; + struct line_buffer { size_t n_pixels; struct pixel_argb_u16 *pixels;