Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1919874lql; Wed, 13 Mar 2024 11:51:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXYzmX+rgnEBmMTmIV1mnjxogc6/Fv6Xdx2b2XLwBAncm9LFoXyl28Dkc0f+BvI/EW/5O9fL8lXcxjoYEW02T6r7VU9ofAcjeyrZQ5V+A== X-Google-Smtp-Source: AGHT+IH4aq5PEn66k5Jfl/z4pLFsmuF+b5NeQxxM5TxMASc/W+Oru8qttpzdvWY0+P4CHG5yPjAN X-Received: by 2002:a25:ba45:0:b0:dc6:b820:bb45 with SMTP id z5-20020a25ba45000000b00dc6b820bb45mr3231761ybj.27.1710355895827; Wed, 13 Mar 2024 11:51:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710355895; cv=pass; d=google.com; s=arc-20160816; b=cs1WXZdLIL4mQLZeOruS8/bOSNmaKLFKKDy5B4UeLMbpC3rtvveN0TTxG7coEDKfO0 O5rxAlfEcx6m2pIbRDz934swMiPrlNyU5FmnoapseYagCnx7tcfPQZ7ahEgs3f9ancVs 0fFdJJf+6M9ENI34PijF7jsZFlG5zUYjrDCtWJaBcYIYN1HS7wQUgKSnK0Fnrf+qnZLP UbsjKMCbB81Vgrw6yXABjTBeuwaVrvQUsyySnCYXhlrdE2VfLtpazUkQR0n55INSrRuL ci+jkZrKTPDhxAOyC7SvlIqtCbx0s3LZM1ZKzZ2aLn8MhrBfPnHAwIgl7aqTdu2Aw14b mG1g== 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=HGht90527wTlRNy6SY5xIteQweC9dJDueCATJTo/DTY=; fh=I1mDzpQ2i/fckVIeMd+WKWb14s85mMQWc3/wF4wbFPI=; b=zuu/hGjfGi+qrvW9d8MNxMXI3xAIqgkYGmNN27ufhlPpXY8sV5MvQrcbuveh59m8he ZOzyj+2wxcL9grTZECyHRCW6C8fJC3iYPBLcBS6mdIlGSox1/MxFyaOx+PAQy1rRGHW5 shLOjqFU9ad2sbxNCktkerJ8LKdFgVkZQsLk7LOH2dQ8UWRTIFjNnY28Mce9aeeljNkW Cfmb99aygkCl5FutIqVWRfiLJaMm0F1Nn+Kc87r4L4D5lBzwfdAU3iIV6gXolBeVbSrw BQ4qkhWkm/r6OkzmgcFrVSWTtLLpHP49a1VFC4Vgl5z8FHjSycxM/Gp9+Sar32hNJqTi 0xEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SeJaOX7n; 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-102306-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102306-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e8-20020a05622a110800b0042eeb2e5c34si10410431qty.465.2024.03.13.11.51.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 11:51:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102306-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SeJaOX7n; 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-102306-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102306-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2ACCE1C260B3 for ; Wed, 13 Mar 2024 18:50:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2FF0A135A7E; Wed, 13 Mar 2024 17:45:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="SeJaOX7n" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.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 E856D67752 for ; Wed, 13 Mar 2024 17:45:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710351943; cv=none; b=oqfPoNZFgIOm7imiG1axqp28XWATNIebFbK/UdMO2Meyw0iFfLw0tA+usowom9GhoOPBdjr5wTV1E6ojabrVTifVf9PjaJmZFd9cRiCQ7dACCB4ifsiDVv0vw7yv3hEii/JG050Ozgcku9aNCkTGIUNFuRRwh8kwPi0ZLkHQcJo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710351943; c=relaxed/simple; bh=iD71b+k0OiTeuqKlKf0a+qVcOP9Pq/u1+8xaqCzxc8o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hRCVJmF8+u8IunauhvF/E7LIDUKCwhiJ2il9eyXS+CRfUK4GTfKVttWSdDjwBuRBtxxYheixIJ8nUgBOGNsBONUcQft8iuZI1B/9HUkwR/DkRHAfIBa3gbatDZkOdzpnzL1o7CkWHrEJYJUM8f6/EZD4JVrsySQdr5uA1sIp/dI= 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=SeJaOX7n; arc=none smtp.client-ip=217.70.183.194 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 591544000C; Wed, 13 Mar 2024 17:45:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710351939; 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=HGht90527wTlRNy6SY5xIteQweC9dJDueCATJTo/DTY=; b=SeJaOX7n6doU+eefHX7cVezfOdU1JJCLw0gKn17svzaauJd1hPiZ4FZuKeI5T/64yHJgv3 H//8p2QGtw/FiNo/vrIDuOYGfodKgQL/nMeehr+Uam7OYU2mIgeYj/yCAIGPNFz7NmFEEd jhKVDGtrkcKjbx6gMSMH6oc8qrByOWZdQ9UD3SwvqjEapusXTsOaThFZnwgVWxUjhUt275 SzMbLjLRhWasXkCV1tE5iQ1OfnWFsr+me08qrQMMYVDNPoy5apKDDRM6sKrYdwj2WK+a7d goUArI/ETkMaF5fXLU/hD4RDbQAYO2mQoscdnmBZ06YTgW2XFrQW9JvffzOztA== From: Louis Chauvet Date: Wed, 13 Mar 2024 18:45:06 +0100 Subject: [PATCH v5 12/16] drm/vkms: Add range and encoding properties to the plane 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: <20240313-yuv-v5-12-e610cbd03f52@bootlin.com> References: <20240313-yuv-v5-0-e610cbd03f52@bootlin.com> In-Reply-To: <20240313-yuv-v5-0-e610cbd03f52@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 , arthurgrillo@riseup.net, Jonathan Corbet , pekka.paalanen@haloniitty.fi 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, Louis Chauvet X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1196; i=louis.chauvet@bootlin.com; h=from:subject:message-id; bh=6BLB7fPlNtj8wcSXI7NyfW833syTdxfhkEAKw4gWOys=; b=owEBbQKS/ZANAwAIASCtLsZbECziAcsmYgBl8eY0kDZ4PGG0/Q6LPMiTDAw3lAupi3pDIHSzJQz9 PApOGKeJAjMEAAEIAB0WIQRPj7g/vng8MQxQWQQgrS7GWxAs4gUCZfHmNAAKCRAgrS7GWxAs4pfVEA DRV22TaZl1roNuVVHsfj+Bth6rfCVXeGHm/xKG3ZE0sFvFotdnUNph4WAxPIWEr7uSB5edl8ENW7FM KN3vY92Gg0IImK4kf8Ic1PLzoNphjEzoCdW4KKMYSpEDwAXwmR830Zj72/6HjcSPr7z2gmj3GZLskx D63BJicemRyNf3tqjPjjj1gVzh7ElHkrE9F/GtMlUHxRrE8grX/Ou8E9FdqoPisIoXjbp0KMT21zTH +GiFhVC032j7Mlj2c7PiVvzs8hm1u0unfnnh5e3l5Wxk3h4jEZK1lPyMO5yOnlbC1QnO0kL//UJT0v l7/SDE87x2SkFgAOzNxRGpQ6dqIBelt+JoSQjEE2HVy8J9uyuTo0aImTpdZ68PYIEihBX3vO4bnkZK GrcBybVZApfk5TdIJV1h2hZPOyHwTQOAkPLdcEqgHWRy3r0Ir6bFf8Gs3wfiNb+OxWz8IqIos9d1k8 OjAxFv5CveSzJh1JTPusxkLGRYAyHW4U+KetUPOD8/+ecC5O/OXpmi4TNVEw9ctQIt3Q63BD8XJ8st NUwsBJuTUwZKwLDdLi8vs8nPhvPSjxojrFmXZl21gtgGLJ82SJ//7ZQ6E3tCtT1QKyrfx2LMtZZrA9 ChgDxZeOmIP40qSyeWLQXRwDTo14Nd4+y3KgPRHC3e9iThAb6sl6FsdIZlMg== X-Developer-Key: i=louis.chauvet@bootlin.com; a=openpgp; fpr=8B7104AE9A272D6693F527F2EC1883F55E0B40A5 X-GND-Sasl: louis.chauvet@bootlin.com From: Arthur Grillo Now that the driver internally handles these quantization ranges and YUV encoding matrices, expose the UAPI for setting them. 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_plane.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index 987dd2b686a8..e21cc92cf497 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -224,5 +224,14 @@ struct vkms_plane *vkms_plane_init(struct vkms_device *vkmsdev, drm_plane_create_rotation_property(&plane->base, DRM_MODE_ROTATE_0, DRM_MODE_ROTATE_MASK | DRM_MODE_REFLECT_MASK); + 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; } -- 2.43.0