From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F5E2C4829C for ; Mon, 12 Feb 2024 17:06:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=f8pvhx90hgR+VoJB977IXA7YMvbfa6vqhPdcEIovKnI=; b=k8nduN/Auekgth hFUEBt/ug1hiUyHEDIuuciN4vjJFa2G7M+BmMldW5IV1KgCz4AMwQyGHbLDMxNxN1KrWsOxPclgeR gwAUZE106uhGxHYJvYmlhdLX2+pcWeIdOg1XMFgloOCAJ2PEjJZX2bbsfyJX8mZ+Bzn1Qhs/cIOS7 o+3QVhLi1Norvy5loYHTWkikSYqBDkGYEf5bA56CUtU1cKz1rkVqLcXDiT3ABPjmqlYjxwRrFWxTp UhJtjE/e5EBisDFrgaaJlylAvu3mEfu12RYNHFrrl2eYO/HxjA68PY/lbtSjTUJkncG5+BG8H21Lh N0ZKzwpWoGvWZ3bdSxbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZZlG-00000006LBP-2yGp; Mon, 12 Feb 2024 17:06:30 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZZlE-00000006L9L-0KBx for linux-arm-kernel@lists.infradead.org; Mon, 12 Feb 2024 17:06:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707757586; 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=3eymUcFdUhoCcBYFo7gSsZUmQAqnxgL1YlUX2Z2tkFY=; b=KHfpeo3GY6JB0Zycm7Jqq3gN4JZQb9lRii/B7UwPwoHpUjPEGYQIIuamf/xW/rl5RuJREF NRuj4CCP+GI0S1LEKG4LHSus5oAro7fO+OMUV6hgZaKSPQP2jy3gOQzpLKFKVxAxGWTmSE XCncgRd/Wba/NR/qOngeWoY8bmz2UV4= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-588-Sl5ouS1FPUSOlXq5hiuNkQ-1; Mon, 12 Feb 2024 12:06:24 -0500 X-MC-Unique: Sl5ouS1FPUSOlXq5hiuNkQ-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-51162d43c64so1845017e87.1 for ; Mon, 12 Feb 2024 09:06:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707757582; x=1708362382; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3eymUcFdUhoCcBYFo7gSsZUmQAqnxgL1YlUX2Z2tkFY=; b=ENxa0IRto3xC2S4vhgpod+oTokGOo9w990HQx7wF3x4inEKpH2qWbJDMiNRpfO4JE7 F82vmWVl5topHr1s445SGRuoXx1rrhVXZHdenSxS57Qx3f94L4PgR1E2TUW5pqtxyCVw 2jK+U5H4RPHZUHvLT9kAcUNDxTzi/gdWmv4WLebOVNXA0NuXMZdTypxR3odXhnKkUrk2 HlTmLwTtrn51EKcGFTDio5A5c/KRViXfVw7Vf1SRG7uNI56qgaEvSD3WRzPE+MM+kgEG +fB3vCgK3CcRwDcMDNrqZ7307fOPENZcWMmft22UEHtxufHhg11gfoV56Rye4e6PDSWf bn+Q== X-Forwarded-Encrypted: i=1; AJvYcCXmxqQTDqvHKHSUapvNFL0x+4ZWMaV6LYNzp0lkFWyYGCR3bAkCXip0Kf7364LSTs/vSBnuNrKobIYyhQatdKeV+wLSiVFjz1xPiYiwD4abZsqpKCI= X-Gm-Message-State: AOJu0YwUuxsT/LNgQpkD7r4s1u6kN+fVyJv9ZhZLlUzDielgkd3L3BQZ /rDcRUErlI4y95fh5zm3RnZRpnyrQXFHKqDBcRYK9WTlDJ+D4G2WcEQByLdxu8egWWhlj+5A3Oe vFiq4F2bbXs5ZCNt3ysyh8+P00F0yoA9RU43zAa1Is3zD5zOUf4MKD0NA2z/UiL3Khl4kWWJ2 X-Received: by 2002:a05:6512:124a:b0:511:6ec8:9b30 with SMTP id fb10-20020a056512124a00b005116ec89b30mr6055826lfb.50.1707757582604; Mon, 12 Feb 2024 09:06:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvDBjKALP1ZmqUpLt6l2lZIIDPssZ4zAUV94qq67shMDrA2wUIprRPNTJdwaMalC0xRGstzA== X-Received: by 2002:a05:6512:124a:b0:511:6ec8:9b30 with SMTP id fb10-20020a056512124a00b005116ec89b30mr6055757lfb.50.1707757580610; Mon, 12 Feb 2024 09:06:20 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVDbpS/N9Btsj6liWrjb0yF4Ne0JTB7gb7oaub+EmpD+3bUF/+aHFfL3eeQSHDleOFtGcMAeedShtTblBVbTLi/Uzs8ehObiuNGcGbwIkqW6km3Ie29qRhA+zUURPsLIoGHoTWSg4hJRYbSVUsPFXzwjVp1B84hrtW4ZC9Jv8hudbAlqksOis3kEPid5AaB+nCE6Em/f/BtlmaI1D33wL7QtFNOoVSooPaFxOqD9+DrN1R72NrThYp7RPQPG9vgFaxmIC/rcynrvuJVZC0kQC5NTEPHKTi9Qn0l3RbIXl0/fCnCDdiXUJxw8nlUJro9mDFSCx+wDMVzsB+duddcMgdppppl5uL/DttHm7iUAuaz0qkvRK3C39vMGgFJ2pPhgKDTzg64xmT9+zSIIq2ZFkxpA9Tfc8HVn9B91LIk3ra8TNo071WjMAsu91/WNaR9L7sywPXJXIzF8A3y086BVmbaiXOCGhXyxY07obLAm8FZzfW0biMsLvV47IZuPgpNOPT85mDreg6UvKQaQZG4gDvu0Hnr4+BJRy84zQW6ds+BqUrNZ5bTTdRwNRvYi5uRnO/7nnB1NHvhtb2EgyO5oPjVjwmKjHzgKkXj7C6vqeNHozSUURoenVazPGqh87+vfENwn/kG40mogSAtYR9VZPedoT/rft62PYkLfTKNzRqyow== Received: from toolbox ([2001:9e8:89a4:db00:6e8f:bfe4:6e0:1fe8]) by smtp.gmail.com with ESMTPSA id w17-20020a05600c475100b00411062c123esm1846050wmo.26.2024.02.12.09.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 09:06:20 -0800 (PST) Date: Mon, 12 Feb 2024 18:06:18 +0100 From: Sebastian Wick To: Maxime Ripard Cc: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Emma Anholt , Jonathan Corbet , Sandy Huang , Heiko =?iso-8859-1?Q?St=FCbner?= , 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: Re: Re: Re: [PATCH v5 08/44] drm/connector: hdmi: Add Broadcast RGB property Message-ID: <20240212170618.GA1372043@toolbox> References: <20240115143720.GA160656@toolbox> <73peztbeeikb3fg6coxu3punxllgtyrmgco34tnxkojtsjbr3s@26bud3sjbcez> <20240209203435.GB996172@toolbox> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240212_090628_268000_7A45E713 X-CRM114-Status: GOOD ( 50.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Feb 12, 2024 at 05:53:48PM +0100, Maxime Ripard wrote: > On Mon, Feb 12, 2024 at 05:49:33PM +0200, Ville Syrj=E4l=E4 wrote: > > On Mon, Feb 12, 2024 at 11:01:07AM +0100, Maxime Ripard wrote: > > > On Fri, Feb 09, 2024 at 09:34:35PM +0100, Sebastian Wick wrote: > > > > On Mon, Feb 05, 2024 at 10:39:38AM +0100, Maxime Ripard wrote: > > > > > On Fri, Feb 02, 2024 at 06:37:52PM +0200, Ville Syrj=E4l=E4 wrote: > > > > > > On Fri, Feb 02, 2024 at 04:59:30PM +0100, Maxime Ripard wrote: > > > > > > > On Fri, Feb 02, 2024 at 05:40:47PM +0200, Ville Syrj=E4l=E4 w= rote: > > > > > > > > On Fri, Feb 02, 2024 at 02:01:39PM +0100, Maxime Ripard wro= te: > > > > > > > > > Hi, > > > > > > > > > = > > > > > > > > > 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) used. > > > > > > > > > > > > + * Infoframes will be generated according to = that value. > > > > > > > > > > > > + * > > > > > > > > > > > > + * The value of this property can be one of t= he following: > > > > > > > > > > > > + * > > > > > > > > > > > > + * Automatic: > > > > > > > > > > > > + * RGB Range is selected automaticall= y based on the mode > > > > > > > > > > > > + * according to the HDMI specificatio= ns. > > > > > > > > > > > > + * > > > > > > > > > > > > + * Full: > > > > > > > > > > > > + * Full RGB Range is forced. > > > > > > > > > > > > + * > > > > > > > > > > > > + * Limited 16:235: > > > > > > > > > > > > + * Limited RGB Range is forced. Unlik= e the name suggests, > > > > > > > > > > > > + * this works for any number of bits-= per-component. > > > > > > > > > > > > + * > > > > > > > > > > > > + * Drivers can set up this property by calling > > > > > > > > > > > > + * drm_connector_attach_broadcast_rgb_propert= y(). > > > > > > > > > > > > + * > > > > > > > > > > > = > > > > > > > > > > > This is a good time to document this in more detail. = There might be two > > > > > > > > > > > different things being affected: > > > > > > > > > > > = > > > > > > > > > > > 1. The signalling (InfoFrame/SDP/...) > > > > > > > > > > > 2. The color pipeline processing > > > > > > > > > > > = > > > > > > > > > > > All values of Broadcast RGB always affect the color p= ipeline processing > > > > > > > > > > > such that a full-range input to the CRTC is converted= to either full- or > > > > > > > > > > > limited-range, depending on what the monitor is suppo= sed to accept. > > > > > > > > > > > = > > > > > > > > > > > When automatic is selected, does that mean that there= is no signalling, > > > > > > > > > > > or that the signalling matches what the monitor is su= pposed to accept > > > > > > > > > > > according to the spec? Also, is this really HDMI spec= ific? > > > > > > > > > > > = > > > > > > > > > > > When full or limited is selected and the monitor does= n't support the > > > > > > > > > > > signalling, what happens? > > > > > > > > > > = > > > > > > > > > > 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 d= oes it affect > > > > > > > > > > YCbCr? > > > > > > > > > = > > > > > > > > > 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 limite= d range while > > > > > > > > > vc4 will follow the value of the property. > > > > > > > > = > > > > > > > > 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 histo= ry happens > > > > > > > to make names inconsistent too, that's fine and not an argume= nt in > > > > > > > itself. > > > > > > > = > > > > > > > > Full range YCbCr is a much rarer beast so we've never bothe= red > > > > > > > > to enable it. > > > > > > > = > > > > > > > vc4 supports it. > > > > > > = > > > > > > Someone implemented it incorrectly then. > > > > > = > > > > > Incorrectly according to what documentation / specification? I'm = sorry, > > > > > but I find it super ironic that i915 gets to do its own thing, not > > > > > document any of it, and when people try to clean things up they g= et told > > > > > that we got it all wrong. > > > > = > > > > FWIW, this was an i915 property and if another driver uses the same > > > > property name it must have the same behavior. Yes, it isn't standar= dized > > > > and yes, it's not documented (hence this effort here) but it's stil= l on > > > > vc4 to make the property compatible. > > > = > > > How is it not compatible? It's a superset of what i915 provides, but > > > it's strictly compatible with it. > > = > > No it is not. > = > The property is compatible with i915 interpretation of it, whether you > like it or not. And that's what Sebastian was referring to. > = > > Eg. what happens if you set the thing to full range for RGB (which you > > must on many broken monitors), and then the kernel automagically > > switches to YCbCr (for whatever reason) but the monitor doesn't > > support full range YCbCr? Answer: you get crap output. > = > And that part is just moving goalposts. But it's really not. The Broadcast RGB property kind of works from a user space perspective because it's a workaround for broken sinks. If a sink expects limited range we can force full range. If this however affects YCbCr modes as well, then this isn't a workaround for broken RGB range anymore because it now breaks YCbCr. Sorry, but vc4 just has to change. And again: let's please stop trying to improve the property. > = > Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel