@@ -2352,6 +2352,16 @@ EXPORT_SYMBOL(drm_mode_create_scaling_mode_property);
23522352 *
23532353 * Absence of the property should indicate absence of support.
23542354 *
2355+ * "passive_vrr_capable":
2356+ * Optional &drm_connector boolean property that drivers should attach
2357+ * with drm_connector_attach_passive_vrr_capable_property() on
2358+ * connectors that could support keeping variable refresh rate signalling
2359+ * in fixed-refresh rate scenarios like desktop work. Drivers should update
2360+ * the property value by calling
2361+ * drm_connector_set_passive_vrr_capable_property().
2362+ *
2363+ * Absence of the property should indicate absence of support.
2364+ *
23552365 * "VRR_ENABLED":
23562366 * Default &drm_crtc boolean property that notifies the driver that the
23572367 * content on the CRTC is suitable for variable refresh rate presentation.
@@ -2370,6 +2380,17 @@ EXPORT_SYMBOL(drm_mode_create_scaling_mode_property);
23702380 *
23712381 * The driver may place further restrictions within these minimum
23722382 * and maximum bounds.
2383+ *
2384+ * "PASSIVE_VRR_DISABLED":
2385+ * Default &drm_crtc boolean property that notifies the driver that the
2386+ * VRR singalling should be disabled in fixed refresh rate scenarios.
2387+ * Functionally, psssive vrr works the same as VRR_ENABLED == false
2388+ * but works around displays blanking (mainly HDMI) that do not support
2389+ * seamless VRR transitions. Also helps with brightness flickering during
2390+ * VRR transitions.
2391+ *
2392+ * Passive VRR mode is not that useful for DP/eDP sinks where seamless VRR
2393+ * transitions are enforced by the standard.
23732394 */
23742395
23752396/**
@@ -2403,6 +2424,37 @@ int drm_connector_attach_vrr_capable_property(
24032424}
24042425EXPORT_SYMBOL (drm_connector_attach_vrr_capable_property );
24052426
2427+ /**
2428+ * drm_connector_attach_passive_vrr_capable_property - creates the
2429+ * passive_vrr_capable property
2430+ * @connector: connector to create the passive_vrr_capable property on.
2431+ *
2432+ * This is used by atomic drivers to add support for querying
2433+ * variable refresh rate on desktop capability for a connector.
2434+ *
2435+ * Returns:
2436+ * Zero on success, negative errno on failure.
2437+ */
2438+ int drm_connector_attach_passive_vrr_capable_property (
2439+ struct drm_connector * connector )
2440+ {
2441+ struct drm_device * dev = connector -> dev ;
2442+ struct drm_property * prop ;
2443+
2444+ if (!connector -> passive_vrr_capable_property ) {
2445+ prop = drm_property_create_bool (dev , DRM_MODE_PROP_IMMUTABLE ,
2446+ "passive_vrr_capable" );
2447+ if (!prop )
2448+ return - ENOMEM ;
2449+
2450+ connector -> passive_vrr_capable_property = prop ;
2451+ drm_object_attach_property (& connector -> base , prop , 0 );
2452+ }
2453+
2454+ return 0 ;
2455+ }
2456+ EXPORT_SYMBOL (drm_connector_attach_passive_vrr_capable_property );
2457+
24062458/**
24072459 * drm_connector_attach_scaling_mode_property - attach atomic scaling mode property
24082460 * @connector: connector to attach scaling mode property on.
@@ -2974,6 +3026,27 @@ void drm_connector_set_vrr_capable_property(
29743026}
29753027EXPORT_SYMBOL (drm_connector_set_vrr_capable_property );
29763028
3029+ /**
3030+ * drm_connector_set_passive_vrr_disabled_capable_property - sets the variable refresh
3031+ * rate on desktop capable property for a connector
3032+ * @connector: drm connector
3033+ * @capable: True if the connector is variable refresh rate on desktop capable
3034+ *
3035+ * Should be used by atomic drivers to update the indicated support for
3036+ * variable refresh rate on desktop over a connector.
3037+ */
3038+ void drm_connector_set_passive_vrr_capable_property (
3039+ struct drm_connector * connector , bool capable )
3040+ {
3041+ if (!connector -> passive_vrr_capable_property )
3042+ return ;
3043+
3044+ drm_object_property_set_value (& connector -> base ,
3045+ connector -> passive_vrr_capable_property ,
3046+ capable );
3047+ }
3048+ EXPORT_SYMBOL (drm_connector_set_passive_vrr_capable_property );
3049+
29773050/**
29783051 * drm_connector_set_panel_orientation - sets the connector's panel_orientation
29793052 * @connector: connector for which to set the panel-orientation property.
0 commit comments