From: Antonino D. <ad...@po...> - 2003-02-25 21:53:06
|
On Wed, 2003-02-26 at 02:09, Andrea Mazzoleni wrote: > How can I detect the capabilities of a FrameBuffer driver and > video board ? > > I have an application which generates at runtime the required > modelines. For this pourpuse I need to know exactly which > capabilities are available in the underline FrameBuffer > software/hardware. > > For example, I have a GeForge 2 board without hardware INTERLACE > support. But I haven't found a way to detect this misfeature from > user level using the FrameBuffer API. The same apply for DOUBLESCAN > modes, at present the Nvidia driver does not support them, but the > driver is not reporting this misfeature in any way. > > Essentially I need a API call to probe the capabilities of the active > Frame Buffer hardware/driver. > Place all your new values in fb_var_screeninfo (test_var) -- set FB_VSYNC_INTERLACED bit in test_var->vmode. Call the fb_set_var ioctl with the FB_ACTIVATE_TEST bit set in test_var->activate. If it returns an error one of your settings is wrong. If it returns without an error, check if test_var and the var returned by the ioctl call still matches. Ie, if the returned var cleared the FB_VSYNC_INTERLACED bit, then the driver does not support interlaced mode. Note: the ioctl will rarely return an error because drivers can round off values in your test_var to ones acceptable by the driver. Also, you have to recheck _all_ fields in test_var. Once you get a var that is acceptable and do a set_var again (this time using FB_ACTIVATE_NOW flag), get fb_fix_screeninfo again, because "fix" can change. Yes, this is a lot of work for user applications and more or less you have to do some (a lot of!) trial and error. Tony |