2019-09-24 04:26 PM
It seems that some of the ones my monitor is reporting ought to be within the range, but I'm only seeing
Modeline 46:"1280x720" 60 74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
Whereas the following are rejected for various reasons - I can understand the CLOCK_HIGH ones, but not so much the CLOCK_RANGE ones - they appear to be lower than the dot-clock in the accepted modeling...
[ 2622.968539] [drm:drm_mode_addfb2] [FB:36]
[ 2623.683425] [drm:drm_mode_addfb2] [FB:38]
[ 3167.141720] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:29:HDMI-A-1]
[ 3167.163438] [drm:drm_add_display_info] non_desktop set to 0
[ 3167.163489] [drm:drm_add_edid_modes.part.19] ELD: no CEA Extension found
[ 3167.163504] [drm:drm_add_display_info] non_desktop set to 0
[ 3167.163774] [drm:drm_mode_debug_printmodeline] Modeline 37:"1920x1080" 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x48 0x9
[ 3167.163791] [drm:drm_mode_prune_invalid] Not using 1920x1080 mode: CLOCK_HIGH
[ 3167.163814] [drm:drm_mode_debug_printmodeline] Modeline 41:"1360x768" 60 85500 1360 1424 1536 1792 768 771 777 795 0x40 0x5
[ 3167.163826] [drm:drm_mode_prune_invalid] Not using 1360x768 mode: CLOCK_RANGE
[ 3167.163847] [drm:drm_mode_debug_printmodeline] Modeline 42:"1680x1050" 0 119000 1680 1728 1760 1840 1050 1053 1059 1080 0x40 0x9
[ 3167.163858] [drm:drm_mode_prune_invalid] Not using 1680x1050 mode: CLOCK_HIGH
[ 3167.163878] [drm:drm_mode_debug_printmodeline] Modeline 43:"1280x800" 0 71000 1280 1328 1360 1440 800 803 809 823 0x40 0x9
[ 3167.163890] [drm:drm_mode_prune_invalid] Not using 1280x800 mode: CLOCK_RANGE
[ 3167.163910] [drm:drm_mode_debug_printmodeline] Modeline 44:"1280x1024" 0 108000 1280 1328 1440 1688 1024 1025 1028 1066 0x40 0x5
[ 3167.163921] [drm:drm_mode_prune_invalid] Not using 1280x1024 mode: CLOCK_HIGH
[ 3167.163942] [drm:drm_mode_debug_printmodeline] Modeline 45:"1280x960" 0 108000 1280 1376 1488 1800 960 961 964 1000 0x40 0x5
[ 3167.163954] [drm:drm_mode_prune_invalid] Not using 1280x960 mode: CLOCK_HIGH
[ 3167.163974] [drm:drm_mode_debug_printmodeline] Modeline 48:"800x600" 0 40000 800 840 968 1056 600 601 605 628 0x40 0x5
[ 3167.163985] [drm:drm_mode_prune_invalid] Not using 800x600 mode: CLOCK_RANGE
[ 3167.164005] [drm:drm_mode_debug_printmodeline] Modeline 49:"800x600" 0 36000 800 824 896 1024 600 601 603 625 0x40 0x5
[ 3167.164017] [drm:drm_mode_prune_invalid] Not using 800x600 mode: CLOCK_RANGE
[ 3167.164037] [drm:drm_mode_debug_printmodeline] Modeline 50:"640x480" 0 25175 640 656 752 800 480 490 492 525 0x40 0xa
[ 3167.164048] [drm:drm_mode_prune_invalid] Not using 640x480 mode: CLOCK_RANGE
[ 3167.164068] [drm:drm_mode_debug_printmodeline] Modeline 51:"720x400" 0 28320 720 738 846 900 400 412 414 449 0x40 0x6
[ 3167.164080] [drm:drm_mode_prune_invalid] Not using 720x400 mode: CLOCK_RANGE
[ 3167.164100] [drm:drm_mode_debug_printmodeline] Modeline 52:"1024x768" 0 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa
[ 3167.164111] [drm:drm_mode_prune_invalid] Not using 1024x768 mode: CLOCK_RANGE
[ 3167.164133] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:29:HDMI-A-1] probed modes :
[ 3167.164154] [drm:drm_mode_debug_printmodeline] Modeline 46:"1280x720" 60 74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
[ 3167.164248] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:31:DSI-1]
[ 3167.164334] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:31:DSI-1] probed modes :
[ 3167.164357] [drm:drm_mode_debug_printmodeline] Modeline 35:"480x800" 50 29700 480 578 610 708 800 815 825 839 0x48 0x0
Is it because of the "ELD: no CEA Extension found" ? I notice that in the wiki there is a line
HDMI: DVI dual 0, max TMDS clock 225000 kHz
... which I appear to be missing. I'm not sure if that comes from the monitor, or is configurable somehow...
Solved! Go to Solution.
2019-09-30 06:57 AM
CLOCK_RANGE means that with the current clock configuration there is no way to get the desired pixel clock within a reasonable margin.
You can display more info with a slightly modified version of the commands proposed in wiki:
The kernel will first verify the pixel clock compatibility, then print-out the summary, so the information are printed in two consecutive but separate parts. With my monitor (actually a TV set) I get:
...
[ 115.295044] [drm:ltdc_crtc_mode_valid] clk rate target 85500000, available 84857143
...
[ 115.295946] [drm:drm_mode_debug_printmodeline] Modeline 41:"1366x768" 60 85500 1366 1436 1579 1792 768 771 774 798 0x40 0x5
[ 115.295961] [drm:drm_mode_prune_invalid] Not using 1366x768 mode: CLOCK_RANGE
...
Let's analyze the results. The mode 41 requires a pixel clock of 85.5 MHz. With current settings in device tree we can at best get 84.857 MHz.
The driver uses a range of +/- 50Hz to accept the value. Here we are outside 85.5MHz +/-50Hz, so the mode is dropped as CLOCK_RANGE.
If you really need to use one of the modes of your monitor, you need to modify the device tree so the required pixel frequency can be generated through the prescalers.
2019-09-30 06:57 AM
CLOCK_RANGE means that with the current clock configuration there is no way to get the desired pixel clock within a reasonable margin.
You can display more info with a slightly modified version of the commands proposed in wiki:
The kernel will first verify the pixel clock compatibility, then print-out the summary, so the information are printed in two consecutive but separate parts. With my monitor (actually a TV set) I get:
...
[ 115.295044] [drm:ltdc_crtc_mode_valid] clk rate target 85500000, available 84857143
...
[ 115.295946] [drm:drm_mode_debug_printmodeline] Modeline 41:"1366x768" 60 85500 1366 1436 1579 1792 768 771 774 798 0x40 0x5
[ 115.295961] [drm:drm_mode_prune_invalid] Not using 1366x768 mode: CLOCK_RANGE
...
Let's analyze the results. The mode 41 requires a pixel clock of 85.5 MHz. With current settings in device tree we can at best get 84.857 MHz.
The driver uses a range of +/- 50Hz to accept the value. Here we are outside 85.5MHz +/-50Hz, so the mode is dropped as CLOCK_RANGE.
If you really need to use one of the modes of your monitor, you need to modify the device tree so the required pixel frequency can be generated through the prescalers.
2019-09-30 07:27 AM
The monitor is a 4K monitor (it's main use is for my mac mini =) . I'll do the -6 thing when I next get to the machine - thanks =)
So I think what you're saying is that it's not that the clock frequency is just too high, it's that there's no way to generate a frequency close enough to what the monitor is saying it can handle, which explains why frequencies for relatively low resolutions like the 640x480, 800x600 and 1024x768 can't be chosen.
Thanks for the reply - that was very informative =)
2019-09-30 08:36 AM
Correct, if the current configuration cannot generate a clock with a frequency close enough to the desired value, the video mode is discarded with CLOCK_RANGE.
Sorry if I wasn't clear enough.
2019-09-30 09:34 AM
My apologies - you were very clear, my phrasing was less than stellar in my reply ... What I was trying to say was "this is what I understand from what you're saying, if I've got it wrong, please let me know" ...