Updated GPU firmware


309 posts   Page 6 of 13   1 ... 3, 4, 5, 6, 7, 8, 9 ... 13
by dom » Tue Nov 27, 2012 1:38 pm
Max wrote:
bleep42 wrote:
Code: Select all
coherent_pool=2M cma=2M smsc95xx.turbo_mode=N dwc_otg.fiq_fix_enable=1 sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline rootwait



Seems your "rootwait" parameter is being ignored, as with that enabled it is supposed to wait an eternity for the device to appear, instead of 2 seconds.
Try if it works better if you move it before your other parameters, to make sure there is not some kind of character limit truncating the cmdline.txt parameters.


Try updating:
Code: Select all
sudo rpi-update d27ca5e5f1c3a94a0a1311e4c0dd86644f0acacc

The maximum command line length has been increased from 500 to 1024.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by bleep42 » Tue Nov 27, 2012 2:14 pm
dom wrote:
Max wrote:
bleep42 wrote:
Code: Select all
coherent_pool=2M cma=2M smsc95xx.turbo_mode=N dwc_otg.fiq_fix_enable=1 sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline rootwait


Seems your "rootwait" parameter is being ignored, as with that enabled it is supposed to wait an eternity for the device to appear, instead of 2 seconds.
Try if it works better if you move it before your other parameters, to make sure there is not some kind of character limit truncating the cmdline.txt parameters.

Try updating:
Code: Select all
sudo rpi-update d27ca5e5f1c3a94a0a1311e4c0dd86644f0acacc

The maximum command line length has been increased from 500 to 1024.

Hi Dom,
Ok thanks I'll give it a go. :-)
Presumably I can get rid of some of the stuff in my cmdline.txt string now any way, like "dwc_otg.fiq_fix_enable=1" for example, maybe "sdhci-bcm2708.sync_after_dma=0" or "dwc_otg.lpm_enable=0" as well? anything else?.
What is the basic baseline cmdline.txt?
Regards, Kevin.
User avatar
Posts: 60
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex
by dom » Tue Nov 27, 2012 2:25 pm
bleep42 wrote:Presumably I can get rid of some of the stuff in my cmdline.txt string now any way, like "dwc_otg.fiq_fix_enable=1" for example, maybe "sdhci-bcm2708.sync_after_dma=0" or "dwc_otg.lpm_enable=0" as well? anything else?.
What is the basic baseline cmdline.txt?


dwc_otg.fiq_fix_enable=1 is a default so is unnecessary
The other two do something.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by milhouse » Tue Nov 27, 2012 2:27 pm
This seems to be the default cmdline.txt in Raspbian:

Code: Select all
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Posts: 569
Joined: Mon Jan 16, 2012 12:59 pm
by bleep42 » Tue Nov 27, 2012 2:43 pm
dom wrote:
bleep42 wrote:Presumably I can get rid of some of the stuff in my cmdline.txt string now any way, like "dwc_otg.fiq_fix_enable=1" for example, maybe "sdhci-bcm2708.sync_after_dma=0" or "dwc_otg.lpm_enable=0" as well? anything else?.
What is the basic baseline cmdline.txt?

dwc_otg.fiq_fix_enable=1 is a default so is unnecessary
The other two do something.

Ok thanks very much for the information Dom :-) I'll get rid of that one and try the new firmware that you have pointed to.
Regards, Kevin.

PS, just checked string length and it is only 242 characers, so I don't think that is the problem, I'll try the new firmaware anyway.
User avatar
Posts: 60
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex
by dom » Tue Nov 27, 2012 2:50 pm
bleep42 wrote:PS, just checked string length and it is only 242 characers, so I don't think that is the problem, I'll try the new firmaware anyway.


The firmware adds extra options to /boot/cmdline.txt. Once booted look at /proc/cmdline for the full command line.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by pepedog » Wed Nov 28, 2012 2:58 pm
Thanks Dom
Over on arch we made it so we can help with the program
To switch to the 3.6.7 kernel and firmware
Code: Select all
pacman -Sy linux-raspberrypi-next linux-headers-raspberrypi-next raspberrypi-firmware-next

pacman -Syu will always pull down the latest, I will try to keep up with your source.
As a note, this picks up the bcmrpi defconfig, but tagged with -ARCH

Without options in, VCHI initialization failed

Options in
Nov 26 2012 22:30:04
Copyright (c) 2012 Broadcom
version 353322 (release)

xbmc runs 2cm with, half height of screen, with this (I have no settings for video)
tvservice-client: Invalid group 3 in [vc_tv_hdmi_get_supported_modes]
Posts: 986
Joined: Fri Oct 07, 2011 9:55 am
by dom » Wed Nov 28, 2012 3:43 pm
pepedog wrote:xbmc runs 2cm with, half height of screen, with this (I have no settings for video)
tvservice-client: Invalid group 3 in [vc_tv_hdmi_get_supported_modes]

I believe xbmc need rebuilding with the updated header files/libs.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by bleep42 » Wed Nov 28, 2012 7:49 pm
dom wrote:
bleep42 wrote:PS, just checked string length and it is only 242 characers, so I don't think that is the problem, I'll try the new firmaware anyway.


The firmware adds extra options to /boot/cmdline.txt. Once booted look at /proc/cmdline for the full command line.

Hi Dom,
OK working now thanks.
The only problem so far I've come across is there is no zram module built in, otherwise it seems to be fine.
Thanks for your help.
Regards, Kevin.
User avatar
Posts: 60
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex
by pepedog » Thu Nov 29, 2012 12:19 am
In compiling xbmc, would this indicate a file is missing or moved to another place?
Code: Select all
from PlayerCoreFactory.cpp:35:
/opt/vc/include/interface/vmcs_host/vcgencmd.h:33:27: fatal error: vchost_config.h: No such file or directory
Posts: 986
Joined: Fri Oct 07, 2011 9:55 am
by dom » Thu Nov 29, 2012 1:32 am
Latest firmware has some fixes to CMA. I think it is quite usable now. A few changes:

In cmdline.txt you want:
Code: Select all
coherent_pool=6M  smsc95xx.turbo_mode=N

(remove cma= or mem= settings).

config.txt should have:
Code: Select all
gpu_mem_256=112
gpu_mem_512=368
cma_lwm=16
cma_hwm=32
cma_offline_start=16


Upate firmware:
Code: Select all
sudo rpi-update bed00525a7d5ea232e2a0afb631771fe61026e77


You should find you have 466M free (on 512M) or 212M free (on 256M), so X/web browsing is quite usable.
But, now you can run penguinspuzzle, omxplayer, quake3, xbmc without rebooting!

[edit: reduced gpu_mem numbers to avoid allocation failures when web browsing]
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by dom » Thu Nov 29, 2012 1:35 am
pepedog wrote:In compiling xbmc, would this indicate a file is missing or moved to another place?
Code: Select all
from PlayerCoreFactory.cpp:35:
/opt/vc/include/interface/vmcs_host/vcgencmd.h:33:27: fatal error: vchost_config.h: No such file or directory


I think you'll find it here:
/opt/vc/include/interface/vcos/pthreads/vchost_config.h
so add /opt/vc/include/interface/vcos/pthreads to your ipath.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by pepedog » Thu Nov 29, 2012 10:29 am
Posts: 986
Joined: Fri Oct 07, 2011 9:55 am
by dom » Thu Nov 29, 2012 1:39 pm
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by pepedog » Fri Nov 30, 2012 12:35 pm
I recompiled xbmc
(coherent_pool=6M 256 model)
With
gpu_mem_256=112
gpu_mem_512=368
cma_lwm=16
cma_hwm=32
cma_offline_start=16
it doesn't run, crash no screens

gpu_mem_256=128
gpu_mem_512=368
#cma_lwm=16
#cma_hwm=32
#cma_offline_start=16
Does run

Note for arch users running next kernel/firmware
Code: Select all
pacman -U http://myplugbox.com/xbmc-rbp-git-20121129-1-armv6h.pkg.tar.xz
Posts: 986
Joined: Fri Oct 07, 2011 9:55 am
by dom » Fri Nov 30, 2012 1:50 pm
pepedog wrote:I recompiled xbmc
(coherent_pool=6M 256 model)
With
gpu_mem_256=112
gpu_mem_512=368
cma_lwm=16
cma_hwm=32
cma_offline_start=16
it doesn't run, crash no screens


