[Intel-gfx] the questions about adding the default mode for LVDS device in KMS mode
Jesse Barnes
jbarnes at virtuousgeek.org
Wed May 13 18:22:44 CEST 2009
On Wed, 13 May 2009 17:01:41 +0800
yakui_zhao <yakui.zhao at intel.com> wrote:
> Hi, Eric/Jesse
> Many users are affected by the issue that the number of modelines
> in KMS is less than that in UMS. And we have gotten the root cause
> that the default mode is not added for the LVDS output device. But
> how can we fix this issue?
> a. Add the default modes by using CVT/GTF . I have send two
> patches(CVT/GTF) to mailing list. If they are merged, we can generate
> the required modeline based on the modeline parameter(hdisplay,
> vdisplay, vfresh) by using the CVT/GTF algorithm. In such case we
> will have to add a modeline table, which contains the basic modeline
> parameter(hdisplay, vdisplay, vfreshrate). How can we get the
> modeline table? Do they come from the default mode table in
> xserver/hw/xfree86/common/xf86defmodeset.c? Are both CVT/GTF
> algorithm used to generate the modeline for the given modeline
> parameter?(hdisplay, vdisplay, vfreshrate). If only one algorithm is
> enough, which should be used?
> At the same time there exists another issue. If the modeline
> is generated by using CVT/GTF, the parameter is different with that
> defined in default mode table. For example: 1024*768 at 60HZ
> CVT: hdisplay=1024, hsync_start=1072 hsync_end=1176,
> htotal=1328 vdsipaly=768, vsync_start=771, vsync_end=775, vtotal=798
> dotclk = 63.50MHz
> GTF: hdisplay=1024, hsync_start=1080 hsync_end=1184,
> htotal=1344 vdsipaly=768, vsync_start=769, vsync_end=772, vtotal=795
> dotclk = 64.11MHz
> default table:
> hdisplay=1024, hsync_start=1048 hsync_end=1184,
> htotal=1344 vdsipaly=768, vsync_start=771, vsync_end=777, vtotal=806
> dotclk = 65MHz
> 65000, 1024,1048,1184,1344,0, 768,771,777,806
>
> Can the above difference be ignored?
I think so; we have a panel fitter on LVDS so we can actually support
more modes. I prefer adding a flag to the LVDS output indicating
whether it supports GTF/CVT timings, then letting userspace just send
in hdisplay, vdisplay and refresh params at LVDS mode set time.
If that flag is set, userspace would also be free to add a set of
default modes for apps to use.
Alternately, we could generate a fake EDID for the LVDS output using
GTF/CVT timings in addition to the native mode we get from the VBT.
I think the main issue here is that userspace apps expect to get a mode
list back, so one has to be generated somewhere. I'd prefer that be
done in userspace though if we can get away with it...
--
Jesse Barnes, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list