drm/radeon/kms: only change mode when coherent value changes.
authorDave Airlie <airlied@redhat.com>
Fri, 9 Apr 2010 06:27:00 +0000 (06:27 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 12 Apr 2010 00:01:57 +0000 (10:01 +1000)
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

index 3fba50540f72cf02b0f3bc1dd9de9c9e6201905b..3bc20406d45b73c8c55c5c2a1505504880ca2ee7 100644 (file)
@@ -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) {