Working for me. Can you report output of:
vcgencmd version
uname -a
dmesg |grep vc
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by pepedog » Fri Nov 30, 2012 2:42 pm
Code: Select all
# /opt/vc/bin/vcgencmd version
Nov 26 2012 22:30:04
Copyright (c) 2012 Broadcom
version 353322 (release)

# uname -a
Linux alarmpi 3.6.7-3-ARCH+ #1 PREEMPT Wed Nov 28 11:56:42 UTC 2012 armv6l GNU/Linux

# dmesg |grep vc
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2708.boardrev=0x2 bcm2708.serial=0x7c6ae7cc smsc95xx.macaddr=B8:27:EB:6A:E7:CC sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0xec00000 vc_mem.mem_size=0x10000000  coherent_pool=6M sdhci-bcm2708.enable_llm=1 sdhci-bcm2708.sync_after_dma=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 loglevel=2 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait
[    0.086235] bcm2708_vcio: mailbox at f200b880
[    0.626380] vc-mem: phys_addr:0x00000000 mem_base=0x0ec00000 mem_size:0x10000000(256 MiB)
[    0.830377] vc-cma: Videocore CMA driver
[    0.830395] vc-cma: vc_cma_base      = 0x00000000
[    0.830405] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    0.830413] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    0.845948] vchiq: vchiq_init_state: slot_zero = 0xc7000000, is_master = 0

Kernel was made same time as firmware
Posts: 986
Joined: Fri Oct 07, 2011 9:55 am
by dom » Fri Nov 30, 2012 3:34 pm
pepedog wrote:Kernel was made same time as firmware


Are you sure you had
Code: Select all
cma_lwm=16
cma_hwm=32

enabled when running dmesg?
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by pepedog » Fri Nov 30, 2012 3:43 pm
That was without, sorry it's the working one
Code: Select all
# dmesg |grep vc
[    0.000000] early_vc_cma_mem(0/0x5c00000@0x9000000)
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x2 bcm2708.serial=0x7c6ae7cc smsc95xx.macaddr=B8:27:EB:6A:E7:CC sdhci-bcm2708.emmc_clock_freq=100000000 vc-cma-mem=0/0x5c00000@0x9000000 mem=0x8000000@0x0 mem=0x5c00000@0x9000000 vc_mem.mem_base=0xec00000 vc_mem.mem_size=0x10000000  coherent_pool=6M sdhci-bcm2708.enable_llm=1 sdhci-bcm2708.sync_after_dma=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 loglevel=2 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait
[    0.097445] bcm2708_vcio: mailbox at f200b880
[    0.638223] vc-mem: phys_addr:0x00000000 mem_base=0x0ec00000 mem_size:0x10000000(256 MiB)
[    0.788571] vc-cma: Videocore CMA driver
[    0.788589] vc-cma: vc_cma_base      = 0x09000000
[    0.788599] vc-cma: vc_cma_size      = 0x05c00000 (92 MiB)
[    0.788607] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    0.803495] vchiq: vchiq_init_state: slot_zero = 0xc7000000, is_master = 0
[    0.804833] vchiq_get_state: g_state.remote->initialised != 1 (0)
[    0.804863] vchiq: vchiq_initialise: videocore not initialized
Posts: 986
Joined: Fri Oct 07, 2011 9:55 am
by dom » Sat Dec 01, 2012 1:17 pm
pepedog wrote:That was without, sorry it's the working one
Code: Select all
[    0.804863] vchiq: vchiq_initialise: videocore not initialized

