From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 593713D9DDC for ; Wed, 29 Jul 2026 12:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785327295; cv=pass; b=Yf0Bcn8nUYLYWPb2NCtpPmySSfw0iYp67TPQFbr/6dyFuQniCxFqgkCTXxspVVI7kMJwjbucN2ltxSIgpYiPaHWgJSH4fAjUWnjA3mFPc82Rx3EdV/Km8qthwhvlqOmREGvGi07ePnhX+xIjJ7nOuZWwBRi60i/n3pdQ1FhRaOg= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785327295; c=relaxed/simple; bh=bIpsSDJV/aVPFM01Nwq0/zf6i1Q+KvLz8BhTlBNl87o=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=UMpiU66/MpFYcuI+AjRknsart6ILLS8ohOfQUOLomUXO3pIaysGc7UKEe/u36j84l1NCa+2MNaUBMXbrNwBrSxitz3Jpu588M6FBF75x9YEemAaQk9JvAcEVQVt87Pvm9sbSHnUv1LtHwB1bEIMlwcWSg/W6qC+tCjqNEd5up1Y= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b=XgIYzdkE; arc=pass smtp.client-ip=136.143.188.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b="XgIYzdkE" ARC-Seal: i=1; a=rsa-sha256; t=1785327244; cv=none; d=zohomail.com; s=zohoarc; b=j0EP3ei8CZYYeG9GcBbOuiJIIxwVKNf1Nwa3aQpWHia6tOg9m0vw7TaymoyDjLGd/qgekNIlDSnVCRm9i9ejrRIRUm5N9qRAsuiCjYQwZ9YqaznV3Iw/L2+rKZcPs0qvBrRMgk+98rH9qDV14o0DosAZv5TKXILMLWL0S3COLAg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785327244; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=Uk0Y1lYvpdLrTlp+7Fwrig6uPWxfBmX/cy9oqIf2et8=; b=cQtfuTJkiK13Rc5tMy4zUcvgox6EJ8uqMVEG2KXegpncWz6hIJtB/O6TGYT0vUsDeJ5VycM4M/Ie5ePJtqgY/sCBtSRRcLUSnkGM27MhSe8PGdQImFxAp6uBBuaVljgd81ExmksqJOcq4RmP6pEu6wXMd9T/daDWrLitkMsZ1nU= 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=1785327244; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding:To:To:Cc:Cc:Reply-To; bh=Uk0Y1lYvpdLrTlp+7Fwrig6uPWxfBmX/cy9oqIf2et8=; b=XgIYzdkEgb8yL0+PcHpuSoRicxhHelurXmpep/8e7/lpK0ahmoH9TcjomAALZCEZ LE55Y4ne6g0+h0PcyrIB9SQMJVapUWJPv1gdONrnrieMKjs2sYRk950bk/OpOipXwGY 5kAAX7jFKkx+4xy810SPB/zmTxhGXTCx0UptVprY= Received: by mx.zohomail.com with SMTPS id 1785327241652832.5455216169823; Wed, 29 Jul 2026 05:14:01 -0700 (PDT) From: Nicolas Frattaroli Subject: [PATCH v2 0/2] Add a "min bpc" connector property Date: Wed, 29 Jul 2026 14:13:26 +0200 Message-Id: <20260729-min-bpc-v2-0-7d0036ef437c@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/z2Oyw6CMBBFf4XM2mpbhBBX/odh0SlFxgDFthAN4 d8tj7ia3OTeM2cGbxwZD7dkBmcm8mT7GOQpAd2o/mkYVTGD5DLnOc9YRz3DQbMKsU4xVTKTAmJ 7cKamz0Z6lHv2I76MDuv8aDjzHuOLsNcAlTdM266jcEsq17FAw+W4sEIa8sG672Y3iW2ziwj5F 5kE4wxRFYWW+lqk+V3btlVonTpHNpTLsvwAnWHWJucAAAA= X-Change-ID: 20260605-min-bpc-dbbf3b3a2521 To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Xaver Hugl , =?utf-8?q?Michel_D=C3=A4nzer?= , Harry Wentland , Mario Kleiner , Pekka Paalanen , =?utf-8?q?Ville_Syrj=C3=A4l=C3=A4?= , Daniel Stone , Marius Vlad Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, wayland-devel@lists.freedesktop.org, Nicolas Frattaroli X-Mailer: b4 0.15.2 This series is an alternative to the link-bpc[1] series, which implemented an immutable property to determine the output's bit depth. The link bpc property wasn't very liked as it'd only be updated after an atomic commit went through. For a userspace that's trying to evaluate all available bit depths at a certain configuration, this was untenable. After some discussion at Display Next Hackfest 2026, the general consensus seemed to be that a "min bpc" property would be a better way forward. By setting it and "max bpc" to the same value, userspace can probe for supported BPCs of a configuration with repeated atomic test commits, without actually doing a modeset. At the same time, it satisfies a common userspace use case: often times, userspace just wants to ensure that its deep color plane it's submitting is not being degraded by the driver to 8bpc for bandwidth reasons. By setting "min bpc" accordingly, userspace will get definitive feedback (an atomic commit failure) and can then make content-specific trade-off decisions that the kernel wouldn't be able to do, such as by lowering the framerate, or once "color format" is in, by subsampling the chroma. Alternatively, userspace can of course also accept that there's really nothing better it can do, and lower "min bpc" to accept the degradation. This series adds the property (including documentation) and implements it in the common HDMI state helpers (including new KUnit tests). Drivers that don't use the common HDMI state helpers will need to register the property and implement the (fairly simple) logic themselves. There is a draft minimal userspace implementation in weston at [2] which doesn't do any fancy atomic test commit probing with dynamic userspace-side fallbacks. [1]: https://lore.kernel.org/dri-devel/20260330-link-bpc-v6-0-ff124af93e48@collabora.com/T/ [2]: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1850 Signed-off-by: Nicolas Frattaroli --- Changes in v2: - Add link to weston draft MR in cover letter - Apply trailers - Link to v1: https://patch.msgid.link/20260612-min-bpc-v1-0-bba88c2c4836@collabora.com --- Nicolas Frattaroli (2): drm/connector: Introduce "min bpc" connector property drm/connector: hdmi: Implement "min bpc" property drivers/gpu/drm/display/drm_hdmi_state_helper.c | 10 +- drivers/gpu/drm/drm_atomic_helper.c | 4 + drivers/gpu/drm/drm_atomic_uapi.c | 4 + drivers/gpu/drm/drm_connector.c | 81 ++++++++++++ drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 146 +++++++++++++++++++++ include/drm/drm_connector.h | 13 ++ 6 files changed, 254 insertions(+), 4 deletions(-) --- base-commit: 5df28e621a86e501b09902fdf816f8c02a162794 change-id: 20260605-min-bpc-dbbf3b3a2521 Best regards, -- Nicolas Frattaroli