[Intel-gfx] [RFC] [Patch 0/2] [intel-gfx] :add the CVT/GTF algorithm in kernel space

yakui_zhao yakui.zhao at intel.com
Tue May 5 09:18:08 CEST 2009


Hi, All

	This is the patch set to add the CVT/GTF algorithm in kernel space. They are based on
the CVT/GTF function in xserver. But the CVT/GTF algorithm in xserver is realized by using float-point
calculation. And the float-point calculation had better be avoided in kernel space. I translate them
by using 32-bit integer calculation.
	Patch 1/2. Add the CVT algorithm . 
	The CVT function can be called to generate the required modeline based on the input parameters
        Patch 2/2. Add the GTF algorithm
	The GTF function can be called to generate the required modeline based on the input parameters.
    
	With the help of CVT/GFT function we can complete the standard timing modeline contained in EDID
in case of KMS mode. At the same time we can also use them to add the default modelines for some
output devices(for example: LVDS).
	But there exists the inconsistent issue when the default modeline is generated by using CVT/GTF(
the cvt/gtf utility tool in user space is used).
	For example: For the modeline of 800*600 at 75HZ 
	The parameter defined in xserver/hw/xfree86/common/xf86DefModeSet.c is :
		hdisplay= 800, hsync_start=816, hsync_end=896, htotal=1056
	 	vdisplay= 600, vsync_start=601, vsync_end=604, vtotal=625
		Dotclk=49500KHz
	The parameter generated by CVT is :
		hdisplay= 800, hsyc_start=840, hsync_end=1020, htotal=1040
		vdisplay= 600, vsync_start=603, vsync_end=607, vtotal=627
		Dotclk=49000KHz
	The parameter generate by GTF is :
		hdisplay= 800, hsyc_start=840, hsync_end=1020, htotal=1040
		vdisplay= 600, vsync_start=601, vsync_end=604, vtotal=627
		Dotclk=48910KHz

	At the same time there exists another issue when GTF is realized by integer calculation. The modeline
parameter generated by the GTF function in patch 2 is different with that generated by GTF utility tool in user space.
       For example: For 1024*768 at 75HZ
	the parameter generated by user space GTF utility tool is :
		hdisplay= 1024, hsyc_start=1080, hsync_end=1192, htotal=1360
		vdisplay= 768, vsync_start=769, vsync_end=772, vtotal=802
		Dotclk=81800KHz
	But the parameter generated by the GTF algorithm in patch 2 is :
		hdisplay= 1024, hsyc_start=1080, hsync_end=1192, htotal=1360
		vdisplay= 768, vsync_start=769, vsync_end=772, vtotal=802
		Dotclk=81833KHz

	Can the above difference be ignored?
	
	
	
Welcome the comments.

Best regards.
    Yakui

 




More information about the Intel-gfx mailing list