Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp281341lqo; Thu, 16 May 2024 06:19:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVf8UPSwzAVT6g0SCG92W1NtKPIoMMRmRXd2QDYV5q0GyhI1J57yIalcj7ElxKPyY/C1aaqAwhJfCK+Rz8sogi02LLoh9eGRKcLkBnMCA== X-Google-Smtp-Source: AGHT+IF97vb+0yXdGP9xJCdLfauIoNBnbJcIE7ezxNusMrsI9X8UyiN85nCkSJcdrjHQfjUUP0t4 X-Received: by 2002:a17:907:36f:b0:a52:6fcb:564a with SMTP id a640c23a62f3a-a5a2d53aa70mr1264561966b.9.1715865574851; Thu, 16 May 2024 06:19:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715865574; cv=pass; d=google.com; s=arc-20160816; b=pfNY+fZHsUBojr/QNJw4kQLZae6q1qH/74IOjxDMHUuAZDVT+b0S2havmFpmzmoi2S IBgnuQsCaV6pM0IVRMzslYYeAYpoQY18EYXIcBSQQeO4ya+s8tx8+HQHB0IiOkLXcMaN e3lJVnE6JcCeILPwCuDbZjDF/j/sXNsiMYNXKP00ifXivmE/665npkjakB6J3rS9Xj1+ MAx6N7bmZb2puPqF7lJEaa9BCZlq2g/JuEgpnUBZKMMCNhz7vN26tTPV0QjVdpauSV8J z+f+14RSF0hgHhXG20YjtQ+6T+51qwdoPYOUAVvbRIddr/9L2pD7+BGqgrvy6MNXj3c0 kAaw== 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=MrS8b39rxDfx4oFYW2S/d2LnfHxde+rqsW+6XOgTsco=; fh=5zsZX+ku5K7/KOEG8/PmwjZDx2OHq0Nmu7y8/HNkT0A=; b=cLdn8X9OIW6Z656bvSxQmowbzsk1piQF1aixbf06pujIMwTXHaXagJq24IcAZAj5GL nHO0dQM2u0JVKS8SNRpdr7JhG7rHSj4/6a3wUn0Wer0esBiu6ObdkxoJ+l2gKSymcNON IgX7lzoEzM3/srNKdrab1+6994HoN72xrRtqo3ngAxqwFZUpxy+op7smG5KrF61mfLVs 54YaGY6hj/JM9CUMb2emnzxb3m79i3sUroxqN1bSW4e8qmbFgikHjWl8k2o9ftQCB2rL pXIjSMgVTjTWjtO8ul51d8LrjwHo1HinJJnwSW3OkFueomC+QMc3CBhy9GDPBUvsVHMn JG6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=pNftCPQq; 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-181100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181100-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 a640c23a62f3a-a5a1797c280si786139066b.249.2024.05.16.06.19.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 06:19:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181100-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=pNftCPQq; 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-181100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181100-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 91B8A1F21E73 for ; Thu, 16 May 2024 13:19:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 216F014D2A6; Thu, 16 May 2024 13:18:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="pNftCPQq" 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 8D98514B071 for ; Thu, 16 May 2024 13:18:35 +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=1715865517; cv=none; b=m4EH1DUgK+L5cobDd/qXj+1GS8HL5StYQ7HI7j6DAvLlO+J+xOnGFvI4OuDOK+uMqA8tfjz+rCyybDqoPTmh0ONSGOYNWhnqeTUAkZzT9RABRmoUHP2I2uzC9dRdxssdIhzwAwb2euFjRWEcbJoIdx9ITyiF0SQr1WKBs7MNOE0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715865517; c=relaxed/simple; bh=/vrxMtadDQYtqI4w4rk5sueAQ3y7eapu4/8W4sRdUvQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Kv59fEmOvyrYJZ00K45NTe7f6IbmhQvEbTOw6tZskpaxl+P8PrrPJy9xTxIWUrQplWTtWExFfRcqmYIZwz9t+8K2h+3XL1a0HapZFgXiKDc+ybY4qY2o6vLf7AVj+cKsMa0JlgJpXVDdH7ds9xz8XTdVWM4OPn7pnYsK3XAyXu8= 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=pNftCPQq; 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 7233E60002; Thu, 16 May 2024 13:18:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715865514; 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=MrS8b39rxDfx4oFYW2S/d2LnfHxde+rqsW+6XOgTsco=; b=pNftCPQqP1awGmnbstlU4DBekkFnYGGJX4eQo4moAulGT9IEZ3+zKZqfcaQTelHwi0KsMW Kq7HlJ4hOgjgQFC1uETzmgb6oMo6kQZJ4Bupmw8o0KFP9QkRFgLrUJEujd8imEkSTe0YOT HWAJ+ZnEerm3SAeb5vRmCsWuWBZRpgHJvGixgODkOhF3V91VdatIgkod6FbHcPcJ8beQD0 R2qkAPNYjXliq8GyfAYZs2zjJbYLgTb/LoWT+95p87pQfuz7P8o/+4qa/5vBDaYhEX7hxt ITOWb+5inqTZs+VaqagW0NakMXANfAGNUjulzug9UaEqVeATcpFrQDMjanPfwg== From: Louis Chauvet Date: Thu, 16 May 2024 15:18:21 +0200 Subject: [PATCH 5/5] drm/vkms: Add support for RGB888 formats 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: <20240516-b4-new-color-formats-v1-5-74cf9fe07317@bootlin.com> References: <20240516-b4-new-color-formats-v1-0-74cf9fe07317@bootlin.com> In-Reply-To: <20240516-b4-new-color-formats-v1-0-74cf9fe07317@bootlin.com> To: Rodrigo Siqueira , Melissa Wen , =?utf-8?q?Ma=C3=ADra_Canal?= , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie Cc: dri-devel@lists.freedesktop.org, arthurgrillo@riseup.net, 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, Louis Chauvet X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1936; i=louis.chauvet@bootlin.com; h=from:subject:message-id; bh=/vrxMtadDQYtqI4w4rk5sueAQ3y7eapu4/8W4sRdUvQ=; b=owEBbQKS/ZANAwAIASCtLsZbECziAcsmYgBmRgef1emOyzGd/IpJLMvz4AbwKcC66NGrRXEYu fm92wBcRNCJAjMEAAEIAB0WIQRPj7g/vng8MQxQWQQgrS7GWxAs4gUCZkYHnwAKCRAgrS7GWxAs 4pHgD/9sniUJ7rD+ib4ar88c6BG1CbRJPURj6hQsJe6PoC2U89A8L5a5LP2WvC+nZoVV10o8uIP mw9Da72ZgX4lv7TYhypzYTZd0fZ/geoto3+VbH2tumKEqmDqt9NeaTJbalrSp1bKt9F25IbYv2B AW6xYtLZXK7b6+QxpgR+/3z1Y575yJZqifkl/aL+tS2s+F5nynMnFT0bwfNySAhKDk27zmJB99v 3oYbEww9IgqW8QBnqmJz/cWHcTLidA5mvy9dlZgoD9GelFGlQHFmrFXCGwSIujYUNAzlNvP0sna /Z7ZaTUR6El4PwzvYfIKgdnIYKXo7aGg2mU8Jj4Kx+w/4bCbuVZe3k+r8ZuA3yNJu/ZqOkS/2U8 7ECns5imI6lLC7b42LJRZqgpC7bULaSsp/uvV8n0czNmst4TySs87wlxUQKnqgaSx+14ntgoRXz yliUKFIyRrLnNphIjRT7fBC+0hBWh04nDXY+lFuw41K2C76rOmVqUgdcmrg0H1DK4pQKyruoUoB uv4HPcxsQC3jGFDSfFAtYekwXbLcDL+vgYH1XN/WxHITdgl6CT1Tl0vLQdP120Raeqg08x3/lIV PpZ59a8AkbBDaaf1oGmkK3FNOxxXXzwRCTC34aR2umd9JppRB+rqAbupsj243TvlEkW7Be6YW6X KIPpvsKCQ3pAxsg== X-Developer-Key: i=louis.chauvet@bootlin.com; a=openpgp; fpr=8B7104AE9A272D6693F527F2EC1883F55E0B40A5 X-GND-Sasl: louis.chauvet@bootlin.com Add the support for: - RGB888 - BGR888 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 7 +++++++ drivers/gpu/drm/vkms/vkms_plane.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index 4d7af36aa28a..6e651f7e6997 100644 --- a/drivers/gpu/drm/vkms/vkms_formats.c +++ b/drivers/gpu/drm/vkms/vkms_formats.c @@ -472,6 +472,9 @@ READ_LINE_ARGB8888(ABGR8888_read_line, px, px[3], px[0], px[1], px[2]) READ_LINE_ARGB8888(RGBA8888_read_line, px, px[0], px[3], px[2], px[1]) READ_LINE_ARGB8888(BGRA8888_read_line, px, px[0], px[1], px[2], px[3]) +READ_LINE_ARGB8888(RGB888_read_line, px, 255, px[2], px[1], px[0]) +READ_LINE_ARGB8888(BGR888_read_line, px, 255, px[0], px[1], px[2]) + READ_LINE_16161616(ARGB16161616_read_line, px, px[3], px[2], px[1], px[0]); READ_LINE_16161616(ABGR16161616_read_line, px, px[3], px[0], px[1], px[2]); READ_LINE_16161616(XRGB16161616_read_line, px, 0xFFFF, px[2], px[1], px[0]); @@ -701,6 +704,10 @@ pixel_read_line_t get_pixel_read_line_function(u32 format) return &RGBX8888_read_line; case DRM_FORMAT_BGRX8888: return &BGRX8888_read_line; + case DRM_FORMAT_RGB888: + return RGB888_read_line; + case DRM_FORMAT_BGR888: + return BGR888_read_line; case DRM_FORMAT_ARGB16161616: return &ARGB16161616_read_line; case DRM_FORMAT_ABGR16161616: diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index a243a706459f..0fa589abc53a 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -21,6 +21,8 @@ static const u32 vkms_formats[] = { DRM_FORMAT_XBGR8888, DRM_FORMAT_RGBX8888, DRM_FORMAT_BGRX8888, + DRM_FORMAT_RGB888, + DRM_FORMAT_BGR888, DRM_FORMAT_XRGB16161616, DRM_FORMAT_XBGR16161616, DRM_FORMAT_ARGB16161616, -- 2.43.2