Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2324503lqt; Mon, 22 Apr 2024 07:49:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIIkQSc9YW1G05lpmFpFQ+8A32jsyxFA04jVlOwCBjrKJVA7X6ZLhIndb+vfTIafNsNiQyhGbE9Rho6qZ5lj/srmYa8Q1cuEhFg3ihxA== X-Google-Smtp-Source: AGHT+IEzlXzod+Jawp/08gq+1D5pwJiz8M/Zt8Cmr8K9nBng3REiZf9ZZF1jgCF0yqo/wPGzPv+H X-Received: by 2002:a05:6122:d9a:b0:4da:9bcd:b097 with SMTP id bc26-20020a0561220d9a00b004da9bcdb097mr11182131vkb.9.1713797376663; Mon, 22 Apr 2024 07:49:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713797376; cv=pass; d=google.com; s=arc-20160816; b=dQ2CJCgqxdmRPQfTPwd/po2rLFQhMh4ZKkv70szQTOEPIeY7wS1No5i1XdwA81aXEq y4CytDuB0F1x+atWUL9LCC829h6oiS3RzvZuzJrCZIeImkew+19VjYUp/5aRwNoeRDem Rcyp5HMiPU8zsEJ1X2XFyCmidNSnTs5y1HHVP00tmap0nibJvRRF5/7Py7Vr3JZWVNFi MbpD9N5kQMQmeTqiMhKFOtdR3E5SkLZZ350a3Su4yXOfQxLDTDn15ro4ugSaxcQ2Qu0p YxqrhV5gCZ1TKInwLlMqjsvTFcWw6rvxVBBW00VCyZOjNdiNErPPmRlnMVpRom4oMq9n HqrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=RZObkw9mTIM46TfVRWkILl8VBCZyQK2atCOhuHQ9kP0=; fh=VxQoP5gQJM8M5WdURpOhy8n1wMbJ2KLm37NA5wrNepI=; b=ksFkHV3/3OlGF37K+zBuvSHDQPvp8ObuWB0Wt719rc0aCAmZnlfoMqadYXqokZzz+N hdBtdPvAtjMaP3AlCnU7FmPOaKHFh4gxQP1UZmsPER51iyDpKktG0cJQTbRZouKMCn+b 2sxApiCH8EnRK1aZXRHP/I30SJMWfrMNhebSw9NxwhJGqhLkXbGNsxMS3SvwhQ+o0N/W Ep1eaEMXubWVg+gq9tFEDATvzr5Uqrl9/PO795no/g7jKC9oGIHEV6flTbB75LfDN0oP osA/FMygr8bI5kefWhoVJW8xYTFmp7CZzLq4oGylgdZujIu1gh/dHE7HuT+SEueMpYxj XXQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LIT12U2Z; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-153580-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153580-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ec28-20020a056122369c00b004daaa95321csi1859190vkb.15.2024.04.22.07.49.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 07:49:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153580-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LIT12U2Z; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-153580-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153580-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6094D1C21355 for ; Mon, 22 Apr 2024 14:49:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FCF315217C; Mon, 22 Apr 2024 14:49:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="LIT12U2Z" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 009B8152169 for ; Mon, 22 Apr 2024 14:49:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713797369; cv=none; b=mQ6o00S+JAlhzncj156sTk/c/N8EkQ4xo/9n719T11TEumrukHuOB4fW5u+grds6RRMQ/Nl+HIltexo/b+Odt0O1GKAuGes9CuVN2eTQl4gTx14vKjsHsgqMGS9jDsCWbjBJmru+ROqvJcrXScs1VXbh30qbp+mASBIf7tDA0C8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713797369; c=relaxed/simple; bh=ANj2lwCdF1e5x2y4t0N/qQl7GamrLnoXCuiQ6qmUnRY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LgTf6fI6m7Z34Nq1ai/C+dPmdqm0pGejRG3394z7Y8RtGpgnB0H441iyv8BmAulMr9eIKxu7A5EyqwxbbqaTlbK94RAGNKuflHM96vefESJ11VfdGU93BQLH9bncJjieC6LNRcJuHi8pTt/VgWMWTUs4KrgjjLp9Xiz4AaZpk5U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=LIT12U2Z; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1713797365; bh=ANj2lwCdF1e5x2y4t0N/qQl7GamrLnoXCuiQ6qmUnRY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LIT12U2Zq14xHhLBBEFLI3q7TtVSuT5LClXc3jRoXLYcGysNofNq+4bVb7DGFVdW5 gmkl/GC4N8wLiF7FZam1KRR2JU5Xdgq22S0DN26y+yqLI0BSlli+QJLAaUTpBYwPlX Od0bl5TEOTS5ssCX7zEZ34xMuqqeRSlj3wWXDx9ny7zjCTAXxi+dWX40ZyY7X/1iVW DHiWjAqvavUKVCKNgJAPHm2rA7+zgpTv/7FC2t+2y1t/Shho2at5p3wyl71gKFDXT2 /4vRYPTecym8dYkA/ICimmg0B2LduSRBnqVBP6PYTTH1MgudjyOQLhvtyi7Zcf6oEl UOt2zg26FYf0g== Received: from eldfell (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pq) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 8888E3782123; Mon, 22 Apr 2024 14:49:24 +0000 (UTC) Date: Mon, 22 Apr 2024 17:49:22 +0300 From: Pekka Paalanen To: Louis Chauvet Cc: Rodrigo Siqueira , Melissa Wen , =?UTF-8?B?TWHDrXJh?= Canal , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , rdunlap@infradead.org, arthurgrillo@riseup.net, Jonathan Corbet , 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 v6 13/17] drm/vkms: Add range and encoding properties to the plane Message-ID: <20240422174922.6bac5683.pekka.paalanen@collabora.com> In-Reply-To: <20240409-yuv-v6-13-de1c5728fd70@bootlin.com> References: <20240409-yuv-v6-0-de1c5728fd70@bootlin.com> <20240409-yuv-v6-13-de1c5728fd70@bootlin.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/4k48lEW_QdEbCmFp+XKPuuC"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Sig_/4k48lEW_QdEbCmFp+XKPuuC Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 09 Apr 2024 15:25:31 +0200 Louis Chauvet wrote: > From: Arthur Grillo >=20 > Now that the driver internally handles these quantization ranges and YUV > encoding matrices, expose the UAPI for setting them. >=20 > Signed-off-by: Arthur Grillo > [Louis Chauvet: retained only relevant parts, updated the commit message] > Signed-off-by: Louis Chauvet > --- > drivers/gpu/drm/vkms/vkms_formats.c | 2 +- > drivers/gpu/drm/vkms/vkms_plane.c | 9 +++++++++ > 2 files changed, 10 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/v= kms_formats.c > index 2d7445a3de93..a294744d29d6 100644 > --- a/drivers/gpu/drm/vkms/vkms_formats.c > +++ b/drivers/gpu/drm/vkms/vkms_formats.c > @@ -238,7 +238,7 @@ static struct pixel_argb_u16 argb_u16_from_RGB565(con= st u16 *pixel) > static struct pixel_argb_u16 argb_u16_from_yuv888(u8 y, u8 channel_1, u8= channel_2, > const struct conversion_matrix *matrix) > { > - u8 r, g, b; > + u16 r, g, b; > s64 fp_y, fp_channel_1, fp_channel_2; > s64 fp_r, fp_g, fp_b; This part belongs in the previous patch. Otherwise, Acked-by: Pekka Paalanen Thanks, pq > =20 > diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkm= s_plane.c > index d4e375913122..8f764a108b00 100644 > --- a/drivers/gpu/drm/vkms/vkms_plane.c > +++ b/drivers/gpu/drm/vkms/vkms_plane.c > @@ -218,5 +218,14 @@ struct vkms_plane *vkms_plane_init(struct vkms_devic= e *vkmsdev, > drm_plane_create_rotation_property(&plane->base, DRM_MODE_ROTATE_0, > DRM_MODE_ROTATE_MASK | DRM_MODE_REFLECT_MASK); > =20 > + drm_plane_create_color_properties(&plane->base, > + BIT(DRM_COLOR_YCBCR_BT601) | > + BIT(DRM_COLOR_YCBCR_BT709) | > + BIT(DRM_COLOR_YCBCR_BT2020), > + BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) | > + BIT(DRM_COLOR_YCBCR_FULL_RANGE), > + DRM_COLOR_YCBCR_BT601, > + DRM_COLOR_YCBCR_FULL_RANGE); > + > return plane; > } >=20 --Sig_/4k48lEW_QdEbCmFp+XKPuuC Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJQjwWQChkWOYOIONI1/ltBGqqqcFAmYmePMACgkQI1/ltBGq qqePdxAAl9TTUVJlL6mpTRB9D+p6M0JTBNIqCo7ZbrR/n8GcWTvxguqpClJgxXIy AXd/N5WYaKqf0Rrs5JefeD8inQ2yFWIv5lwjw4Kph0QzsBstnUGrSoONLG9aLQNq SxUyE24TFz1jRH6H7Frthvv/8QebFoyaAMP9YBFDC6R7/8DJIoEAJPAoe/0F3oQw Z5Lje7gyIaNNHDUjHxmJMCp3eSnW3N6nzA9hc0lynnkj3YdP3pjFYLkujGJ7kKPU LOsxer8hzVOMu+5BkBIfHnqrHB/a3klSA0ar77ylJ+I4aEiFz9q4ESoVIVV2ya1P iuvhZN1AVM9owHTrxoLOZBSzo0zuEOS7xoTZKGBH55i++DTm8yE+1fOfKQmjMioM +NIDmHQNvtF2wV95+T0htxqJ6HnsIE56XqZPSzjmISHzrhLY3Ve2JgMp8uFoO0ZG ty9ScqQRHdLDr3g60T4v4nWV3T72WRrile48VQ+lwtg0Tqo68Y0LzKgxbg94DU2D rmIDNuSK+AeUySRP8xQ+dIij7NBQ7BqHCx+ZVpnvF+oSI4Pd/+51I9iVKcfkCO4b vfezyqJwGERRo4W8nJZ0lH3cyQEzVmBQcsIxQZkfVIo5jqwE+XefAJtVkM3uudWv jy7rswGSNevz/hZ55S0mIy/Vs279I65kvCWyP/63oBGzvlLKKDI= =db9e -----END PGP SIGNATURE----- --Sig_/4k48lEW_QdEbCmFp+XKPuuC--