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 07177EE20B2 for ; Fri, 6 Feb 2026 15:27:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A074E10E81F; Fri, 6 Feb 2026 15:27:22 +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="g1rsV09N"; 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 72C6E10E813; Fri, 6 Feb 2026 15:27:21 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1770391628; cv=none; d=zohomail.com; s=zohoarc; b=a4h+OMbk0iyCauZRGyFmaHiVxh6Yugm4f32aGLbFhazNxk2AM6aEzKSFJrvmbCkDa1kHpArrcDG9eOr9eKpkJn9go19QxTKOfOKPavc5QP1VZYj/GcgVI6YH6osbBQ4tzee6Ic2DfhF+KQUDs1tmYsAkCdpua4wS0c2x/ZR4Zos= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770391628; 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=vqntc3mGZhsTFj2qn0IsTeoSdqqAdPY47w81CjtIRcU=; b=WhmsIoXPknI/ZfuAJvjw/L+iIZm5YOJgtxfxsCHunsPD5aWHpevT5NdsNfEsw2dpwijkoc7oTtOsPAla8d0ob3+jULGNzZxNoS5vf9OI5QrhioFduAh/oLPT6249tPWOGt2YjRWyWFMe9duEZryJd/xA+ugNdJb9pJso95K6M50= 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=1770391628; 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=vqntc3mGZhsTFj2qn0IsTeoSdqqAdPY47w81CjtIRcU=; b=g1rsV09NZVeVjM8t7+ErxmMNzCf1eyjSqe3YVJSgOOy2VOoOdHNMsYj8XQqpHLWU 3nZeRaIXnrlgW9G2ES7zouFMyDRjfDplLgvXSGV33v+UHedcPcFRcrdeC2lBx7/vEqB 6+UL8ghWEGrqLdtKZUlfBYCyJY/EQ/LEvY4xFERo= Received: by mx.zohomail.com with SMTPS id 1770391626411181.8997983206183; Fri, 6 Feb 2026 07:27:06 -0800 (PST) From: Nicolas Frattaroli To: 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 , 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, Andri Yngvason , Werner Sembach , Marius Vlad Subject: Re: [PATCH v7 02/22] drm: Add new general DRM property "color format" Date: Fri, 06 Feb 2026 16:26:56 +0100 Message-ID: <6318997.lOV4Wx5bFT@workhorse> In-Reply-To: <20260206-deft-provocative-perch-6ca9bf@houat> References: <20260121-color-format-v7-0-ef790dae780c@collabora.com> <20260121-color-format-v7-2-ef790dae780c@collabora.com> <20260206-deft-provocative-perch-6ca9bf@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" Hello, On Friday, 6 February 2026 15:05:08 Central European Standard Time Maxime Ripard wrote: > Hi, > > On Wed, Jan 21, 2026 at 03:45:09PM +0100, Nicolas Frattaroli wrote: > > diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h > > index 7eaec37ae1c7..b5604dca728a 100644 > > --- a/include/drm/drm_connector.h > > +++ b/include/drm/drm_connector.h > > @@ -556,6 +556,16 @@ enum drm_colorspace { > > DRM_MODE_COLORIMETRY_COUNT > > }; > > > > +enum drm_color_format { > > + DRM_COLOR_FORMAT_AUTO = 0, > > + DRM_COLOR_FORMAT_RGB444 = BIT(0), > > + DRM_COLOR_FORMAT_YCBCR444 = BIT(1), > > + DRM_COLOR_FORMAT_YCBCR422 = BIT(2), > > + DRM_COLOR_FORMAT_YCBCR420 = BIT(3), > > +}; > > + > > +#define DRM_COLOR_FORMAT_COUNT 5 > > + > > I don't really see a reason to expose an enum, with a bunch of values > that are all mutually exclusive, as a bitmask. It's pretty inconsistent > with most (all?) the other similar properties we have. > > I appreciate you did that to avoid fixing up every driver using those > values, but then maybe we don't have to? We could create a userspace > facing enum, and convert to DRM_COLOR_FORMAT internally. This is what the series did at v5 and earlier. IMHO it was kind of counter-productive, because we then had two different things for the same purpose, and some conversion logic between them. I think it's more error prone to do it that way (think: mixing up the two), and doesn't have a clear benefit. Just to give a picture of how bad things get: 1. we have the HDMI color format (aka "HDMI_COLORSPACE") 2. we have driver specific output color formats, e.g. the intel ones 3. we have DRM_COLOR_FORMAT 4. we have the bus formats (multiple per color format) 5. we have the DRM plane formats (again, multiple per color format) Adding a sixth into the mix feels a bit bad because we'll then need to justify why we should have another layer of switch-case statements. Kind regards, Nicolas Frattaroli > > Maxime >