Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp132869lqi; Wed, 6 Mar 2024 12:08:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU/cdvpLWnD9GmWcDGLJkhyWRaSwcwQYFIK+zuVsAbn+Wdmowg4aJdGd4TPHDTpZbg4DoeU1jn//Ozn7AFHvLFZ2K5f62e4RsmffytIAg== X-Google-Smtp-Source: AGHT+IGXG2TS8V5160nWxyQFLK4SxzCLDQPctjS5JjUrl4x6X/e3XKt8a1d3RaZh5d9fvVKwFpc7 X-Received: by 2002:a05:6a00:1955:b0:6e4:eb29:357 with SMTP id s21-20020a056a00195500b006e4eb290357mr19836444pfk.12.1709755725223; Wed, 06 Mar 2024 12:08:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709755725; cv=pass; d=google.com; s=arc-20160816; b=g7I1/tYADrAyPoCnWQeiwNkCXhuhTv/h9MaEqjTNAihVNNlq+h6Nqu3/g5Gy1Mkj47 +KlmP/Aq4fUCESWGAZ8o1tNn5RGtmgNBOYkK5xqLvvVcHmUGtl2Z21wnbmcZlC4BRF2G v1oiYLrEB/lqTPDwz3jU1L+Ky1/qbHXW8lWbx+fVRwssWsQW42rMNmIePiHXzGC5b+A+ DVzObV1sRg+aid9IJ9ks9b14lhnxxUjQLr9BQQ7Pdz7ASlJdo//li9idfU1ozlEEoolt 9xBB2wVe2opugvGI/8ZcQ3kQKKnRf8ZFDRM71kB574lQVdaEW8yxRt4QOzfJelX5eBg/ hl3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=jw+qUkuIzZbNufNeBeCeJ/8Gref3iD5nwAzGT+yPJ64=; fh=4CsK72aiJy+h/EShV5QBE7/0hoTm6C2hvI6ysn6ZfMM=; b=yjlRDaav0dvJSxfBVdqOxayTxNpA41UjyO/pdu9y2vHjGKlhBV/wN9pYFfjvBhRKQd 62OhjDRW7UQHkexUHU7x5o3Z9+0/fQKKP3Vu7QTgh1C6KXXHE/V8qMmFgf2zibjDWVVA oE9klphKLyJ4202rDnVgPdiHzslGhcy30CEJB/R/fD1pNUjDCLKB3kz++sP+EBUp7yYX ZiGWDNrA45coAaMUieffP1QdpAOdIkdtFvAEv/Nkq2KiQLCkkg6gjnodwOijvuEwBSFx q6ykR5Vc9ZkGW6fjPg9ozwUIsodjFaIxn9UL50AeVvraauuHCSbiYMUwp3oaJ6iU8naB ntTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=sxaH4jB+; arc=pass (i=1 spf=pass spfdomain=riseup.net dkim=pass dkdomain=riseup.net dmarc=pass fromdomain=riseup.net); spf=pass (google.com: domain of linux-kernel+bounces-94534-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94534-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=riseup.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 14-20020a630a0e000000b005db9566a62fsi12644594pgk.697.2024.03.06.12.08.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 12:08:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94534-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=sxaH4jB+; arc=pass (i=1 spf=pass spfdomain=riseup.net dkim=pass dkdomain=riseup.net dmarc=pass fromdomain=riseup.net); spf=pass (google.com: domain of linux-kernel+bounces-94534-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94534-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=riseup.net 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 263CAB23C22 for ; Wed, 6 Mar 2024 20:06:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71BC41448FA; Wed, 6 Mar 2024 20:04:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=riseup.net header.i=@riseup.net header.b="sxaH4jB+" Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) (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 0EF0414403F for ; Wed, 6 Mar 2024 20:04:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.252.153.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709755444; cv=none; b=GHEGrwLWN6kOo50oIxJCja6Ne6TfkegJnXkNtnbnzGG5jFLr7AEoVl9N/sKWikXang+ufrXBmnRhFNy9dUuFEEUMGPpIn7238LO9T6ef3Qs1mYBGcSUme3sISE6wknz1h0KyyPYwblRQ4zpLWyNP1I629kCW+AlSybj4jtHG12I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709755444; c=relaxed/simple; bh=yXbuN+CoZuGbUAgSQaHGYWiyhuige5NUNnLWq/soBQM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GjH1Lj+ZAGbABeVXc+bhX6rZYRXG7BzVeGm170z5ep9hekMS5UGWe17rpDNC3HxlJzXdk24HntvGHtL+CjgppJq+y+u8kNRUjWiqHwVszRFHgY+ZqFuFBODD+EUQhWX1vYjhKDZ/z16Bdra/fG43sQgDNoDGf9F5oPHcgUZu2Mc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riseup.net; spf=pass smtp.mailfrom=riseup.net; dkim=pass (1024-bit key) header.d=riseup.net header.i=@riseup.net header.b=sxaH4jB+; arc=none smtp.client-ip=198.252.153.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riseup.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riseup.net 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 mx0.riseup.net (Postfix) with ESMTPS id 4Tqk0K6DYWz9wLd; Wed, 6 Mar 2024 20:04:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1709755442; bh=yXbuN+CoZuGbUAgSQaHGYWiyhuige5NUNnLWq/soBQM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=sxaH4jB+I12ibLBpFeegaJT5HHbr9J8j1ezVHJuBPLXC0BVfhqvbjVfBxb7b+6JCI RF+vx+UTTLk3b4s5BI5Cgwr8C4mYoO4uDa7hqYuCbn5M1k0l3wstsYoi8P4YgWHp8U nRXk71dhMWSTZSUIgsT3Kya+Z+5R8JgDdDarHqyQ= X-Riseup-User-ID: 8880DFCE1D029D93798CB6476356726EB753FBDD344B564393D9FDDA451E06DC Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4Tqk0D2vmCzFvsZ; Wed, 6 Mar 2024 20:03:56 +0000 (UTC) From: Arthur Grillo Date: Wed, 06 Mar 2024 17:03:13 -0300 Subject: [PATCH 6/7] drm/vkms: Change the gray RGB representation 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240306-louis-vkms-conv-v1-6-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 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. 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