aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-04-09 02:27:00 -0400
committerDave Airlie <airlied@redhat.com>2010-04-11 20:01:57 -0400
commitce227c4183a2c18c9e5467b7e92d47140e763ab9 (patch)
treea3342a0db6b5560e65cf5ec4711d41e0a768c44c /drivers/gpu
parent65384a1d41c4e91f0b49d90d11b7f424d6e5c58e (diff)
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c8
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 3fba50540f72..3bc20406d45b 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
287 287
288 if (property == rdev->mode_info.coherent_mode_property) { 288 if (property == rdev->mode_info.coherent_mode_property) {
289 struct radeon_encoder_atom_dig *dig; 289 struct radeon_encoder_atom_dig *dig;
290 bool new_coherent_mode;
290 291
291 /* need to find digital encoder on connector */ 292 /* need to find digital encoder on connector */
292 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); 293 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
299 return 0; 300 return 0;
300 301
301 dig = radeon_encoder->enc_priv; 302 dig = radeon_encoder->enc_priv;
302 dig->coherent_mode = val ? true : false; 303 new_coherent_mode = val ? true : false;
303 radeon_property_change_mode(&radeon_encoder->base); 304 if (dig->coherent_mode != new_coherent_mode) {
305 dig->coherent_mode = new_coherent_mode;
306 radeon_property_change_mode(&radeon_encoder->base);
307 }
304 } 308 }
305 309
306 if (property == rdev->mode_info.tv_std_property) { 310 if (property == rdev->mode_info.tv_std_property) {