Problem with xf86-video-fbturbo

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

Problem with xf86-video-fbturbo

Postby sylend » Thu Apr 16, 2020 4:33 pm

Greetings community. First timer. Done quite a research but nothing helped.

I am trying to install xf86-video-fbturbo on my Raspberry Pi 3 B+ model which from my understanding is required for hardware acceleration which is required in order to play HD media. I have Arch up and running.

Cloned the git, and I ran:
$this->bbcode_second_pass_code('', 'autoreconf -vi
./configure --prefix=/usr
make')

And it broke down at "make" command.
This is the output it gave me:
$this->bbcode_second_pass_code('', ' CPPAS arm_asm.lo
CC cpuinfo.lo
CC cpu_backend.lo
CC fb_copyarea.lo
CC backing_store_tuner.lo
CC fbdev.lo
fbdev.c: In function 'FBDevPciProbe':
fbdev.c:289:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
289 | device = xf86FindOptionValue(devSection->options, "fbdev");
| ^
fbdev.c: In function 'FBDevProbe':
fbdev.c:348:10: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
348 | dev = xf86FindOptionValue(devSections[i]->options,"fbdev");
| ^
fbdev.c: In function 'FBDevPreInit':
fbdev.c:467:30: warning: passing argument 3 of 'fbdevHWInit' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
467 | if (!fbdevHWInit(pScrn,NULL,xf86FindOptionValue(fPtr->pEnt->device->options,"fbdev")))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from fbdev.c:70:
/usr/include/xorg/fbdevhw.h:22:41: note: expected 'char *' but argument is of type 'const char *'
22 | char *device);
| ~~~~~~^~~~~~
fbdev.c: In function 'FBDevCreateScreenResources':
fbdev.c:678:6: warning: implicit declaration of function 'shadowUpdateRotatePackedWeak'; did you mean 'shadowUpdateRotatePacked'? [-Wimplicit-function-declaration]
678 | shadowUpdateRotatePackedWeak() : shadowUpdatePackedWeak(),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| shadowUpdateRotatePacked
fbdev.c:678:39: warning: implicit declaration of function 'shadowUpdatePackedWeak'; did you mean 'shadowUpdatePacked'? [-Wimplicit-function-declaration]
678 | shadowUpdateRotatePackedWeak() : shadowUpdatePackedWeak(),
| ^~~~~~~~~~~~~~~~~~~~~~
| shadowUpdatePacked
fbdev.c:678:37: warning: passing argument 3 of 'shadowAdd' makes pointer from integer without a cast [-Wint-conversion]
677 | if (!shadowAdd(pScreen, pPixmap, fPtr->rotate ?
| ~~~~~~~~~~~~~~
678 | shadowUpdateRotatePackedWeak() : shadowUpdatePackedWeak(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from fbdev.c:46:
/usr/include/xorg/shadow.h:78:28: note: expected 'ShadowUpdateProc' {aka 'void (*)(struct _Screen *, struct _shadowBuf *)'} but argument is of type 'int'
78 | ShadowUpdateProc update,
| ~~~~~~~~~~~~~~~~~^~~~~~
fbdev.c: In function 'FBDevScreenInit':
fbdev.c:924:20: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
924 | if (!(accelmethod = xf86GetOptValString(fPtr->Options, OPTION_ACCELMETHOD)) ||
| ^
fbdev.c:945:21: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
945 | if (!(accelmethod = xf86GetOptValString(fPtr->Options, OPTION_ACCELMETHOD)) ||
| ^
fbdev.c:982:4: warning: implicit declaration of function 'xf86DisableRandR'; did you mean 'xf86DisableIO'? [-Wimplicit-function-declaration]
982 | xf86DisableRandR();
| ^~~~~~~~~~~~~~~~
| xf86DisableIO
fbdev.c:1040:7: error: #if with no expression
1040 | #if XV
| ^
fbdev.c: In function 'FBDevCloseScreen':
fbdev.c:1130:7: error: #if with no expression
1130 | #if XV
| ^
make[2]: *** [Makefile:552: fbdev.lo] Error 1
make[2]: Leaving directory '/home/sylend/xf86-video-fbturbo/src'
make[1]: *** [Makefile:443: all-recursive] Error 1
make[1]: Leaving directory '/home/sylend/xf86-video-fbturbo'
make: *** [Makefile:375: all] Error 2
')

Any ideas would be highly appreciated, apologies if I didn't give as much information as needed whatsoever.
sylend
 
Posts: 3
Joined: Thu Apr 16, 2020 4:23 pm

Re: Problem with xf86-video-fbturbo

Postby moniker117 » Mon Apr 27, 2020 2:51 am

From my understanding, fbturbo is not required for hardware acceleration.

That being said, fbturbo is in the main repository, so you don't have to compile it yourself:

$this->bbcode_second_pass_code('', '
$ pacman -Ss fbturbo
alarm/xf86-video-fbturbo-git 199.f9a6ed7-4
X.org MALI video driver
alarm/xf86-video-fbturbo-odroid-c2-git 199.f9a6ed7-4
X.org fbturbo video driver for odroid-c2
')

Regarding enable hardware acceleration, I believe you have to enable the VC4 driver. If you're running the 32-bit install, then you have to modify the config.txt to add dtoverlay=vc4-kms-v3d. If you're running the 64-bit mainline kernel then it's supposed to "just work" but there's a bug in the current kernel that prevents it from working which should be addressed in the next release (5.7).
moniker117
 
Posts: 9
Joined: Sun Feb 09, 2014 2:03 am

Re: Problem with xf86-video-fbturbo

Postby tck42 » Tue May 05, 2020 12:02 am

Thanks moniker117, I'd spent a ton of time trying to figure out why even though the vc4 module looks to be loaded on aarch64, it doesn't appear to actually do anything at this point (nothing in /dev/dri, etc).

I'm new to the platform so still learning. Do you happen to have a link to the bug or any info I could use to find it? I get the same behavior from the -rc kernel, was thinking to try to get it working while I wait for the patch to land in a release. I tried searching the kernel bugzilla but I didn't find anything, though I'm searching vc4 so maybe the bug itself is in some other component?

Thanks in advance!
tck42
 
Posts: 2
Joined: Mon May 04, 2020 3:12 am

Re: Problem with xf86-video-fbturbo

Postby moniker117 » Tue May 05, 2020 4:31 am

Not a problem. I also spent a good amount of time trying to understand why accelerated graphics weren't working on my RPI3B+ running the mainline aarch64 alarm kernel. I get the impression that it's not very clear what the issue is, and I'm not sure why it's not clearly explained anywhere... unless I don't really understand it myself.

Regardless, this is something that user lategoodbye pointed out in this thread post that's right next to this one:
viewtopic.php?f=65&t=14222

In it, Weston fails to start because /dev/dri was missing and lategoodbye found this in the Linux git:
https://git.kernel.org/pub/scm/linux/ke ... 50ee7032bb

My understanding of the issue is that the driver fails to fully load because of the bug noted in the git.kernel.org link. I kind of followed up on it and compiled some of the older aarch64 alarm kernels and I noted that when I got down to around the 5.2 versions of the kernel the 3d acceleration would start to work. I also took the linux-next kernel, which is basically 5.7, and compiled and installed it and that seemed to work.

Reading through what you tried, I see that the linux-aarch64-rc kernel is actually 5.7 already. :lol: I guess I didn't have to compile it myself. Anyway, you don't see the /dev/dri populated when the linux-aarch64-rc kernel installed?
moniker117
 
Posts: 9
Joined: Sun Feb 09, 2014 2:03 am

Re: Problem with xf86-video-fbturbo

Postby moniker117 » Tue May 05, 2020 5:47 am

This is interesting. So the linux-aarch64-rc package installs 5.7 rc4. It doesn't load the vc4 driver correctly. But the ones that I built, which were 5.7 rc3 and 5.7 rc2, did and still do load the driver. Not sure what's up with that.
moniker117
 
Posts: 9
Joined: Sun Feb 09, 2014 2:03 am

Re: Problem with xf86-video-fbturbo

Postby tck42 » Wed May 06, 2020 1:45 pm

Ah - thank you VERY MUCH for that info - when you compiled and it worked, did you base off of the Arch pkgbuild? Though tbh quickly looking through the patches they include I see nothing relevant. I guess my first step will be setting up a pkgbuild based on 5.7-rc3, then 5.7-rc2 and see how that works.

Seems that the patch you linked to is for disabling driver controlled power management and switching back to letting the firmware handle it in the device tree; I'm wondering if that change is enough to fail the driver from starting up.

Anyways, thanks again - if I manage to get it working or gain any insight I'll post here.
tck42
 
Posts: 2
Joined: Mon May 04, 2020 3:12 am

Re: Problem with xf86-video-fbturbo

Postby moniker117 » Thu May 07, 2020 4:15 am

Hmm... I took the PKGBUILD from linux-aarch64, the one used for what's currently deployed, and merged in the changes from the AUR Archlinux linux-next-git PKGBUILD, so that when I did a makepkg against the linux-aarch64 it would use the linux-next git from kernel.org instead of the stable kernel. I used it to build 5.7 rc2 and 5.7 rc3, both of those were (and still are, I have the pkg.tar.xz packages) loading the vc4 module correctly.

What's interesting is that the linux-aarch64-rc, which builds 5.7 rc4, doesn't load the vc4 module correctly. I tried modifying the PKGBUILD for linux-aarch64-rc so that it pulls 5.7 rc3, and that also doesn't load the vc4. I noticed it takes linux-aarch64-rc gets it source from https://git.kernel.org/torvalds/t/linux-5.7.rc3.tar.gz, whereas linux-next-git uses git://git.kernel.org/pub/scm/linux/kern ... x-next.git

So either the source of the package is bad different enough to have a problem, or something the PKGBUILD for linux-aarch64 is different for linux-aarch64-rc.
moniker117
 
Posts: 9
Joined: Sun Feb 09, 2014 2:03 am


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 2 guests

cron