I'm taking over this series from Marius Vlad. The series adds a new "link bpc" DRM property. It reflects the display link's actual achieved output bits per component, considering any degradation of the bit depth done by drivers for bandwidth or other reasons. The property's value is updated during an atomic commit, which is also when it fires an uevent if it changed to let userspace know.
There's a weston implementation at [1] which makes use of this new property to warn when a user's requested bpc could not be reached. [1]: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1850 --- Changes in v4: - Throw out the workqueue and delayed work item - Remove the drm_connector_update_link_bpc_state function - Reimplement it by updating the property and firing the uevent in commit_tail - Check that the provided max_bpc value in attach_link_bpc_property is within the expected range - Clamp the connector state's link_bpc value between 8 and max_bpc so that no value outside the declared range is ever written to the drm property - Update and reword doc strings - Add an amdgpu implementation - Link to v3: https://lore.kernel.org/r/[email protected]/T/ Changes in v3: - remove VRR mention from commit description (Ville) - add DRM_MODE_PROP_IMMUTABLE to flags (Ville) - provide helpers functions for drivers to use (can be used by other types of connectors, not just HDMI) - send uevent informating userspace when 'link bpc' connector state changed (Daniel @ https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1850) - added missing doc entry - Link to v2: https://lore.kernel.org/r/[email protected]/T/ Changes in v2: - replace return with EBUSY if connector already exists (Dmitry) - add i-g-t test and an implementation for Weston (Dmitry) - re-wording patch description (Jani) - Link to v1: https://lore.kernel.org/r/[email protected]/T/ Signed-off-by: Nicolas Frattaroli <[email protected]> --- Nicolas Frattaroli (2): drm/connector: hdmi: Add a 'link bpc' property drm/amd/display: Add support for 'link bpc' property drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 2 + drivers/gpu/drm/drm_atomic_helper.c | 9 +++ drivers/gpu/drm/drm_atomic_uapi.c | 2 + drivers/gpu/drm/drm_connector.c | 86 +++++++++++++++++++++++ include/drm/drm_connector.h | 16 +++++ 6 files changed, 129 insertions(+), 1 deletion(-) --- base-commit: 9a6bac4a4a289d3ac043f885758d208ccf07f149 change-id: 20260309-link-bpc-d0afc475ac49 Best regards, -- Nicolas Frattaroli <[email protected]>
