Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1311328lql; Tue, 12 Mar 2024 13:16:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUUFK3SuF4pYEQwXvDhx1zFlW2R1tcvsUi7aADy2RKoUjiZMYhW9xYOBGTCg1xSEzoGUl4SNfKqNvfwQxDb7H2zivhLumQagXvyXuCb0Q== X-Google-Smtp-Source: AGHT+IGYM57zugMOPj9AhXtMK6MK8Xxn9kJ+sYludyuMSjkrlJo7a33y1YFI2ylo9ZEjVAqi5lQB X-Received: by 2002:a17:903:22d1:b0:1dc:4190:38f3 with SMTP id y17-20020a17090322d100b001dc419038f3mr1873504plg.13.1710274605440; Tue, 12 Mar 2024 13:16:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710274605; cv=pass; d=google.com; s=arc-20160816; b=HJxP0loUq54tnAv9/g7bS0a6DnXna3eJdZLZluMEIC2HUiPAXanPa8Y4kY7QmjkxPu xjBOOPJ0WulZb8PML1mVMZ6lsBfv2t2H40yn5KIJeFkGhFLttXGpQN6TutoNNXvBtma+ O2FVW82UsX+IS8FoZl6nOP8v+nEguJBwYjdANDyuKOnypdMeWawrY6zRkaDYyGyHd29E Voxw6msnbjPLIBWXPZ4gS4X7eUNSiAE2VMVvkq/KBvJ/dCejJ7smv8ikYxJrkHXnDLqp 43/5+jzv+LIXk3yeeecZb56aHrqQRgCjkrwth6cy9DV1+OciacxhlMFbynAuhy5mB8hZ jLKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=icJZII2NzZ8YTpuhYylAOUy/6nsXY8cVerNtIDwM3N0=; fh=VK0CYqqefElW456HQQS5KFBAU9reQYzrLnZ0D/JDj5g=; b=P7ZnequBMtpmbrODWPyomPkQBRy+sd1o9vo3OodGVLVN5wemTpJ6LRoyZ9kFqJRZGl mOZBMZ3PLWFEm2PMaOkIgAJX0gM9H+2K7z3v5AB+yRNOs9UrFFxoJRCJAKnUa2IWLQbB prT0gNWtNbEURLDPH2MW9O+9eMrBgRJqVw6iYSPwZI/+zy4k/9VqTRCkhbNiHjHNyNpI EavLQe3lw74bmHPwm82/3vMaZRsTXhN5hX2Q+Ej7U7WSBpI8W+NbkI6Hn283T5nFPUpr teqqskET3w2AHq07VCR24FYObxTy6emOQJVqe401R1cUKcZS/hMF2KUn6r1WvKpVti14 W8Nw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=CRUkd854; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-100752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100752-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w20-20020a170902d11400b001dc6699f553si7233010plw.360.2024.03.12.13.16.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 13:16:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=CRUkd854; arc=pass (i=1 spf=pass spfdomain=igalia.com dkim=pass dkdomain=igalia.com); spf=pass (google.com: domain of linux-kernel+bounces-100752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100752-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1DFA92843EC for ; Tue, 12 Mar 2024 20:16:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C7A4A1428FC; Tue, 12 Mar 2024 20:16:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="CRUkd854" Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (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 426967E104 for ; Tue, 12 Mar 2024 20:16:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710274599; cv=none; b=LWCL9znszmytFraowBZyIc6A3Es9FzsmpGHKLCSYrQYb2a8bO7oFOzB96CH2KtdxnkkBvncyoe8/BuaIuUz3XjI992XwXgm2oAEYJSm4NZupUCZBqyLPSbfYlQ8LuQisj79t+Er2YfXJ7JX0s7HlSz1Wo2steCYob6xrj0uAsPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710274599; c=relaxed/simple; bh=+e8AniSaQWLlkyHKk8x3jYF5zupwMoaIeiUhEeWHoi4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OPtHt4Rrk0lttzRPNZMVJWaq5QjCz+rfBcwmz76fBSXIpY4EpDoadcbvBAbGRt+eNFZmEDizG2iqaPBDQdC9q0pjN3tdE2V6QHQawX2GYHtzFSPwX+Q6A3w5Tor8KGNs95COcADVi4ZwN8mRGtdwm4bn7TDK6AMZNFqEekpibbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=CRUkd854; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=icJZII2NzZ8YTpuhYylAOUy/6nsXY8cVerNtIDwM3N0=; b=CRUkd854ft2j4bz3Ta5s9wxdpW KZuvLszbFxDwC1rbr1BFT8JX1mnOL+WEVb+YD6QUy7MYhqPzIMUxjR75lAEYMoi5qzKwkzhjUgHww d6hPK0z/ufuR8dR32hsPazYwRrvbrJ3fs/Kw8WpviryU1FfXaTrp8dnKSbAvNm0bVhAxE0hg0JSPf 1Ioz89EYCUK2NEkWLuHL4xNEJkBXUVy13nyhw34zdpL8U5XfKUyjZuZh8y+pfp3n2cBD6C9NxxinN xqivvzWOMTQEY9UXoz6lFRPSOvk6zfXPSbRynlYziCP4Cu0P93xCZP9+ohaqe9juLchDaIgfecLue ggVquWyg==; Received: from [189.6.17.125] (helo=mail.igalia.com) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1rk8Xk-009VhK-IL; Tue, 12 Mar 2024 21:16:13 +0100 Date: Tue, 12 Mar 2024 17:16:01 -0300 From: Melissa Wen To: Arthur Grillo Cc: Rodrigo Siqueira , Melissa Wen , =?utf-8?B?TWHDrXJh?= Canal , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Jonathan Corbet , pekka.paalanen@haloniitty.fi, Louis Chauvet , 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 6/7] drm/vkms: Change the gray RGB representation Message-ID: <4jvdfkfnqsn6dcuybruyvexop5du4sd6mmmjvtmeso5kyg4sdi@klimifhnenqm> References: <20240306-louis-vkms-conv-v1-0-5bfe7d129fdd@riseup.net> <20240306-louis-vkms-conv-v1-6-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=us-ascii Content-Disposition: inline In-Reply-To: <20240306-louis-vkms-conv-v1-6-5bfe7d129fdd@riseup.net> On 03/06, Arthur Grillo wrote: > Using the drm_fixed calls, this needs to be changed. Which in fact is > more correct, colour.YCbCr_to_RGB() gives 0x8080 for same the yuv > parameters. Hi Arthur, For consistency, shouldn't this change be together with the previous patch that uses the drm_fixed api? I mean, a single patch that changes to drm_fixed calls and adjust the color values accordingly, avoiding room for mismatches? Melissa > > Signed-off-by: Arthur Grillo > --- > drivers/gpu/drm/vkms/tests/vkms_format_test.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/vkms/tests/vkms_format_test.c b/drivers/gpu/drm/vkms/tests/vkms_format_test.c > index 66cdd83c3d25..49125cf76eb5 100644 > --- a/drivers/gpu/drm/vkms/tests/vkms_format_test.c > +++ b/drivers/gpu/drm/vkms/tests/vkms_format_test.c > @@ -48,7 +48,7 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = { > .n_colors = 6, > .colors = { > {"white", {0xff, 0x80, 0x80}, {0xffff, 0xffff, 0xffff, 0xffff}}, > - {"gray", {0x80, 0x80, 0x80}, {0xffff, 0x8000, 0x8000, 0x8000}}, > + {"gray", {0x80, 0x80, 0x80}, {0xffff, 0x8080, 0x8080, 0x8080}}, > {"black", {0x00, 0x80, 0x80}, {0xffff, 0x0000, 0x0000, 0x0000}}, > {"red", {0x4c, 0x55, 0xff}, {0xffff, 0xffff, 0x0000, 0x0000}}, > {"green", {0x96, 0x2c, 0x15}, {0xffff, 0x0000, 0xffff, 0x0000}}, > @@ -71,7 +71,7 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = { > .n_colors = 6, > .colors = { > {"white", {0xeb, 0x80, 0x80}, {0xffff, 0xffff, 0xffff, 0xffff}}, > - {"gray", {0x7e, 0x80, 0x80}, {0xffff, 0x8000, 0x8000, 0x8000}}, > + {"gray", {0x7e, 0x80, 0x80}, {0xffff, 0x8080, 0x8080, 0x8080}}, > {"black", {0x10, 0x80, 0x80}, {0xffff, 0x0000, 0x0000, 0x0000}}, > {"red", {0x51, 0x5a, 0xf0}, {0xffff, 0xffff, 0x0000, 0x0000}}, > {"green", {0x91, 0x36, 0x22}, {0xffff, 0x0000, 0xffff, 0x0000}}, > @@ -94,7 +94,7 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = { > .n_colors = 4, > .colors = { > {"white", {0xff, 0x80, 0x80}, {0xffff, 0xffff, 0xffff, 0xffff}}, > - {"gray", {0x80, 0x80, 0x80}, {0xffff, 0x8000, 0x8000, 0x8000}}, > + {"gray", {0x80, 0x80, 0x80}, {0xffff, 0x8080, 0x8080, 0x8080}}, > {"black", {0x00, 0x80, 0x80}, {0xffff, 0x0000, 0x0000, 0x0000}}, > {"red", {0x36, 0x63, 0xff}, {0xffff, 0xffff, 0x0000, 0x0000}}, > {"green", {0xb6, 0x1e, 0x0c}, {0xffff, 0x0000, 0xffff, 0x0000}}, > @@ -117,7 +117,7 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = { > .n_colors = 4, > .colors = { > {"white", {0xeb, 0x80, 0x80}, {0xffff, 0xffff, 0xffff, 0xffff}}, > - {"gray", {0x7e, 0x80, 0x80}, {0xffff, 0x8000, 0x8000, 0x8000}}, > + {"gray", {0x7e, 0x80, 0x80}, {0xffff, 0x8080, 0x8080, 0x8080}}, > {"black", {0x10, 0x80, 0x80}, {0xffff, 0x0000, 0x0000, 0x0000}}, > {"red", {0x3f, 0x66, 0xf0}, {0xffff, 0xffff, 0x0000, 0x0000}}, > {"green", {0xad, 0x2a, 0x1a}, {0xffff, 0x0000, 0xffff, 0x0000}}, > @@ -140,7 +140,7 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = { > .n_colors = 4, > .colors = { > {"white", {0xff, 0x80, 0x80}, {0xffff, 0xffff, 0xffff, 0xffff}}, > - {"gray", {0x80, 0x80, 0x80}, {0xffff, 0x8000, 0x8000, 0x8000}}, > + {"gray", {0x80, 0x80, 0x80}, {0xffff, 0x8080, 0x8080, 0x8080}}, > {"black", {0x00, 0x80, 0x80}, {0xffff, 0x0000, 0x0000, 0x0000}}, > {"red", {0x43, 0x5c, 0xff}, {0xffff, 0xffff, 0x0000, 0x0000}}, > {"green", {0xad, 0x24, 0x0b}, {0xffff, 0x0000, 0xffff, 0x0000}}, > @@ -163,7 +163,7 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = { > .n_colors = 4, > .colors = { > {"white", {0xeb, 0x80, 0x80}, {0xffff, 0xffff, 0xffff, 0xffff}}, > - {"gray", {0x7e, 0x80, 0x80}, {0xffff, 0x8000, 0x8000, 0x8000}}, > + {"gray", {0x7e, 0x80, 0x80}, {0xffff, 0x8080, 0x8080, 0x8080}}, > {"black", {0x10, 0x80, 0x80}, {0xffff, 0x0000, 0x0000, 0x0000}}, > {"red", {0x4a, 0x61, 0xf0}, {0xffff, 0xffff, 0x0000, 0x0000}}, > {"green", {0xa4, 0x2f, 0x19}, {0xffff, 0x0000, 0xffff, 0x0000}}, > > -- > 2.43.0 >