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 CDB3B106B535 for ; Wed, 25 Mar 2026 13:22:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 936FF10E1B2; Wed, 25 Mar 2026 13:22:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b="kMKm63Fg"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by gabe.freedesktop.org (Postfix) with ESMTPS id 26FDA10E1B2; Wed, 25 Mar 2026 13:22:09 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1774444903; cv=none; d=zohomail.com; s=zohoarc; b=CCtBlCPi3Q2bB+pY52f2jYSHnPdZPKK5c/bNbLVbaqFROouY4wutn/e4U4ddPiCh2dRtIJEa+4sw3eRcgkx5itizWSiHQJ1k5ji2y3TV8Sfd+LOOHE+4eImuNXHyhepL4Y6xZLlucHqh7dhKlIgV597SkxauYwWGp3Mt/qwyCQE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774444903; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=4NCts4nAAjmpTTPXyyXJubEwZVKpuACtYHYvuhLjnEg=; b=neSpIpW8c/spyqvAiNwkjoDSOZqyZHnFCRxV+Gi3qYZVjFyK2gFbh4bi4baBjnCEikE9tteSGtcEZu59GjHFByVfFlXSi6+KM02lf2Fn1W/82bQzFgR2uXoK9V23thc386KYuCtfUVJTQ5xbJa49Byx9hCa8SriuTIc37yQPjqA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1774444902; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=4NCts4nAAjmpTTPXyyXJubEwZVKpuACtYHYvuhLjnEg=; b=kMKm63FguoGfblCxfxSJ1j3I+F7NdvBi9QkoZ36rRIQm4aQhUxkdXUzXAXW4P2/G +iy6N2K0+KnjFKEck7QsfoKxt4RhRphih9F7T8mSCX2RA9nAFsIw2VpoO+K94iKlTUc te0syhpVY6coMVnV3Yp8zmz2ebBBxIMveJzQYjMI= Received: by mx.zohomail.com with SMTPS id 1774444893218302.43210365950904; Wed, 25 Mar 2026 06:21:33 -0700 (PDT) From: Nicolas Frattaroli To: Dave Stevenson , Maxime Ripard Cc: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , Christian =?UTF-8?B?S8O2bmln?= , David Airlie , Simona Vetter , Maarten Lankhorst , Thomas Zimmermann , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Sandy Huang , Heiko =?UTF-8?B?U3TDvGJuZXI=?= , 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" Date: Wed, 25 Mar 2026 14:21:24 +0100 Message-ID: <12425220.nUPlyArG6x@workhorse> In-Reply-To: <20260325-quaint-bull-of-fortitude-dc68da@houat> References: <20260324-color-format-v11-0-605559af4fb4@collabora.com> <20260325-quaint-bull-of-fortitude-dc68da@houat> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Wednesday, 25 March 2026 14:05:25 Central European Standard Time Maxime Ripard wrote: > Hi Dave, > > On Wed, Mar 25, 2026 at 12:49:19PM +0000, Dave Stevenson wrote: > > > diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h > > > index af8b92d2d5b7..bd549f912b76 100644 > > > --- a/include/drm/drm_connector.h > > > +++ b/include/drm/drm_connector.h > > > @@ -571,14 +571,102 @@ enum drm_colorspace { > > > * YCbCr 4:2:2 output format (ie. with horizontal subsampling) > > > * @DRM_OUTPUT_COLOR_FORMAT_YCBCR420: > > > * YCbCr 4:2:0 output format (ie. with horizontal and vertical subsampling) > > > + * @DRM_OUTPUT_COLOR_FORMAT_COUNT: > > > + * Number of valid output color format values in this enum > > > */ > > > enum drm_output_color_format { > > > DRM_OUTPUT_COLOR_FORMAT_RGB444 = 0, > > > DRM_OUTPUT_COLOR_FORMAT_YCBCR444, > > > DRM_OUTPUT_COLOR_FORMAT_YCBCR422, > > > DRM_OUTPUT_COLOR_FORMAT_YCBCR420, > > > + DRM_OUTPUT_COLOR_FORMAT_COUNT, > > > }; > > > > > > +/** > > > + * enum drm_connector_color_format - Connector Color Format Request > > > + * > > > + * This enum, unlike &enum drm_output_color_format, is used to specify requests > > > + * for a specific color format on a connector through the DRM "color format" > > > + * property. The difference is that it has an "AUTO" value to specify that > > > + * no specific choice has been made. > > > + */ > > > +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 "AUTO" > > > + * 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 mode > > > + * is YCbCr 4:2:0-only, as long as the mode and output both support > > > + * YCbCr 4:2:0. > > > > Is there a reason you propose dropping back to YCbCr 4:2:0 without > > trying YCbCr 4:2:2 first? Minimising the subsampling is surely > > beneficial, and vc4 for one can do 4:2:2 but not 4:2:0. > > The "auto" behaviour is strictly identical to the one we have right now, > and this one stems from i915. Back when all that logic was added, it was > decided to align every driver behavior on i915 because that's what most > compositors would expect. Hi Maxime, would it be okay to extend the behavior while we're at it? 4:2:2 does save bandwidth compared to RGB (unlike YCbCr 4:4:4). I do think 4:2:2 instead of 4:2:0 will provide benefits in some cases. I assume hardware that supports 4:2:2 only instead of 4:2:0 does so in order to save >= 1 horizontal row of local SRAM buffer in the display controller for any downscaling, as it'll only need to consider neighbouring pixels on the same row. Kind regards, Nicolas Frattaroli > > Maxime >