fb-dev issues after apt-upgrade

Post Reply
sikotik
Posts: 17
Joined: Wed Feb 22, 2017 6:05 am
languages_spoken: english
ODROIDs: xu4
Contact:

fb-dev issues after apt-upgrade

Unread post by sikotik » Thu Mar 14, 2019 11:00 am

I've been working on porting our RetroArena formerly retropie build to the n2. Today after performing an apt-upgrade I'm having serious graphic issues with emulation station and retroarch. The terminal is also mangled after running them. My startup splashscreen video plays properly via mpv and i can start and use the desktop normally if i do not run EmulationStation first.
I'm using the custom Mali-fbdev SDL 2.08 from RetroPie.
Attachments
20190313_183837.jpg
20190313_183837.jpg (307.3 KiB) Viewed 388 times
20190313_183724.jpg
20190313_183724.jpg (353 KiB) Viewed 388 times

joy
Posts: 678
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by joy » Thu Mar 14, 2019 1:49 pm

Which display resolution do you use?
Could you share it?

In case of 4K, I found a fb issue on recent release with ubuntu minimal image but I'm not sure it's same issue as yours and trying to figure it out.
I'm not sure your issue is same as the one I got recently.

Raybuntu
Posts: 1292
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by Raybuntu » Thu Mar 14, 2019 6:43 pm

We had similar issues with Kodi (in CE) on resolutions smaller than 1080p but also before the recent kernel updates. Looks like the canvas size is wrong.

sikotik
Posts: 17
Joined: Wed Feb 22, 2017 6:05 am
languages_spoken: english
ODROIDs: xu4
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by sikotik » Fri Mar 15, 2019 12:22 am

My TV is just 1080P

User avatar
tobetter
Posts: 2807
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by tobetter » Fri Mar 15, 2019 12:32 am

Raybuntu wrote:
Thu Mar 14, 2019 6:43 pm
We had similar issues with Kodi (in CE) on resolutions smaller than 1080p but also before the recent kernel updates. Looks like the canvas size is wrong.
Can you try to revert this commit and test if the problem happens?
https://github.com/hardkernel/linux/com ... 477a31fe93

Also, would you let me know the kernel cmdline when the problem happens?

joy
Posts: 678
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by joy » Fri Mar 15, 2019 3:41 pm

Raybuntu wrote:
Thu Mar 14, 2019 6:43 pm
We had similar issues with Kodi (in CE) on resolutions smaller than 1080p but also before the recent kernel updates. Looks like the canvas size is wrong.
@Raybuntu,
If you have the issue with resolutions smaller than 1080p, the cause of the issue you have is different from the one I got.
I also think it's related to fb side.
But I can't reproduce it with 1080p or lower resolutions.
Could you share your instruction or program version to run kodi on N2? then I can sync with you can reproduce it by my side.

@sikotik,
Could you try tobetter's guide?
With the commit revert, the issue I have with 4k is cleared.
But it seems the cause of your issue may be another.

joy
Posts: 678
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by joy » Fri Mar 15, 2019 3:57 pm

Hello @sikotik, @Raybuntu,
Could you check this patch and update kernel image if you're available?

Code: Select all

diff --git a/drivers/amlogic/media/osd/osd_fb.c b/drivers/amlogic/media/osd/osd_fb.c
index f533941..0e9746b 100644
--- a/drivers/amlogic/media/osd/osd_fb.c
+++ b/drivers/amlogic/media/osd/osd_fb.c
@@ -422,15 +422,9 @@ static void osd_set_fb_parameters(int index, const struct vinfo_s *vinfo)
 
 	osd_set_free_scale_enable_hw(index, 0);
 	osd_set_free_scale_mode_hw(index, 1);
-	osd_set_free_scale_axis_hw(index, 0, 0, vinfo->width, vinfo->height);
-
-	/* OVERSCAN */
-	overscan_window(vinfo, overscan_ratio, &left, &top, &width, &height);
-	osd_set_window_axis_hw(index, left, top, width, height);
-	osd_set_free_scale_enable_hw(index, 0x10001);
-
+	osd_set_free_scale_axis_hw(index, 0, 0, (vinfo->width - 1), (vinfo->height - 1));
+	osd_set_window_axis_hw(index, 0, 0, (vinfo->width - 1), (vinfo->height - 1));
 	osd_enable_hw(index, 1);
-
 }
 
 static int __init overscan_setup(char *str)
I think the axis points of my old patch looks wrong.
To make sure, I blocked the overscan option temporarily.
Attachments
0001_fix_fb_window_axis.diff.zip
(560 Bytes) Downloaded 4 times

Raybuntu
Posts: 1292
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by Raybuntu » Fri Mar 15, 2019 4:31 pm

@joy @tobetter I think my issues are different it just looked the same where the Picture was distorted and repeated itself.
I fixed it with a kodi patch: https://github.com/CoreELEC/CoreELEC/bl ... ling.patch

But I can give your patch a try.

User avatar
tobetter
Posts: 2807
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by tobetter » Fri Mar 15, 2019 5:18 pm

Raybuntu wrote:
Fri Mar 15, 2019 4:31 pm
@joy @tobetter I think my issues are different it just looked the same where the Picture was distorted and repeated itself.
I fixed it with a kodi patch: https://github.com/CoreELEC/CoreELEC/bl ... ling.patch

But I can give your patch a try.
I hope that fixes the problem.
Also maybe @sikotik could try for the issue... :)

Raybuntu
Posts: 1292
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by Raybuntu » Fri Mar 15, 2019 6:08 pm

