You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
new kms driver doesn't detect 480i or work when forced. #4307
DRM works in frames not fields. 480i is 30 frames (60 fields) per second, and 33ms would therefore be correct for vsync timings (I'm assuming .28ms was a typo for 28ms).
You can not update the display between fields.
Your listed timing is totally different from the porch timings of the one parsed from the EDID, so I'm not sure of the relevance.
Fkms has a specific conditional to allow such modes with DBLCLK.
Looking at vc4_crtc.c, all the horizontal pixel valve timings get doubled in DBLCLK mode, so there is no way they can be odd, so those modes can be supported. The filtering out is erroneous then.
DRM works in frames not fields. 480i is 30 frames (60 fields) per second, and 33ms would therefore be correct for vsync timings (I'm assuming .28ms was a typo for 28ms).
You can not update the display between fields.
not a typo, it's returning after less than a millisecond. Note these are only inferred timings as they are based on when the swapbuffer call returns. Are you saying that 480i60 can only be updated at 30hz?
Your listed timing is totally different from the porch timings of the one parsed from the EDID, so I'm not sure of the relevance.
you must be talking about the timing generated with the cvt command line, which does work even with the kms driver release I tested under. my point of including that was that kms interlaced at this resolution works fine if you bypass the edid. To be clear, I'll restate:
as soon as a new firmware is pushed out I'll test it but since you can bypass the filtering by jamming custom values into the mode struct before initializing kms/drm I'm worried that it still won't work. At least I assume that bypasses the filtering. In any case no reason to pursue this further until the new firmware is out and ready to test, I just wanted to close the loop for posterity.
Are you saying that 480i60 can only be updated at 30hz?
Yes. Always has been the case if you're actually updating the display lists rather than scrawling over a live buffer.
I guess I'm "scrawling over a live buffer" then. Times printed below are between calls to eglSwapBuffers(*display, *surface), and alternating full black and white frames are displayed correctly. identical performance under kms and fkms (note that I'm using 1080i since 480i is not available to test yet)
kmsmodeline 15
/dev/dri/card0 does not have DRM resources, using card1
1920x1080i-60.00hz(60): 74.250000 1920 2008 2052 2200 1080 1084 1094 1125 +hsync +vsync interlace
Initialized EGL version: 1.4
GL Viewport size: 1920x1080
16.65 ms 60.05 hz
16.70 ms 59.89 hz
16.89 ms 59.21 hz
16.40 ms 60.96 hz
19.01 ms 52.61 hz
14.18 ms 70.53 hz
16.64 ms 60.08 hz
16.63 ms 60.14 hz
in fact none of the code I've used seems to update at 32ms intervals, though I suspect strongly all are based on this example above. From a technical viewpoint I would have thought "scrawling over a live buffer" meant writing directly to the front buffer (or as we called it 10+ years ago, the framebuffer).
as soon as a new firmware is pushed out I'll test it
Kernel, not firmware.
as of aad6d2e912201703446691bb5efeca8e97dbaa9b it doesn't work (not detected). I'm guessing the new kernel hasn't been pushed out.
oh goodness, I'm very sorry. that post above was first written with the new rpi-update but with fkms enabled not kms. 480i is still not detected under kms. I've updated the post above so that it's correct, but if you registered for emails the one sent out is wrong.
Yes, sorry that was sloppy of me, I thought it was working so I didn't bother to check the commits. But I can report that it is working as of 1340be471e2764cca8b9f8266e23347d1288919e: the mode is now reported as existing via modetest, and it can be initialized too.
There is some oddness of the timing, with eglSwapBuffers(*display, *surface); returning at a semi-random time after vsync , which means that sometimes you have a lot less than a full frame period to render your next frame. This is not a problem with fkms @ 480i despite it's reputation for poor vsync timing.
Activity
alanbork commentedon Apr 23, 2021
seems this exact problem was fixed for fkms a while ago: #3725.
[-]new kms driver doesn't detect 480i[/-][+]new kms driver doesn't detect 480i or work when forced.[/+]6by9 commentedon Apr 28, 2021
DRM works in frames not fields. 480i is 30 frames (60 fields) per second, and 33ms would therefore be correct for vsync timings (I'm assuming .28ms was a typo for 28ms).
You can not update the display between fields.
Your listed timing is totally different from the porch timings of the one parsed from the EDID, so I'm not sure of the relevance.
As per the docs, due to the 2-pixels/clock architecture, odd values in horizontal timings can not be supported.
720x480i 30.00 720 739 801 858 480 488 494 525 13514and720x480i 29.97 720 739 801 858 480 488 494 525 13500will have been pruned due to this. See https://github.com/raspberrypi/linux/blob/rpi-5.10.y/drivers/gpu/drm/vc4/vc4_hdmi.c#L1444Fkms has a specific conditional to allow such modes with DBLCLK.
Looking at vc4_crtc.c, all the horizontal pixel valve timings get doubled in DBLCLK mode, so there is no way they can be odd, so those modes can be supported. The filtering out is erroneous then.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
alanbork commentedon Apr 28, 2021
not a typo, it's returning after less than a millisecond. Note these are only inferred timings as they are based on when the swapbuffer call returns. Are you saying that 480i60 can only be updated at 30hz?
you must be talking about the timing generated with the cvt command line, which does work even with the kms driver release I tested under. my point of including that was that kms interlaced at this resolution works fine if you bypass the edid. To be clear, I'll restate:
mode as revealed under fkms via modetest:
#31 720x480i 30.00 720 739 801 858 480 488 494 525 13514 flags: nhsync, nvsync, interlace, dblclk; type: driver
is the same as this xorg compatible modeline:
720x480i-60.00hz(60): 13.514000 720 739 801 858 480 488 494 525 -hsync -vsync interlace dblclk
which works with fkms but not kms.
as soon as a new firmware is pushed out I'll test it but since you can bypass the filtering by jamming custom values into the mode struct before initializing kms/drm I'm worried that it still won't work. At least I assume that bypasses the filtering. In any case no reason to pursue this further until the new firmware is out and ready to test, I just wanted to close the loop for posterity.
6by9 commentedon Apr 28, 2021
Yes. Always has been the case if you're actually updating the display lists rather than scrawling over a live buffer.
Kernel, not firmware.
I've tested this with an HDMI analyser. It reports the timings exactly as expected.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
alanbork commentedon Apr 30, 2021
I guess I'm "scrawling over a live buffer" then. Times printed below are between calls to eglSwapBuffers(*display, *surface), and alternating full black and white frames are displayed correctly. identical performance under kms and fkms (note that I'm using 1080i since 480i is not available to test yet)
(code:
in fact none of the code I've used seems to update at 32ms intervals, though I suspect strongly all are based on this example above. From a technical viewpoint I would have thought "scrawling over a live buffer" meant writing directly to the front buffer (or as we called it 10+ years ago, the framebuffer).
as of aad6d2e912201703446691bb5efeca8e97dbaa9b it doesn't work (not detected). I'm guessing the new kernel hasn't been pushed out.
alanbork commentedon Apr 30, 2021
oh goodness, I'm very sorry. that post above was first written with the new rpi-update but with fkms enabled not kms. 480i is still not detected under kms. I've updated the post above so that it's correct, but if you registered for emails the one sent out is wrong.
6by9 commentedon Apr 30, 2021
You could check the commit history yourself
https://github.com/Hexxeh/rpi-firmware/commits/master
Hexxeh/rpi-firmware@aad6d2e
Hexxeh/rpi-firmware@1340be4
alanbork commentedon Apr 30, 2021
Yes, sorry that was sloppy of me, I thought it was working so I didn't bother to check the commits. But I can report that it is working as of 1340be471e2764cca8b9f8266e23347d1288919e: the mode is now reported as existing via modetest, and it can be initialized too.
There is some oddness of the timing, with eglSwapBuffers(*display, *surface); returning at a semi-random time after vsync , which means that sometimes you have a lot less than a full frame period to render your next frame. This is not a problem with fkms @ 480i despite it's reputation for poor vsync timing.
81 remaining items
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.
drm/vc4: Allow DBLCLK modes even if horz timing is odd.