[Intel-gfx] [PATCH] drm/i915: Reuse probed LVDS modes

Li Peng peng.li at linux.intel.com
Tue May 19 08:54:25 CEST 2009


>From 8f45e42005abeb26e877fbeecaeb517e94027155 Mon Sep 17 00:00:00 2001
From: Li Peng <peng.li at intel.com>
Date: Tue, 19 May 2009 08:07:15 +0800
Subject: Reuse probed LVDS modes

This is an optimization that reuse probed LVDS modes
in fill_modes(), since LVDS modes have been setup at
drm_helper_initial_config(). This could help to reduce
driver boot time.

Signed-off-by: Li Peng <peng.li at intel.com>
---
 drivers/gpu/drm/i915/intel_lvds.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 439a865..991cea2 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -351,6 +351,17 @@ static int intel_lvds_set_property(struct drm_connector *connector,
 	return 0;
 }
 
+static int intel_lvds_fill_modes(struct drm_connector *connector, uint32_t maxX, uint32_t maxY)
+{
+	struct list_head *node, *next;
+	int ret = 0;
+
+	list_for_each_safe(node, next, &connector->modes) 
+		ret++;
+
+	return ret;
+}
+
 static const struct drm_encoder_helper_funcs intel_lvds_helper_funcs = {
 	.dpms = intel_lvds_dpms,
 	.mode_fixup = intel_lvds_mode_fixup,
@@ -369,7 +380,7 @@ static const struct drm_connector_funcs intel_lvds_connector_funcs = {
 	.save = intel_lvds_save,
 	.restore = intel_lvds_restore,
 	.detect = intel_lvds_detect,
-	.fill_modes = drm_helper_probe_single_connector_modes,
+	.fill_modes = intel_lvds_fill_modes,
 	.set_property = intel_lvds_set_property,
 	.destroy = intel_lvds_destroy,
 };
-- 
1.6.1.3






More information about the Intel-gfx mailing list