From 71906e86e81440037aa08b6f23f36e9fd3835639 Mon Sep 17 00:00:00 2001
From: Maarten Maathuis <madman2003@gmail.com>
Date: Fri, 27 Jun 2008 16:30:25 +0200
Subject: [modesetting-101] Actually store properties when being changed.

---
 linux-core/drm_crtc.c         |  3 +++
 linux-core/nv50_kms_wrapper.c | 17 +++++++++++++++++
 2 files changed, 20 insertions(+)

(limited to 'linux-core')

diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index 4f21d09e..b9276c3a 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -2017,6 +2017,9 @@ int drm_mode_connector_property_set_ioctl(struct drm_device *dev,
 		}
 	}
 
+	/* store the property value */
+	drm_connector_property_set_value(connector, property, out_resp->value);
+
 	if (connector->funcs->set_property)
 		ret = connector->funcs->set_property(connector, property, out_resp->value);
 
diff --git a/linux-core/nv50_kms_wrapper.c b/linux-core/nv50_kms_wrapper.c
index 900dfccd..9ece228e 100644
--- a/linux-core/nv50_kms_wrapper.c
+++ b/linux-core/nv50_kms_wrapper.c
@@ -663,6 +663,23 @@ int nv50_kms_crtc_set_config(struct drm_mode_set *set)
 				goto out;
 			}
 		}
+
+		/* update dpms state to DPMSModeOn */
+		for (i = 0; i < set->num_connectors; i++) {
+			drm_connector = set->connectors[i];
+			if (!drm_connector) {
+				DRM_ERROR("No connector\n");
+				goto out;
+			}
+
+			rval = drm_connector_property_set_value(drm_connector,
+					dev->mode_config.dpms_property,
+					DPMSModeOn);
+			if (rval != 0) {
+				DRM_ERROR("failed to update dpms state\n");
+				goto out;
+			}
+		}
 	}
 
 	display->update(display);
-- 
cgit v1.2.3