-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
screen tearing when using display_rotate #837
Comments
No. display_rotate is designed to copy/transpose a live buffer and so will suffer from tearing. In the future we will be moving to an arm side kms driver and that should have the ability to rotate the display using standard X mechanisms which should allow rotation without tearing. |
Just adding: You can avoid tearing this if you rotate the video renderer output only instead of rotating the complete output with the |
Yes, if it only video you care about then see popcornmix/omxplayer#553 |
The latest firmware has an extra config.txt option which may help with tearing a little bit. Here's all the display change config.txt options I added. display_lcd_rotate -specifies rotate of LCD only. There is probably still a chance of tearing (I'm working on a fix for that) but it may be reduced. |
extra_transpose_buffer=1 still have tearing from my experience. |
Is it reduced by using the extra_transpose_buffer config item? |
Hmm, I don't have retroarch. Or that screen, so not easy for me to look at. |
I hope kms driver come out soon 👍 |
You can use the beta version now. It's been out for ages. |
I'm currently using kernel 4.4.50, are the new config.txt options working in this kernel version?? I'm facing similar issues. |
You enable the KMS driver using raspi-config, but I suspect 4.4.50 might be too old. We are currently in testing of 4.19, and current release is 4.14, so you are a long way behind. |
Ok. Thanks. Does it mean that the new config.txt settings are also only available in 4.14+ kernel?
… On 29 Dec 2018, at 21:51, James Hughes ***@***.***> wrote:
You enable the KMS driver using raspi-config, but I suspect 4.4.50 might be too old. We are currently in testing of 4.19, and current release is 4.14, so you are a long way behind.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
It's actually the firmware on the VC4 that parses config.txt for the transpose buffer, so if that is up to date, you should have that option. The latest KMS (name?) code needs a fairly recent kernel I believe. |
I see. I'm using a CM3 compute module purchased in Jan 2018. Is there anyway to check the firmware of the VC4?
Else, I guess I could just try the commands to see if it does anything.
Thanks.
…On 30 Dec 2018, 00:53, at 00:53, James Hughes ***@***.***> wrote:
It's actually the firmware on the VC4 that parses config.txt for the
transpose buffer, so if that is up to date, you should have that
option. The latest KMS (name?) code needs a fairly recent kernel I
believe.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#837 (comment)
|
|
Ok. I'll check this. |
We had checked and found that kernel 4.4.50 does not support the above extra options. Kernel 4.14 will support it. For the KMS drivers, it's not working in 4.4.50, but working in 4.14. However, tearing issue is still there. Is it possible to modify the HDMI driver to solve this issue? Just wondering.... |
Can you copy&paste the results of the following to here so I can confirm the transpose buffers are working.
You should get entries for "transpose buffer0" and "transpose buffer1" |
should have mentioned, this is for the standard display drivers, not KMS, so using display_lcd_rotate and extra_transpose_buffer in config.txt |
Yes. I understood, but enabling the KMS drivers didn't show any (improved) effect to tearing, even with or without the additional commands. The one that made a difference in the GUI desktop was basically kernel 4.14 with extra_transpose_buffer =1. |
Ok. I'll check for both 4.4.50 and 4.14. |
Please see the screenshots of both Looks like 4.14 has a transpose buffer0, even without the extra_transponse_buffer=1, but 4.4.50 has neither. Comments welcome. |
OK, so 4.14 (actually, its the version of firmware that is important, 4.14 has a much more recent firmware. You could use the 4.14 firmware on 4.4 I think) is allocating a transpose buffer, you would get two transpose buffers if you have extra_transpose_buffer set. I would expect two transpose buffers to improve the observed tearing effect, although in my tests here, when running omxplayer over the framebuffer on rotated HDMI screen, I still get some tearing. I do not get the dark band, its only vaguely noticeable in the corner of the played back video. |
Do you mean the firmware inside the VC4 chip? Couldn’t really make out the firmware version, as the numbers (hex) were pretty long. It’s different tho. Did you want me to swap the kernel version and have a look?
If the firmware is on the chip, is there anyway to program the VC4?
Resolution wise we’re not even close to 1920x1080. I’d guess that’d explain why our moving images are more responsive to the extra buffer?
… On 4 Jan 2019, at 19:52, James Hughes ***@***.***> wrote:
OK, so 4.14 (actually, its the version of firmware that is important, 4.14 has a much more recent firmware. You could use the 4.14 firmware on 4.4 I think) is allocating a transpose buffer, you would get two transpose buffers if you have extra_transpose_buffer set. I would expect two transpose buffers to improve the observed tearing effect, although in my tests here, when running omxplayer over the framebuffer on rotated HDMI screen, I still get some tearing. I do not get the dark band, its only vaguely noticeable in the corner of the played back video.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The firmware is the start*.elf files in the boot folder. They are loaded on to the VC4 on startup. They should be backwards compatible, so you could take the start*.elf files from a 4.14 and put on a 4.4 and its should still work. However, I would backup the old files just in case as its not something we generally check. vcgencmd version will display the version number of the firmware (and date etc). |
Ok. I’ll give it a try and see. Thank you for your help. Let you know soon.
… On 4 Jan 2019, at 21:07, James Hughes ***@***.***> wrote:
The firmware is the start*.elf files in the boot folder. They are loaded on to the VC4 on startup. They should be backwards compatible, so you could take the start*.elf files from a 4.14 and put on a 4.4 and its should still work. However, I would backup the old files just in case as its not something we generally check. vcgencmd version will display the version number of the firmware (and date etc).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I'm just using a normal desktop 1920x1200 monitor, rotated, then playing 1080p video over the top. Until I added the extra extra transpose buffer, I was getting slight tearing depending on where on the display the video was played. Note each transpose buffer takes 9MB, so using this will reduce the overall memory available. The extra extra patch has been applied to the firmware tree, will be available in rpi-update in a few days. Not available in github as its closed source. I could probably let you have a custom version if it is urgent. Let me know. |
The tranpose buffers are only necessary on rotated displays. I also use the default GPU memory settings. |
I see. We're using only up to SVGA (800 x 600) resolution, so I guess it is not. We're now seeing transpose buffer0 & transpose buffer1. I presume there will be another transpose buffer on top the existing 2?? We see that the buffers take up 1.9MB per buffer. Could you confirm? No issue. I understand that it is a closed source, due to licensing. I was thinking that it should be part of the /firmware section in github? In any case, if you could provide a version to us it'll be good, since we're doing some tests now. We can just confirm it for you? Thanks. |
Rotated display only --> Got it! Default should be 64MB right? Theoretically, would increase GPU to 128MB be necessary? |
Depends what other stuff is going on. If you are using the camera, you'll probably need to increase it, or using H264, maybe. Try it and see what happens. |
Yes, another transpose buffer will be added if you use extra_transpose_buffer=2 on the latest firmware. Each TB is about 10MB on the display I use - the size of the buffer is the size of the display, so a smaller display requires smaller buffers. |
Ok. I can try it out, if you're able to share it with me? Size of buffer would make sense.. |
Have uploaded the firmware set to here. This is all the different firmwares you would get on a normal install (standard, full, cutdown, debug). Not sure which one you are using, probably _x. https://drive.google.com/open?id=1fsvwhbE1cxjJMT_L8_sypy8zwdiAIQc5 use extra_transpose_buffer=2 in config.txt |
Thanks. We'll update tomorrow. Preliminary impression it looks like tearing is not present now. Update again tomorrow. Just a check. We tried the KMS drivers, but the tearing was still present and we still had to add the transpose buffer. If you need us to help you to test it, please do advise. We can allocate resources to do so. |
I have no knowledge of how the KMS driver works with this stuff. I would not expect the extra buffers to have any effect, I do not think that the KMS driver uses them, but could be wrong. |
|
Ok. I understand, which means that this buffer is probably mandatory to solve this issue, since it's GPU firmware related. |
Ok. Looks like the tearing issue is solved, using extra_transpose_buffer=2 and latest firmware (dated 7 Jan 2019). Let us run through and update by tomorrow. Can I close the case if I wasn't the one, whom opened it? |
I'll close it. Thanks for testing. The code should be in rpi-update within a week or so, once it is you can move away from the custom firware you have at the moment. There's also a minor fix to this stuff, I didn't release all the buffers correctly on shutdown which isn't in your code, but will be in the release. I don't think it will affect you in the meantime. |
kernel: ASoC: Add support for AudioSense-Pi add-on soundcard See: raspberrypi/linux#2793 kernel: USB Audio: generic DSD detection for XMOS-based implemtations See: raspberrypi/linux#2790 firmware: Added ability to have an third transpose buffer See: #837 firmware: isp: Correct the conversion tables changed in adding the gamma block See: #1084 firmware: raspberrypi_full variant: Drop unused Camplus sw stages bootcode: Reset WiFi and BT devices before resetting the expander See: #1088 bootcode: Fix Ethernet boot on a different subnet See: #1078
kernel: ASoC: Add support for AudioSense-Pi add-on soundcard See: raspberrypi/linux#2793 kernel: USB Audio: generic DSD detection for XMOS-based implemtations See: raspberrypi/linux#2790 firmware: Added ability to have an third transpose buffer See: raspberrypi/firmware#837 firmware: isp: Correct the conversion tables changed in adding the gamma block See: raspberrypi/firmware#1084 firmware: raspberrypi_full variant: Drop unused Camplus sw stages bootcode: Reset WiFi and BT devices before resetting the expander See: raspberrypi/firmware#1088 bootcode: Fix Ethernet boot on a different subnet See: raspberrypi/firmware#1078
Now in latest rpi-update firmware |
@JamesH65 @popcornmix |
This fixes the tearing when combined with the latest firmware see raspberrypi/firmware#837
This fixes the tearing when combined with the latest firmware see raspberrypi/firmware#837
This fixes the tearing when combined with the latest firmware see raspberrypi/firmware#837
i agree...... it happened to me too |
@ijash This issue has been closed for some time - do you still have a problem with the fixes outlined above? |
been updating it to latest firmware with |
Are you using the vc4-fkms-v3d driver? If you don't need it, turn it off to see if that helps. The code path that uses extra_transpose_buffer is not used with this driver IIRC. |
no, i'm not using that driver. |
Hi all, |
Have you tried the extra transpose buffer in the config.txt.
Does it show the symptom in non rotated mode?
Regards lwpz
…On 11 Aug 2019, 08:15, at 08:15, stuarth ***@***.***> wrote:
Hi all,
I have a Dell P2418HT 24" touchscreen connected to a 3b+ and am using
`rotate_display=1` in `/boot/config.txt`. The display rotates
appropriately, but there is a slight flicker/tearing when opening new
windows as the image is, seemingly, rotating. Is this a similar issue?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#837 (comment)
|
My RPI 3 setup (fully updated and upgraded) consists of an HDMI screen in portrait mode. So I used the
display_rotate
option inboot/config.txt
to rotate the entire desktop.This option/feature causes screen tearing (https://en.wikipedia.org/wiki/Screen_tearing). After some Googling, I found https://raspberrypi.stackexchange.com/questions/37280/distortion-while-moving-objects-in-portrait-mode, which describes the problem and proposes a solution to rotate the Xserver. This is indeed a solution, but the result is suffering from similar artefacts when updating the screen's content.
Other sources address this problem to
VSYNC
(https://www.raspberrypi.org/forums/viewtopic.php?f=7&t=4451), but I don't seem to be able to find any way to influence this from my side.My main question regarding this issue is: Is there a way to use the
display_rotate
option and avoid the screen tearing?Thanks for your insights and feedback,
Christophe VG
The text was updated successfully, but these errors were encountered: