Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: kernel drivers vs Xorg drivers : resolutions limits seem not the same  (Read 6918 times)

0 Members and 1 Guest are viewing this topic.

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 816
  • Last login:March 23, 2024, 02:35:43 pm
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Hey,

TL/DR : a same resolution would work with Xorg, but not in DRM drivers (through EDID) on nvidia GPU (need to test on i915).

Full version :
Along with my tests with EDID in groovyarcade, I stumbled about a strange behaviour : some almost identical resolutions (648x480 EDID generated by switchres vs 640x480 modeline for X vs 640x480 patched resolution in 15kHz kernel) do not always work whereas they should. For example : the nouveau drm drivers says the EDID resolution is "invalid" (I'm not sure about the real error behind, I suspect it's a MODE_CLOCK_LOW), whereas the "almost same resolution" (pixel clocks are almost the same. Don't have them at hand for now, but it's something like 13MHz vs 13.128 MHz).

So, anyone would have an idea why DRM would reject a resolution that would run perfect from the 15kHz kernel or Xorg ?

The same EDID worked fine with the amd drm driver, I have yet to test on i915.

Sources :
DRM/nouveau : https://github.com/torvalds/linux/blob/v5.3/drivers/gpu/drm/nouveau/nouveau_connector.c#L1020-L1064
DRM/i915 : I guess it's somewhere in the intel_sdvo.c, looks connector dependant, haven't found yet anything for VGA (HDMI would be 25MHz, DP 10MHz)

Now here is the whole point of it : is it worh patching the DRM drivers for lower pixel clock limits (to 10MHz for example) ?

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: kernel drivers vs Xorg drivers : resolutions limits seem not the same
« Reply #1 on: September 26, 2019, 08:45:28 am »
Hey,

TL/DR : a same resolution would work with Xorg, but not in DRM drivers (through EDID) on nvidia GPU (need to test on i915).

Full version :
Along with my tests with EDID in groovyarcade, I stumbled about a strange behaviour : some almost identical resolutions (648x480 EDID generated by switchres vs 640x480 modeline for X vs 640x480 patched resolution in 15kHz kernel) do not always work whereas they should. For example : the nouveau drm drivers says the EDID resolution is "invalid" (I'm not sure about the real error behind, I suspect it's a MODE_CLOCK_LOW), whereas the "almost same resolution" (pixel clocks are almost the same. Don't have them at hand for now, but it's something like 13MHz vs 13.128 MHz).

So, anyone would have an idea why DRM would reject a resolution that would run perfect from the 15kHz kernel or Xorg ?

The same EDID worked fine with the amd drm driver, I have yet to test on i915.

Sources :
DRM/nouveau : https://github.com/torvalds/linux/blob/v5.3/drivers/gpu/drm/nouveau/nouveau_connector.c#L1020-L1064
DRM/i915 : I guess it's somewhere in the intel_sdvo.c, looks connector dependant, haven't found yet anything for VGA (HDMI would be 25MHz, DP 10MHz)

Now here is the whole point of it : is it worh patching the DRM drivers for lower pixel clock limits (to 10MHz for example) ?

Hi Substring,

Have you tried to enable the DRM debug output with at least DRM_DEBUG_KMS option? (drm.debug=0x...)
A quick look at the clock in drm_edid does not reveal any pixel clock limitation or dot clock lower cap. But maybe you are unlucky and used a manufacturer ID that has a quirk defined.

Code: [Select]
parm:           debug:Enable debug output, where each bit enables a debug category.
Bit 0 (0x01)  will enable CORE messages (drm core code)
Bit 1 (0x02)  will enable DRIVER messages (drm controller code)
Bit 2 (0x04)  will enable KMS messages (modesetting code)
Bit 3 (0x08)  will enable PRIME messages (prime code)
Bit 4 (0x10)  will enable ATOMIC messages (atomic code)
Bit 5 (0x20)  will enable VBL messages (vblank code)
Bit 7 (0x80)  will enable LEASE messages (leasing code)
Bit 8 (0x100) will enable DP messages (displayport code) (int)

Is the EDID binary available somewhere?

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 816
  • Last login:March 23, 2024, 02:35:43 pm
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: kernel drivers vs Xorg drivers : resolutions limits seem not the same
« Reply #2 on: September 26, 2019, 12:28:09 pm »
The edid is available on Ansa89 github repo, generic 15. I repeat : just removing the nvidia card and using the onboard  ATI HD3200 (quite an old beast tbh) -> it does work, nothing changed in boot parameters

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: kernel drivers vs Xorg drivers : resolutions limits seem not the same
« Reply #3 on: September 26, 2019, 01:02:13 pm »
HD 3200 has a low dot clock limitation. May be it is coming from this. I am a bit skeptic because it is a 13MHz dot clock, which is not so low.


No issue here with EDID from Ansa89 on HD5450.

[    2.298272] [drm] Got external EDID base block and 0 extensions from "edid/edid_arcade15.bin" for connector "VGA-1"

VGA-0 connected 640x480+0+0 (normal left inverted right x axis y axis) 485mm x 364mm
   640x480i      59.98*+

EDIT: reading myself few hours later shows that I tested arcade15 and not generic15, but I does not change the result, arcade15 is only bumping modeline H range to 16kHz
« Last Edit: September 26, 2019, 03:14:07 pm by Doozer »

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 816
  • Last login:March 23, 2024, 02:35:43 pm
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: kernel drivers vs Xorg drivers : resolutions limits seem not the same
« Reply #4 on: September 26, 2019, 04:17:43 pm »
It doesn"t work with a nvidia, not an ati ;)