How VGA monitor detects video resolution. I'm asking this because with different VSYNC, HSYNC intervals it's possible to have different dot clock.
VGA monitors have a small serial EEPROM embedded into their circuit boards. The chip (known in the business as an "EDID" (electronic device ID)) connects to two pins on the HD15 connector. These two pins operate as an I2C bus that permits the driver software to query the monitor and find out what range of VGA picture resolution that the monitor supports.
The intended scheme is that the driver software on the host computer side will allow selection of a video resolution that is supported by the monitor. Once the monitor gets a video signal it has the capability of inferring the operating resolution by counting dot clocks per HSync and number of HSyncs per VSync. Once the operating resolution is inferred the monitor will switch itself to the best known method for itself to display that video mode.
Older monitors, back in the days of "MultiSync" CRT style monitors, may have only supported a couple of video resolutions. In some cases the video mode detect may have even been a simple R/C filter that could detect changes in the HSYNC frequency.
Newer monitors, including the plethora of LCD screens in use now, all have digital controllers in them that have built in circuits to detect video resolution. Most assuredly done by counting the pixels per line and/or lines per frame.
The latest CRT monitors had microcontrollers which were detecting the resolution based on the sync timings. All that mattered there was to have those frequencies in the ranges that were supported by the monitor. This was a physical limit of the crt deflection coils and the electronics that drove them. The image was ok on the screen if the deflection could work at the given frequencies.
The LCD monitors need more precision because they need a pixel clock and a "display enable" signal. These come from the sync signals as well, the microcontroller would measure the sync signals and then setup and maintain some PLL circuits running in sync with them. EDID was implemented to let the PC know what are the supported resolutions the monitor can work with, it does not help the monitor know what resolution it gets from the PC.
You can learn a lot about these by studying the VESA VGA standard, some analog frontend chips' datasheet (such as the analog devices AD988x series), maybe even LCD panels datasheet, as you get to know what is required for an LCD monitor to work, then see how it is implemented. Datasheets of some of the lcd controllers used in monitors also can be found and be useful.