[Intel-gfx] the question about adding the default modes for LVDS output device in KMS mode

yakui_zhao yakui.zhao at intel.com
Mon Jun 15 12:28:56 CEST 2009


Hi, All
    
    When the system is booted with KMS enabled, the xrandr tool will get
less modes than in UMS mode. And it seems that this is a top KMS gap.
Many laptops will be affected by this issue. 

    I worked on this issue and gave two proposals for this issue. One is
realized in user space(src/drmmode_display.c). Another is realized in
kernel space.

    a. user space: This is similar to what we have done in UMS mode.
	In UMS mode the gtf flag is always set in EDID for integrated LVDS
device. Even when there is no EDID, we will construct a bogus EDID. Then
the xorg will add the default mode for the LVDS output device.
        So when this is done in user space, the gtf flag will be set in
EDID for the LVDS output device. When there is no EDID, we will
construct a bogus EDID. Then the default mode will be added for the LVDS
output device. At the same time in order to remove the invalid the
modeline, the LVDS panel limit will be obtained and used to check
whether the given modeline is valid.
      
    This solution is very simple. And it won't touch the kernel code. 

    b. kernel space: 
       Add the CVT/GTF algorithm in kernel space and then it can be
called to generate the required modelines for the given parameters(The
CVT/GTF patches are ready. They are converted from CVT/GTF algorithm in
xserver). In fact this two patches are should be used for interpreting
the standard timing mode in EDID. I will send this patch set
ASAP(CVT/GTF, get the standard timing mode by CVT/GTF).
       But I have three issues about this method. 
      1. the inconsistence of modeline parameter between the modeline
generated by CVT/GTF and that defined in
xserver/hw/xfree86/commons/xf86DefModeset.c. 
         For the given modeline parameter(hdisplay, vdisplay,
vfreshrate), we will get the different modelines by using CVT/GTF. At
the same time the modeline is also different with that defined
xf86DefModset.c 
         Can we ignore the difference?
      2. which of CVT/GTF algorithm should be used to generate the
default mode?
         If the CVT/GTF is used to generate the default mode lines for
the given output device, which should be preferred? 
         In the UMS mode we will get the timing_level,which is used to
select CVT/GTF for the standard timing mode. So we can also get the
timing level in KMS mode and then select CVT/GTF to generate  the
default modes.
        But what should we do if there is no EDID? At the same time it
seems that sometimes we will get the different modelines for the
different output devices with the different standard timing level in
EDID. 
      3. Is default mode table static or generated dynamically by using
CVT/GTF?
         We can add the default mode table once for the drm_device by
calling the CVT/GTF algorithm. And when the default mode is required for
the output device, we will add the default mode by copying it.
         Of course we can generate the default modes dynamically by
calling CVT/GTF algorithm for every output device. It will take more
time to call the CVT/GTF algorithm in the boot phase.
         
      
In fact I prefer the first proposal that adds the default modes for LVDS
device in user space. It is very simple. 

Welcome the comments

Best regards
   Yakui


      
         



     




More information about the Intel-gfx mailing list