aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-16 23:05:10 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-21 11:19:45 +0100
commit219adae138513bae20b256f1946b9cb3b75ca05c (patch)
treee47ac76a0f7e426a77d475c36557c979367d3983 /drivers/gpu/drm
parente9e5f8e8d373e72f5c39dafde1ce110fc7082118 (diff)
downloadkernel_samsung_aries-219adae138513bae20b256f1946b9cb3b75ca05c.zip
kernel_samsung_aries-219adae138513bae20b256f1946b9cb3b75ca05c.tar.gz
kernel_samsung_aries-219adae138513bae20b256f1946b9cb3b75ca05c.tar.bz2
drm/i915: Cache LVDS EDID
We assume that the panel is permenantly connected and that the EDID data is consistent from boot, so simply cache the whole EDID for the panel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index f6a72cb..5666e89 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -44,7 +44,7 @@
struct intel_lvds {
struct intel_encoder base;
- bool edid_good;
+ struct edid *edid;
int fitting_mode;
u32 pfit_control;
@@ -475,14 +475,12 @@ static int intel_lvds_get_modes(struct drm_connector *connector)
{
struct intel_lvds *intel_lvds = intel_attached_lvds(connector);
struct drm_device *dev = connector->dev;
- struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_display_mode *mode;
- if (intel_lvds->edid_good) {
- int ret = intel_ddc_get_modes(connector,
- &dev_priv->gmbus[GMBUS_PORT_PANEL].adapter);
- if (ret)
- return ret;
+ if (intel_lvds->edid) {
+ drm_mode_connector_update_edid_property(connector,
+ intel_lvds->edid);
+ return drm_add_edid_modes(connector, intel_lvds->edid);
}
mode = drm_mode_duplicate(dev, intel_lvds->fixed_mode);
@@ -906,11 +904,10 @@ void intel_lvds_init(struct drm_device *dev)
* Attempt to get the fixed panel mode from DDC. Assume that the
* preferred mode is the right one.
*/
- intel_lvds->edid_good = true;
- if (!intel_ddc_get_modes(connector, &dev_priv->gmbus[GMBUS_PORT_PANEL].adapter))
- intel_lvds->edid_good = false;
+ intel_lvds->edid = drm_get_edid(connector,
+ &dev_priv->gmbus[GMBUS_PORT_PANEL].adapter);
- if (!intel_lvds->edid_good) {
+ if (!intel_lvds->edid) {
/* Didn't get an EDID, so
* Set wide sync ranges so we get all modes
* handed to valid_mode for checking