@tobetter: I don't have this overscan commit in our CE tree cause we haven't pulled the latest HK changes. I've edited the osd_set_fb_parameters function to look like yours in the patch. It doesn't solve my issue. There is generally something weird with the FB. My Kodi patch works so I don't mind with this issue. But @shanti already reported it that the FB begins to flicker when something else tries to write to the FB. This happens when you run the glmark examples in official Ubuntu release from tty0 and the text comes in front of the FB the screen starts to flicker. Same if you launch retro games from within Kodi. The FB gets confused and starts to flicker like hell. Anyway this is just hijacking this Thread sorry.

So my Kodi scaling issue is not related to this bug. Sorry.

User avatar
tobetter
Posts: 2807
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by tobetter » Fri Mar 15, 2019 6:10 pm

Raybuntu wrote:
Fri Mar 15, 2019 6:08 pm
@tobetter: I don't have this overscan commit in our CE tree cause we haven't pulled the latest HK changes. I've edited the osd_set_fb_parameters function to look like yours in the patch. It doesn't solve my issue. There is generally something weird with the FB. My Kodi patch works so I don't mind with this issue. But @shanti already reported it that the FB begins to flicker when something else tries to write to the FB. This happens when you run the glmark examples in official Ubuntu release from tty0 and the text comes in front of the FB the screen starts to flicker. Same if you launch retro games from within Kodi. The FB gets confused and starts to flicker like hell. Anyway this is just hijacking this Thread sorry.

So my Kodi scaling issue is not related to this bug. Sorry.
Not a problem at all, good to know the issue and status.
The problem is that the problem is not solved yet.
Let me and @joy look into the issue.

sikotik
Posts: 17
Joined: Wed Feb 22, 2017 6:05 am
languages_spoken: english
ODROIDs: xu4
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by sikotik » Sat Mar 16, 2019 6:20 am

I can confirm it's the kernel update. I made all of the changes and updates I wanted to do the other day except that to make sure it wasn't something I had done and I'm not having a screen issue. I will be trying the patch later in the day or evening.

sikotik
Posts: 17
Joined: Wed Feb 22, 2017 6:05 am
languages_spoken: english
ODROIDs: xu4
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by sikotik » Sat Mar 16, 2019 10:46 am

@joy @tobetter

That patch got the my video straightened out. Thanks!

User avatar
tobetter
Posts: 2807
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by tobetter » Sat Mar 16, 2019 1:30 pm

sikotik wrote:
Sat Mar 16, 2019 10:46 am
@joy @tobetter

That patch got the my video straightened out. Thanks!
@sikotik, thanks for the update.

joy
Posts: 678
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by joy » Mon Mar 18, 2019 11:57 am

sikotik wrote:
Sat Mar 16, 2019 10:46 am
@joy @tobetter

That patch got the my video straightened out. Thanks!
Hi sikotik,
Thank you for sharing your test result! :)

tobetter and I shared each different two patches.
1. revert the following patch
https://github.com/hardkernel/linux/com ... 477a31fe93
2. fix fb axis

Did you apply the second patch I shared?
or did you use tobetter's guide only (revert overscan commit only)?

My patch included aforementioned both clues, so tt became ambiguous to catch the real criminal. :o :(
So can I ask your favor again?
If your issued is fixed with the second patch, could you test the following patch one more to make sure which part is a real cause?

Code: Select all

diff --git a/drivers/amlogic/media/osd/osd_fb.c b/drivers/amlogic/media/osd/osd_fb.c
index f533941..7a30692 100644
--- a/drivers/amlogic/media/osd/osd_fb.c
+++ b/drivers/amlogic/media/osd/osd_fb.c
@@ -422,7 +422,7 @@ static void osd_set_fb_parameters(int index, const struct vinfo_s *vinfo)
 
 	osd_set_free_scale_enable_hw(index, 0);
 	osd_set_free_scale_mode_hw(index, 1);
-	osd_set_free_scale_axis_hw(index, 0, 0, vinfo->width, vinfo->height);
+	osd_set_free_scale_axis_hw(index, 0, 0, (vinfo->width - 1), (vinfo->height - 1));
 
 	/* OVERSCAN */
 	overscan_window(vinfo, overscan_ratio, &left, &top, &width, &height);
Sorry for asking it again.
Attachments
0002_fix_fb_window_axis_with_overscan.diff.zip
(520 Bytes) Downloaded 2 times

sikotik
Posts: 17
Joined: Wed Feb 22, 2017 6:05 am
languages_spoken: english
ODROIDs: xu4
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by sikotik » Tue Mar 19, 2019 5:50 am

joy wrote:
Mon Mar 18, 2019 11:57 am
Hi sikotik,
Thank you for sharing your test result! :)

tobetter and I shared each different two patches.
1. revert the following patch
https://github.com/hardkernel/linux/com ... 477a31fe93
2. fix fb axis

Did you apply the second patch I shared?
or did you use tobetter's guide only (revert overscan commit only)?

My patch included aforementioned both clues, so tt became ambiguous to catch the real criminal. :o :(
So can I ask your favor again?
If your issued is fixed with the second patch, could you test the following patch one more to make sure which part is a real cause?
I applied the second patch that was posted previously.
The patch you provided last night also gave me working video on Boot, emulationstation and Retroarch as well.

I need to do more testing on other emulators but so far things look right on retroarch cores and sdl2 applications.

joy
Posts: 678
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: fb-dev issues after apt-upgrade

Unread post by joy » Tue Mar 19, 2019 8:16 am

sikotik wrote:
Tue Mar 19, 2019 5:50 am
I applied the second patch that was posted previously.
The patch you provided last night also gave me working video on Boot, emulationstation and Retroarch as well.

I need to do more testing on other emulators but so far things look right on retroarch cores and sdl2 applications.
@sikotik,
Thank you so much for your confirmation.
Now we've caught a real clue. :)
This patch will be included in next release.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest