[Intel-gfx] [PATCH 28/43] drm: don't zero out the CRTC even if it's the same as the current one

Chris Wilson chris at chris-wilson.co.uk
Fri May 25 14:33:07 CEST 2012


From: Jesse Barnes <jbarnes at virtuousgeek.org>

In set_config we currently try to reset the CRTC if both the requested
CRTC and the currently bound one are the same.  The reason for this
appears to be lost to history (it pre-dates KMS support upstream at
least).

Remove this restriction to allow existing configs to be simple flips
rather than full mode sets.

Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---
 drivers/gpu/drm/drm_crtc_helper.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 974196a..35fbb1f 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -659,13 +659,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
 	}
 
 	count = 0;
+	new_crtc = NULL;
 	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
 		if (!connector->encoder)
 			continue;
 
-		if (connector->encoder->crtc == set->crtc)
-			new_crtc = NULL;
-		else
+		if (new_crtc && connector->encoder->crtc != set->crtc)
 			new_crtc = connector->encoder->crtc;
 
 		for (ro = 0; ro < set->num_connectors; ro++) {
-- 
1.7.10




More information about the Intel-gfx mailing list