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 E1457106B535 for ; Wed, 25 Mar 2026 13:22: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:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4NCts4nAAjmpTTPXyyXJubEwZVKpuACtYHYvuhLjnEg=; b=kZjYW/Pgj7zfDlgrIpb8be2pLt nSXWa7gTu574ONgOdSvi10MQbH88daYKEnY6p/8tROZ4xvJu1bb3EWVQ6T1+ridUKF8n6ezmrxrIL gTydT4Mob+K8OgzCE2zvJO86ihCu3DJzjXXN+Jx860giVVbGE2aQJOufOF9exz43fI+a6XcRCDOwy bLvpnFMS5Ff8DmpVUUdU+kAxZ+G64EQ3gXMduCqLmrqAgdDj7b0M6q3gA7maZw4HzOIPd4U6vlZVp KKjCOyZQvBE6Hh/Wmd7ppJ2nk3jBVTjSsllOqUsa/0SCqan2Clgaj0LlQVhgsOmTwAA8zLJHH1O4A yoYloseg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w5OC1-00000003SMe-2TrB; Wed, 25 Mar 2026 13:22:41 +0000 Received: from sender4-pp-f112.zoho.com ([136.143.188.112]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w5OBx-00000003SLj-3h2u; Wed, 25 Mar 2026 13:22:41 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260325_062239_969923_E58BEC20 X-CRM114-Status: GOOD ( 29.35 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 >