FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 12-09-2009, 03:05 PM
Andy Whitcroft
 
Default UBUNTU: SAUCE: KMS: cache the EDID information of the LVDS

From: Arjan van de Ven <arjan@linux.intel.com>

you're not going to replace your LVDS at runtime..... so this patch
caches the EDID information of the LVDS. An LVDS probe can easily take
200 milliseconds, and we do this multiple times during a system startup.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
drivers/gpu/drm/i915/intel_drv.h | 1 +
drivers/gpu/drm/i915/intel_lvds.c | 2 ++
drivers/gpu/drm/i915/intel_modes.c | 9 ++++++++-
3 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index ef61fe9..4f4a61c 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -102,6 +102,7 @@ struct intel_output {
int type;
struct i2c_adapter *i2c_bus;
struct i2c_adapter *ddc_bus;
+ struct edid *edid;
bool load_detect_temp;
bool needs_tv_clock;
void *dev_priv;
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 05598ae..4b8cbda 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -716,6 +716,7 @@ static void intel_lvds_destroy(struct drm_connector *connector)
acpi_lid_notifier_unregister(&dev_priv->lid_notifier);
drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
+ kfree(intel_output->edid);
kfree(connector);
}

@@ -1093,5 +1094,6 @@ failed:
if (intel_output->ddc_bus)
intel_i2c_destroy(intel_output->ddc_bus);
drm_connector_cleanup(connector);
+ kfree(intel_output->edid);
kfree(intel_output);
}
diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c
index 67e2f46..5ac537f 100644
--- a/drivers/gpu/drm/i915/intel_modes.c
+++ b/drivers/gpu/drm/i915/intel_modes.c
@@ -74,6 +74,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
int ret = 0;

intel_i2c_quirk_set(intel_output->base.dev, true);
+ if (intel_output->edid && intel_output->type == INTEL_OUTPUT_LVDS) {
+ printk(KERN_INFO "Skipping EDID probe due to cached edid
");
+ return ret;
+ }
edid = drm_get_edid(&intel_output->base, intel_output->ddc_bus);
intel_i2c_quirk_set(intel_output->base.dev, false);
if (edid) {
@@ -81,7 +85,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
edid);
ret = drm_add_edid_modes(&intel_output->base, edid);
intel_output->base.display_info.raw_edid = NULL;
- kfree(edid);
+ if (intel_output->type == INTEL_OUTPUT_LVDS)
+ intel_output->edid = edid;
+ else
+ kfree(edid);
}

return ret;
--
1.6.3.3


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 09:47 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org