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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 22004FEC109 for ; Tue, 24 Mar 2026 19:53:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 42C4C10E5F1; Tue, 24 Mar 2026 19:53:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CGBn0ynj"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id E13DF10E06D; Tue, 24 Mar 2026 19:53:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774382029; x=1805918029; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=42rT3SIGPmyvbyvEqlNTF5uxxcBXVhvc5i/A4d+Id/U=; b=CGBn0ynjmh076HoifniSgFEbPHEZmEq0+vIizcv0L86Kytx1aL0t2U5m 6GUFDKh37o+s4ivwORfI3nb7ytU7j5/j+0dC8bTKnKtZf37yi4KyQRzUJ V3U3moDB0ZObKY9wD0ri/6c9ko8hWGMlVuRtJ3khB5yWOpv02Xt2+BpOQ qbz9vYBEUPTFqVE2/c2X08OuAhNcPeLR1DHshwFqVp6l5RIOWhNhbwG4L bSXcJyheNk51hVdV9eEECoy35vGz2DVMwr6dRVBrKaA5nlA6cfNwgCGIx sr1ZpHOgt8PwwwFXXhCvzkkJ3cDrJ3qeFOwb64Y2rQer66SbgLTAlWRnQ g==; X-CSE-ConnectionGUID: lGUel0pAR0KuWjHViLF/MQ== X-CSE-MsgGUID: voQ/3tb7Q7SpHI3Etapihg== X-IronPort-AV: E=McAfee;i="6800,10657,11739"; a="79269896" X-IronPort-AV: E=Sophos;i="6.23,138,1770624000"; d="scan'208";a="79269896" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2026 12:53:48 -0700 X-CSE-ConnectionGUID: bv/SM0XXQLOd1k3yTDy84Q== X-CSE-MsgGUID: hZyr5j3TSKi1jqU5SfUZgw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,138,1770624000"; d="scan'208";a="228502299" Received: from klitkey1-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.244.220]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2026 12:53:38 -0700 Date: Tue, 24 Mar 2026 21:53:35 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Nicolas Frattaroli Cc: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Sandy Huang , Heiko =?iso-8859-1?Q?St=FCbner?= , Andy Yan , Jani Nikula , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , Dmitry Baryshkov , Sascha Hauer , Rob Herring , Jonathan Corbet , Shuah Khan , kernel@collabora.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-doc@vger.kernel.org, Werner Sembach , Andri Yngvason , Marius Vlad Subject: Re: [PATCH v11 03/22] drm: Add new general DRM property "color format" Message-ID: References: <20260324-color-format-v11-0-605559af4fb4@collabora.com> <20260324-color-format-v11-3-605559af4fb4@collabora.com> <23910073.EfDdHjke4D@workhorse> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <23910073.EfDdHjke4D@workhorse> X-Patchwork-Hint: comment Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Mar 24, 2026 at 08:10:11PM +0100, Nicolas Frattaroli wrote: > On Tuesday, 24 March 2026 18:00:45 Central European Standard Time Ville S= yrj=E4l=E4 wrote: > > On Tue, Mar 24, 2026 at 05:01:07PM +0100, Nicolas Frattaroli wrote: > > > +enum drm_connector_color_format { > > > + /** > > > + * @DRM_CONNECTOR_COLOR_FORMAT_AUTO: The driver or display protocol > > > + * helpers should pick a suitable color format. All implementations= of a > > > + * specific display protocol must behave the same way with "AUTO", = but > > > + * different display protocols do not necessarily have the same "AU= TO" > > > + * semantics. > > > + * > > > + * For HDMI, "AUTO" picks RGB, but falls back to YCbCr 4:2:0 if the > > > + * bandwidth required for full-scale RGB is not available, or the m= ode > > > + * is YCbCr 4:2:0-only, as long as the mode and output both support > > > + * YCbCr 4:2:0. > > > + * > > > + * For display protocols other than HDMI, the recursive bridge chain > > > + * format selection picks the first chain of bridge formats that wo= rks, > > > + * as has already been the case before the introduction of the "col= or > > > + * format" property. Non-HDMI bridges should therefore either sort = their > > > + * bus output formats by preference, or agree on a unified auto for= mat > > > + * selection logic that's implemented in a common state helper (like > > > + * how HDMI does it). > > > + */ > > > + DRM_CONNECTOR_COLOR_FORMAT_AUTO =3D 0, > > > + > > > + /** > > > + * @DRM_CONNECTOR_COLOR_FORMAT_RGB444: RGB output format > > > + */ > > > + DRM_CONNECTOR_COLOR_FORMAT_RGB444, > > > + > > > + /** > > > + * @DRM_CONNECTOR_COLOR_FORMAT_YCBCR444: YCbCr 4:4:4 output format = (ie. > > > + * not subsampled) > > > + */ > > > + DRM_CONNECTOR_COLOR_FORMAT_YCBCR444, > > > + > > > + /** > > > + * @DRM_CONNECTOR_COLOR_FORMAT_YCBCR422: YCbCr 4:2:2 output format = (ie. > > > + * with horizontal subsampling) > > > + */ > > > + DRM_CONNECTOR_COLOR_FORMAT_YCBCR422, > > > + > > > + /** > > > + * @DRM_CONNECTOR_COLOR_FORMAT_YCBCR420: YCbCr 4:2:0 output format = (ie. > > > + * with horizontal and vertical subsampling) > > > + */ > > > + DRM_CONNECTOR_COLOR_FORMAT_YCBCR420, > >=20 > > Seems like this should document what the quantization range > > should be for each format. > >=20 >=20 > I don't think so? If you want per-component bit depth values, > DRM_FORMAT_* defines would be the appropriate values to use. This > enum is more abstract than that, and is there to communicate > YUV vs. RGB and chroma subsampling, with bit depth being handled > by other properties. >=20 > If you mean the factor used for subsampling, then that'd only be > relevant if YCBCR410 was supported where one chroma plane isn't > halved but quartered in resolution. I suspect 4:1:0 will never > be added; no digital display protocol standard supports it to my > knowledge, and hopefully none ever will. No, I mean the quantization range (16-235 vs. 0-255 etc). The i915 behaviour is that YCbCr is always limited range, RGB can either be full or limited range depending on the=20 "Broadcast RGB" property and other related factors. --=20 Ville Syrj=E4l=E4 Intel