drm/vrr: Set VRR capable prop only if it is attached to connector
authorjsg <jsg@openbsd.org>
Thu, 7 Apr 2022 09:36:23 +0000 (09:36 +0000)
committerjsg <jsg@openbsd.org>
Thu, 7 Apr 2022 09:36:23 +0000 (09:36 +0000)
From Manasi Navare
3534c5c005ef99a1804ed50b8a72cdae254cabb5 in linux 5.15.y/5.15.30
62929726ef0ec72cbbe9440c5d125d4278b99894 in mainline linux

sys/dev/pci/drm/drm_connector.c

index 83f0a27..e9e12a1 100644 (file)
@@ -2233,6 +2233,9 @@ EXPORT_SYMBOL(drm_connector_atomic_hdr_metadata_equal);
 void drm_connector_set_vrr_capable_property(
                struct drm_connector *connector, bool capable)
 {
+       if (!connector->vrr_capable_property)
+               return;
+
        drm_object_property_set_value(&connector->base,
                                      connector->vrr_capable_property,
                                      capable);