On Thu, 2009-09-03 at 09:39 +0800, Dave Airlie wrote:
> On Thu, 2009-09-03 at 09:33 +0800, yakui.z...@intel.com wrote:
> > From: Zhao Yakui <yakui.z...@intel.com>
> > 
> > Add the default mode for the CRT output without EDID. But we only add the 
> > mode
> > which visible part is equal to or less than 1024x768.
> 
> Use 800x600 as the default mode for consistency with X sake, this case
> should be handled by the main drm code when it finds no modes anyways,
> it possibly should be done in a helper
Your propose seems better. When one output device is connected but there
is no mode, we can add some default modes for it. How about the
following patch?
If so, we will add the default mode for every output device when there
is no mode for it.


---
 drivers/gpu/drm/drm_crtc_helper.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/gpu/drm/drm_crtc_helper.c
===================================================================
--- linux-2.6.orig/drivers/gpu/drm/drm_crtc_helper.c    2009-09-03
14:25:16.000000000 +0800
+++ linux-2.6/drivers/gpu/drm/drm_crtc_helper.c 2009-09-03
14:27:51.000000000 +0800
@@ -109,8 +109,11 @@
        }
 
        count = (*connector_funcs->get_modes)(connector);
-       if (!count)
-               return 0;
+       if (!count) {
+               count = drm_add_modes_noedid(connector, 800, 600);
+               if (!count)
+                       return 0;
+       }
 
        drm_mode_connector_list_update(connector);
 

> 
> Dave.
> 
> > 
> > Signed-off-by: Zhao Yakui <yakui.z...@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_crt.c |    8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > Index: linux-2.6/drivers/gpu/drm/i915/intel_crt.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/gpu/drm/i915/intel_crt.c 2009-09-03 
> > 08:56:50.000000000 +0800
> > +++ linux-2.6/drivers/gpu/drm/i915/intel_crt.c      2009-09-03 
> > 09:28:35.000000000 +0800
> > @@ -458,6 +458,14 @@
> >     intel_i2c_destroy(ddcbus);
> >  
> >  end:
> > +   if (!ret) {
> > +           /*
> > +            * when there is no EDID, add some default modes.
> > +            * But the hdisplay should not be greater than 1024.
> > +            * the vdisplay should not be greater than 768
> > +            */
> > +           ret = drm_add_modes_noedid(connector, 1024, 768);
> > +   }
> >     return ret;
> >  
> >  }
> 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to