From: Dave Airlie <airl...@redhat.com>

This just tries EDID detection, then falls back to the slow path code.
I think this is should detect most monitors currently available.

based on Arjan's speed-up patch.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
 drivers/gpu/drm/drm_edid.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index ca9c616..de92323 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -602,8 +602,13 @@ static int drm_ddc_read(struct i2c_adapter *adapter,
        int i, j;
        int ret = -1;
 
-       algo_data->setscl(algo_data->data, 1);
+       ret = drm_do_probe_ddc_edid(adapter, buf, len);
+       if (ret == 0)
+               goto out;
 
+       algo_data->setscl(algo_data->data, 1);
+       /* we may want to increase this to 2 or 3 in the
+        * future. */
        for (i = 0; i < 1; i++) {
                /* For some old monitors we need the
                 * following process to initialize/stop DDC
@@ -650,6 +655,7 @@ static int drm_ddc_read(struct i2c_adapter *adapter,
        /* Release the DDC lines when done or the Apple Cinema HD display
         * will switch off
         */
+out:
        algo_data->setsda(algo_data->data, 1);
        algo_data->setscl(algo_data->data, 1);
 
-- 
1.6.0.6


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to