Processed: Re: Bug#968181: linux-image-5.7.0-2-arm64: DRM unavailable on Rapsberry Pi 4B

2021-01-19 Thread Debian Bug Tracking System
Processing control commands:

> forwarded -1 https://github.com/raspberrypi/firmware/issues/1247
Bug #968181 [src:linux] missing DRI/DRM support on Raspberry Pi
Changed Bug forwarded-to-address to 
'https://github.com/raspberrypi/firmware/issues/1247' from 
'https://github.com/lategoodbye/rpi-zero/issues/46'.
> tags -1 + fixed-upstream
Bug #968181 [src:linux] missing DRI/DRM support on Raspberry Pi
Added tag(s) fixed-upstream.

-- 
968181: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968181
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#968181: linux-image-5.7.0-2-arm64: DRM unavailable on Rapsberry Pi 4B

2021-01-19 Thread Ryutaroh Matsumoto
Control: forwarded -1 https://github.com/raspberrypi/firmware/issues/1247
Control: tags -1 + fixed-upstream

> On the other hand, gdm3 and weston gives the following error in dmesg,
> "kernel: [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:"
> and no graphics come. Rendering by wayland does not work at all with
> vc4.ko in 5.10.9.

The above symptom is "fixed" by adding
CMA=256M@128M
to the kernel command line.

Then the gdm3 display manager starts up well, and I have
# grep -i cma /proc/meminfo 
CmaTotal: 262144 kB
CmaFree:  143008 kB

Best regards, Ryutaroh Matsumoto



Bug#968181: linux-image-5.7.0-2-arm64: DRM unavailable on Rapsberry Pi 4B

2021-01-19 Thread Ryutaroh Matsumoto
Hi all,

This is an update to
Bug#968181: linux-image-5.7.0-2-arm64: DRM unavailable on Rapsberry Pi 4B

I compiled Linux 5.10.9 by myself, and xinit starts fine without installing
the Debian package xserver-xorg-video-fbdev. When I originally reported this
#968181, the graphics on my raspi can only be used through 
xserver-xorg-video-fbdev.

X server works fine by using
/dev/dri/card0 on my raspi 4B 8GB model.
DRI/DRM on raspi started to partially work.

On the other hand, gdm3 and weston gives the following error in dmesg,
"kernel: [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:"
and no graphics come. Rendering by wayland does not work at all with
vc4.ko in 5.10.9.

Best regards, Ryutaroh



Bug#968181: linux-image-5.7.0-2-arm64: DRM unavailable on Rapsberry Pi 4B

2020-12-17 Thread Diederik de Haas
On donderdag 17 december 2020 15:28:45 CET Lucas Nussbaum wrote:
> On 17/12/20 at 13:49 +0100, Diederik de Haas wrote:
> > On Wed, 4 Nov 2020 09:09:55 +0100 Lucas Nussbaum  wrote:
> > > Outside of the kernel, there's nothing else needed.
> > 
> > What I haven't seen mentioned thus far and is AFAIUI essential, is the
> > following line in /boot[/firmware/]/config.txt:
> > 
> > dtoverlay=vc4-kms-v3d
> > 
> > Note that it is not the -fkms- variant and this is not a typo on my end.
> 
> Isn't that for the Raspberry Pi Foundation kernel, not the vanilla one?

IIRC, it was 'pelwell' that said it, so it's certainly for the RPF kernel.
I know there are differences between the RPF kernel and the vanilla one, but I 
didn't know (and would be surprised) if that would entail not using that 
overlay. I can (ofc) be wrong.
I guess it is worth verifying.

signature.asc
Description: This is a digitally signed message part.


Bug#968181: linux-image-5.7.0-2-arm64: DRM unavailable on Rapsberry Pi 4B

2020-12-17 Thread Lucas Nussbaum
On 17/12/20 at 13:49 +0100, Diederik de Haas wrote:
> On Wed, 4 Nov 2020 09:09:55 +0100 Lucas Nussbaum  wrote:
> > Outside of the kernel, there's nothing else needed.
> 
> What I haven't seen mentioned thus far and is AFAIUI essential, is the 
> following line in /boot[/firmware/]/config.txt:
> 
> dtoverlay=vc4-kms-v3d
> 
> Note that it is not the -fkms- variant and this is not a typo on my end.

