From nobody Thu Mar 5 08:31:16 2026 Received: from mail-ej1-f67.google.com (mail-ej1-f67.google.com [209.85.218.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDA5B2D0C9D for ; Mon, 16 Feb 2026 16:45:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.67 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771260354; cv=none; b=Go68nI3SeNWBkQV/v7muL+VfxtZiesc66jZ/xr5CdcDKSE1xytZY3KFKas0ujdxDXyT8019JZcshX+ZA+eGexprNSynHJB1Azc72QRLDAH/4w270bQmmhANdJjzMBQmJSMUbZ9beiQIy1NoF6N+7FhqmjmCQjuzPIuS8Qugnr/o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771260354; c=relaxed/simple; bh=i1XejaUvFJ0YAaujKNbUEx1X8Wxs7QoHR08OZmN6awQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jh5dMD1CMqTxsivxnvVAMG3twgx86egEUxx33aiceu6I2maFpKCOVfqMbIp2XX5VD8rRE6jyILU6ISskKb8U/RA9FGBOPT4ixigG64Uv1/qLVdWtvjb5Pp6B9NaYAdEh6kZmmpcsIskb4rA/Fmp517CyRNBAGVRcNPQ0n7w7nx0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hrPFtqUL; arc=none smtp.client-ip=209.85.218.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hrPFtqUL" Received: by mail-ej1-f67.google.com with SMTP id a640c23a62f3a-b8f8d9b2c50so27325366b.1 for ; Mon, 16 Feb 2026 08:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771260351; x=1771865151; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=il27DEcymwLna7hK1ELrrYkujYqTcKdi5syqhicz4KY=; b=hrPFtqULzXXsytQvngddRIIqOfZUhhYfzRj9gmbQFrJj8IGI51cfd/ca4R8nj33QZZ zGaYy2arvbMBPcF221GueXnk3Z+qAB/diK1NC/EmrrVr/o+F+a9XOUH3lEXpca9u15qa DABu3NN6wHHBwV8GKfSId9mh9LsNql/dXranyZngFRM3fj468mRfjD0OCjhx1LGMD/OU /bEX1pIFDW3vXjhtZj4hp8YOPMtdX9Tfli3jaAcjDoV8Zccz4ktWbwy5AxISHT63ETwx pqzuOcKFHDwCY7suLX5aiWi9nj7TmPRrxRoRUimvgNHriMqcfOGwh76xIYKXFYLf8H0A nTdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771260351; x=1771865151; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=il27DEcymwLna7hK1ELrrYkujYqTcKdi5syqhicz4KY=; b=o3kUyZilBh3oCe7pEf5Kh37Cafx/wnIBsDyQ1u24xYwkdA2aO+1LfiJIPhB3PtIPH4 29HDW8G1Jpcnl0lCsFmjTUa+wXuxDOnjyLwzDBlZEyDQbw3/PwLx1vpKpXY6R905t7jx 3ewY8w1QZIctNN0kIbZJQlH4HSzshplgRED2QWDnMir6nges7FPRKhYXZQpeXT7U87w2 +KS948cwFw7leIGf6c0BLRtLzeVve6K5pIEqYKukbUp2ca6y/4Pk/oyWgilNk4bmIh9q Jx0FdSDqHNbpLadaFeTu7zFF8JnyvXKzxagB5IXeqTJJ2Z7X6v304pQdoLa/j1wBcju9 g9mQ== X-Forwarded-Encrypted: i=1; AJvYcCVMoEP1Le51KwUpNxMk2yzI8KhFUy4l30vZBlCfT/nIS11KXEk/kP4DdIpnuW2ajBzm6dscf/GWh9SkNxA=@vger.kernel.org X-Gm-Message-State: AOJu0Yx1wZTk1T5uRVHNA1FF2xuuu8mjyoSQWvDKL04sLXEu0XwlRm/W JjbrbRyg36BIqg0Md7VeL5dVXSNUXnUMxB+8spWAofa6Ol7ZuBFWXV2D X-Gm-Gg: AZuq6aJnP+TFcXTm13xSf87MieP4jVS9KJSGQjkOGoDXdkpDh+zGZ5s03BkA7Q92q4T QzgBScOK/1rqar5PVt+2mNK3zsbOIx644bKkocAAJFCC3oTU0UOxHcj32CUM47EDnZCtXfqR2m8 uRL40hDgrbeTHoadJHsKZDDI53Qc+QCU6XceL2Lg/bgn77A5sJLMqVfZn808ZASKe2T6DDAIChb l9gtRa+v5raReMqdct6Rx24/TFBGGoZdMUtuE2f91sOOWyIzZB1EYUmfBLCr/0wD+7gYQGcvldH 4LERJYb0F0DnrXC7rrHlhBXoG/mBP7PJdxRfeG6tycHz5bDVaxdbJsI+Ffm1Hl84/iYsqzYWN3/ QcpFzh02L8A25oS/F2o0PJGUUugFvLnTAWzKNnLnOQXgLLMAsleSrFWuqu3oxGkSZvv/ggepq29 4/3Hem11PEpKsjvTPYv+lB6EyGRJzdDbPkzzSJRN3MCQ//+phZ5uldxPDXoPCWioi9v39jieoZV AJp X-Received: by 2002:a17:906:6a24:b0:b87:3c3a:cb7e with SMTP id a640c23a62f3a-b8face00ea5mr368595266b.6.1771260351124; Mon, 16 Feb 2026 08:45:51 -0800 (PST) Received: from laptok.lan (87-205-5-123.static.ip.netia.com.pl. [87.205.5.123]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8fc735d185sm264683866b.14.2026.02.16.08.45.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Feb 2026 08:45:50 -0800 (PST) From: =?UTF-8?q?Tomasz=20Paku=C5=82a?= To: alexander.deucher@amd.com, harry.wentland@amd.com, sunpeng.li@amd.com Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, siqueira@igalia.com, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, tomasz.pakula.oficjalny@gmail.com, bernhard.berger@gmail.com, michel.daenzer@mailbox.org, daniel@fooishbar.org Subject: [PATCH v4 24/27] drm: Add passive_vrr_capable property to connector Date: Mon, 16 Feb 2026 17:45:13 +0100 Message-ID: <20260216164516.36803-25-tomasz.pakula.oficjalny@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260216164516.36803-1-tomasz.pakula.oficjalny@gmail.com> References: <20260216164516.36803-1-tomasz.pakula.oficjalny@gmail.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: quoted-printable Supplement to the passive_vrr_disabled crtc property Drivers can add the property to a connector with drm_connector_attach_passive_vrr_capable_property(). The value should be updated based on driver and hardware capability by using drm_connector_set_passive_vrr_capable_property(). Signed-off-by: Tomasz Paku=C5=82a --- drivers/gpu/drm/drm_connector.c | 73 +++++++++++++++++++++++++++++++++ include/drm/drm_connector.h | 15 +++++++ 2 files changed, 88 insertions(+) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connecto= r.c index 272d6254ea47..5bb38b80e214 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -2346,6 +2346,16 @@ EXPORT_SYMBOL(drm_mode_create_scaling_mode_property); * * Absence of the property should indicate absence of support. * + * "passive_vrr_capable": + * Optional &drm_connector boolean property that drivers should attach + * with drm_connector_attach_passive_vrr_capable_property() on + * connectors that could support keeping variable refresh rate signalling + * in fixed-refresh rate scenarios like desktop work. Drivers should update + * the property value by calling + * drm_connector_set_passive_vrr_capable_property(). + * + * Absence of the property should indicate absence of support. + * * "VRR_ENABLED": * Default &drm_crtc boolean property that notifies the driver that the * content on the CRTC is suitable for variable refresh rate presentation. @@ -2364,6 +2374,17 @@ EXPORT_SYMBOL(drm_mode_create_scaling_mode_property); * * The driver may place further restrictions within these minimum * and maximum bounds. + * + * "PASSIVE_VRR_DISABLED": + * Default &drm_crtc boolean property that notifies the driver that the + * VRR singalling should be disabled in fixed refresh rate scenarios. + * Functionally, psssive vrr works the same as VRR_ENABLED =3D=3D false + * but works around displays blanking (mainly HDMI) that do not support + * seamless VRR transitions. Also helps with brightness flickering during + * VRR transitions. + * + * Passive VRR mode is not that useful for DP/eDP sinks where seamless VRR + * transitions are enforced by the standard. */ =20 /** @@ -2397,6 +2418,37 @@ int drm_connector_attach_vrr_capable_property( } EXPORT_SYMBOL(drm_connector_attach_vrr_capable_property); =20 +/** + * drm_connector_attach_passive_vrr_capable_property - creates the + * passive_vrr_capable property + * @connector: connector to create the passive_vrr_capable property on. + * + * This is used by atomic drivers to add support for querying + * variable refresh rate on desktop capability for a connector. + * + * Returns: + * Zero on success, negative errno on failure. + */ +int drm_connector_attach_passive_vrr_capable_property( + struct drm_connector *connector) +{ + struct drm_device *dev =3D connector->dev; + struct drm_property *prop; + + if (!connector->passive_vrr_capable_property) { + prop =3D drm_property_create_bool(dev, DRM_MODE_PROP_IMMUTABLE, + "passive_vrr_capable"); + if (!prop) + return -ENOMEM; + + connector->passive_vrr_capable_property =3D prop; + drm_object_attach_property(&connector->base, prop, 0); + } + + return 0; +} +EXPORT_SYMBOL(drm_connector_attach_passive_vrr_capable_property); + /** * drm_connector_attach_scaling_mode_property - attach atomic scaling mode= property * @connector: connector to attach scaling mode property on. @@ -2968,6 +3020,27 @@ void drm_connector_set_vrr_capable_property( } EXPORT_SYMBOL(drm_connector_set_vrr_capable_property); =20 +/** + * drm_connector_set_passive_vrr_disabled_capable_property - sets the vari= able refresh + * rate on desktop capable property for a connector + * @connector: drm connector + * @capable: True if the connector is variable refresh rate on desktop cap= able + * + * Should be used by atomic drivers to update the indicated support for + * variable refresh rate on desktop over a connector. + */ +void drm_connector_set_passive_vrr_capable_property( + struct drm_connector *connector, bool capable) +{ + if (!connector->passive_vrr_capable_property) + return; + + drm_object_property_set_value(&connector->base, + connector->passive_vrr_capable_property, + capable); +} +EXPORT_SYMBOL(drm_connector_set_passive_vrr_capable_property); + /** * drm_connector_set_panel_orientation - sets the connector's panel_orient= ation * @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 dab9d5521f41..30dd9737bfe0 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -2101,6 +2101,17 @@ struct drm_connector { */ struct drm_property *vrr_capable_property; =20 + /** + * @passive_vrr_capable_property: Optional property to help userspace + * query hardware support for passive variable refresh rate on a + * connector. Drivers can add the property to a connector by + * calling drm_connector_attach_passive_vrr_capable_property(). + * + * This should be updated only by calling + * drm_connector_set_passive_vrr_capable_property(). + */ + struct drm_property *passive_vrr_capable_property; + /** * @colorspace_property: Connector property to set the suitable * colorspace supported by the sink. @@ -2495,6 +2506,8 @@ int drm_connector_attach_scaling_mode_property(struct= drm_connector *connector, u32 scaling_mode_mask); 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_broadcast_rgb_property(struct drm_connector *conn= ector); int drm_connector_attach_colorspace_property(struct drm_connector *connect= or); int drm_connector_attach_hdr_output_metadata_property(struct drm_connector= *connector); @@ -2517,6 +2530,8 @@ void drm_connector_set_link_status_property(struct dr= m_connector *connector, uint64_t link_status); 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); int drm_connector_set_panel_orientation( struct drm_connector *connector, enum drm_panel_orientation panel_orientation); --=20 2.53.0