[PATCH v4 25/27] drm: Add ALLM properties to connector
From: Tomasz Pakuła
Date: Mon Feb 16 2026 - 11:50:18 EST
Adds HDMI Auto Low Latency Mode optional connector properties allm_mode
and allm_mode_capable.
ALLM automatically puts TVs into low latency modes (gaming modes) and
it's part of the HDMI Gaming Features introduced in HDMI 2.1.
allm_mode_capable indicates whether connector (sink) supports ALLM
allm_mode tells the driver which triggering mode to use. Off, dynamic
and always on. Dynamic mode should consider the content type and the
state of the crtc to discern whether ALLM should be activated.
Recommendation is Content Type Hint == Game || VRR_ENABLED based on
testing behaviors on other operating systems and multiple GPU vendors +
how TVs behave.
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@xxxxxxxxx>
---
drivers/gpu/drm/drm_atomic_uapi.c | 4 ++
drivers/gpu/drm/drm_connector.c | 115 ++++++++++++++++++++++++++++++
include/drm/drm_connector.h | 37 ++++++++++
3 files changed, 156 insertions(+)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index a3ad2fe3306b..cfb50a3d617d 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -758,6 +758,8 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
state->content_type = val;
} else if (property == connector->scaling_mode_property) {
state->scaling_mode = val;
+ } else if (property == connector->allm_mode_property) {
+ state->allm_mode = val;
} else if (property == config->content_protection_property) {
if (val == DRM_MODE_CONTENT_PROTECTION_ENABLED) {
drm_dbg_kms(dev, "only drivers can set CP Enabled\n");
@@ -855,6 +857,8 @@ drm_atomic_connector_get_property(struct drm_connector *connector,
*val = state->colorspace;
} else if (property == connector->scaling_mode_property) {
*val = state->scaling_mode;
+ } else if (property == connector->allm_mode_property) {
+ *val = state->allm_mode;
} else if (property == config->hdr_output_metadata_property) {
*val = state->hdr_output_metadata ?
state->hdr_output_metadata->base.id : 0;
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 5bb38b80e214..14d504ca73f4 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -1226,6 +1226,12 @@ static const struct drm_prop_enum_list drm_content_type_enum_list[] = {
{ DRM_MODE_CONTENT_TYPE_GAME, "Game" },
};
+static const struct drm_prop_enum_list drm_allm_mode_enum_list[] = {
+ { DRM_ALLM_MODE_DISABLED, "Disabled" },
+ { DRM_ALLM_MODE_ENABLED_DYNAMIC, "Dynamic" },
+ { DRM_ALLM_MODE_ENABLED_FORCED, "Always On" },
+};
+
static const struct drm_prop_enum_list drm_panel_orientation_enum_list[] = {
{ DRM_MODE_PANEL_ORIENTATION_NORMAL, "Normal" },
{ DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP, "Upside Down" },
@@ -2449,6 +2455,94 @@ int drm_connector_attach_passive_vrr_capable_property(
}
EXPORT_SYMBOL(drm_connector_attach_passive_vrr_capable_property);
+/**
+ * DOC: Auto Low Latency Mode properties
+ *
+ * Auto Low Latency capable HDMI displays (be it PC monitors or TVs)
+ * can automatically enter a "low latency" mode, usually named "Game Mode" by
+ * receiving specific data in HDMI Forum vendor-specific info frame.
+ *
+ * This usually is the best mode for PC usage but disables as much processing as
+ * possible which might not be desireable on lower end devices casing them to
+ * produce an image that's unsatisfactory to some users.
+ *
+ * "allm_capable":
+ * Optional &drm_connector boolean property that drivers should attach
+ * with drm_connector_attach_allm_capable_property() on connectors that
+ * could support Auto Low Latency Mode. Drivers should update the
+ * property value by calling drm_connector_set_allm_capable_property().
+ *
+ * Absence of the property should indicate absence of support.
+ *
+ * "ALLM_MODE":
+ * Optional &drm_connector enum property enables compositors to control and
+ * expose ALLM triggering behavior modes to the end user where:
+ *
+ * - ALLM_MODE_DISABLED: completely disabled ALLM signalling.
+ * - ALLM_MODE_ENABLED_DYNAMIC: triggers ALLM based on current needs.
+ * preferrably display content type hint being set to Game by compositor
+ * or VRR being enabled and active.
+ * - ALLM_MODE_ENABLED_FORCED: always-on ALLM triggering.
+ *
+ * ALLM_MODE_ENABLED_DYNAMIC should behave like gaming devices such as
+ * consoles where ALLM is only triggered when needed. It's main purpose is
+ * gaming (part of so-called HDMI gaming features).
+ *
+ * If compositors wish to control ALLM completely on their own, they can
+ * switch between disabled and enabled_forced modes.
+ */
+
+/**
+ * drm_connector_attach_allm_capable_property - creates the
+ * allm_capable property
+ * @connector: connector to create the allm_capable property on.
+ *
+ * This is used by atomic drivers to add support for querying
+ * Auto Low Latency Mode capability for a connector.
+ *
+ * Returns:
+ * Zero on success, negative errno on failure.
+ */
+int drm_connector_attach_allm_capable_property(struct drm_connector *connector)
+{
+ struct drm_device *dev = connector->dev;
+ struct drm_property *prop;
+
+ if (!connector->allm_capable_property) {
+ prop = drm_property_create_bool(dev, DRM_MODE_PROP_IMMUTABLE,
+ "allm_capable");
+ if (!prop)
+ return -ENOMEM;
+
+ connector->allm_capable_property = prop;
+ drm_object_attach_property(&connector->base, prop, 0);
+ }
+
+ return 0;
+}
+EXPORT_SYMBOL(drm_connector_attach_allm_capable_property);
+
+int drm_connector_attach_allm_mode_property(struct drm_connector *connector)
+{
+ struct drm_property *prop;
+
+ if (connector->allm_mode_property)
+ return 0;
+
+ prop = drm_property_create_enum(connector->dev, 0, "allm_mode",
+ drm_allm_mode_enum_list,
+ ARRAY_SIZE(drm_allm_mode_enum_list));
+ if (!prop)
+ return -ENOMEM;
+
+ connector->allm_mode_property = prop;
+ drm_object_attach_property(&connector->base, prop,
+ DRM_ALLM_MODE_DISABLED);
+
+ return 0;
+}
+EXPORT_SYMBOL(drm_connector_attach_allm_mode_property);
+
/**
* drm_connector_attach_scaling_mode_property - attach atomic scaling mode property
* @connector: connector to attach scaling mode property on.
@@ -3041,6 +3135,27 @@ void drm_connector_set_passive_vrr_capable_property(
}
EXPORT_SYMBOL(drm_connector_set_passive_vrr_capable_property);
+/**
+ * drm_connector_set_allm_capable_property - sets Auto Low Latency Mode
+ * capable property for a connector
+ * @connector: drm connector
+ * @capable: True if the connector is ALLM capable
+ *
+ * Should be used by atomic drivers to update the indicated support for
+ * Auto Low Latency Mode over a connector.
+ */
+void drm_connector_set_allm_capable_property(
+ struct drm_connector *connector, bool capable)
+{
+ if (!connector->allm_capable_property)
+ return;
+
+ drm_object_property_set_value(&connector->base,
+ connector->allm_capable_property,
+ capable);
+}
+EXPORT_SYMBOL(drm_connector_set_allm_capable_property);
+
/**
* drm_connector_set_panel_orientation - sets the connector's panel_orientation
* @connector: connector for which to set the panel-orientation property.
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 30dd9737bfe0..fa4abfe8971e 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -58,6 +58,12 @@ enum drm_connector_force {
DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */
};
+enum drm_allm_mode {
+ DRM_ALLM_MODE_DISABLED,
+ DRM_ALLM_MODE_ENABLED_DYNAMIC,
+ DRM_ALLM_MODE_ENABLED_FORCED,
+};
+
/**
* enum drm_connector_status - status for a &drm_connector
*
@@ -1147,6 +1153,13 @@ struct drm_connector_state {
*/
unsigned int content_protection;
+ /**
+ * @allm_mode: Connector property to control the
+ * HDMI Auto Low Latency Mode trigger setting.
+ * The %DRM_ALLM_MODE_\* values must match the values.
+ */
+ enum drm_allm_mode allm_mode;
+
/**
* @colorspace: State variable for Connector property to request
* colorspace change on Sink. This is most commonly used to switch
@@ -2112,6 +2125,26 @@ struct drm_connector {
*/
struct drm_property *passive_vrr_capable_property;
+ /**
+ * @allm_capable_property: Optional property to help userspace
+ * query hardware support for HDMI Auto Low Latency Mode on a connector.
+ * Drivers can add the property to a connector by calling
+ * drm_connector_attach_allm_capable_property().
+ *
+ * This should be updated only by calling
+ * drm_connector_set_allm_capable_property().
+ */
+ struct drm_property *allm_capable_property;
+
+ /**
+ * @allm_mode_property:
+ *
+ * Indicates HDMI Auto Low Latency Mode triggering mode for connector.
+ * Support for the requested state will depend on driver and hardware
+ * capabiltiy - lacking support is not treated as failure.
+ */
+ struct drm_property *allm_mode_property;
+
/**
* @colorspace_property: Connector property to set the suitable
* colorspace supported by the sink.
@@ -2508,6 +2541,8 @@ int drm_connector_attach_vrr_capable_property(
struct drm_connector *connector);
int drm_connector_attach_passive_vrr_capable_property(
struct drm_connector *connector);
+int drm_connector_attach_allm_capable_property(struct drm_connector *connector);
+int drm_connector_attach_allm_mode_property(struct drm_connector *connector);
int drm_connector_attach_broadcast_rgb_property(struct drm_connector *connector);
int drm_connector_attach_colorspace_property(struct drm_connector *connector);
int drm_connector_attach_hdr_output_metadata_property(struct drm_connector *connector);
@@ -2532,6 +2567,8 @@ void drm_connector_set_vrr_capable_property(
struct drm_connector *connector, bool capable);
void drm_connector_set_passive_vrr_capable_property(
struct drm_connector *connector, bool capable);
+void drm_connector_set_allm_capable_property(
+ struct drm_connector *connector, bool capable);
int drm_connector_set_panel_orientation(
struct drm_connector *connector,
enum drm_panel_orientation panel_orientation);
--
2.53.0