Isn't that for the Raspberry Pi Foundation kernel, not the vanilla one?

Lucas



Bug#968181: linux-image-5.7.0-2-arm64: DRM unavailable on Rapsberry Pi 4B

2020-12-17 Thread Diederik de Haas
On Wed, 4 Nov 2020 09:09:55 +0100 Lucas Nussbaum  wrote:
> Outside of the kernel, there's nothing else needed.

What I haven't seen mentioned thus far and is AFAIUI essential, is the 
following line in /boot[/firmware/]/config.txt:

dtoverlay=vc4-kms-v3d

Note that it is not the -fkms- variant and this is not a typo on my end.

Cheers,
  Diederik

signature.asc
Description: This is a digitally signed message part.


Bug#968181: linux-image-5.7.0-2-arm64: DRM unavailable on Rapsberry Pi 4B

2020-11-27 Thread Lucas Nussbaum
On 04/11/20 at 09:09 +0100, Lucas Nussbaum wrote:
> Outside of the kernel, there's nothing else needed.

OK, this is not entirely true: you also need support in Mesa, which is
not available on buster, but is available in testing. Things are still
moving in that area, see for example
https://www.phoronix.com/scan.php?page=news_item&px=V3DV-Raspberry-Pi4-Mesa-20.3

Lucas



Bug#968181: linux-image-5.7.0-2-arm64: DRM unavailable on Rapsberry Pi 4B

2020-11-04 Thread Lucas Nussbaum
Hi,

Here is a summary of what I understand about this issue. (disclaimer:
just my understanding)

To get usable graphics (not software rendering) with the mainline kernel
and the RPI4, the following are needed:
A/ RPI4 support for modesetting in the kernel vc4 driver
B/ RPI4 support in the kernel v3d driver

(A) is mostly done, with Maxime Ripard's work merged in 5.10. I
confirmed this works in 5.10-rc2. See discussion starting at
http://lists.infradead.org/pipermail/linux-rpi-kernel/2020-November/007894.html

(B) requires less work, so should come next quite quickly.

Outside of the kernel, there's nothing else needed.


The Raspberry Pi Foundation is doing The Right Thing on two levels.
First, it funds contractors to do the mainlining work (so it will happen
eventually). Second, it rebases its patches on the mainline kernel on a
regular basis, so it's easy to see the remaining delta (see references below).

So overall, this is looking good, and it's likely that we will get full
support for RPI4 (and similar systems such as RPI 400) at some point.

In the meantime, we could also provide an unofficial kernel package based on
the latest release supported by the RPI Foundation. This would allow our
users to choose between an official Debian kernel without acceleration,
and an unofficial one with acceleration.

Various pointers:
-
* https://github.com/raspberrypi/linux
  github repo with the RPI foundation kernel work. See the rpi-5.*.y
  branches for the rebased patchsets on top of the mainline kernel.
* https://github.com/sakaki-/bcm2711-kernel
  provides regular builds of the RPI foundation kernel. This is usable
  on Debian with some tweaking. (it would probably be worth documenting
  the process though)
* https://github.com/lategoodbye/rpi-zero/issues/46
  github issue providing good background information about accelerated
  graphics on RPI4/mainline kernel.

Lucas


