Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp925976rdb; Fri, 2 Feb 2024 08:06:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IE71gM07zpFx3bMAEhwxG8Pn+X6ZbjjOGghqUF4gpwwDoqMYFqEAz85JN2KjdQx6/+clXJ9 X-Received: by 2002:a05:6a20:3b1d:b0:199:37ce:2370 with SMTP id c29-20020a056a203b1d00b0019937ce2370mr2189341pzh.23.1706889997650; Fri, 02 Feb 2024 08:06:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706889997; cv=pass; d=google.com; s=arc-20160816; b=klKIGV9VIbEJi0yM8tzrP9f2b1Q/F5wG9WVpk0Ht05t3e+uryuDAozimyyhoP1/sV8 FiTRYEgpSO9yFoFxy6LMGP/uh05IiLNEH0Q5ApgKnO4lWcen+EfYoVEHH5C4KrCeEUCj ew3/PaAoWo/XH32Bu4dDDbdgZwHkSll7nAr4aC/AY4x53psdpWq7F6TpC0S/t4cEtuIw hv0c+DoiFS0ckEm3bUOa/6nkvv+Vgw6W4avqzDaUsRSmXpsJ9A/X9gXDXiko2Fu7qlHN D0BLjVTmPg7LpP/unVeO55vqNSDCFGdbAXby/80D6QO50FNK7pBTZN8X3Xhh5y15bldn fGWA== 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=gE3i5Mg9iJWZY964ornDDGJvyx9gPn26I8BTIeGamrc=; fh=mo2ftHr/pRjNR01xI3D7+KwMNRjAvJXjLKB0xpkx6jc=; b=k8PsziJVRhO7rIdgkxO6okmn+D5gYa8Myxhfe2NmWlkLJnRM+7Ct9ahPpiJZ+aMZHB cD2nE2k4OYL+t6u2uImX78gU5G+H6+adx775J8Q3Ufm06Z6jd04IvrqGLWCDRf5/hFg1 rjGVIdV975tlaA4wNOfH8Lxn570MBVrnPx6k7rE+/vjD8uMAmnf90ro0Np4INd4Fk+ca BTY/z7BD5rOMxluf0idCuI/PfwBc4vCYufLbtTHD4HOT2YQ683HAdHuOoUxgzGIStAbk d+GPk1WbSbyqjCh0He08UR8Qnn+IDcEj/cpadLdrtZlUp2lZDrZxGDwHhAJXWGw0cfRW oacQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HTDaz0RY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50088-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50088-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCU250esM8A+ziZo2CWsfof3lOtemN+Ln8VPsmIZzENacRxeZB2lUtjdfE4cQVo8PVZQvhljkktJPMAPeYJZEKsU1OQhgcwzI0Pje2F2VQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m11-20020a63ed4b000000b005cd8cb67fe9si1858897pgk.583.2024.02.02.08.06.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 08:06:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50088-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=pass header.i=@kernel.org header.s=k20201202 header.b=HTDaz0RY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50088-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50088-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 8BA3F281B9A for ; Fri, 2 Feb 2024 16:06:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8C821482FE; Fri, 2 Feb 2024 15:59:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HTDaz0RY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E51E41474AD; Fri, 2 Feb 2024 15:59:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706889577; cv=none; b=eXRGJe5v2/XBl7vkDStdCQKbsgCBw5A8rk887zbR4vSA5vcimpXigH9M/80ywLD/8j/zMluTfGTL7TsKfuA3Faw2zYsZmjX9Or8mFKG5Vp4H583lXCRSzlgU6b++txEWT56ZNvplKH8fBNaAXMPmrV7bdRasvMlvxv2RIR60/yY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706889577; c=relaxed/simple; bh=NeFFADYXbSKDmrGxCWJn52cB3UzPfQUhTWEHOnSrQZo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZlDr+aiTLvKXtJ/yZS8jmbXAn/XHuYgN2GAKfjvkt9A9HAna/o+hvFfAhvnUr1woG6l+FfhRKtXN68niQWOfE76vV7FZt3LlbWFfh+tUIUE8F0owwq6pP90iBh5ZKEJgTYkUaZLjZok6rsFJdlobFQzCPeVarcsjRKZa1l6MIyw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HTDaz0RY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF4B4C433F1; Fri, 2 Feb 2024 15:59:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706889576; bh=NeFFADYXbSKDmrGxCWJn52cB3UzPfQUhTWEHOnSrQZo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HTDaz0RYlhUret3nyLqzvt6R8k6VsimfwHqO1yl3uS9kIgBDturoT/SzAOrkJmL0D gby8DoOSYxkckwhawpNZGiKhJZAA/FYdwsgnDQqfvz3dMDCU/HO5WY8xz2FHu9Kr8L daPvZmGo4bFFcHgIrkr2mcbFtdg9New0ZyzGfphKcNJO3eDiwJkoGdhHoc6hntlGeH lerkU+3sB1Fb0yguYyLd2yDxiGP4NzJ3nhUkBgGk+/hfGOKRyXS6Ek/g7K6aW5+Ln+ wxu2+c68gmL0w0uwr/TJaeDRR3RtaEQeDvUyu6v/v1+AmIcFFDLpsTN9Vxh4MaHkrk 8PWHWdcqKrMlQ== Date: Fri, 2 Feb 2024 16:59:30 +0100 From: Maxime Ripard To: Ville =?utf-8?B?U3lyasOkbMOk?= Cc: Sebastian Wick , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Emma Anholt , Jonathan Corbet , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hans Verkuil , linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: Re: Re: Re: [PATCH v5 08/44] drm/connector: hdmi: Add Broadcast RGB property Message-ID: References: <20231207-kms-hdmi-connector-state-v5-0-6538e19d634d@kernel.org> <20231207-kms-hdmi-connector-state-v5-8-6538e19d634d@kernel.org> <20240115143308.GA159345@toolbox> <20240115143720.GA160656@toolbox> <73peztbeeikb3fg6coxu3punxllgtyrmgco34tnxkojtsjbr3s@26bud3sjbcez> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nkbwqjl5lzj6skqt" Content-Disposition: inline In-Reply-To: --nkbwqjl5lzj6skqt Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 02, 2024 at 05:40:47PM +0200, Ville Syrj=E4l=E4 wrote: > On Fri, Feb 02, 2024 at 02:01:39PM +0100, Maxime Ripard wrote: > > Hi, > >=20 > > On Mon, Jan 15, 2024 at 03:37:20PM +0100, Sebastian Wick wrote: > > > > > /** > > > > > * DOC: HDMI connector properties > > > > > * > > > > > + * Broadcast RGB > > > > > + * Indicates the RGB Quantization Range (Full vs Limited) u= sed. > > > > > + * Infoframes will be generated according to that value. > > > > > + * > > > > > + * The value of this property can be one of the following: > > > > > + * > > > > > + * Automatic: > > > > > + * RGB Range is selected automatically based on the= mode > > > > > + * according to the HDMI specifications. > > > > > + * > > > > > + * Full: > > > > > + * Full RGB Range is forced. > > > > > + * > > > > > + * Limited 16:235: > > > > > + * Limited RGB Range is forced. Unlike the name sug= gests, > > > > > + * this works for any number of bits-per-component. > > > > > + * > > > > > + * Drivers can set up this property by calling > > > > > + * drm_connector_attach_broadcast_rgb_property(). > > > > > + * > > > >=20 > > > > This is a good time to document this in more detail. There might be= two > > > > different things being affected: > > > >=20 > > > > 1. The signalling (InfoFrame/SDP/...) > > > > 2. The color pipeline processing > > > >=20 > > > > All values of Broadcast RGB always affect the color pipeline proces= sing > > > > such that a full-range input to the CRTC is converted to either ful= l- or > > > > limited-range, depending on what the monitor is supposed to accept. > > > >=20 > > > > When automatic is selected, does that mean that there is no signall= ing, > > > > or that the signalling matches what the monitor is supposed to acce= pt > > > > according to the spec? Also, is this really HDMI specific? > > > >=20 > > > > When full or limited is selected and the monitor doesn't support the > > > > signalling, what happens? > > >=20 > > > Forgot to mention: user-space still has no control over RGB vs YCbCr = on > > > the cable, so is this only affecting RGB? If not, how does it affect > > > YCbCr? > >=20 > > So I dug a bit into both the i915 and vc4 drivers, and it looks like if > > we're using a YCbCr format, i915 will always use a limited range while > > vc4 will follow the value of the property. >=20 > The property is literally called "Broadcast *RGB*". > That should explain why it's only affecting RGB. Right. And the limited range option is called "Limited 16:235" despite being usable on bpc > 8 bits. Naming errors occurs, and history happens to make names inconsistent too, that's fine and not an argument in itself. > Full range YCbCr is a much rarer beast so we've never bothered > to enable it. vc4 supports it. > Eg. with DP it only became possible with the introduction of the VSC > SDP (and I don't recall if there's additional capability checks that > are also required). With DP MSA signalling full range YCbCr is not > possible at all. This is for HDMI only. > I don't recall right now what the HDMI requirements are. HDMI has supported it for a while, and it's defined (for example) in the HDMI 1.4 spec in Section 6.6 - Video Quantization Ranges. It supports limited and full range on both RGB and YCbCr, as long as the EDIDs state so and the Infoframes signal it. Maxime --nkbwqjl5lzj6skqt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZb0RYgAKCRDj7w1vZxhR xaFMAPwPX00aGuZMcwT8+4307ZfdO5OyFc7WAkZEWUBovapBWAD/d9+niBWsPvl3 otXPVDwd1PFHbq4/qGvzqn443KiCiQA= =rMjR -----END PGP SIGNATURE----- --nkbwqjl5lzj6skqt--