Page 1 of 1

Detecting supported resolutions of a motitor?

Posted: Thu Sep 08, 2005 10:45 am
by udarkman
Is it possible to find if monitor supports a desired resolution. Is there a way to detect that??

Re:Detecting supported resolutions of a motitor?

Posted: Thu Sep 08, 2005 2:48 pm
by johandj
If you're using VESA you can get a list of supported video modes. Unfortunatley, this is the list of video modes supported by the video card. As far as I know there is no way to tell which resolutions are actually supported by the attached monitor. The best way to find out if a resolution is supported is to switch to that resolution and ask the user if the resolution works. If the user doesn't react for say 10 seconds, switch back to the previous resolution. In that case the resolution probably didn't work because the user was unable to confirm the message.

Re:Detecting supported resolutions of a motitor?

Posted: Thu Sep 08, 2005 3:39 pm
by Lazy Neuromancer
What about EDID and DDC? I don't know much about it but IIRC it gives the supported resolutions and frequencies of the monitor. Just Google a bit..

Re:Detecting supported resolutions of a motitor?

Posted: Thu Sep 08, 2005 5:38 pm
by AR
I think I read somewhere, can't remember where exactly, that when you use VESA's "query mode" function to get the details about a given mode that it will inform you that the monitor won't support it (the call will fail IIRC).

Re:Detecting supported resolutions of a motitor?

Posted: Thu Sep 08, 2005 11:16 pm
by Brendan
Hi,

On the hardware side, most monitors now support EDDC (Extentions/Display Data Channel) which allows the monitor to send digital information to the video card (manufacturer, supported resolutions, etc). If the video card also supports EDDC (which is likely), then it can read this data.

Then there's EDID (Extended Display Identification Data) which determines the format of the data sent via. the EDDC hardware.

For the video BIOS there's VBE function 15H, which can be used to get the DDC capabilities and read the EDID data into a buffer.

In the VBE 3.0 standard, in the "Function 01h - Return VBE Mode Information" section it describes the "Mode Attributes" field. The lowest bit of this field is labelled "Mode supported by hardware configuration". The description for this bit is:
Bit D0 is set to indicate that this mode can be initialized in the present hardware configuration. This bit is reset to indicate the unavailability of a graphics mode if it requires a certain monitor type, more memory than is installed, etc.
DO NOT rely on the video card to examine the monitor's information and disable any video modes the monitor won't support. My OS uses VBE to build a list of video modes and allows the user to select one. It does check the "Mode supported by hardware configuration" flag but the resulting list still contains modes that my monitor won't support. The monitor does support DDC/EDID and supports video modes up to 1280 * 1024, but according to this flag higher resolutions (e.g. 1600 * 1280) are usable (they definately aren't).

In the VBE 3.0 standard, in the "Refresh Rate Control" section it says:
The VBE/DDC interface can be used to obtain the operational limits of the attached monitor, such as the minimum and maximum horizontal and vertical frequencies as well as supported resolutions. If the monitor and video card both support DDC, this information should be obtained and used to restrict the refresh rate computation routines to ensure that the resulting CRTC values do not produce a mode that lies outside of the operational limits of the attached monitor.
This may be intended for refresh rate adjustments, but to me it seems like a good idea anyway.


Cheers,

Brendan

Re:Detecting supported resolutions of a motitor?

Posted: Fri Sep 09, 2005 10:52 am
by udarkman
Brendan wrote:
In the VBE 3.0 standard, in the "Refresh Rate Control" section it says:
The VBE/DDC interface can be used to obtain the operational limits of the attached monitor, such as the minimum and maximum horizontal and vertical frequencies as well as supported resolutions. If the monitor and video card both support DDC, this information should be obtained and used to restrict the refresh rate computation routines to ensure that the resulting CRTC values do not produce a mode that lies outside of the operational limits of the attached monitor.
This may be intended for refresh rate adjustments, but to me it seems like a good idea anyway.
Ill check this.
Thanks for all replies..