Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp198171rdb; Thu, 19 Oct 2023 01:26:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHsKj+jnVcjqcAhTHuWx/NeOvIIpZbsQRsrXoyO2huJiSkCsWvHOBr9kzKpVsFmyd9mUzH7 X-Received: by 2002:a05:6359:618a:b0:132:d32d:d929 with SMTP id sb10-20020a056359618a00b00132d32dd929mr1197920rwb.20.1697704018027; Thu, 19 Oct 2023 01:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697704017; cv=none; d=google.com; s=arc-20160816; b=g8fa0yVgM0IQcVMzVDGGlhUoZ6d36QfWIy2749uv9gqUtwMgwHhU9XpIiSWmFZZ0tt 0wSLiCSOCYIcdeQREBaGzT5aOFJtmRPk9avfWzkZS5nNUw/gsF5PT2qLFUVU6x1CslNQ E1iwVzVSatNkboS9cL24AsCJWnN9SleaUcKvWUeJBMNK2MoKLPhNCTc6pTWQ8Oo+0j5a p4iJ2dcNP/8dvsM8XFhbPkNO3v9l0KP58s50w9W5JbdAaCQlQrgyfkYfeVCQDO5OOKEB H8DbmWMlMNKtyriM4gFVa+1LRNVgZLjrrJTkcza5VQCA7n4tJjeT2OFP3BvOYA3JwJ7o 9OPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id; bh=955P1DaEG4Qd6RFKB6nBiiHVSRr5D2ouEmyjuJxM/FA=; fh=MEGqNiM3dStF2X5XBlocBX8joG1ZRid4qQbmQBhDLcs=; b=Hip/XJ95n1/EZNeLAyiB6iZiownZI/ld0pfQ3sSQ3TVLzoK+UDBuD77pz32yAjtcRH M0hzJmYkQw9BgGrJBnUDpnHVEmXQ5QTyhVc1O5KAlgSRm/3eA3GXDBnmRyhhomZj0W5F 5grc64jMQa7smuBaOzFag1MPEE9J5P2+JPkGvQpBWZnvTdFxoa4jo4n9R09tS7j8Jnab G+H+RtZ1A2GR49utnC1d/Sf2AEdIK28Mxz9uIi4h6KKeWaS/xT4OFlzx1tNDp0uMsTWj ZamuC0xc3VmP3KA5y03cFZXFMuuy/xaKrDXAQivjPZAfQiHK6JddALU9PO6aWESOlptD Tosg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id r2-20020aa79ec2000000b00691019fd0efsi5532283pfq.75.2023.10.19.01.26.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 01:26:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 14DC7811AD9A; Thu, 19 Oct 2023 01:26:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344865AbjJSI0r (ORCPT + 99 others); Thu, 19 Oct 2023 04:26:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232846AbjJSI0p (ORCPT ); Thu, 19 Oct 2023 04:26:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B708AC0 for ; Thu, 19 Oct 2023 01:26:43 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C761C433C9; Thu, 19 Oct 2023 08:26:42 +0000 (UTC) Message-ID: <12669999-295f-40c5-8c58-ba3ed26efb16@xs4all.nl> Date: Thu, 19 Oct 2023 10:26:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/9] drm/vc4: hdmi: Add Broadcast RGB property to allow override of RGB range Content-Language: en-US, nl To: Maxime Ripard , Daniel Vetter Cc: Emma Anholt , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dave Stevenson References: <20221207-rpi-hdmi-improvements-v3-0-bdd54f66884e@cerno.tech> <20221207-rpi-hdmi-improvements-v3-3-bdd54f66884e@cerno.tech> From: Hans Verkuil Autocrypt: addr=hverkuil@xs4all.nl; keydata= xsFNBFQ84W0BEAC7EF1iL4s3tY8cRTVkJT/297h0Hz0ypA+ByVM4CdU9sN6ua/YoFlr9k0K4 BFUlg7JzJoUuRbKxkYb8mmqOe722j7N3HO8+ofnio5cAP5W0WwDpM0kM84BeHU0aPSTsWiGR yw55SOK2JBSq7hueotWLfJLobMWhQii0Zd83hGT9SIt9uHaHjgwmtTH7MSTIiaY6N14nw2Ud C6Uykc1va0Wqqc2ov5ihgk/2k2SKa02ookQI3e79laOrbZl5BOXNKR9LguuOZdX4XYR3Zi6/ BsJ7pVCK9xkiVf8svlEl94IHb+sa1KrlgGv3fn5xgzDw8Z222TfFceDL/2EzUyTdWc4GaPMC E/c1B4UOle6ZHg02+I8tZicjzj5+yffv1lB5A1btG+AmoZrgf0X2O1B96fqgHx8w9PIpVERN YsmkfxvhfP3MO3oHh8UY1OLKdlKamMneCLk2up1Zlli347KMjHAVjBAiy8qOguKF9k7HOjif JCLYT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AxV6WBlQc85ArOiQZB Wm7L0repwr7zEJFEkdy8C81WRhMdPvHkAIh3RoY1SGcdB7rB3wCzfYkAuCBqaF7Zgfw8xkad KEiQTexRbM1sc/I8ACpla3N26SfQwrfg6V7TIoweP0RwDrcf5PVvwSWsRQp2LxFCkwnCXOra gYmkrmv0duG1FStpY+IIQn1TOkuXrciTVfZY1cZD0aVxwlxXBnUNZZNslldvXFtndxR0SFat sflovhDxKyhFwXOP0Rv8H378/+14TaykknRBIKEc0+lcr+EMOSUR5eg4aURb8Gc3Uc7fgQ6q UssTXzHPyj1hAyDpfu8DzAwlh4kKFTodxSsKAjI45SLjadSc94/5Gy8645Y1KgBzBPTH7Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 19 Oct 2023 01:26:55 -0700 (PDT) Hi Maxime, On 19/10/2023 10:02, Maxime Ripard wrote: > Hi, > > On Wed, Oct 11, 2023 at 03:23:18PM +0200, Daniel Vetter wrote: >> On Mon, 6 Mar 2023 at 11:49, Maxime Ripard wrote: >>> >>> From: Dave Stevenson >>> >>> Copy Intel's "Broadcast RGB" property semantics to add manual override >>> of the HDMI pixel range for monitors that don't abide by the content >>> of the AVI Infoframe. >>> >>> Signed-off-by: Dave Stevenson >>> Signed-off-by: Maxime Ripard >> >> Stumbled over this grepping around, but would have been nice to lift >> this into drm code and document the property. It's one of the legacy >> ones from the table of horrors after all ... >> >> Shouldn't be an uapi problem because it's copypasted to much, just not great. > > We already discussed it on IRC, but just for the record I have a current > series that should address exactly that: > > https://lore.kernel.org/dri-devel/20230920-kms-hdmi-connector-state-v2-3-17932daddd7d@kernel.org/ > > Maxime I've pasted a snippet from that patch below for a quick review: > /** > * DOC: HDMI connector properties > * > + * Broadcast RGB (HDMI Specific): Full vs Limited is actually not HDMI specific, DisplayPort can signal this as well for whatever it is worth. > + * Indicates the RGB Range (Full vs Limited) used. RGB Range -> RGB Quantization Range > + * > + * 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: It is very unfortunate that this is called "Limited 16:235" instead of just "Limited" since for color component bit depths > 8 these values are different. I have no idea if it is possible to add an alias "Limited" that you can use instead. In any case, this should document that it works just as well for higher bit depths, but with different limits. Regards, Hans > + * Limited RGB Range is forced. > + * > + * Drivers can set up this property by calling > + * drm_connector_attach_broadcast_rgb_property(). > + * > * content type (HDMI specific): > * Indicates content type setting to be used in HDMI infoframes to indicate > * content type for the external device, so that it adjusts its display