drm/radeon/kms: only change mode when coherent value changes.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, April 19, 2010 - 8:59 am

Gitweb:     http://git.kernel.org/linus/ce227c4183a2c18c9e5467b7e92d47140e763ab9
Commit:     ce227c4183a2c18c9e5467b7e92d47140e763ab9
Parent:     65384a1d41c4e91f0b49d90d11b7f424d6e5c58e
Author:     Dave Airlie <airlied@redhat.com>
AuthorDate: Fri Apr 9 06:27:00 2010 +0000
Committer:  Dave Airlie <airlied@redhat.com>
CommitDate: Mon Apr 12 10:01:57 2010 +1000

    drm/radeon/kms: only change mode when coherent value changes.
    
    On X startup we were getting a flicker where there shouldn't have been one.
    the X DDX calls the kernel to set the properties to the same values (yes
    it could be smarter), however the kernel was doing a pointless modeset then,
    making my nice smooth boot ugly.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/radeon/radeon_connectors.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 3fba505..3bc2040 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -287,6 +287,7 @@ int radeon_connector_set_property(struct drm_connector *connector, struct drm_pr
 
 	if (property == rdev->mode_info.coherent_mode_property) {
 		struct radeon_encoder_atom_dig *dig;
+		bool new_coherent_mode;
 
 		/* need to find digital encoder on connector */
 		encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS);
@@ -299,8 +300,11 @@ int radeon_connector_set_property(struct drm_connector *connector, struct drm_pr
 			return 0;
 
 		dig = radeon_encoder->enc_priv;
-		dig->coherent_mode = val ? true : false;
-		radeon_property_change_mode(&radeon_encoder->base);
+		new_coherent_mode = val ? true : false;
+		if (dig->coherent_mode != new_coherent_mode) {
+			dig->coherent_mode = new_coherent_mode;
+			radeon_property_change_mode(&radeon_encoder->base);
+		}
 	}
 
 	if (property == rdev->mode_info.tv_std_property) {
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
drm/radeon/kms: only change mode when coherent value changes., Linux Kernel Mailing ..., (Mon Apr 19, 8:59 am)