On 10/08/20 at 19:01 +0900, Ryutaroh Matsumoto wrote:
> Package: src:linux
> Version: 5.7.10-1
> Severity: normal
> 
> Dear Maintainer,
> 
> DRM is unavailable on Raspberry Pi 4B (board revision 1.4).
> Lack of DRM prevents drm_backend in weston/wayland.
> X server does not start without installation of xserver-xorg-video-fbdev.
> 
> In contrast to the Debian kernel, the kernel from Raspbian Foundation
> allows drm_backend in weston, and it does not need xserver-xorg-video-fbdev.
> 
> Best regards, Ryutaroh Matsumoto
> 
> 
> -- Package-specific info:
> ** Version:
> Linux version 5.7.0-2-arm64 (debian-kernel@lists.debian.org) (gcc version 
> 9.3.0 (Debian 9.3.0-15), GNU ld (GNU Binutils for Debian) 2.35) #1 SMP Debian 
> 5.7.10-1 (2020-07-26)
> 
> ** Command line:
> video=HDMI-A-1:3840x2160M@30,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48
>  dma.dmachans=0x71f5 bcm2709.boardrev=0xd03114 bcm2709.serial=0x488d2af3 
> bcm2709.uart_clock=4800 bcm2709.disk_led_gpio=42 
> bcm2709.disk_led_active_low=0 smsc95xx.macaddr=DC:A6:32:BB:99:D9 
> vc_mem.mem_base=0x3ec0 vc_mem.mem_size=0x4000  console=tty0 
> console=ttyS1,115200 root=/dev/mmcblk1p2 rw elevator=bfq fsck.repair=yes 
> net.ifnames=0  rootwait systemd.unified_cgroup_hierarchy=1
> 
> ** Tainted: C (1024)
>  * staging driver was loaded
> 
> ** Kernel log:
> Unable to read kernel log; any relevant messages should be attached
> dmesg out put is included here:
> 
> 
> [0.00] Booting Linux on physical CPU 0x00 [0x410fd083]
> [0.00] Linux version 5.7.0-2-arm64 (debian-kernel@lists.debian.org) 
> (gcc version 9.3.0 (Debian 9.3.0-15), GNU ld (GNU Binutils for Debian) 2.35) 
> #1 SMP Debian 5.7.10-1 (2020-07-26)
> [0.00] Machine model: Raspberry Pi 4 Model B Rev 1.4
> [0.00] efi: UEFI not found.
> [0.00] Reserved memory: created CMA memory pool at 
> 0x2900, size 64 MiB
> [0.00] OF: reserved mem: initialized node linux,cma, compatible id 
> shared-dma-pool
> [0.00] NUMA: No NUMA configuration found
> [0.00] NUMA: Faking a node at [mem 
> 0x-0x0001]
> [0.00] NUMA: NODE_DATA [mem 0x1ff0730c0-0x1ff074fff]
> [0.00] Zone ranges:
> [0.00]   DMA  [mem 0x-0x3fff]
> [0.00]   DMA32[mem 0x4000-0x]
> [0.00]   Normal   [mem 0x0001-0x0001]
> [0.00] Movable zone start for each node
> [0.00] Early memory node ranges
> [0.00]   node   0: [mem 0x-0x2fff]
> [0.00]   node   0: [mem 0x4000-0xfbff]
> [0.00]   node   0: [mem 0x0001-0x0001]
> [0.00] Initmem setup node 0 [mem 
> 0x-0x0001]
> [0.00] On node 0 totalpages: 2015232
> [0.00]   DMA zone: 3072 pages used for memmap
> [0.00]   DMA zone: 0 pages reserved
> [0.00]   DMA zone: 196608 pages, LIFO batch:63
> [ 

Bug#968181: linux-image-5.7.0-2-arm64: DRM unavailable on Rapsberry Pi 4B

2020-08-10 Thread Ryutaroh Matsumoto
Package: src:linux
Version: 5.7.10-1
Severity: normal

Dear Maintainer,

DRM is unavailable on Raspberry Pi 4B (board revision 1.4).
Lack of DRM prevents drm_backend in weston/wayland.
X server does not start without installation of xserver-xorg-video-fbdev.

In contrast to the Debian kernel, the kernel from Raspbian Foundation
allows drm_backend in weston, and it does not need xserver-xorg-video-fbdev.

Best regards, Ryutaroh Matsumoto


-- Package-specific info:
** Version:
Linux version 5.7.0-2-arm64 (debian-kernel@lists.debian.org) (gcc version 9.3.0 
(Debian 9.3.0-15), GNU ld (GNU Binutils for Debian) 2.35) #1 SMP Debian 
5.7.10-1 (2020-07-26)

** Command line:
video=HDMI-A-1:3840x2160M@30,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48
 dma.dmachans=0x71f5 bcm2709.boardrev=0xd03114 bcm2709.serial=0x488d2af3 
bcm2709.uart_clock=4800 bcm2709.disk_led_gpio=42 
bcm2709.disk_led_active_low=0 smsc95xx.macaddr=DC:A6:32:BB:99:D9 
vc_mem.mem_base=0x3ec0 vc_mem.mem_size=0x4000  console=tty0 
console=ttyS1,115200 root=/dev/mmcblk1p2 rw elevator=bfq fsck.repair=yes 
net.ifnames=0  rootwait systemd.unified_cgroup_hierarchy=1

** Tainted: C (1024)
 * staging driver was loaded

** Kernel log:
Unable to read kernel log; any relevant messages should be attached
dmesg out put is included here:


[0.00] Booting Linux on physical CPU 0x00 [0x410fd083]
[0.00] Linux version 5.7.0-2-arm64 (debian-kernel@lists.debian.org) 
(gcc version 9.3.0 (Debian 9.3.0-15), GNU ld (GNU Binutils for Debian) 2.35) #1 
SMP Debian 5.7.10-1 (2020-07-26)
[0.00] Machine model: Raspberry Pi 4 Model B Rev 1.4
[0.00] efi: UEFI not found.
[0.00] Reserved memory: created CMA memory pool at 0x2900, 
size 64 MiB
[0.00] OF: reserved mem: initialized node linux,cma, compatible id 
shared-dma-pool
[0.00] NUMA: No NUMA configuration found
[0.00] NUMA: Faking a node at [mem 
0x-0x0001]
[0.00] NUMA: NODE_DATA [mem 0x1ff0730c0-0x1ff074fff]
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x-0x3fff]
[0.00]   DMA32[mem 0x4000-0x]
[0.00]   Normal   [mem 0x0001-0x0001]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x2fff]
[0.00]   node   0: [mem 0x4000-0xfbff]
[0.00]   node   0: [mem 0x0001-0x0001]
[0.00] Initmem setup node 0 [mem 0x-0x0001]
[0.00] On node 0 totalpages: 2015232
[0.00]   DMA zone: 3072 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 196608 pages, LIFO batch:63
[0.00]   DMA32 zone: 12288 pages used for memmap
[0.00]   DMA32 zone: 770048 pages, LIFO batch:63
[0.00]   Normal zone: 16384 pages used for memmap
[0.00]   Normal zone: 1048576 pages, LIFO batch:63
[0.00] percpu: Embedded 32 pages/cpu s93720 r8192 d29160 u131072
[0.00] pcpu-alloc: s93720 r8192 d29160 u131072 alloc=32*4096
[0.00] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[0.00] Detected PIPT I-cache on CPU0
[0.00] CPU features: detected: EL2 vector hardening
[0.00] CPU features: kernel page table isolation forced ON by KASLR
[0.00] CPU features: detected: Kernel page table isolation (KPTI)
[0.00] ARM_SMCCC_ARCH_WORKAROUND_1 missing from firmware
[0.00] CPU features: detected: ARM erratum 1319367
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 1983488
[0.00] Policy zone: Normal
[0.00] Kernel command line: 
video=HDMI-A-1:3840x2160M@30,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48
 dma.dmachans=0x71f5 bcm2709.boardrev=0xd03114 bcm2709.serial=0x488d2af3 
bcm2709.uart_clock=4800 bcm2709.disk_led_gpio=42 
bcm2709.disk_led_active_low=0 smsc95xx.macaddr=DC:A6:32:BB:99:D9 
vc_mem.mem_base=0x3ec0 vc_mem.mem_size=0x4000  console=tty0 
console=ttyS1,115200 root=/dev/mmcblk1p2 rw elevator=bfq fsck.repair=yes 
net.ifnames=0  rootwait systemd.unified_cgroup_hierarchy=1
[0.00] Kernel parameter elevator= does not have any effect anymore.
   Please use sysfs to set IO scheduler for individual devices.
[0.00] Dentry cache hash table entries: 1048576 (order: 11, 8388608 
bytes, linear)
[0.00] Inode-cache hash table entries: 524288 (order: 10, 4194304 
bytes, linear)
[0.00] mem auto-init: stack:off, heap alloc:off, heap free:off
[0.00] software IO TLB: mapped [mem 0x2500-0x2900] (64MB)
[0.00] Memory: 4732836K/8060928K available (10684K kernel code, 1848K 
rwdata, 3808K rodata, 5184K init, 561K bss, 277044K reserved, 65536K 
cma-reserved)
[0.00] random: get_rando