Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp239147lqi; Wed, 6 Mar 2024 16:03:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUfxcey0uq8SDNOA6tZ7D+xi/52mccdXZBEhamaaAYPaXxOPYNyhnppj0jbqp3cZaNHD41rnNrkjFUDfTivfQKeytJa5pH2ZRu2Ekeg8A== X-Google-Smtp-Source: AGHT+IFZQuR53Qg7afyjRWvrofKSIeKlKUBc9JtKBa46fo4SZmJH+wV49yfqgd1c+80BarCUtRCF X-Received: by 2002:a17:906:4818:b0:a45:2fc4:f25d with SMTP id w24-20020a170906481800b00a452fc4f25dmr7307142ejq.12.1709769830665; Wed, 06 Mar 2024 16:03:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709769830; cv=pass; d=google.com; s=arc-20160816; b=fqoiN1KcezBOf4QzsLMmYpLqrq++eP69xc8IyNBJOaAgP0CkJgEVPCtWNdjhcdl51H 7yLQfRZYS1S2dDvsdAVP4FyT8xxL2Lqo5D4nxVtuwEW47kKURBTNbpuB3zvt+7vLTLIA A0Fn1kPSdA9xGmFCujXnHvvDP0IRz7FL7DPX/3GC0nqhPIynSaSISOyseiV2FmrTXsmx F7KC6Fp5D783e1xCRML7u5ddvDAEByANvQ0sLoqUYAaWz11ozjdWJyklGa3hCd+XxDER 9vEZTfppZSUZ5n+An8nkVXExyoqy7EquzTtjx9OxSI/CpfDazn3QjCh34kQQouy+KUjB O9Tw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=YV8E64LTaxsAW1jsNczlEzcxi3GT245AiC4UGrhHsUI=; fh=pEOvsqHZyKeBaOjoipg1u26T/dNaZ9UU6E/qX0hC/Lo=; b=c75UqdTcWtw6FBADww2n6v2ojQP61rHQyPQVZIk8VvBPSFzcU02CZNKhrDQ16tTPlu iHL7GEAqF0ImiKgQQ9Lzg5x8NPnhgWgWRnUNHD1XLYUBe9J0LLtvUS/NbT5Qgp0RjXat Ey1cpRghui9l6wWQFIWLnKV2uH45dj+CsWpegngfqvNVG+20QlB0isFWtMZ4A3DdYREF 4hhzA1DU/QRVc/OPv01i0YLPtS9pt1HANeokb1e7FfTUtCRnbcRQX35AJGCmQAzQh+S1 K5IhJeF4O25i+6oxVOMCvaxIDjl0FK8DWRmIQzukGVuM6X/g+qOh+NMx8AqDWHWA88iK HN+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=peexX0AA; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-94762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94762-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lt26-20020a170906fa9a00b00a456286be4dsi2864649ejb.127.2024.03.06.16.03.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 16:03:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=peexX0AA; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-94762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94762-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 670471F25B6A for ; Thu, 7 Mar 2024 00:03:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A248D1FA6; Thu, 7 Mar 2024 00:03:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="peexX0AA" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7573917F0 for ; Thu, 7 Mar 2024 00:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709769820; cv=none; b=OplQs96794SUdMHPcavwXe9yVu3dibd78d69T+D84w2c6lYQmb8yWZZiRmZVxVOd+QqLOhU82l26BR3A6o1o+eoaQt2oF+BgNhBm2luUa5o83qv1iUGhN7rP/Ea3ddYwUF1TaQFWOIkRsXR7XRdrwqCkQ6486vFbbdDFORZPdsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709769820; c=relaxed/simple; bh=RmIaE95j9tGXdTs/a5M9v0UNVZUALUbMvKJoZsyGp6A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NZjAd6hG9LOUDiFz6zaMuvk176IF0jZLLp7lmIyoA7hVejdXBuQwP1FGxVBQkPqhKUPWjRM43qFwNCPdtV+ovFFnEEFaKTdzpB2vGqAmkW6iOSprRY6kTpvmNkuBksD657iRmJav6tIIR2m9AZpVP/4u1DvsNXczWzgpJlVkc5Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=peexX0AA; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 9C5B360003; Thu, 7 Mar 2024 00:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709769816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YV8E64LTaxsAW1jsNczlEzcxi3GT245AiC4UGrhHsUI=; b=peexX0AANXlwYG/zkq1lh5bvcDkR4fuWupWrXew1xWKDoA2nh9qH4Oa8i4lRKxqiApBJsB N3L+NL3g3WU49hDCburHjmTJnN99968AyIp/opJG2aopR1DGib1K2JEFYTHjHdj/6OmM7L +86zvJAbY7zYguuiwtGJZiiK8y1Mt0eLmDprVmAknuDLYyc73Iv5vTtpFTBEVvLVlmrF7c Mr1MRJEyK1zNiZp8IWnSdpXumwcVAyB6EmMfPQTYDCX0HsvUhAd9KiOlpXh8b/s9rK75Q9 UYlS25AYWQQZY9RmCRizn6/bLLsOmMZHOIXL8d31GOOWbbCriyTU3/tsRKO6mg== Date: Thu, 7 Mar 2024 01:03:33 +0100 From: Louis Chauvet To: Arthur Grillo Cc: Rodrigo Siqueira , Melissa Wen , =?iso-8859-1?Q?Ma=EDra?= Canal , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Jonathan Corbet , pekka.paalanen@haloniitty.fi, 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 Subject: Re: [PATCH 4/7] drm/vkms: Fix compilation issues Message-ID: Mail-Followup-To: Arthur Grillo , Rodrigo Siqueira , Melissa Wen , =?iso-8859-1?Q?Ma=EDra?= Canal , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Jonathan Corbet , pekka.paalanen@haloniitty.fi, 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 References: <20240306-louis-vkms-conv-v1-0-5bfe7d129fdd@riseup.net> <20240306-louis-vkms-conv-v1-4-5bfe7d129fdd@riseup.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240306-louis-vkms-conv-v1-4-5bfe7d129fdd@riseup.net> X-GND-Sasl: louis.chauvet@bootlin.com Le 06/03/24 - 17:03, Arthur Grillo a ?crit : > 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; > +}; Can I move this structure in the test itself? As discussed with Pekka, I think it's not a good idea to have such specific `pixel_{fmt}_{size}` for each variant. Leaving it in vkms_drv.h give the idea of "for each new kind of format we have to create a new structure". > + > struct line_buffer { > size_t n_pixels; > struct pixel_argb_u16 *pixels; > > -- > 2.43.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com