This is the problem. I don't get that. Do you get that line when using official github kernel?
https://github.com/Hexxeh/rpi-firmware/ ... kernel.img
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by pepedog » Sat Dec 01, 2012 5:59 pm
Code: Select all
uname -a
Linux alarmpi 3.6.7+ #313 PREEMPT Wed Nov 28 20:19:26 GMT 2012 armv6l GNU/Linux
[root@alarmpi ~]# dmesg |grep vc
[    0.000000] early_vc_cma_mem(0/0x5c00000@0x9000000)
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x2 bcm2708.serial=0x7c6ae7cc smsc95xx.macaddr=B8:27:EB:6A:E7:CC sdhci-bcm2708.emmc_clock_freq=100000000 vc-cma-mem=0/0x5c00000@0x9000000 mem=0x8000000@0x0 mem=0x5c00000@0x9000000 vc_mem.mem_base=0xec00000 vc_mem.mem_size=0x10000000  coherent_pool=6M sdhci-bcm2708.enable_llm=1 sdhci-bcm2708.sync_after_dma=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 loglevel=2 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait
[    0.098069] bcm2708_vcio: mailbox at f200b880
[    0.638588] vc-mem: phys_addr:0x00000000 mem_base=0x0ec00000 mem_size:0x10000000(256 MiB)
[    0.779389] vc-cma: Videocore CMA driver
[    0.779408] vc-cma: vc_cma_base      = 0x09000000
[    0.779418] vc-cma: vc_cma_size      = 0x05c00000 (92 MiB)
[    0.779426] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    0.794283] vchiq: vchiq_init_state: slot_zero = 0xc9000000, is_master = 0
[    0.795080] vchiq_get_state: g_state.remote->initialised != 1 (0)
[    0.795110] vchiq: vchiq_initialise: videocore not initialized

I grabbed the official kernel and modules, using this
Code: Select all
git clone --depth 1 -b next git://github.com/Hexxeh/rpi-firmware.git
Posts: 986
Joined: Fri Oct 07, 2011 9:55 am
by mcgyver83 » Sun Dec 02, 2012 5:28 pm
Hi to all,
I run sudo rpi-update and now I have these outputs:
Code: Select all
uname -a
Linux raspberrypi 3.2.27+ #307 PREEMPT Mon Nov 26 23:22:29 GMT 2012 armv6l GNU/Linux


Code: Select all
vcgencmd version
Nov 22 2012 18:12:01
Copyright (c) 2012 Broadcom
version 352766 (release)


I think to have the last gpu firmaware but the kernel isn't the last one.
How ca I do to update my rpi 512MB to the last kernel?

CMA looks very interesting, I added
Code: Select all
coherent_pool=6M  smsc95xx.turbo_mode=N

to cmdline.txt and checked that no "cma=" or "mem=" settings are present;
and added
Code: Select all
gpu_mem_512=480
cma_lwm=16
cma_hwm=32
cma_offline_start=16

to config.txt.

Can someone explain me these settings?
I know that now I'm starting with 480MB of ram for the cpu and 32MB for gpu, when the gpu has less than 16MB of free ram it asks to have more ram, when gpu has more than 32MB of free ram it releases some ram.
But what about cma_offline_start?
Posts: 316
Joined: Fri Oct 05, 2012 11:49 am
by dom » Mon Dec 03, 2012 1:19 pm
mcgyver83 wrote:Hi to all,
I run sudo rpi-update and now I have these outputs:
Code: Select all
uname -a
Linux raspberrypi 3.2.27+ #307 PREEMPT Mon Nov 26 23:22:29 GMT 2012 armv6l GNU/Linux


You don't have the "next" firmware tree. Please read the prededing posts by me of how to update to "next" firmware (it involves adding a hash number to the end of the rpi-update line).

mcgyver83 wrote:But what about cma_offline_start?

The "online" shared memory is owned by the GPU. The "offline" shared memory is owned by ARM.
That means the first 16M is dedicated to GPU, to allow for initial allocations of framebuffer etc. which occur before the CMA driver has started.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by mcgyver83 » Mon Dec 03, 2012 1:40 pm
Ok, I have to run rpi-update with the hast you posted before, but is this a stable kernel or e beta one? Why it isn't available through rpi-update standard?
Posts: 316
Joined: Fri Oct 05, 2012 11:49 am
by dom » Mon Dec 03, 2012 1:58 pm
mcgyver83 wrote:Ok, I have to run rpi-update with the hast you posted before, but is this a stable kernel or e beta one? Why it isn't available through rpi-update standard?


No guarantees about stability when using rpi-update. You should stick with what "apt-get upgrade" gives you if you want stability.

The "next" tree is more experimental than the normal "rpi-update" tree, so even less guarantees.

However at the moment, I'm not aware of any specifc issues with either "rpi-update" trees, so they should be quite usable.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4105
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge