Add support for 4.1 kernel with vc4 DRM/KMS driver
cover Add support for 4.1 kernel with vc4 DRM/KMS driver
Hello Andrei,
This series adds support for Eric Anholt's v4.1 kernel, that has support for the vc4 DRM/KMS driver. Which is the new open source graphics driver stack for the Raspberry Pi to be used instead of the userland driver.
We are using it in the Tizen port to RPI2 [0] and are trying to push all the patches back to the tizen-distro and meta-raspberrypi OE layers so I'm posting these patches to get your feedback.
The v4.1 kernel is under heavy development so is a work-in-progress and should not be used in production. That's why a default preference of -1 is set and the kernel only is enabled if the "vc4-gfx" feature is added to the DISTRO_FEATURES variable.
But even when it's still a development kernel, having the recipe in the meta-raspberrypi will allow people to test it. The patches are for:
Patch 1/5 makes optional to add the kgdboc kernel command line parameter
Patch 2/5 allows to set the mask_gpu_interrupt0 option in config.txt
Patch 3/5 changes the partition layout to add more space for boot files
Patch 4/5 adds a recipe for the 4.1 and some patches to make it stable
Patch 5/5 switchs the default providers according to the gfx stack used
One problem I found is that the latest RPI kernels changed the path for the DT overlays after commit 739c586c8757 ("BCM270X_DT: Move the overlays into a subdirectory, adding the README") [1] so the kernel fails to build with the default KERNEL_DEVICETREE. I tried to change get_dts() function logic to take this into account but found that it would had been a more intrusive change and KERNEL_DEVICETREE will have to be changed anyways once the recipes for the other kernels are updated to the latest HEAD so for now I just define the following on local.conf to make it build:
KERNEL_DEVICETREE = " \
bcm2708-rpi-b.dtb \
bcm2708-rpi-b-plus.dtb \
bcm2709-rpi-2-b.dtb \
\
overlays/hifiberry-amp-overlay.dtb \
overlays/hifiberry-dac-overlay.dtb \
overlays/hifiberry-dacplus-overlay.dtb \
overlays/hifiberry-digi-overlay.dtb \
overlays/iqaudio-dac-overlay.dtb \
overlays/iqaudio-dacplus-overlay.dtb \
overlays/lirc-rpi-overlay.dtb \
overlays/pps-gpio-overlay.dtb \
overlays/w1-gpio-overlay.dtb \
overlays/w1-gpio-pullup-overlay.dtb \
"[0]: http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/
[1]: https://github.com/raspberrypi/linux/commit/739c586c8757
Best regards,
---
Javier Martinez Canillas
Open Source Group
Samsung Research America
Derek Foreman (4):
rpi-config: Allow to mask GPU irqs sdcard_image-rpi.bbclass: Allocate more space for boot partition
linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
rpi-default-providers: Switch providers according to used gfx stack
Mauro Carvalho Chehab (1):
linux-raspberrypi.inc: Make kgdboc kernel param optional
README | 38 +++++-- classes/sdcard_image-rpi.bbclass | 6 +- conf/machine/include/rpi-default-providers.inc | 8 +- conf/machine/include/rpi-default-versions.inc | 2 +- recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++ recipes-kernel/linux/linux-raspberrypi.inc | 5 +- ..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++ ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++ .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115 +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95 +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++ 12 files changed, 433 insertions(+), 17 deletions(-) create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bb
Signature · 1 line
2.4.3
PATCH 1/5 linux-raspberrypi.inc: Make kgdboc kernel param optional
From: Mauro Carvalho Chehab <[email protected]>
The kernel debugger over console (kgdboc) parameter is being added unconditionally to the kernel command line but this means that the kernel will stop and wait for gdb to attach in case of a exception or when sending a sysrq-g key. This behaviour may not be what most users wants that are not remotely debugging the kernel over serial console so make it optional by adding a ENABLE_KGDB config option.
---
README | 23 +++++++++++++++-------- recipes-kernel/linux/linux-raspberrypi.inc | 5 ++++- 2 files changed, 19 insertions(+), 9 deletions(-)
README +15 -8
@@ -19,10 +19,11 @@ Contents: 2.E. Set overclocking options 2.F. Optional - Video camera support with V4L2 drivers 2.G. Optional - Enable offline compositing support - 2.H. Images - 2.I. Boot to U-Boot - 2.J. Image with Initramfs - 2.K. Device tree support + 2.H. Optional - Enable kgdb over console support + 2.I. Images + 2.J. Boot to U-Boot + 2.K. Image with Initramfs + 2.L. Device tree support 3. Extra apps 3.A. omxplayer 4. Source code and mirrors
@@ -138,7 +139,13 @@ Heavily recommended for Wayland/Weston. See: http://wayland.freedesktop.org/raspberrypi.html -2.H. Images +2.H. Optional - Enable kgdb over console support +================================================ +To add the kdbg over console (kgdboc) parameter to the kernel command line, +set this variable in local.conf: +ENABLE_KGDB = "1" + +2.I. Images =========== * rpi-hwup-image Hardware up image
@@ -148,7 +155,7 @@ See: http://wayland.freedesktop.org/raspberrypi.html Image based on rpi-basic-image which includes most of the packages in this layer and some media samples. -2.I. Boot to U-Boot +2.J. Boot to U-Boot =================== To have u-boot load kernel image, set in your local.conf KERNEL_IMAGETYPE = "uImage"
@@ -156,7 +163,7 @@ KERNEL_IMAGETYPE = "uImage" This will make kernel.img be u-boot image which will load uImage. By default, kernel.img is the actual kernel image (ex. Image). -2.J. Image with Initramfs +2.K. Image with Initramfs ========================= To build an initramfs image : * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@@ -169,7 +176,7 @@ To build an initramfs image : * Set the meta-rasberrypi variable (in raspberrypi.conf for example) - KERNEL_INITRAMFS = "-initramfs" -2.K. Device tree support +2.L. Device tree support ========================= Device tree for RPi is only supported when using linux-raspberrypi 3.18+ kernels.
recipes-kernel/linux/linux-raspberrypi.inc +4 -1
@@ -19,7 +19,10 @@ KERNEL_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig" KERNEL_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig" # CMDLINE for raspberrypi -CMDLINE = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" +CMDLINE = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" + +# Add the kernel debugger over console kernel command line option if enabled +CMDLINE_append = ' ${@base_conditional("ENABLE_KGDB", "1", "kgdboc=ttyAMA0,115200", "", d)}' UDEV_GE_141 ?= "1"
Signature · 1 line
2.4.3
Andrei Gherzan
AppliedRe: [meta-raspberrypi][PATCH 1/5] linux-raspberrypi.inc: Make kgdboc kernel param optional
Quoted 13 lines · Javier Martinez Canillas
From: Mauro Carvalho Chehab <[email protected]>
The kernel debugger over console (kgdboc) parameter is being added unconditionally to the kernel command line but this means that the kernel will stop and wait for gdb to attach in case of a exception or when sending a sysrq-g key. This behaviour may not be what most users wants that are not remotely debugging the kernel over serial console so make it optional by adding a
ENABLE_KGDBconfig option.Signed-off-by Mauro Carvalho Chehab <[email protected]>[javier: Extended commit message and made it conditional]Signed-off-by Javier Martinez Canillas <[email protected]>
Quoted 5 lines
---
README | 23 +++++++++++++++-------- recipes-kernel/linux/linux-raspberrypi.inc | 5 ++++- 2 files changed, 19 insertions(+), 9 deletions(-)
Merged to master. Thanks.
--
Andrei Gherzan
PATCH 2/5 rpi-config: Allow to mask GPU irqs
In reply to Javier Martinez CanillasFrom: Derek Foreman <[email protected]>
The rpi config.txt file has a mask_gpu_interrupt option which needs to be set when using the new VC4 DRM/KMS driver. Since this option exists in the config file and needed by some kernels, add a option to set it.
---
README | 22 ++++++++++++++-------- recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++ 2 files changed, 20 insertions(+), 8 deletions(-)
README +14 -8
@@ -20,10 +20,11 @@ Contents: 2.F. Optional - Video camera support with V4L2 drivers 2.G. Optional - Enable offline compositing support 2.H. Optional - Enable kgdb over console support - 2.I. Images - 2.J. Boot to U-Boot - 2.K. Image with Initramfs - 2.L. Device tree support + 2.I. Optional - Mask GPU interrupts + 2.J. Images + 2.K. Boot to U-Boot + 2.L. Image with Initramfs + 2.M. Device tree support 3. Extra apps 3.A. omxplayer 4. Source code and mirrors
@@ -145,7 +146,12 @@ To add the kdbg over console (kgdboc) parameter to the kernel command line, set this variable in local.conf: ENABLE_KGDB = "1" -2.I. Images +2.I. Optional - Mask GPU interrupts +=================================== +To mask the GPU interrupts, set in your local.conf +MASK_GPU_INTERRUPT = "0x400" + +2.J. Images =========== * rpi-hwup-image Hardware up image
@@ -155,7 +161,7 @@ ENABLE_KGDB = "1" Image based on rpi-basic-image which includes most of the packages in this layer and some media samples. -2.J. Boot to U-Boot +2.K. Boot to U-Boot =================== To have u-boot load kernel image, set in your local.conf KERNEL_IMAGETYPE = "uImage"
@@ -163,7 +169,7 @@ KERNEL_IMAGETYPE = "uImage" This will make kernel.img be u-boot image which will load uImage. By default, kernel.img is the actual kernel image (ex. Image). -2.K. Image with Initramfs +2.L. Image with Initramfs ========================= To build an initramfs image : * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@@ -176,7 +182,7 @@ To build an initramfs image : * Set the meta-rasberrypi variable (in raspberrypi.conf for example) - KERNEL_INITRAMFS = "-initramfs" -2.L. Device tree support +2.M. Device tree support ========================= Device tree for RPi is only supported when using linux-raspberrypi 3.18+ kernels.
recipes-bsp/bootfiles/rpi-config_git.bb +6 -0
@@ -66,6 +66,12 @@ do_deploy() { echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt fi + + # Mask GPU interrupts + if [ -n "${MASK_GPU_INTERRUPT}" ]; then + echo "# Mask GPU interrupts" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "mask_gpu_interrupt0=${MASK_GPU_INTERRUPT}" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi } addtask deploy before do_package after do_install
Signature · 1 line
2.4.3
Re: [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs
Hello,
Quoted 6 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
The rpi config.txt file has a
mask_gpu_interruptoption which needs to be set when using the new VC4 DRM/KMS driver. Since this option exists in the config file and needed by some kernels, add a option to set it.
I understand the scope of this change and it makes sense. The only confusion is in the "since this option exixts in the config file". This option is not in the config file. What do you mean by that?
--
Andrei Gherzan
Re: [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs
Hello Andrei,
Thanks a lot for your feedback and for picking patches #1 and #3!
Quoted 5 lines · Andrei Gherzan
Hello,
Quoted 2 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
Quoted 9 lines
Quoted 4 lines
The rpi config.txt file has a
mask_gpu_interruptoption which needs to be set when using the new VC4 DRM/KMS driver. Since this option exists in the config file and needed by some kernels, add a option to set it.I understand the scope of this change and it makes sense. The only confusion is in the "since this option exixts in the config file". This option is not in the config file. What do you mean by that?
Right, that was worded badly. I meant that the option is a valid one for the config.txt file. IOW, that is a supported option by the RPi firmware but it was not possible to setup from the meta-raspberrypi layer.
I'll fix the commit message on v2.
Quoted 3 lines
--
Andrei Gherzan
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs
Quoted 20 lines · Javier Martinez Canillas
Hello Andrei,
Thanks a lot for your feedback and for picking patches #1 and #3!
Quoted 5 lines · Andrei Gherzan
Hello,
Quoted 2 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
Quoted 9 lines
Quoted 4 lines
The rpi config.txt file has a
mask_gpu_interruptoption which needs to be set when using the new VC4 DRM/KMS driver. Since this option exists in the config file and needed by some kernels, add a option to set it.I understand the scope of this change and it makes sense. The only confusion is in the "since this option exixts in the config file". This option is not in the config file. What do you mean by that?
Quoted 6 lines
Right, that was worded badly. I meant that the option is a valid one for the config.txt file. IOW, that is a supported option by the RPi firmware but it was not possible to setup from the meta-raspberrypi layer.
I'll fix the commit message on v2.
Uh. Got it now. Thanks. Waiting for V2s.
Cheers!
--
Andrei Gherzan
PATCH 3/5 sdcard_image-rpi.bbclass: Allocate more space for boot partition
In reply to Javier Martinez CanillasFrom: Derek Foreman <[email protected]>
The boot partition currently has a size of 20 MiB but just the start elf binaries account almost 12 MiB, which means that only 8 MiB is left for the kernel image. A recent kernel with many of its options built-in can easily be more than 4 MiB so let's double the boot partition size to 40 MiB to make sure that it has enough room for the kernel image, the DTBs and possible even a backup kernel.
---
classes/sdcard_image-rpi.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
classes/sdcard_image-rpi.bbclass +3 -3
@@ -14,14 +14,14 @@ inherit linux-raspberrypi-base # Default Free space = 1.3x # Use IMAGE_OVERHEAD_FACTOR to add more space # <---------> -# 4MiB 20MiB SDIMG_ROOTFS +# 4MiB 40MiB SDIMG_ROOTFS # <-----------------------> <----------> <----------------------> # ------------------------ ------------ ------------------------ # | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | # ------------------------ ------------ ------------------------ # ^ ^ ^ ^ # | | | | -# 0 4MiB 4MiB + 20MiB 4MiB + 20Mib + SDIMG_ROOTFS +# 0 4MiB 4MiB + 40MiB 4MiB + 40Mib + SDIMG_ROOTFS # This image depends on the rootfs image IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}"
@@ -40,7 +40,7 @@ SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img" BOOTDD_VOLUME_ID ?= "${MACHINE}" # Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT) -BOOT_SPACE ?= "20480" +BOOT_SPACE ?= "40960" # Set alignment to 4MB [in KiB] IMAGE_ROOTFS_ALIGNMENT = "4096"
Signature · 1 line
2.4.3
Re: [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition
I am not the author - but ping for this one
Andreas
Re: [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition
Aaargh wrong patch - sorry
Quoted 3 lines · Andreas Müller
I am not the author - but ping for this one
Andreas
Andrei Gherzan
AppliedRe: [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition
In reply to Javier Martinez CanillasCheers guys,
Quoted 9 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
The boot partition currently has a size of 20 MiB but just the start elf binaries account almost 12 MiB, which means that only 8 MiB is left for the kernel image. A recent kernel with many of its options built-in can easily be more than 4 MiB so let's double the boot partition size to 40 MiB to make sure that it has enough room for the kernel image, the DTBs and possible even a backup kernel.
Quoted 9 lines
Signed-off-by Derek Foreman <[email protected]>[javier: Extended the commit message]Signed-off-by Javier Martinez Canillas <[email protected]>---
classes/sdcard_image-rpi.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Merged to master. Thanks.
--
Andrei Gherzan
PATCH 4/5 linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
In reply to Javier Martinez CanillasFrom: Derek Foreman <[email protected]>
This adds Eric Anholt's WIP kernel with dri/kms/3d support for the GPU on the rpi2. Adding a recipe that tracks this kernel, will make it easier to test this setup.
This recipe should only used for testing purposes for now, so it will not be set as the default.
The kernel will be choosen though if the "vc4-gfx" feature has been added to the the DISTRO_FEATURES variable.
---
README | 9 ++ ..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++ ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++ .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115 +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95 +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++ 7 files changed, 394 insertions(+) create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bb
README +9 -0
@@ -25,6 +25,7 @@ Contents: 2.K. Boot to U-Boot 2.L. Image with Initramfs 2.M. Device tree support + 2.O. Graphics stack 3. Extra apps 3.A. omxplayer 4. Source code and mirrors
@@ -195,6 +196,14 @@ kernels. NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for older kernel versions. +2.O. Graphic stacks +=================== +The Raspberry Pi boards can use one of two graphics stacks: The userland +user-space driver or the vc4 DRM/KMS kernel driver. By default userland +is used since the vc4 is still experimental. But this can be changed by +setting the following in the local.conf +DISTRO_FEATURES_append = " vc4-gfx" + 3. Extra apps =============
recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch new file +48 -0
48 lines not on this page · raw message
recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch new file +85 -0
85 lines not on this page · raw message
recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch new file +115 -0
115 lines not on this page · raw message
recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch new file +26 -0
@@ -0,0 +1,26 @@ +From 4388ed0f2d66399a6ad3133b91bd438cdb25e37b Mon Sep 17 00:00:00 2001 +From: Derek Foreman <[email protected]> +Date: Thu, 2 Jul 2015 11:20:21 -0500 +Subject: [PATCH 4/5] drm/vc4: Allow vblank to be disabled + +Signed-off-by: Derek Foreman <[email protected]> +--- + drivers/gpu/drm/vc4/vc4_kms.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c +index cb18d8f0e387..1473df9ef4a1 100644 +--- a/drivers/gpu/drm/vc4/vc4_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_kms.c +@@ -218,6 +218,8 @@ vc4_kms_load(struct drm_device *dev) + dev->mode_config.funcs = &vc4_mode_funcs; + dev->mode_config.preferred_depth = 24; + ++ dev->vblank_disable_allowed = true; ++ + ret = vc4_init_modeset_objects(dev); + if (ret) + goto fail; +-- +2.4.3 +
recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch new file +95 -0
95 lines not on this page · raw message
recipes-kernel/linux/linux-raspberrypi_4.1.bb new file +16 -0
@@ -0,0 +1,16 @@ +LINUX_VERSION ?= "4.1.0" + +# Don't make this the default kernel, right now it is only for testing purposes +DEFAULT_PREFERENCE = "-1" + +SRCREV = "07009cab090ade3dd180e8a55d590b1a00072eed" +SRC_URI = "git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2" + +# Add patches needed for the vc4 driver but only if enabled as distro feature since are experimental +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch', '', d)}" +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch', '', d)}" +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0003-drm-vc4-Use-the-fbdev_cma-helpers.patch', '', d)}" +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0004-drm-vc4-Allow-vblank-to-be-disabled.patch', '', d)}" +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0005-drm-vc4-Disable-KMS-operations.patch', '', d)}" + +require linux-raspberrypi.inc
Signature · 1 line
2.4.3
Re: [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
Hi,
Quoted 6 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
This adds Eric Anholt's WIP kernel with dri/kms/3d support for the GPU on the rpi2. Adding a recipe that tracks this kernel, will make it easier to test this setup.
Quoted 6 lines
This recipe should only used for testing purposes for now, so it will not be set as the default.
The kernel will be choosen though if the "vc4-gfx" feature has been added to the the
DISTRO_FEATURESvariable.
It was said before - it seems like this is a MACHINE_FEATURE. I know you will address this in V2.
Quoted 7 lines
Signed-off-by Derek Foreman <[email protected]>[javier: Extended commit message and set default preference to -1]Signed-off-by Javier Martinez Canillas <[email protected]>---
README | 9 ++
Please split this change in another patch.
Quoted 27 lines
..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++ ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++ .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115 +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95 +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++ 7 files changed, 394 insertions(+) create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bbREADME +1
-0@@ -25,6 +25,7 @@ Contents: 2.K. Boot to U-Boot 2.L. Image with Initramfs 2.M. Device tree support + 2.O. Graphics stack 3. Extra apps 3.A. omxplayer 4. Source code and mirrors
README kernels. · line 205
Quoted 10 lines
README +7
-0@@ -195,6 +196,14 @@ kernels. NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for older kernel versions. +2.O. Graphic stacks +=================== +The Raspberry Pi boards can use one of two graphics stacks: The userland +user-space driver or the vc4 DRM/KMS kernel driver. By default userland +is used since the vc4 is still experimental. But this can be changed by +setting the following in the local.conf +DISTRO_FEATURES_append = " vc4-gfx"
Userland / binaries : vc-*. I'm wondering if we should actually define a feature for this or just let the users configure the providers as they want. We do this for vc-* / userland. We don't have a feature to switch from binaries to userland or so.
recipes-kernel/linux/linux-raspberrypi_4.1.bb
Quoted 404 lines
README +1
-0+ 3. Extra apps =============recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch new file +48
-0@@ -0,0 +1,48 @@ +From 5908700d3cb88114002aa66f920e91961ebe91e4 Mon Sep 17 00:00:00 2001 +From: Derek Foreman <[email protected]> +Date: Fri, 24 Jul 2015 01:58:31 +0200 +Subject: [PATCH 1/5] ARM: bcm2709_defconfig: Enable config options for vc4 + support + +Add the needed Kconfig symbols to build Eric Anholt's WIP kernel +4.1 Linux kernel with vc4 dri/kms/3d support. Also increase CMA +size from 5 MiB to 256 MiB as that is needed by the driver. + +Signed-off-by: Derek Foreman <[email protected]> +--- + arch/arm/configs/bcm2709_defconfig | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index a3067bfb610f..7891bb17df57 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -39,6 +39,7 @@ CONFIG_MAC_PARTITION=y + CONFIG_CFQ_GROUP_IOSCHED=y + CONFIG_ARCH_BCM2709=y + CONFIG_BCM2709_DT=y ++# CONFIG_VDSO is not set + # CONFIG_CACHE_L2X0 is not set + CONFIG_SMP=y + CONFIG_HAVE_ARM_ARCH_TIMER=y +@@ -388,7 +389,7 @@ CONFIG_NFC_PN533=m + CONFIG_DEVTMPFS=y + CONFIG_DEVTMPFS_MOUNT=y + CONFIG_DMA_CMA=y +-CONFIG_CMA_SIZE_MBYTES=5 ++CONFIG_CMA_SIZE_MBYTES=256 + CONFIG_BLK_DEV_LOOP=y + CONFIG_BLK_DEV_CRYPTOLOOP=m + CONFIG_BLK_DEV_DRBD=m +@@ -771,6 +772,8 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_FB=y ++CONFIG_DRM=y ++CONFIG_DRM_VC4=y + CONFIG_FB_BCM2708=y + CONFIG_FB_SSD1307=m + # CONFIG_BACKLIGHT_GENERIC is not set +-- +2.4.3 +recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch new file +85
-0@@ -0,0 +1,85 @@ +From 8882728be24f35f81da4558c84fb18658e23fcc9 Mon Sep 17 00:00:00 2001 +From: Derek Foreman <[email protected]> +Date: Wed, 27 May 2015 13:20:21 -0500 +Subject: [PATCH 2/5] ARM: dts: Fix i2c for bcm2709 RPI2 B board + +Fix up device tree and i2c setup for rpi2 + +Signed-off-by: Derek Foreman <[email protected] +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 2 +- + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 6 ++++++ + drivers/i2c/busses/i2c-bcm2708.c | 6 +++++- + 3 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index ccf01a568cb6..15277d2765bb 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -155,7 +155,7 @@ + }; + + i2c2: i2c@7e805000 { +- compatible = "brcm,bcm2835-i2c"; ++ compatible = "brcm,bcm2708-i2c"; + reg = <0x7e805000 0x1000>; + interrupts = <2 21>; + clocks = <&clk_i2c>; +diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +index 8aaaf1fb7143..712ca455cc46 100644 +--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts ++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +@@ -11,6 +11,7 @@ + spi0 = &spi0; + i2c0 = &i2c0; + i2c1 = &i2c1; ++ i2c2 = &i2c2; + i2s = &i2s; + gpio = &gpio; + intc = &intc; +@@ -94,6 +95,11 @@ + clock-frequency = <100000>; + }; + ++&i2c2 { ++ pinctrl-names = "default"; ++ clock-frequency = <100000>; ++}; ++ + &i2s { + #sound-dai-cells = <0>; + pinctrl-names = "default"; +diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c +index 8773203b34eb..2054ff44e744 100644 +--- a/drivers/i2c/busses/i2c-bcm2708.c ++++ b/drivers/i2c/busses/i2c-bcm2708.c +@@ -109,6 +109,7 @@ static void bcm2708_i2c_init_pinmode(int id) + #define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3)) + + int pin; ++ + u32 *gpio = ioremap(GPIO_BASE, SZ_16K); + + BUG_ON(id != 0 && id != 1); +@@ -382,7 +383,7 @@ static int bcm2708_i2c_probe(struct platform_device *pdev) + goto out_clk_put; + } + +- if (!pdev->dev.of_node) ++ if (pdev->id < 2) + bcm2708_i2c_init_pinmode(pdev->id); + + bi = kzalloc(sizeof(*bi), GFP_KERNEL); +@@ -407,6 +408,9 @@ static int bcm2708_i2c_probe(struct platform_device *pdev) + case 1: + adap->class = I2C_CLASS_DDC; + break; ++ case 2: ++ adap->class = I2C_CLASS_DDC; ++ break; + default: + dev_err(&pdev->dev, "can only bind to BSC 0 or 1\n"); + err = -ENXIO; +-- +2.4.3 +recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch new file +115
-0@@ -0,0 +1,115 @@ +From e877e76e5d723eb14bce9c58af40b962eced02bf Mon Sep 17 00:00:00 2001 +From: Derek Foreman <[email protected]> +Date: Thu, 2 Jul 2015 11:19:54 -0500 +Subject: [PATCH 3/5] drm/vc4: Use the fbdev_cma helpers + +Keep the fbdev_cma pointer around so we can use it on hotplog and close +to ensure the frame buffer console is in a useful state. + +Signed-off-by: Derek Foreman <[email protected]> +--- + drivers/gpu/drm/vc4/vc4_drv.c | 15 +++++++++++++++ + drivers/gpu/drm/vc4/vc4_drv.h | 2 ++ + drivers/gpu/drm/vc4/vc4_kms.c | 18 +++++++++++++++--- + 3 files changed, 32 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index 5c023ba4f6ad..04f1f738ebc2 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -13,6 +13,7 @@ + #include <linux/module.h> + #include <linux/of_platform.h> + #include <linux/platform_device.h> ++#include <drm/drm_fb_cma_helper.h> + + #include "uapi/drm/vc4_drm.h" + #include "vc4_drv.h" +@@ -78,6 +79,11 @@ vc4_drm_load(struct drm_device *dev, unsigned long flags) + + static int vc4_drm_unload(struct drm_device *dev) + { ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ ++ if (vc4->fbdev) ++ drm_fbdev_cma_fini(vc4->fbdev); ++ + drm_mode_config_cleanup(dev); + + component_unbind_all(dev->dev, dev); +@@ -93,6 +99,14 @@ static void vc4_drm_preclose(struct drm_device *dev, struct drm_file *file) + vc4_cancel_page_flip(crtc, file); + } + ++static void vc4_lastclose(struct drm_device *dev) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ ++ if (vc4->fbdev) ++ drm_fbdev_cma_restore_mode(vc4->fbdev); ++} ++ + static const struct file_operations vc4_drm_fops = { + .owner = THIS_MODULE, + .open = drm_open, +@@ -123,6 +137,7 @@ static struct drm_driver vc4_drm_driver = { + DRIVER_PRIME), + .load = vc4_drm_load, + .unload = vc4_drm_unload, ++ .lastclose = vc4_lastclose, + .set_busid = drm_platform_set_busid, + .preclose = vc4_drm_preclose, + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index 13b475785ca0..d460bb3e6b64 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -81,6 +81,8 @@ struct vc4_dev { + } hangcheck; + + struct semaphore async_modeset; ++ ++ struct drm_fbdev_cma *fbdev; + }; + + static inline struct vc4_dev * +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c +index acfd1b23ab4a..cb18d8f0e387 100644 +--- a/drivers/gpu/drm/vc4/vc4_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_kms.c +@@ -155,7 +155,17 @@ static int vc4_atomic_commit(struct drm_device *dev, + return 0; + } + ++static void vc4_output_poll_changed(struct drm_device *dev) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ ++ if (vc4->fbdev) ++ drm_fbdev_cma_hotplug_event(vc4->fbdev); ++} ++ ++ + static const struct drm_mode_config_funcs vc4_mode_funcs = { ++ .output_poll_changed = vc4_output_poll_changed, + .atomic_check = drm_atomic_helper_check, + .atomic_commit = vc4_atomic_commit, + .fb_create = drm_fb_cma_create, +@@ -214,9 +224,11 @@ vc4_kms_load(struct drm_device *dev) + + drm_mode_config_reset(dev); + +- drm_fbdev_cma_init(dev, 32, +- dev->mode_config.num_crtc, +- dev->mode_config.num_connector); ++ vc4->fbdev = drm_fbdev_cma_init(dev, 32, ++ dev->mode_config.num_crtc, ++ dev->mode_config.num_connector); ++ if (IS_ERR(vc4->fbdev)) ++ vc4->fbdev = NULL; + + drm_kms_helper_poll_init(dev); + +-- +2.4.3 +recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch new file +26
-0@@ -0,0 +1,26 @@ +From 4388ed0f2d66399a6ad3133b91bd438cdb25e37b Mon Sep 17 00:00:00 2001 +From: Derek Foreman <[email protected]> +Date: Thu, 2 Jul 2015 11:20:21 -0500 +Subject: [PATCH 4/5] drm/vc4: Allow vblank to be disabled + +Signed-off-by: Derek Foreman <[email protected]> +--- + drivers/gpu/drm/vc4/vc4_kms.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c +index cb18d8f0e387..1473df9ef4a1 100644 +--- a/drivers/gpu/drm/vc4/vc4_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_kms.c +@@ -218,6 +218,8 @@ vc4_kms_load(struct drm_device *dev) + dev->mode_config.funcs = &vc4_mode_funcs; + dev->mode_config.preferred_depth = 24; + ++ dev->vblank_disable_allowed = true; ++ + ret = vc4_init_modeset_objects(dev); + if (ret) + goto fail; +-- +2.4.3 +recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch new file +95
-0@@ -0,0 +1,95 @@ +From 844a32b8444a38b6378c98ad4a4b8b8c3522c020 Mon Sep 17 00:00:00 2001 +From: Derek Foreman <[email protected]> +Date: Fri, 24 Jul 2015 03:29:15 +0200 +Subject: [PATCH 5/5] drm/vc4: Disable KMS operations + +The vc4 driver KMS implementation still has some issues so +for now skip most of the codepaths to avoid system hangs. + +Signed-off-by: Derek Foreman <[email protected]> +--- + drivers/gpu/drm/drm_atomic_helper.c | 2 +- + drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- + drivers/gpu/drm/vc4/vc4_hdmi.c | 6 ++++-- + drivers/gpu/drm/vc4/vc4_kms.c | 1 + + 4 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c +index 1d2ca52530d5..ba7f355bcced 100644 +--- a/drivers/gpu/drm/drm_atomic_helper.c ++++ b/drivers/gpu/drm/drm_atomic_helper.c +@@ -1876,7 +1876,7 @@ void drm_atomic_helper_connector_dpms(struct drm_connector *connector, + struct drm_connector *tmp_connector; + int ret; + bool active = false; +- ++return; + if (mode != DRM_MODE_DPMS_ON) + mode = DRM_MODE_DPMS_OFF; + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index f9960ac34fd7..1b85355baef0 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -91,7 +91,7 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) + ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? 1 : 0)); + u32 format = PV_CONTROL_FORMAT_24; + bool debug_dump_regs = false; +- ++return; + if (debug_dump_regs) { + DRM_INFO("CRTC %d regs before:\n", drm_crtc_index(crtc)); + vc4_crtc_dump_regs(vc4_crtc); +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index 8c41fdc4ef2e..2a212b08e108 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -273,7 +273,7 @@ vc4_set_pixel_clock(struct vc4_dev *vc4, u32 clock) + { + u32 packet[2]; + int ret; +- ++return; + packet[0] = 8; /* Pixel clock. */ + packet[1] = clock; + +@@ -295,6 +295,7 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder, + bool debug_dump_regs = false; + bool hsync_pos = !(mode->flags & DRM_MODE_FLAG_NHSYNC); + bool vsync_pos = !(mode->flags & DRM_MODE_FLAG_NVSYNC); ++return; + u32 vactive = (mode->vdisplay >> + ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? 1 : 0)); + u32 verta = (VC4_SET_FIELD(mode->vsync_end - mode->vsync_start, +@@ -405,7 +406,7 @@ static void vc4_hdmi_encoder_disable(struct drm_encoder *encoder) + { + struct drm_device *dev = encoder->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); +- ++return; + HDMI_WRITE(VC4_HDMI_TX_PHY_RESET_CTL, 0xf << 16); + } + +@@ -413,6 +414,7 @@ static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder) + { + struct drm_device *dev = encoder->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); ++return; + + HDMI_WRITE(VC4_HDMI_TX_PHY_RESET_CTL, 0); + } +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c +index 1473df9ef4a1..5ddc5d9beaae 100644 +--- a/drivers/gpu/drm/vc4/vc4_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_kms.c +@@ -144,6 +144,7 @@ static int vc4_atomic_commit(struct drm_device *dev, + * current layout. + */ + ++ async=0; + if (async) { + vc4_queue_seqno_cb(dev, &c->cb, wait_seqno, + vc4_atomic_complete_commit_seqno_cb); +-- +2.4.3 +recipes-kernel/linux/linux-raspberrypi_4.1.bb +0
-0
We will have to rename this because the linux-raspberrypi recipes are known from the raspberrypi linux fork. So maybe havinf something like:
linux-raspberrypi-vc4?
Quoted 10 lines
new file mode 100644
index 000000000000..a8e1863ddf2crecipes-kernel/linux/linux-raspberrypi_4.1.bb new file +5
-0@@ -0,0 +1,16 @@ +LINUX_VERSION ?= "4.1.0" + +# Don't make this the default kernel, right now it is only for testing purposes +DEFAULT_PREFERENCE = "-1" +
recipes-kernel/linux/linux-raspberrypi_4.1.bb line 15
Quoted 10 lines
recipes-kernel/linux/linux-raspberrypi_4.1.bb new file +10
-0+SRCREV = "07009cab090ade3dd180e8a55d590b1a00072eed" +SRC_URI = "git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2" + +# Add patches needed for the vc4 driver but only if enabled as distro feature since are experimental +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch', '', d)}" +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch', '', d)}" +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0003-drm-vc4-Use-the-fbdev_cma-helpers.patch', '', d)}" +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0004-drm-vc4-Allow-vblank-to-be-disabled.patch', '', d)}" +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0005-drm-vc4-Disable-KMS-operations.patch', '', d)}" +
I don't see the need of the selective inclusion as this fork is a vc4 one. So, as long as you select this provider, you will need the patches.
Quoted 4 lines
recipes-kernel/linux/linux-raspberrypi_4.1.bb new file +1
-1+require linux-raspberrypi.inc --2.4.3
--
Andrei Gherzan
Re: [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
Hello Andrei,
Quoted 12 lines · Andrei Gherzan
Hi,
Quoted 9 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
This adds Eric Anholt's WIP kernel with dri/kms/3d support for the GPU on the rpi2. Adding a recipe that tracks this kernel, will make it easier to test this setup.
This recipe should only used for testing purposes for now, so it will not be set as the default.
Quoted 7 lines
Quoted 3 lines
The kernel will be choosen though if the "vc4-gfx" feature has been added to the the
DISTRO_FEATURESvariable.It was said before - it seems like this is a
MACHINE_FEATURE. I know you will address this in V2.
Yes, but since it was decided to add a new kernel recipe for the linux vc4 kernel and changing the default providers manually aided by a comment, the "vc4-gfx" feature may not be necessary and I could drop it in v2. If found to still be necessary, I'll add it as a MACHINE_FEATURE though.
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
Quoted 19 lines · Javier Martinez Canillas
Hello Andrei,
Quoted 16 lines · Andrei Gherzan
Hi,
Quoted 12 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
This adds Eric Anholt's WIP kernel with dri/kms/3d support for the GPU on the rpi2. Adding a recipe that tracks this kernel, will make it easier to test this setup.
This recipe should only used for testing purposes for now, so it will not be set as the default.
The kernel will be choosen though if the "vc4-gfx" feature has been added to the the
DISTRO_FEATURESvariable.
Quoted 9 lines
Quoted 3 lines
It was said before - it seems like this is a
MACHINE_FEATURE. I know you will address this in V2.Yes, but since it was decided to add a new kernel recipe for the linux vc4 kernel and changing the default providers manually aided by a comment, the "vc4-gfx" feature may not be necessary and I could drop it in v2. If found to still be necessary, I'll add it as a
MACHINE_FEATUREthough.
Yup. Let's have this as the first step. And we will see if additional bits are needed.
--
Andrei Gherzan
PATCH 5/5 rpi-default-providers: Switch providers according to used gfx stack
In reply to Javier Martinez CanillasFrom: Derek Foreman <[email protected]>
The Raspberry Pi boards can use one of two graphics stacks: The "userland" user-space driver or the VC4 drm/kms kernel driver. This patch allows the user to choose if the VC4 driver has to be used instead and set the right preferred providers for that case.
---
conf/machine/include/rpi-default-providers.inc | 8 ++++---- conf/machine/include/rpi-default-versions.inc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
conf/machine/include/rpi-default-providers.inc +4 -4
@@ -3,8 +3,8 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi" PREFERRED_PROVIDER_u-boot = "u-boot-rpi" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" -PREFERRED_PROVIDER_virtual/egl ?= "userland" -PREFERRED_PROVIDER_virtual/libgles2 ?= "userland" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl" -PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}" +PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}" PREFERRED_PROVIDER_jpeg = "jpeg"
conf/machine/include/rpi-default-versions.inc +1 -1
@@ -1,3 +1,3 @@ # RaspberryPi BSP default versions -PREFERRED_VERSION_linux-raspberrypi ?= "3.18.%" +PREFERRED_VERSION_linux-raspberrypi ?= "${@bb.utils.contains("DISTRO_FEATURES", "vc4-gfx", "4.1.%", "3.18.%", d)}"
Signature · 1 line
2.4.3
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Quoted 46 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
The Raspberry Pi boards can use one of two graphics stacks: The "userland" user-space driver or the VC4 drm/kms kernel driver. This patch allows the user to choose if the VC4 driver has to be used instead and set the right preferred providers for that case.
Signed-off-by Derek Foreman <[email protected]>[javier: Extend commit msg and made conditional instead removing userland]Signed-off-by Javier Martinez Canillas <[email protected]>---
conf/machine/include/rpi-default-providers.inc | 8 ++++---- conf/machine/include/rpi-default-versions.inc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)conf/machine/include/rpi-default-providers.inc +4
-4@@ -3,8 +3,8 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi" PREFERRED_PROVIDER_u-boot = "u-boot-rpi" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" -PREFERRED_PROVIDER_virtual/egl ?= "userland" -PREFERRED_PROVIDER_virtual/libgles2 ?= "userland" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl" -PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}" +PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}" PREFERRED_PROVIDER_jpeg = "jpeg"conf/machine/include/rpi-default-versions.inc +1
-2@@ -1,3 +1,3 @@ # RaspberryPi BSP default versions -PREFERRED_VERSION_linux-raspberrypi ?= "3.18.%" +PREFERRED_VERSION_linux-raspberrypi ?= "${@bb.utils.contains("DISTRO_FEATURES", "vc4-gfx", "4.1.%", "3.18.%", d)}" --2.4.3
Quoted 1 line
--
This patch series is an exciting starter but I think it is incomplete:
Without further configuration mesa simply builds swrast which is not what we want. We need some '--with-gallium-drivers=vc4' right? [1]
Andreas
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hello Andreas,
Quoted 48 lines · Andreas Müller
Quoted 46 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
The Raspberry Pi boards can use one of two graphics stacks: The "userland" user-space driver or the VC4 drm/kms kernel driver. This patch allows the user to choose if the VC4 driver has to be used instead and set the right preferred providers for that case.
Signed-off-by Derek Foreman <[email protected]>[javier: Extend commit msg and made conditional instead removing userland]Signed-off-by Javier Martinez Canillas <[email protected]>---
conf/machine/include/rpi-default-providers.inc | 8 ++++---- conf/machine/include/rpi-default-versions.inc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)conf/machine/include/rpi-default-providers.inc +4
-4@@ -3,8 +3,8 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi" PREFERRED_PROVIDER_u-boot = "u-boot-rpi" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" -PREFERRED_PROVIDER_virtual/egl ?= "userland" -PREFERRED_PROVIDER_virtual/libgles2 ?= "userland" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl" -PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}" +PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}" PREFERRED_PROVIDER_jpeg = "jpeg"conf/machine/include/rpi-default-versions.inc +1
-2@@ -1,3 +1,3 @@ # RaspberryPi BSP default versions -PREFERRED_VERSION_linux-raspberrypi ?= "3.18.%" +PREFERRED_VERSION_linux-raspberrypi ?= "${@bb.utils.contains("DISTRO_FEATURES", "vc4-gfx", "4.1.%", "3.18.%", d)}" --2.4.3
Quoted 5 lines
Quoted 1 line
--
This patch series is an exciting starter but I think it is incomplete:
Without further configuration mesa simply builds swrast which is not what we want. We need some '--with-gallium-drivers=vc4' right? [1]
Yes, this is only the kernel changes. I'm testing with more patches on top for mesa and libdrm [0]. I always find hard to draw a line between a BSP and a distro layer so I didn't know if I should include those in the series or not. But you are right and probably at least the GALLIUMDRIVERSTIZEN vc4 append should be in a mesa .bbappend. I'll do that when posting a v2 once I get more feedback from others.
Quoted 4 lines
Andreas
[0]: https://github.com/martinezjavier/meta-raspberrypi/commits/rpi2-vc4-gfx
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Quoted 69 lines · Javier Martinez Canillas
Hello Andreas,
Quoted 48 lines · Andreas Müller
Quoted 46 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
The Raspberry Pi boards can use one of two graphics stacks: The "userland" user-space driver or the VC4 drm/kms kernel driver. This patch allows the user to choose if the VC4 driver has to be used instead and set the right preferred providers for that case.
Signed-off-by Derek Foreman <[email protected]>[javier: Extend commit msg and made conditional instead removing userland]Signed-off-by Javier Martinez Canillas <[email protected]>---
conf/machine/include/rpi-default-providers.inc | 8 ++++---- conf/machine/include/rpi-default-versions.inc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)conf/machine/include/rpi-default-providers.inc +4
-4@@ -3,8 +3,8 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi" PREFERRED_PROVIDER_u-boot = "u-boot-rpi" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" -PREFERRED_PROVIDER_virtual/egl ?= "userland" -PREFERRED_PROVIDER_virtual/libgles2 ?= "userland" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl" -PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}" +PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}" PREFERRED_PROVIDER_jpeg = "jpeg"conf/machine/include/rpi-default-versions.inc +1
-2@@ -1,3 +1,3 @@ # RaspberryPi BSP default versions -PREFERRED_VERSION_linux-raspberrypi ?= "3.18.%" +PREFERRED_VERSION_linux-raspberrypi ?= "${@bb.utils.contains("DISTRO_FEATURES", "vc4-gfx", "4.1.%", "3.18.%", d)}" --2.4.3
Quoted 5 lines
Quoted 1 line
--
This patch series is an exciting starter but I think it is incomplete:
Without further configuration mesa simply builds swrast which is not what we want. We need some '--with-gallium-drivers=vc4' right? [1]Yes, this is only the kernel changes. I'm testing with more patches on top for mesa and libdrm [0]. I always find hard to draw a line between a BSP and a distro layer so I didn't know if I should include those in the series or not. But you are right and probably at least the GALLIUMDRIVERSTIZEN vc4 append should be in a mesa .bbappend. I'll do that when posting a v2 once I get more feedback from others.
Quoted 4 lines
Andreas
Quoted 7 lines
[0]: https://github.com/martinezjavier/meta-raspberrypi/commits/rpi2-vc4-gfx
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
Another thing: With witch version of RasPi did you test. With V2 I get
[ 1.342175] [drm:vc4_hdmi_bind] *ERROR* Failed to get ddc i2c adapter by node [ 1.349359] vc4-drm soc:vc4@0x7e4c0000: failed to bind
3f902000.brcm,vc4-hdmi (ops vc4_hdmi_ops): -517
Andreas
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hello Andreas,
On 08/04/2015 06:55 PM, Andreas Müller wrote:
[snip]
Quoted 2 lines
Another thing: With witch version of RasPi did you test. With V2 I get
I also tested on a RPI2 model B.
Quoted 4 lines
[ 1.342175] [drm:vc4_hdmi_bind] *ERROR* Failed to get ddc i2c adapter by node [ 1.349359] vc4-drm soc:vc4@0x7e4c0000: failed to bind3f902000.brcm,vc4-hdmi (ops
vc4_hdmi_ops): -517
Yes, the problem is that you are missing mask_gpu_interrupt0=0x400 in your /boot/config.txt as explained in [0]. That's why patch 2/5 added a config option for this. Add the following to your conf/local.conf and should work:
MASK_GPU_INTERRUPT = "0x400"
I also needed to add DISABLE_OVERSCAN = "1"
Quoted 2 lines
Andreas
[0]: http://dri.freedesktop.org/wiki/VC4/
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
In reply to Javier Martinez CanillasQuoted 28 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
The Raspberry Pi boards can use one of two graphics stacks: The "userland" user-space driver or the VC4 drm/kms kernel driver. This patch allows the user to choose if the VC4 driver has to be used instead and set the right preferred providers for that case.
Signed-off-by Derek Foreman <[email protected]>[javier: Extend commit msg and made conditional instead removing userland]Signed-off-by Javier Martinez Canillas <[email protected]>---
conf/machine/include/rpi-default-providers.inc | 8 ++++---- conf/machine/include/rpi-default-versions.inc | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)conf/machine/include/rpi-default-providers.inc +0
-0@@ -3,8 +3,8 @@PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi" PREFERRED_PROVIDER_u-boot = "u-boot-rpi" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
conf/machine/include/rpi-default-providers.inc
Quoted 8 lines
conf/machine/include/rpi-default-providers.inc +4
-4-PREFERRED_PROVIDER_virtual/egl ?= "userland" -PREFERRED_PROVIDER_virtual/libgles2 ?= "userland" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl" -PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}" +PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}”
who defines the distro feature ?
Quoted 18 lines
PREFERRED_PROVIDER_jpeg= "jpeg"conf/machine/include/rpi-default-versions.inc +1
-2@@ -1,3 +1,3 @@ # RaspberryPi BSP default versions -PREFERRED_VERSION_linux-raspberrypi ?= "3.18.%" +PREFERRED_VERSION_linux-raspberrypi ?= "${@bb.utils.contains("DISTRO_FEATURES", "vc4-gfx", "4.1.%", "3.18.%", d)}" --2.4.3
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hello Khem,
Quoted 30 lines · Khem Raj
Quoted 30 lines · Javier Martinez Canillas
From: Derek Foreman <[email protected]>
The Raspberry Pi boards can use one of two graphics stacks: The "userland" user-space driver or the VC4 drm/kms kernel driver. This patch allows the user to choose if the VC4 driver has to be used instead and set the right preferred providers for that case.
Signed-off-by Derek Foreman <[email protected]>[javier: Extend commit msg and made conditional instead removing userland]Signed-off-by Javier Martinez Canillas <[email protected]>---
conf/machine/include/rpi-default-providers.inc | 8 ++++---- conf/machine/include/rpi-default-versions.inc | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)conf/machine/include/rpi-default-providers.inc +0
-0@@ -3,8 +3,8 @@PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi" PREFERRED_PROVIDER_u-boot = "u-boot-rpi" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
conf/machine/include/rpi-default-providers.inc +0
-2-PREFERRED_PROVIDER_virtual/egl ?= "userland" -PREFERRED_PROVIDER_virtual/libgles2 ?= "userland"
Quoted 10 lines
conf/machine/include/rpi-default-providers.inc
Quoted 6 lines
conf/machine/include/rpi-default-providers.inc +4
-2-PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl" -PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'userland', d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}" +PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'mesa', 'mesa-gl', d)}”who defines the distro feature ?
Distro features AFAICT are user defined options, you can for example have the following in your conf/local.conf:
DISTRO_FEATURES_append = " vc4-gfx"
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Quoted 8 lines · Javier Martinez Canillas
Quoted 3 lines
who defines the distro feature ?
Distro features AFAICT are user defined options, you can for example have the following in your
conf/local.conf:
DISTRO_FEATURES_append= " vc4-gfx"
I wasnt trying to learn about what DISTRO_FEATURES are, I was trying to draw attention to the fact that meta-rpi being a BSP layer was trying to define a lot more than a BSP layer is supposed to do. So if its a distro feature, I would like it to work as expected on other machines besides raspberrypi. If thats not applicable then we should rethink if it could be folded into MACHINE_FEATURES if it needs to be a distro feature then propose it to OE-Core, at the very least document them in README of this layer. Or separate it out into a common layer which rpi BSPs will depend on.
but think beyond single machine when deciding on adding distro features, there are distros based on OE which support multiple machines
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hello Khem,
Quoted 6 lines · Khem Raj
Quoted 4 lines · Javier Martinez Canillas
Quoted 3 lines
who defines the distro feature ?
Quoted 7 lines
Quoted 4 lines
Distro features AFAICT are user defined options, you can for example have the following in your
conf/local.conf:
DISTRO_FEATURES_append= " vc4-gfx"I wasnt trying to learn about what
DISTRO_FEATURESare, I was trying to draw attention to the fact that meta-rpi being a BSP layer
Ok, sorry. But I believe it's more productive to just do suggestions instead of asking rhetorical questions that can be misunderstood :-)
Quoted 4 lines
was trying to define a lot more than a BSP layer is supposed to do. So if its a distro feature, I would like it to work as expected on other machines besides raspberrypi. If thats not applicable then we should rethink if it could be folded into
MACHINE_FEATURESif it needs to be
Yes, I in fact was not sure if it should be a distro or machine feature and then decided on the former because there is more than the kernel to make it work like changing mesa configure options. But as mentioned to Andrea Müller, probably we should ship a mesa .bbappend for this in the BSP so I agree that a MACHINE_FEATURE will make more sense.
Quoted 7 lines
a distro feature then propose it to OE-Core, at the very least document them in README of this layer. Or separate it out into a common layer which rpi BSPs will depend on.
but think beyond single machine when deciding on adding distro features, there are distros based on OE which support multiple machines
Yes, I know that there are distros than support more tha one machine but I thought it was OK to have machine specific DISTRO_FEATURES but seems I was wrong.
Another option is to add a different machine (i.e: raspberrypi2-vc4.conf) so instead of changing the default provider based on a feature, it can be set based on the machine. Petter Mabäcker asked to have a different BB recipe for the vc4 kernel so the conditional include of the vc4 patches will not be needed on the kernel recipe either.
What do you think of this option?
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Quoted 5 lines · Javier Martinez Canillas
Yes, I in fact was not sure if it should be a distro or machine feature and then decided on the former because there is more than the kernel to make it work like changing mesa configure options. But as mentioned to Andrea Müller, probably we should ship a mesa .bbappend for this in the BSP so I agree that a
MACHINE_FEATUREwill make more sense.
Suggestions:
* Mesa: A simple append with
PACKAGECONFIG_append_rpi += " gallium"GALLIUMDRIVERS_rpi = "vc4"
would do. If you check mesa.inc in oe-core others (intel) do similar (we might have to wait for a more recent mesa expected in September).
* kernel: have different name e.g linux-raspberrypi-vc4
The selection is done in this layer by changing default providers. In a first step this could be done manually - aided by a helpful comment.
Andreas
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hello Andreas,
Thanks a lot for your feedback.
Quoted 7 lines · Andreas Müller
Quoted 5 lines · Javier Martinez Canillas
Yes, I in fact was not sure if it should be a distro or machine feature and then decided on the former because there is more than the kernel to make it work like changing mesa configure options. But as mentioned to Andrea Müller, probably we should ship a mesa .bbappend for this in the BSP so I agree that a
MACHINE_FEATUREwill make more sense.
Quoted 8 lines
Suggestions:
* Mesa: A simple append with
PACKAGECONFIG_append_rpi+= " gallium"GALLIUMDRIVERS_rpi= "vc4"would do. If you check mesa.inc in oe-core others (intel) do similar
That sounds good to me.
Quoted 2 lines
(we might have to wait for a more recent mesa expected in September).
Why do you think we would have to wait for a newer mesa? AFAICT the mesa version in Fido (10.4.4) already has vc4 support [0]. Although we have been using mesa master so I should test how well 10.4 works. AFAIK Derek picked a specific mesa sha1 that Eric's vc4 DRM driver was known to work.
But if there is a meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend then we can use a newer mesa in tizen-distro without the need of having patches on top of meta-raspberrypi as we do now.
Quoted 2 lines
* kernel: have different name e.g linux-raspberrypi-vc4
Yes, that seems to be what most people agree on. I'll change it in v2.
Quoted 3 lines
The selection is done in this layer by changing default providers. In a first step this could be done manually - aided by a helpful comment.
Agreed.
Quoted 2 lines
Andreas
[0]: http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/vc4?h=10.4
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Quoted 23 lines · Javier Martinez Canillas
Hello Andreas,
Thanks a lot for your feedback.
Quoted 7 lines · Andreas Müller
Quoted 5 lines · Javier Martinez Canillas
Yes, I in fact was not sure if it should be a distro or machine feature and then decided on the former because there is more than the kernel to make it work like changing mesa configure options. But as mentioned to Andrea Müller, probably we should ship a mesa .bbappend for this in the BSP so I agree that a
MACHINE_FEATUREwill make more sense.Quoted 8 lines
Suggestions:
* Mesa: A simple append with
PACKAGECONFIG_append_rpi+= " gallium"GALLIUMDRIVERS_rpi= "vc4"would do. If you check mesa.inc in oe-core others (intel) do similar
That sounds good to me.
Quoted 7 lines
Quoted 2 lines
(we might have to wait for a more recent mesa expected in September).
Why do you think we would have to wait for a newer mesa? AFAICT the mesa version in Fido (10.4.4) already has vc4 support [0]. Although we have been using mesa master so I should test how well 10.4 works. AFAIK Derek picked a specific mesa sha1 that Eric's vc4 DRM driver was known to work.
Just started an image based upon oe-core's master sources yet - no EGL/GLES tests so far. This weekend I will try som EGL/GLES and am really excited to see how far I get with my first open source graphic stack (am so tired of this blob crap)...
Andreas
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hello Andreas,
Quoted 28 lines · Andreas Müller
Quoted 26 lines · Javier Martinez Canillas
Hello Andreas,
Thanks a lot for your feedback.
Quoted 7 lines · Andreas Müller
Quoted 5 lines · Javier Martinez Canillas
Yes, I in fact was not sure if it should be a distro or machine feature and then decided on the former because there is more than the kernel to make it work like changing mesa configure options. But as mentioned to Andrea Müller, probably we should ship a mesa .bbappend for this in the BSP so I agree that a
MACHINE_FEATUREwill make more sense.Quoted 8 lines
Suggestions:
* Mesa: A simple append with
PACKAGECONFIG_append_rpi+= " gallium"GALLIUMDRIVERS_rpi= "vc4"would do. If you check mesa.inc in oe-core others (intel) do similar
That sounds good to me.
Quoted 2 lines
(we might have to wait for a more recent mesa expected in September).
Quoted 9 lines
Quoted 4 lines
Why do you think we would have to wait for a newer mesa? AFAICT the mesa version in Fido (10.4.4) already has vc4 support [0]. Although we have been using mesa master so I should test how well 10.4 works. AFAIK Derek picked a specific mesa sha1 that Eric's vc4 DRM driver was known to work.
Just started an image based upon oe-core's master sources yet - no EGL/GLES tests so far. This weekend I will try som EGL/GLES and am really excited to see how far I get with my first open source graphic stack (am so tired of this blob crap)...
Awesome, thanks a lot for all your feedback, suggestions and tests!
Quoted 2 lines
Andreas
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
In reply to Javier Martinez CanillasQuoted 12 lines · Javier Martinez Canillas
Hello Khem,
Quoted 9 lines · Khem Raj
Quoted 7 lines · Javier Martinez Canillas
Quoted 3 lines
who defines the distro feature ?
Distro features AFAICT are user defined options, you can for example have the following in your
conf/local.conf:
Quoted 13 lines
Quoted 4 lines
Quoted 1 line
DISTRO_FEATURES_append= " vc4-gfx"I wasnt trying to learn about what
DISTRO_FEATURESare, I was trying to draw attention to the fact that meta-rpi being a BSP layerOk, sorry. But I believe it's more productive to just do suggestions instead of asking rhetorical questions that can be misunderstood :-)
Quoted 4 lines
was trying to define a lot more than a BSP layer is supposed to do. So if its a distro feature, I would like it to work as expected on other machines besides raspberrypi. If thats not applicable then we should rethink if it could be folded into
MACHINE_FEATURESif it needs to be
Khem definitely has a very good point. Maybe his way of putting it in words was not that productive. But the core idea was definitely right: I don't want rpi layer to introduce distro features.
--
Andrei Gherzan
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Quoted 3 lines
Khem definitely has a very good point. Maybe his way of putting it in words was not that productive. But the core idea was definitely right: I don't want rpi layer to introduce distro features.
Agreed but I still have issues make the changes work
What I have done to test:
1. addMASK_GPU_INTERRUPT = "0x400"DISTRO_FEATURES_append = " vc4-gfx"
to my local.conf
2. put [1] on top of the VC4 patches sent (this is a WIP patch not yet finished)
3. tested running X11
Question: What setting does the trick getting vc4 driver created by mesa doing the OpenGL work. I see only swrast which is bulls...
Andreas
[1] https://github.com/schnitzeltony/meta-raspberrypi/commit/4a626add25c1d13dfa6d22c61f9804764f49301a
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hello Andreas,
Quoted 11 lines · Andreas Müller
Quoted 3 lines
Khem definitely has a very good point. Maybe his way of putting it in words was not that productive. But the core idea was definitely right: I don't want rpi layer to introduce distro features.
Agreed but I still have issues make the changes work
What I have done to test:
1. add
MASK_GPU_INTERRUPT= "0x400"DISTRO_FEATURES_append= " vc4-gfx"
Quoted 6 lines
to my local.conf
2. put [1] on top of the VC4 patches sent (this is a WIP patch not yet finished)
3. tested running X11
I did only test with Weston since that is what Tizen uses and not with X11. I'll make sure to test with X11 and also include a mesa_%.bbappend for v2.
Quoted 3 lines
Question: What setting does the trick getting vc4 driver created by mesa doing the OpenGL work. I see only swrast which is bulls...
I'm not really a graphics person so I'll let Derek to answer this. He is in fact the author of most of these patches and I'm just working on push them upstream.
Quoted 4 lines
Andreas
[1] https://github.com/schnitzeltony/meta-raspberrypi/commit/4a626add25c1d13dfa6d22c61f9804764f49301a
Fyi, I'm testing with some patches for mesa and libdrm on top of the set I posted and the commits are here in case you want to compare changes:
https://github.com/martinezjavier/meta-raspberrypi/commits/rpi2-vc4-gfx
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hi,
Quoted 24 lines · Javier Martinez Canillas
Hello Andreas,
Quoted 11 lines · Andreas Müller
Quoted 3 lines
Khem definitely has a very good point. Maybe his way of putting it in words was not that productive. But the core idea was definitely right: I don't want rpi layer to introduce distro features.
Agreed but I still have issues make the changes work
What I have done to test:
1. add
MASK_GPU_INTERRUPT= "0x400"DISTRO_FEATURES_append= " vc4-gfx"Quoted 6 lines
to my local.conf
2. put [1] on top of the VC4 patches sent (this is a WIP patch not yet finished)
3. tested running X11I did only test with Weston since that is what Tizen uses and not with X11. I'll make sure to test with X11 and also include a mesa_%.bbappend for v2.
Quoted 8 lines
Quoted 3 lines
Question: What setting does the trick getting vc4 driver created by mesa doing the OpenGL work. I see only swrast which is bulls...
I'm not really a graphics person so I'll let Derek to answer this. He is in fact the author of most of these patches and I'm just working on push them upstream.
Guys, I really appreciate this. Thanks.
--
Andrei Gherzan
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
In reply to Javier Martinez CanillasHello,
Quoted 20 lines · Javier Martinez Canillas
Hello Andreas,
Quoted 17 lines · Andreas Müller
Quoted 3 lines
Khem definitely has a very good point. Maybe his way of putting it in words was not that productive. But the core idea was definitely right: I don't want rpi layer to introduce distro features.
Agreed but I still have issues make the changes work
What I have done to test:
1. add
MASK_GPU_INTERRUPT= "0x400"DISTRO_FEATURES_append= " vc4-gfx"to my local.conf
2. put [1] on top of the VC4 patches sent (this is a WIP patch not yet finished)
3. tested running X11
I tested Andreas' WIP patch under X11 using the core-image-sato image and I could reproduce the same behavior. KMS/DRM works when using the modesetting Xorg DDX but no GLES with HW acceleration.
Quoted 4 lines
I did only test with Weston since that is what Tizen uses and not with X11. I'll make sure to test with X11 and also include a mesa_%.bbappend for v2.
Quoted 8 lines
Quoted 3 lines
Question: What setting does the trick getting vc4 driver created by mesa doing the OpenGL work. I see only swrast which is bulls...
I'm not really a graphics person so I'll let Derek to answer this. He is in fact the author of most of these patches and I'm just working on push them upstream.
Derek is on holidays until next week so I tried to dig on this. When running the glmark2-es2 benchmark I get:
$ glmark2-es2
libEGL warning: DRI2: failed to authenticate
** Failed to set swap interval. Results may be bounded above by refresh rate.
=======================================================
glmark2 2014.03
=======================================================
OpenGL Information
GL_VENDOR: Mesa Project
GL_RENDERER: Software Rasterizer
GL_VERSION: OpenGL ES 2.0 Mesa 10.5.8
=======================================================so as Andreas said, it is using swrast instead of the VC4 hw one. And in fact by running strace I see that there is a open("/usr/lib/dri/swrast_dri.so",...) but /usr/lib/dri/vc4_dri.so is never opened.
I tried bumping the mesa git recipe to use the same sha1 we are using in our Tizen port but ran into build issues...
But I've reworked the patch series according to your suggestions and I can post a v2 if you want since at least KMS/DRM is working with Andreas' changes or do you want to first sort out the mesa bits for 3D HW accel before posting a v2?
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Quoted 60 lines · Javier Martinez Canillas
Hello,
Quoted 20 lines · Javier Martinez Canillas
Hello Andreas,
Quoted 17 lines · Andreas Müller
Quoted 3 lines
Khem definitely has a very good point. Maybe his way of putting it in words was not that productive. But the core idea was definitely right: I don't want rpi layer to introduce distro features.
Agreed but I still have issues make the changes work
What I have done to test:
1. add
MASK_GPU_INTERRUPT= "0x400"DISTRO_FEATURES_append= " vc4-gfx"to my local.conf
2. put [1] on top of the VC4 patches sent (this is a WIP patch not yet finished)
3. tested running X11I tested Andreas' WIP patch under X11 using the core-image-sato image and I could reproduce the same behavior. KMS/DRM works when using the modesetting Xorg DDX but no GLES with HW acceleration.
Quoted 4 lines
I did only test with Weston since that is what Tizen uses and not with X11. I'll make sure to test with X11 and also include a mesa_%.bbappend for v2.
Quoted 8 lines
Quoted 3 lines
Question: What setting does the trick getting vc4 driver created by mesa doing the OpenGL work. I see only swrast which is bulls...
I'm not really a graphics person so I'll let Derek to answer this. He is in fact the author of most of these patches and I'm just working on push them upstream.
Derek is on holidays until next week so I tried to dig on this. When running the glmark2-es2 benchmark I get:
$ glmark2-es2 libEGL warning: DRI2: failed to authenticate ** Failed to set swap interval. Results may be bounded above by refresh rate. ======================================================= glmark2 2014.03 ======================================================= OpenGL Information GL_VENDOR: Mesa Project GL_RENDERER: Software Rasterizer GL_VERSION: OpenGL ES 2.0 Mesa 10.5.8 =======================================================so as Andreas said, it is using swrast instead of the VC4 hw one. And in fact by running strace I see that there is a
open("/usr/lib/dri/swrast_dri.so",...)but/usr/lib/dri/vc4_dri.sois never opened.
Quoted 7 lines
I tried bumping the mesa git recipe to use the same sha1 we are using in our Tizen port but ran into build issues...
But I've reworked the patch series according to your suggestions and I can post a v2 if you want since at least KMS/DRM is working with Andreas' changes or do you want to first sort out the mesa bits for 3D HW accel before posting a v2?
FYI: I managed to get the vc4 driver loaded (should be in my repo branch vc4-2). With this I get some repeating kernel error messages (don't have them here). I am sure that I read something about these messages when preparing vc4 (yes I started similar before you sent patches).
Hope I have some energy left tonight to check further and let you know...
Andreas
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Quoted 8 lines · Andreas Müller
FYI: I managed to get the vc4 driver loaded (should be in my repo branch vc4-2). With this I get some repeating kernel error messages (don't have them here). I am sure that I read something about these messages when preparing vc4 (yes I started similar before you sent patches).
Hope I have some energy left tonight to check further and let you know...
From xorg perspective all looks fine
[595923.730] (II) modeset(0): [DRI2] Setup complete [595923.730] (II) modeset(0): [DRI2] DRI driver: vc4 [595923.730] (II) modeset(0): [DRI2] VDPAU driver: vc4 [595923.740] (--) RandR disabled [595923.745] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer [595923.745] (II) AIGLX: enabled GLX_ARB_create_context [595923.745] (II) AIGLX: enabled GLX_ARB_create_context_profile [595923.745] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile [595923.745] (II) AIGLX: enabled GLX_INTEL_swap_event [595923.745] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control [595923.745] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB [595923.745] (II) AIGLX: enabled GLX_ARB_fbconfig_float [595923.745] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects [595923.747] (II) AIGLX: Loaded and initialized vc4 [595923.747] (II) GLX: Initialized DRI2 GL provider for screen 0 [595923.782] (II) modeset(0): Setting screen physical size to 338 x 270
but kernel complains periodically ~6s with
[ 36.814922] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires BOs to validate [ 43.060516] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires BOs to validate [ 49.325115] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires BOs to validate [ 55.558433] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires
BOs to validate
Will check what this message want me to say - anybody out there with helping hints?
Andreas
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hello Andreas,
Quoted 8 lines · Andreas Müller
Quoted 6 lines · Andreas Müller
FYI: I managed to get the vc4 driver loaded (should be in my repo branch vc4-2). With this I get some repeating kernel error messages (don't have them here). I am sure that I read something about these messages when preparing vc4 (yes I started similar before you sent patches).
Awesome, I tried to get it working yesterday but couldn't. Good work!
Quoted 23 lines
Quoted 3 lines
Hope I have some energy left tonight to check further and let you know...
From xorg perspective all looks fine
[595923.730] (II) modeset(0): [DRI2] Setup complete [595923.730] (II) modeset(0): [DRI2] DRI driver: vc4 [595923.730] (II) modeset(0): [DRI2] VDPAU driver: vc4 [595923.740] (--) RandR disabled [595923.745] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer [595923.745] (II) AIGLX: enabled GLX_ARB_create_context [595923.745] (II) AIGLX: enabled GLX_ARB_create_context_profile [595923.745] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile [595923.745] (II) AIGLX: enabled GLX_INTEL_swap_event [595923.745] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control [595923.745] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB [595923.745] (II) AIGLX: enabled GLX_ARB_fbconfig_float [595923.745] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects [595923.747] (II) AIGLX: Loaded and initialized vc4 [595923.747] (II) GLX: Initialized DRI2 GL provider for screen 0 [595923.782] (II) modeset(0): Setting screen physical size to 338 x 270but kernel complains periodically ~6s with
Quoted 9 lines
[ 36.814922] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires BOs to validate [ 43.060516] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires BOs to validate [ 49.325115] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires BOs to validate [ 55.558433] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requiresBOs to validate
Yes, I was able to reproduce the issue. My X -verbose output:
http://hastebin.com/onovosojuw.md
Quoted 3 lines
Will check what this message want me to say - anybody out there with helping hints?
No clue. I was looking and the error is in the VC4_SUBMIT_CL ioctl cmd handler (vc4_submit_cl_ioctl) in drivers/gpu/drm/vc4/vc4_gem.c.
AFAIU bo_handle_count is supposed to always be > 0 but somehow mesa is passing 0 on it.
The ioctl call is in vc4_flush (src/gallium/drivers/vc4/vc4_context.c) in mesa. So it seems this is a mesa issue. I've asked Eric Anholt in #dri-devel on IRC if his kernel is supposed to work with mesa 10.5.8 or if there is a minimum version / sha1 that is needed.
Quoted 2 lines
Andreas
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hello,
Quoted 58 lines · Javier Martinez Canillas
Hello Andreas,
Quoted 8 lines · Andreas Müller
Quoted 6 lines · Andreas Müller
FYI: I managed to get the vc4 driver loaded (should be in my repo branch vc4-2). With this I get some repeating kernel error messages (don't have them here). I am sure that I read something about these messages when preparing vc4 (yes I started similar before you sent patches).
Awesome, I tried to get it working yesterday but couldn't. Good work!
Quoted 23 lines
Quoted 3 lines
Hope I have some energy left tonight to check further and let you know...
From xorg perspective all looks fine
[595923.730] (II) modeset(0): [DRI2] Setup complete [595923.730] (II) modeset(0): [DRI2] DRI driver: vc4 [595923.730] (II) modeset(0): [DRI2] VDPAU driver: vc4 [595923.740] (--) RandR disabled [595923.745] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer [595923.745] (II) AIGLX: enabled GLX_ARB_create_context [595923.745] (II) AIGLX: enabled GLX_ARB_create_context_profile [595923.745] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile [595923.745] (II) AIGLX: enabled GLX_INTEL_swap_event [595923.745] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control [595923.745] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB [595923.745] (II) AIGLX: enabled GLX_ARB_fbconfig_float [595923.745] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects [595923.747] (II) AIGLX: Loaded and initialized vc4 [595923.747] (II) GLX: Initialized DRI2 GL provider for screen 0 [595923.782] (II) modeset(0): Setting screen physical size to 338 x 270but kernel complains periodically ~6s with
Quoted 9 lines
[ 36.814922] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires BOs to validate [ 43.060516] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires BOs to validate [ 49.325115] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires BOs to validate [ 55.558433] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requiresBOs to validate
Yes, I was able to reproduce the issue. My X -verbose output:
http://hastebin.com/onovosojuw.md
Quoted 3 lines
Will check what this message want me to say - anybody out there with helping hints?
No clue. I was looking and the error is in the
VC4_SUBMIT_CLioctl cmd handler (vc4_submit_cl_ioctl) indrivers/gpu/drm/vc4/vc4_gem.c.
Quoted 8 lines
AFAIU
bo_handle_countis supposed to always be > 0 but somehow mesa is passing 0 on it.The ioctl call is in
vc4_flush(src/gallium/drivers/vc4/vc4_context.c) in mesa. So it seems this is a mesa issue. I've asked Eric Anholt in #dri-devel on IRC if his kernel is supposed to work with mesa 10.5.8 or if there is a minimum version / sha1 that is needed.
So I spent a lot of time trying to figure out what is wrong with mesa 10.5.8 and then gave up and tried updating mesa to the version we are using for our Tizen port that works. I did the change in the meta layer just for testing purposes. This is the diff [0] on top of the kernel patches and Andreas' latest changes.
I did this because it was a known mesa version that works and indeed Xorg starts and the "Rendering requires BOs to validate" error is gone. The complete Xorg log is at [1].
Also, glmark2 says:
=======================================================
glmark2 2014.03
=======================================================
OpenGL Information
GL_VENDOR: Broadcom
GL_RENDERER: Gallium 0.4 on VC4
GL_VERSION: 2.1 Mesa 10.7.0-devel (git-1762568fd39b)
=======================================================
And I see the horse and the box spinning. It gives me a 33-35 FPS but the last texture-filter=linear test fails with:
[drm:vc4_use_bo] *ERROR* BO index -980025344 greater than BO count 9
So there are still some issues. The glkmar2 log is at [2].
I'll post the v2 of the vc4 kernel recipe patches since the problem seems to be with mesa 10.5.8 and also is working for us with Weston.
At least so we all are on the same page and testing with the same set of patches.
Best regards,
Signature · 7 lines
Javier Martinez Canillas Open Source Group Samsung Research America [0]: http://hastebin.com/karakapeqa.diff [1]: http://hastebin.com/foyanotema.vhdl [2]: http://hastebin.com/ikotadavop.vbs
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
On Thu, Aug 13, 2015 at 5:43 PM, Javier Martinez Canillas <[email protected]> wrote:
Hi
Thanks a lot!l. I am afraid my build machine at home (RPi is hobby) is about to die for hard-disk issues. As soon as it's back I will try with updated mesa.
As I cannot do myself currently: Can you give glmark-es2 a try?
Andreas
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
Hello Andreas,
Quoted 10 lines · Andreas Müller
On Thu, Aug 13, 2015 at 5:43 PM, Javier Martinez Canillas <[email protected]> wrote:
HiThanks a lot!l. I am afraid my build machine at home (RPi is hobby) is about to die for hard-disk issues. As soon as it's back I will try with updated mesa.
As I cannot do myself currently: Can you give glmark-es2 a try?
There is an issue with glmark-es2, even though it says
=======================================================
glmark2 2014.03
=======================================================
OpenGL Information
GL_VENDOR: Broadcom
GL_RENDERER: Gallium 0.4 on VC4
GL_VERSION: OpenGL ES 2.0 Mesa 10.7.0-devel (git-1762568fd39b)
and the framerate is higher than with glmark2:
[build] use-vbo=false: FPS: 50 FrameTime: 20.000 ms [build] use-vbo=true: FPS: 54 FrameTime: 18.519 ms [texture] texture-filter=nearest: FPS: 53 FrameTime: 18.868 ms
The image is frozen and no errors shown in the kernel log buffer. Eric did not answer me yet which mesa version or sha1 is known to work well with X11 + OpenGL ES.
Quoted 2 lines
Andreas
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
In reply to Andrei GherzanHello Andrei,
Quoted 27 lines · Andrei Gherzan
Quoted 12 lines · Javier Martinez Canillas
Hello Khem,
Quoted 9 lines · Khem Raj
Quoted 7 lines · Javier Martinez Canillas
Quoted 3 lines
who defines the distro feature ?
Distro features AFAICT are user defined options, you can for example have the following in your
conf/local.conf:Quoted 13 lines
Quoted 4 lines
Quoted 1 line
DISTRO_FEATURES_append= " vc4-gfx"I wasnt trying to learn about what
DISTRO_FEATURESare, I was trying to draw attention to the fact that meta-rpi being a BSP layerOk, sorry. But I believe it's more productive to just do suggestions instead of asking rhetorical questions that can be misunderstood :-)
Quoted 4 lines
was trying to define a lot more than a BSP layer is supposed to do. So if its a distro feature, I would like it to work as expected on other machines besides raspberrypi. If thats not applicable then we should rethink if it could be folded into
MACHINE_FEATURESif it needs to be
Quoted 4 lines
Khem definitely has a very good point. Maybe his way of putting it in words was not that productive. But the core idea was definitely right: I don't want rpi layer to introduce distro features.
Agreed. After Khem answers and reading about the MACHINE and DISTRO in the documentation, I understood that the changes were not correct. Thanks a lot to both of you for the clarification.
Quoted 3 lines
--
Andrei Gherzan
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Quoted 28 lines · Javier Martinez Canillas
Hello Andrei,
This series adds support for Eric Anholt's v4.1 kernel, that has support for the vc4 DRM/KMS driver. Which is the new open source graphics driver stack for the Raspberry Pi to be used instead of the userland driver.
We are using it in the Tizen port to RPI2 [0] and are trying to push all the patches back to the tizen-distro and meta-raspberrypi OE layers so I'm posting these patches to get your feedback.
The v4.1 kernel is under heavy development so is a work-in-progress and should not be used in production. That's why a default preference of -1 is set and the kernel only is enabled if the "vc4-gfx" feature is added to the
DISTRO_FEATURESvariable.But even when it's still a development kernel, having the recipe in the meta-raspberrypi will allow people to test it. The patches are for:
Patch 1/5 makes optional to add the kgdboc kernel command line parameter
Patch 2/5 allows to set the
mask_gpu_interrupt0option in config.txtPatch 3/5 changes the partition layout to add more space for boot files
Patch 4/5 adds a recipe for the 4.1 and some patches to make it stable
Patch 5/5 switchs the default providers according to the gfx stack used
Quoted 8 lines
One problem I found is that the latest RPI kernels changed the path for the DT overlays after commit
739c586c8757("BCM270X_DT: Move the overlays into a subdirectory, adding the README") [1] so the kernel fails to build with the defaultKERNEL_DEVICETREE. I tried to changeget_dts()function logic to take this into account but found that it would had been a more intrusive change andKERNEL_DEVICETREEwill have to be changed anyways once the recipes for the other kernels are updated to the latest HEAD so for now I just define the following on local.conf to make it build:
As long as we bump SRCREV for 3.18 kernel as well, I see no problem. Since then the KERNEL_DEVICETREE default value can look the same in all situations (both 3.18 and 4.x can handle the new structure and we get no compatibility issues) and for older kernels (3.12 and 3.14) it doesn't matter since they don't have native device tree support and will turn device tree support off by default.
Quoted 50 lines
KERNEL_DEVICETREE = " \ bcm2708-rpi-b.dtb \ bcm2708-rpi-b-plus.dtb \ bcm2709-rpi-2-b.dtb \ \ overlays/hifiberry-amp-overlay.dtb \ overlays/hifiberry-dac-overlay.dtb \ overlays/hifiberry-dacplus-overlay.dtb \ overlays/hifiberry-digi-overlay.dtb \ overlays/iqaudio-dac-overlay.dtb \ overlays/iqaudio-dacplus-overlay.dtb \ overlays/lirc-rpi-overlay.dtb \ overlays/pps-gpio-overlay.dtb \ overlays/w1-gpio-overlay.dtb \ overlays/w1-gpio-pullup-overlay.dtb \ "[0]: http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/
[1]: https://github.com/raspberrypi/linux/commit/739c586c8757Best regards,
---
Javier Martinez Canillas
Open Source Group
Samsung Research AmericaDerek Foreman (4):
rpi-config: Allow to mask GPU irqs sdcard_image-rpi.bbclass: Allocate more space for boot partition
linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
rpi-default-providers: Switch providers according to used gfx stackMauro Carvalho Chehab (1):
linux-raspberrypi.inc: Make kgdboc kernel param optionalREADME | 38 +++++-- classes/sdcard_image-rpi.bbclass | 6 +- conf/machine/include/rpi-default-providers.inc | 8 +- conf/machine/include/rpi-default-versions.inc | 2 +- recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++ recipes-kernel/linux/linux-raspberrypi.inc | 5 +- ..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++ ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++ .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115 +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95 +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++ 12 files changed, 433 insertions(+), 17 deletions(-)
Quoted 7 lines
create mode 100644
recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patchcreate mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bb
Nice and interesting changes, but you really should sync this with Alex Lennon as well since he currently are working with integrating 4.1 into meta-raspberrypi. An other opinion is that you should start by trying to integrate relevant kernel changes both from 'git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2' and the integration patches into the currently used upstream (https://github.com/raspberrypi/linux) and I also think it's a good idea to ensure that the new code is added within kernel config options so it's easy to enable/disable the vc4 support. Then at least I think this more easily can be integrated in meta-raspberrypi.
BR,
Petter
Hello Petter,
Thanks a lot for your feedback.
Quoted 37 lines · Petter Mabäcker
Quoted 28 lines · Javier Martinez Canillas
Hello Andrei,
This series adds support for Eric Anholt's v4.1 kernel, that has support for the vc4 DRM/KMS driver. Which is the new open source graphics driver stack for the Raspberry Pi to be used instead of the userland driver.
We are using it in the Tizen port to RPI2 [0] and are trying to push all the patches back to the tizen-distro and meta-raspberrypi OE layers so I'm posting these patches to get your feedback.
The v4.1 kernel is under heavy development so is a work-in-progress and should not be used in production. That's why a default preference of -1 is set and the kernel only is enabled if the "vc4-gfx" feature is added to the
DISTRO_FEATURESvariable.But even when it's still a development kernel, having the recipe in the meta-raspberrypi will allow people to test it. The patches are for:
Patch 1/5 makes optional to add the kgdboc kernel command line parameter
Patch 2/5 allows to set the
mask_gpu_interrupt0option in config.txtPatch 3/5 changes the partition layout to add more space for boot files
Patch 4/5 adds a recipe for the 4.1 and some patches to make it stable
Patch 5/5 switchs the default providers according to the gfx stack used
Quoted 8 lines
One problem I found is that the latest RPI kernels changed the path for the DT overlays after commit
739c586c8757("BCM270X_DT: Move the overlays into a subdirectory, adding the README") [1] so the kernel fails to build with the defaultKERNEL_DEVICETREE. I tried to changeget_dts()function logic to take this into account but found that it would had been a more intrusive change andKERNEL_DEVICETREEwill have to be changed anyways once the recipes for the other kernels are updated to the latest HEAD so for now I just define the following on local.conf to make it build:
Quoted 2 lines
As long as we bump SRCREV for 3.18 kernel as well, I see no problem. Since then the
KERNEL_DEVICETREEdefault value can look the same in all situations (both 3.18 and 4.x can handle the new structure and we get no compatibility issues) and for older kernels (3.12 and 3.14) it doesn't matter since they don't have native device tree support and will turn device tree support off by default.
Yes, that's what I meant when I said that the problem will be solved once all the recipes for DT enabled kernels are updated to the latest branch HEAD. But I didn't want to do that in this series since I wanted the changes to be as less intrusive as possible.
Quoted 58 lines
Quoted 50 lines
KERNEL_DEVICETREE = " \ bcm2708-rpi-b.dtb \ bcm2708-rpi-b-plus.dtb \ bcm2709-rpi-2-b.dtb \ \ overlays/hifiberry-amp-overlay.dtb \ overlays/hifiberry-dac-overlay.dtb \ overlays/hifiberry-dacplus-overlay.dtb \ overlays/hifiberry-digi-overlay.dtb \ overlays/iqaudio-dac-overlay.dtb \ overlays/iqaudio-dacplus-overlay.dtb \ overlays/lirc-rpi-overlay.dtb \ overlays/pps-gpio-overlay.dtb \ overlays/w1-gpio-overlay.dtb \ overlays/w1-gpio-pullup-overlay.dtb \ "[0]: http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/
[1]: https://github.com/raspberrypi/linux/commit/739c586c8757Best regards,
---
Javier Martinez Canillas
Open Source Group
Samsung Research AmericaDerek Foreman (4):
rpi-config: Allow to mask GPU irqs sdcard_image-rpi.bbclass: Allocate more space for boot partition
linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
rpi-default-providers: Switch providers according to used gfx stackMauro Carvalho Chehab (1):
linux-raspberrypi.inc: Make kgdboc kernel param optionalREADME | 38 +++++-- classes/sdcard_image-rpi.bbclass | 6 +- conf/machine/include/rpi-default-providers.inc | 8 +- conf/machine/include/rpi-default-versions.inc | 2 +- recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++ recipes-kernel/linux/linux-raspberrypi.inc | 5 +- ..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++ ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++ .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115 +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95 +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++ 12 files changed, 433 insertions(+), 17 deletions(-)Quoted 7 lines
create mode 100644
recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patchcreate mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bb
Quoted 2 lines
Nice and interesting changes, but you really should sync this with Alex Lennon as well since he currently are working with integrating 4.1 into meta-raspberrypi. An other opinion is that you should start by trying to integrate relevant kernel changes both from '
git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2' and the integration patches into the currently used upstream (https://github.com/raspberrypi/linux) and I also think it's a good idea to ensure that the new code is added within kernel config options so it's easy to enable/disable the vc4 support. Then at least I think this more easily can be integrated in meta-raspberrypi.
I didn't know there was a work in progress to integrate the 4.1 tree. Although that is for the branch in https://github.com/raspberrypi/linux
that does not have the Broadcom VC4 DRM/KMS driver. I agree that ideally Eric's changes should be integrated back to that tree but I don't expect that to be a trivial task. I certainly don't know if have the bandwidth to do it. Also, it is under heavy development so will be hard to track.
Another option is to have two recipes for 4.1, one for the raspberrypi tree with userland and another one with the tree with the VC4 DRM/KMS driver. Or use the same recipe but with a different SRC_URI for each case.
I tried to isolate all the VC4 support so is enabled and disable easily using a config option.
Quoted 2 lines
BR,
Petter
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
2015-08-04 18:07 skrev Javier Martinez Canillas:
Quoted 6 lines
Hello Petter,
Thanks a lot for your feedback.
On 08/04/2015 11:16 AM, Petter
Quoted 2 lines · Mabäcker
Quoted 2 lines
On 07/30/2015 10:34 AM, Javier Martinez Canillas
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Hello Andrei, This series adds support for Eric Anholt's
v4.1 kernel, that has support for the vc4 DRM/KMS driver. Which is the new open source graphics driver stack for the Raspberry Pi to be used instead of the userland driver. We are using it in the Tizen port to RPI2 [0] and are trying to push all the patches back to the tizen-distro and meta-raspberrypi OE layers so I'm posting these patches to get your feedback. The v4.1 kernel is under heavy development so is a work-in-progress and should not be used in production. That's why a default preference of -1 is set and the kernel only is enabled if the "vc4-gfx" feature is added to the DISTRO_FEATURES variable. But even when it's still a development kernel, having the recipe in the meta-raspberrypi will allow people to test it. The patches are for:
Patch 1/5 makes optional to add the kgdboc kernel command line parameter Patch 2/5 allows to set the mask_gpu_interrupt0 option in config.txt Patch 3/5 changes the partition layout to add more space for boot files Patch 4/5 adds a recipe for the 4.1 and some patches to make it stable Patch 5/5 switchs the default providers according to the gfx stack used One problem I found is that the latest RPI kernels changed the path for the DT overlays after commit 739c586c8757 ("BCM270X_DT: Move the overlays into a subdirectory, adding the README") [1] so the kernel fails to build with the default KERNEL_DEVICETREE. I tried to change get_dts() function logic to take this into account but found that it would had been a more intrusive change and KERNEL_DEVICETREE will have to be changed anyways once the recipes for the other kernels are updated to the latest HEAD so for now I just define the following on local.conf to make it build:
Quoted 1 line
Quoted 1 line
As long as we bump SRCREV for 3.18 kernel as well,
I see no problem. Since then the KERNEL_DEVICETREE default value can look the same in all situations (both 3.18 and 4.x can handle the new structure and we get no compatibility issues) and for older kernels (3.12 and 3.14) it doesn't matter since they don't have native device tree support and will turn device tree support off by default.
Quoted 2 lines
Yes,
that's what I meant when I said that the problem will be solved once
Quoted 1 line
all the recipes for DT enabled kernels are updated to the latest branch
Quoted 1 line
HEAD. But I didn't want to do that in this series since I
wanted the
Quoted 1 line
changes to be as less intrusive as possible.
Ok, sounds
reasonable. Alex found some problems when bumping 3.18 to latest but when that is solved he can push the 3.18 bumping and prepare the KERNEL_DEVICETREE variable with the new subdir for overlays.
Quoted 1 line
Quoted 1 line
KERNEL_DEVICETREE = " bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb bcm2709-rpi-2-b.dtb overlays/hifiberry-amp-overlay.dtb overlays/hifiberry-dac-overlay.dtb overlays/hifiberry-dacplus-overlay.dtb overlays/hifiberry-digi-overlay.dtb overlays/iqaudio-dac-overlay.dtb overlays/iqaudio-dacplus-overlay.dtb overlays/lirc-rpi-overlay.dtb overlays/pps-gpio-overlay.dtb overlays/w1-gpio-overlay.dtb overlays/w1-gpio-pullup-overlay.dtb " [0]:
http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/ [1] [1]: https://github.com/raspberrypi/linux/commit/739c586c8757 [2] Best regards, --- Javier Martinez Canillas Open Source Group Samsung Research America Derek Foreman (4): rpi-config: Allow to mask GPU irqs sdcard_image-rpi.bbclass: Allocate more space for boot partition
linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
rpi-default-providers: Switch providers according to used gfx stack Mauro Carvalho Chehab (1): linux-raspberrypi.inc: Make kgdboc kernel param optional README | 38 +++++-- classes/sdcard_image-rpi.bbclass | 6
+- conf/machine/include/rpi-default-providers.inc | 8 +- conf/machine/include/rpi-default-versions.inc | 2 +- recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++ recipes-kernel/linux/linux-raspberrypi.inc | 5 +- ..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++ ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++ .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115 +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95 +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++ 12 files changed, 433 insertions(+), 17 deletions(-) create mode 100644
recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bb
Quoted 1 line
Nice
and interesting changes, but you really should sync this with Alex Lennon as well since he currently are working with integrating 4.1 into meta-raspberrypi. An other opinion is that you should start by trying to integrate relevant kernel changes both from 'git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2' and the integration patches into the currently used upstream
(https://github.com/raspberrypi/linux [3]) and I also think it's a good idea to ensure that the new code is added within kernel config options so it's easy to enable/disable the vc4 support. Then at least I think this more easily can be integrated in meta-raspberrypi.
I didn't know
there was a work in progress to integrate the 4.1 tree. Although that is
for the branch in https://github.com/raspberrypi/linux [3]that does not have the Broa> n't expect that to be a trivial task. I certainly don't know if have the bandwidth to do it. Also, it is under heavy development so will be hard to track. Another option is to have two recipes for 4.1, one for the raspberrypi tree with userland and another one with the tree with the VC4 DRM/KMS driver. Or use the same recipe but with a different SRC_URI for each case. I tried to isolate all the VC4 support so is enabled and disable easily using a config option.
Quoted 2 lines
Ok, in that case
I think we don't have so much options. I vote for two recipes in that case (at least to start with) something like recipe-kernel/linux/linux-raspberrypi-vc4 or similar.
r
Best
regards,
Quoted 1 line
Links:
------
[1]
http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/
[2]
https://github.com/raspberrypi/linux/commit/739c586c8757
[3]
https://github.com/raspberrypi/linux
Hello Petter,
Quoted 53 lines · Petter Mabäcker
2015-08-04 18:07 skrev Javier Martinez Canillas:
Quoted 6 lines
Hello Petter,
Thanks a lot for your feedback.
On 08/04/2015 11:16 AM, Petter
Quoted 2 lines · Mabäcker
Quoted 2 lines
On 07/30/2015 10:34 AM, Javier Martinez Canillas
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Hello Andrei, This series adds support for Eric Anholt's
v4.1 kernel, that has support for the vc4 DRM/KMS driver. Which is the new open source graphics driver stack for the Raspberry Pi to be used instead of the userland driver. We are using it in the Tizen port to RPI2 [0] and are trying to push all the patches back to the tizen-distro and meta-raspberrypi OE layers so I'm posting these patches to get your feedback. The v4.1 kernel is under heavy development so is a work-in-progress and should not be used in production. That's why a default preference of -1 is set and the kernel only is enabled if the "vc4-gfx" feature is added to the
DISTRO_FEATURESvariable. But even when it's still a development kernel, having the recipe in the meta-raspberrypi will allow people to test it. The patches are for:
Patch 1/5 makes optional to add the kgdboc kernel command line parameter Patch 2/5 allows to set themask_gpu_interrupt0option in config.txt Patch 3/5 changes the partition layout to add more space for boot files Patch 4/5 adds a recipe for the 4.1 and some patches to make it stable Patch 5/5 switchs the default providers according to the gfx stack used One problem I found is that the latest RPI kernels changed the path for the DT overlays after commit739c586c8757("BCM270X_DT: Move the overlays into a subdirectory, adding the README") [1] so the kernel fails to build with the defaultKERNEL_DEVICETREE. I tried to changeget_dts()function logic to take this into account but found that it would had been a more intrusive change andKERNEL_DEVICETREEwill have to be changed anyways once the recipes for the other kernels are updated to the latest HEAD so for now I just define the following on local.conf to make it build:Quoted 1 line
Quoted 1 line
As long as we bump SRCREV for 3.18 kernel as well,
I see no problem. Since then the
KERNEL_DEVICETREEdefault value can look the same in all situations (both 3.18 and 4.x can handle the new structure and we get no compatibility issues) and for older kernels (3.12 and 3.14) it doesn't matter since they don't have native device tree support and will turn device tree support off by default.Quoted 2 lines
Yes,
that's what I meant when I said that the problem will be solved once
Quoted 1 line
all the recipes for DT enabled kernels are updated to the latest branch
Quoted 9 lines
Quoted 1 line
HEAD. But I didn't want to do that in this series since I
wanted the
Quoted 1 line
changes to be as less intrusive as possible.
Ok, sounds
reasonable. Alex found some problems when bumping 3.18 to latest but when that is solved he can push the 3.18 bumping and prepare theKERNEL_DEVICETREEvariable with the new subdir for overlays.
Awesome.
Quoted 63 lines
Quoted 1 line
Quoted 1 line
KERNEL_DEVICETREE= " bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb bcm2709-rpi-2-b.dtb overlays/hifiberry-amp-overlay.dtb overlays/hifiberry-dac-overlay.dtb overlays/hifiberry-dacplus-overlay.dtb overlays/hifiberry-digi-overlay.dtb overlays/iqaudio-dac-overlay.dtb overlays/iqaudio-dacplus-overlay.dtb overlays/lirc-rpi-overlay.dtb overlays/pps-gpio-overlay.dtb overlays/w1-gpio-overlay.dtb overlays/w1-gpio-pullup-overlay.dtb " [0]:
http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/ [1] [1]: https://github.com/raspberrypi/linux/commit/739c586c8757 [2] Best regards, --- Javier Martinez Canillas Open Source Group Samsung Research America Derek Foreman (4): rpi-config: Allow to mask GPU irqs sdcard_image-rpi.bbclass: Allocate more space for boot partition
linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
rpi-default-providers: Switch providers according to used gfx stack Mauro Carvalho Chehab (1): linux-raspberrypi.inc: Make kgdboc kernel param optional README | 38 +++++-- classes/sdcard_image-rpi.bbclass | 6+- conf/machine/include/rpi-default-providers.inc | 8 +- conf/machine/include/rpi-default-versions.inc | 2 +- recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++ recipes-kernel/linux/linux-raspberrypi.inc | 5 +- ..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++ ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++ .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115 +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95 +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++ 12 files changed, 433 insertions(+), 17 deletions(-) create mode 100644
recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patchcreate mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bbQuoted 1 line
Nice
and interesting changes, but you really should sync this with Alex Lennon as well since he currently are working with integrating 4.1 into meta-raspberrypi. An other opinion is that you should start by trying to integrate relevant kernel changes both from '
git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2' and the integration patches into the currently used upstream
(https://github.com/raspberrypi/linux [3]) and I also think it's a good idea to ensure that the new code is added within kernel config options so it's easy to enable/disable the vc4 support. Then at least I think this more easily can be integrated in meta-raspberrypi.I didn't know
there was a work in progress to integrate the 4.1 tree. Although that is
for the branch in https://github.com/raspberrypi/linux [3]that does not have the Broa> n't expect that to be a trivial task. I certainly don't know if have the bandwidth to do it. Also, it is under heavy development so will be hard to track. Another option is to have two recipes for 4.1, one for the raspberrypi tree with userland and another one with the tree with the VC4 DRM/KMS driver. Or use the same recipe but with a differentSRC_URIfor each case. I tried to isolate all the VC4 support so is enabled and disable easily using a config option.Quoted 1 line
Quoted 6 lines
Quoted 1 line
Ok, in that case
I think we don't have so much options. I vote for two recipes in that case (at least to start with) something like recipe-kernel/linux/linux-raspberrypi-vc4 or similar.
r
Ok, that makes sense for me. I'll wait a couple of days to see if there are more feedback and post a v2 based on your (an others) suggestions.
Thanks a lot!
Quoted 3 lines
Best
regards,
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Cheers!
First of all good work. Additionally to the comments I made in patches, find some here.
Quoted 60 lines · Javier Martinez Canillas
Hello Petter,
Quoted 57 lines · Petter Mabäcker
2015-08-04 18:07 skrev Javier Martinez Canillas:
Quoted 6 lines
Hello Petter,
Thanks a lot for your feedback.
On 08/04/2015 11:16 AM, Petter
Quoted 2 lines · Mabäcker
Quoted 2 lines
On 07/30/2015 10:34 AM, Javier Martinez Canillas
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Hello Andrei, This series adds support for Eric Anholt's
v4.1 kernel, that has support for the vc4 DRM/KMS driver. Which is the new open source graphics driver stack for the Raspberry Pi to be used instead of the userland driver. We are using it in the Tizen port to RPI2 [0] and are trying to push all the patches back to the tizen-distro and meta-raspberrypi OE layers so I'm posting these patches to get your feedback. The v4.1 kernel is under heavy development so is a work-in-progress and should not be used in production. That's why a default preference of -1 is set and the kernel only is enabled if the "vc4-gfx" feature is added to the
DISTRO_FEATURESvariable. But even when it's still a development kernel, having the recipe in the meta-raspberrypi will allow people to test it. The patches are for:
Patch 1/5 makes optional to add the kgdboc kernel command line parameter Patch 2/5 allows to set themask_gpu_interrupt0option in config.txt Patch 3/5 changes the partition layout to add more space for boot files Patch 4/5 adds a recipe for the 4.1 and some patches to make it stable Patch 5/5 switchs the default providers according to the gfx stack used One problem I found is that the latest RPI kernels changed the path for the DT overlays after commit739c586c8757("BCM270X_DT: Move the overlays into a subdirectory, adding the README") [1] so the kernel fails to build with the defaultKERNEL_DEVICETREE. I tried to changeget_dts()function logic to take this into account but found that it would had been a more intrusive change andKERNEL_DEVICETREEwill have to be changed anyways once the recipes for the other kernels are updated to the latest HEAD so for now I just define the following on local.conf to make it build:Quoted 1 line
Quoted 1 line
As long as we bump SRCREV for 3.18 kernel as well,
I see no problem. Since then the
KERNEL_DEVICETREEdefault value can look the same in all situations (both 3.18 and 4.x can handle the new structure and we get no compatibility issues) and for older kernels (3.12 and 3.14) it doesn't matter since they don't have native device tree support and will turn device tree support off by default.Quoted 2 lines
Yes,
that's what I meant when I said that the problem will be solved once
Quoted 1 line
all the recipes for DT enabled kernels are updated to the latest branch
Quoted 1 line
HEAD. But I didn't want to do that in this series since I
wanted the
Quoted 1 line
changes to be as less intrusive as possible.
Quoted 8 lines
Quoted 5 lines
Ok, sounds
reasonable. Alex found some problems when bumping 3.18 to latest but when that is solved he can push the 3.18 bumping and prepare theKERNEL_DEVICETREEvariable with the new subdir for overlays.Awesome.
Yes. This will be address along with rpi kernel bump to 4.X.
Quoted 40 lines
Quoted 40 lines
Quoted 1 line
Quoted 1 line
KERNEL_DEVICETREE= " bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb bcm2709-rpi-2-b.dtb overlays/hifiberry-amp-overlay.dtb overlays/hifiberry-dac-overlay.dtb overlays/hifiberry-dacplus-overlay.dtb overlays/hifiberry-digi-overlay.dtb overlays/iqaudio-dac-overlay.dtb overlays/iqaudio-dacplus-overlay.dtb overlays/lirc-rpi-overlay.dtb overlays/pps-gpio-overlay.dtb overlays/w1-gpio-overlay.dtb overlays/w1-gpio-pullup-overlay.dtb " [0]:
http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/ [1] [1]: https://github.com/raspberrypi/linux/commit/739c586c8757 [2] Best regards, --- Javier Martinez Canillas Open Source Group Samsung Research America Derek Foreman (4): rpi-config: Allow to mask GPU irqs sdcard_image-rpi.bbclass: Allocate more space for boot partition
linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
rpi-default-providers: Switch providers according to used gfx stack Mauro Carvalho Chehab (1): linux-raspberrypi.inc: Make kgdboc kernel param optional README | 38 +++++-- classes/sdcard_image-rpi.bbclass | 6+- conf/machine/include/rpi-default-providers.inc | 8 +- conf/machine/include/rpi-default-versions.inc | 2 +- recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++ recipes-kernel/linux/linux-raspberrypi.inc | 5 +- ..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++ ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++ .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115 +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95 +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++ 12 files changed, 433 insertions(+), 17 deletions(-) create mode 100644
recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patchcreate mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bbQuoted 1 line
Nice
Quoted 11 lines
Quoted 11 lines
and interesting changes, but you really should sync this with Alex Lennon as well since he currently are working with integrating 4.1 into meta-raspberrypi. An other opinion is that you should start by trying to integrate relevant kernel changes both from '
git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2' and the integration patches into the currently used upstream
(https://github.com/raspberrypi/linux [3]) and I also think it's a good idea to ensure that the new code is added within kernel config options so it's easy to enable/disable the vc4 support. Then at least I think this more easily can be integrated in meta-raspberrypi.
That would definitely be the preferate way but would involve some additional work in tracking the patches. So, as an initial state, I am fine with a different kernel recipe (with a different name).
Quoted 12 lines
Quoted 12 lines
I didn't know
there was a work in progress to integrate the 4.1 tree. Although that is
for the branch in https://github.com/raspberrypi/linux [3]that does not have the Broa> n't expect that to be a trivial task. I certainly don't know if have the bandwidth to do it. Also, it is under heavy development so will be hard to track. Another option is to have two recipes for 4.1, one for the raspberrypi tree with userland and another one with the tree with the VC4 DRM/KMS driver. Or use the same recipe but with a differentSRC_URIfor each case. I tried to isolate all the VC4 support so is enabled and disable easily using a config option.Quoted 1 line
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Ok, in that case
I think we don't have so much options. I vote for two recipes in that case (at least to start with) something like recipe-kernel/linux/linux-raspberrypi-vc4 or similar.
r
Vote++
Quoted 9 lines
Ok, that makes sense for me. I'll wait a couple of days to see if there are more feedback and post a v2 based on your (an others) suggestions.
Thanks a lot!
Quoted 3 lines
Best
regards,
Quoted 5 lines
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
Andrei Gherzan
Hello Andrei,
Quoted 5 lines · Andrei Gherzan
Cheers!
First of all good work. Additionally to the comments I made in patches, find some here.
Thanks a lot.
Quoted 67 lines · Javier Martinez Canillas
Quoted 66 lines
Hello Petter,
Quoted 62 lines · Petter Mabäcker
2015-08-04 18:07 skrev Javier Martinez Canillas:
Quoted 6 lines
Hello Petter,
Thanks a lot for your feedback.
On 08/04/2015 11:16 AM, Petter
Quoted 2 lines · Mabäcker
Quoted 2 lines
On 07/30/2015 10:34 AM, Javier Martinez Canillas
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Hello Andrei, This series adds support for Eric Anholt's
v4.1 kernel, that has support for the vc4 DRM/KMS driver. Which is the new open source graphics driver stack for the Raspberry Pi to be used instead of the userland driver. We are using it in the Tizen port to RPI2 [0] and are trying to push all the patches back to the tizen-distro and meta-raspberrypi OE layers so I'm posting these patches to get your feedback. The v4.1 kernel is under heavy development so is a work-in-progress and should not be used in production. That's why a default preference of -1 is set and the kernel only is enabled if the "vc4-gfx" feature is added to the
DISTRO_FEATURESvariable. But even when it's still a development kernel, having the recipe in the meta-raspberrypi will allow people to test it. The patches are for:
Patch 1/5 makes optional to add the kgdboc kernel command line parameter Patch 2/5 allows to set themask_gpu_interrupt0option in config.txt Patch 3/5 changes the partition layout to add more space for boot files Patch 4/5 adds a recipe for the 4.1 and some patches to make it stable Patch 5/5 switchs the default providers according to the gfx stack used One problem I found is that the latest RPI kernels changed the path for the DT overlays after commit739c586c8757("BCM270X_DT: Move the overlays into a subdirectory, adding the README") [1] so the kernel fails to build with the defaultKERNEL_DEVICETREE. I tried to changeget_dts()function logic to take this into account but found that it would had been a more intrusive change andKERNEL_DEVICETREEwill have to be changed anyways once the recipes for the other kernels are updated to the latest HEAD so for now I just define the following on local.conf to make it build:Quoted 1 line
Quoted 1 line
As long as we bump SRCREV for 3.18 kernel as well,
I see no problem. Since then the
KERNEL_DEVICETREEdefault value can look the same in all situations (both 3.18 and 4.x can handle the new structure and we get no compatibility issues) and for older kernels (3.12 and 3.14) it doesn't matter since they don't have native device tree support and will turn device tree support off by default.Quoted 2 lines
Yes,
that's what I meant when I said that the problem will be solved once
Quoted 1 line
all the recipes for DT enabled kernels are updated to the latest branch
Quoted 1 line
HEAD. But I didn't want to do that in this series since I
wanted the
Quoted 1 line
changes to be as less intrusive as possible.
Ok, sounds
reasonable. Alex found some problems when bumping 3.18 to latest but when that is solved he can push the 3.18 bumping and prepare theKERNEL_DEVICETREEvariable with the new subdir for overlays.
Quoted 5 lines
Quoted 2 lines
Awesome.
Yes. This will be address along with rpi kernel bump to 4.X.
Great.
Quoted 52 lines
Quoted 40 lines
Quoted 40 lines
Quoted 1 line
Quoted 1 line
KERNEL_DEVICETREE= " bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb bcm2709-rpi-2-b.dtb overlays/hifiberry-amp-overlay.dtb overlays/hifiberry-dac-overlay.dtb overlays/hifiberry-dacplus-overlay.dtb overlays/hifiberry-digi-overlay.dtb overlays/iqaudio-dac-overlay.dtb overlays/iqaudio-dacplus-overlay.dtb overlays/lirc-rpi-overlay.dtb overlays/pps-gpio-overlay.dtb overlays/w1-gpio-overlay.dtb overlays/w1-gpio-pullup-overlay.dtb " [0]:
http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/ [1] [1]: https://github.com/raspberrypi/linux/commit/739c586c8757 [2] Best regards, --- Javier Martinez Canillas Open Source Group Samsung Research America Derek Foreman (4): rpi-config: Allow to mask GPU irqs sdcard_image-rpi.bbclass: Allocate more space for boot partition
linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
rpi-default-providers: Switch providers according to used gfx stack Mauro Carvalho Chehab (1): linux-raspberrypi.inc: Make kgdboc kernel param optional README | 38 +++++-- classes/sdcard_image-rpi.bbclass | 6+- conf/machine/include/rpi-default-providers.inc | 8 +- conf/machine/include/rpi-default-versions.inc | 2 +- recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++ recipes-kernel/linux/linux-raspberrypi.inc | 5 +- ..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++ ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++ .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115 +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95 +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++ 12 files changed, 433 insertions(+), 17 deletions(-) create mode 100644
recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patchcreate mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bbQuoted 1 line
Nice
Quoted 11 lines
Quoted 11 lines
and interesting changes, but you really should sync this with Alex Lennon as well since he currently are working with integrating 4.1 into meta-raspberrypi. An other opinion is that you should start by trying to integrate relevant kernel changes both from '
git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2' and the integration patches into the currently used upstream
(https://github.com/raspberrypi/linux [3]) and I also think it's a good idea to ensure that the new code is added within kernel config options so it's easy to enable/disable the vc4 support. Then at least I think this more easily can be integrated in meta-raspberrypi.
Quoted 4 lines
That would definitely be the preferate way but would involve some additional work in tracking the patches. So, as an initial state, I am fine with a different kernel recipe (with a different name).
Ok, I was waiting for your feedback before preparing v2.
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
I didn't know
there was a work in progress to integrate the 4.1 tree. Although that is
for the branch in https://github.com/raspberrypi/linux [3]that does not have the Broa> n't expect that to be a trivial task. I certainly don't know if have the bandwidth to do it. Also, it is under heavy development so will be hard to track. Another option is to have two recipes for 4.1, one for the raspberrypi tree with userland and another one with the tree with the VC4 DRM/KMS driver. Or use the same recipe but with a differentSRC_URIfor each case. I tried to isolate all the VC4 support so is enabled and disable easily using a config option.Quoted 2 lines
Ok, in that case
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
I think we don't have so much options. I vote for two recipes in that case (at least to start with) something like recipe-kernel/linux/linux-raspberrypi-vc4 or similar.
rVote++
Ok.
Quoted 9 lines
Quoted 9 lines
Ok, that makes sense for me. I'll wait a couple of days to see if there are more feedback and post a v2 based on your (an others) suggestions.
Thanks a lot!
Quoted 3 lines
Best
regards,
Quoted 9 lines
Quoted 5 lines
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America--
Andrei Gherzan
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Quoted 138 lines · Javier Martinez Canillas
Hello Andrei,
Quoted 5 lines · Andrei Gherzan
Cheers!
First of all good work. Additionally to the comments I made in patches, find some here.
Thanks a lot.
Quoted 67 lines · Javier Martinez Canillas
Quoted 66 lines
Hello Petter,
Quoted 62 lines · Petter Mabäcker
2015-08-04 18:07 skrev Javier Martinez Canillas:
Quoted 6 lines
Hello Petter,
Thanks a lot for your feedback.
On 08/04/2015 11:16 AM, Petter
Quoted 2 lines · Mabäcker
Quoted 2 lines
On 07/30/2015 10:34 AM, Javier Martinez Canillas
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Hello Andrei, This series adds support for Eric Anholt's
v4.1 kernel, that has support for the vc4 DRM/KMS driver. Which is the new open source graphics driver stack for the Raspberry Pi to be used instead of the userland driver. We are using it in the Tizen port to RPI2 [0] and are trying to push all the patches back to the tizen-distro and meta-raspberrypi OE layers so I'm posting these patches to get your feedback. The v4.1 kernel is under heavy development so is a work-in-progress and should not be used in production. That's why a default preference of -1 is set and the kernel only is enabled if the "vc4-gfx" feature is added to the
DISTRO_FEATURESvariable. But even when it's still a development kernel, having the recipe in the meta-raspberrypi will allow people to test it. The patches are for:
Patch 1/5 makes optional to add the kgdboc kernel command line parameter Patch 2/5 allows to set themask_gpu_interrupt0option in config.txt Patch 3/5 changes the partition layout to add more space for boot files Patch 4/5 adds a recipe for the 4.1 and some patches to make it stable Patch 5/5 switchs the default providers according to the gfx stack used One problem I found is that the latest RPI kernels changed the path for the DT overlays after commit739c586c8757("BCM270X_DT: Move the overlays into a subdirectory, adding the README") [1] so the kernel fails to build with the defaultKERNEL_DEVICETREE. I tried to changeget_dts()function logic to take this into account but found that it would had been a more intrusive change andKERNEL_DEVICETREEwill have to be changed anyways once the recipes for the other kernels are updated to the latest HEAD so for now I just define the following on local.conf to make it build:Quoted 1 line
Quoted 1 line
As long as we bump SRCREV for 3.18 kernel as well,
I see no problem. Since then the
KERNEL_DEVICETREEdefault value can look the same in all situations (both 3.18 and 4.x can handle the new structure and we get no compatibility issues) and for older kernels (3.12 and 3.14) it doesn't matter since they don't have native device tree support and will turn device tree support off by default.Quoted 2 lines
Yes,
that's what I meant when I said that the problem will be solved once
Quoted 1 line
all the recipes for DT enabled kernels are updated to the latest branch
Quoted 1 line
HEAD. But I didn't want to do that in this series since I
wanted the
Quoted 1 line
changes to be as less intrusive as possible.
Ok, sounds
reasonable. Alex found some problems when bumping 3.18 to latest but when that is solved he can push the 3.18 bumping and prepare theKERNEL_DEVICETREEvariable with the new subdir for overlays.Quoted 5 lines
Quoted 2 lines
Awesome.
Yes. This will be address along with rpi kernel bump to 4.X.
Great.
Quoted 52 lines
Quoted 51 lines
Quoted 51 lines
Quoted 1 line
Quoted 1 line
KERNEL_DEVICETREE= " bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb bcm2709-rpi-2-b.dtb overlays/hifiberry-amp-overlay.dtb overlays/hifiberry-dac-overlay.dtb overlays/hifiberry-dacplus-overlay.dtb overlays/hifiberry-digi-overlay.dtb overlays/iqaudio-dac-overlay.dtb overlays/iqaudio-dacplus-overlay.dtb overlays/lirc-rpi-overlay.dtb overlays/pps-gpio-overlay.dtb overlays/w1-gpio-overlay.dtb overlays/w1-gpio-pullup-overlay.dtb " [0]:
http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/ [1] [1]: https://github.com/raspberrypi/linux/commit/739c586c8757 [2] Best regards, --- Javier Martinez Canillas Open Source Group Samsung Research America Derek Foreman (4): rpi-config: Allow to mask GPU irqs sdcard_image-rpi.bbclass: Allocate more space for boot partition
linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
rpi-default-providers: Switch providers according to used gfx stack Mauro Carvalho Chehab (1): linux-raspberrypi.inc: Make kgdboc kernel param optional README | 38 +++++-- classes/sdcard_image-rpi.bbclass | 6+- conf/machine/include/rpi-default-providers.inc | 8 +- conf/machine/include/rpi-default-versions.inc | 2 +- recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++ recipes-kernel/linux/linux-raspberrypi.inc | 5 +- ..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++ ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++ .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115 +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95 +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++ 12 files changed, 433 insertions(+), 17 deletions(-) create mode 100644
recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patchcreate mode 100644recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patchcreate mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bbQuoted 1 line
Nice
and interesting changes, but you really should sync this with Alex Lennon as well since he currently are working with integrating 4.1 into meta-raspberrypi. An other opinion is that you should start by trying to integrate relevant kernel changes both from '
git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2' and the integration patches into the currently used upstream
(https://github.com/raspberrypi/linux [3]) and I also think it's a good idea to ensure that the new code is added within kernel config options so it's easy to enable/disable the vc4 support. Then at least I think this more easily can be integrated in meta-raspberrypi.
Quoted 6 lines
Quoted 4 lines
That would definitely be the preferate way but would involve some additional work in tracking the patches. So, as an initial state, I am fine with a different kernel recipe (with a different name).
Ok, I was waiting for your feedback before preparing v2.
I guess this is my feedback. We can go on a separate linux provider for now. Something like linux-raspbery-vc.bb . Or, if you want to maintain the patches we can only pull in patches and apply them on top of 4.X based on a FEATURE. What do you think?
--
Andrei Gherzan
Hello Andrei,
Quoted 1 line · Andrei Gherzan
On Mon, Aug 10, 2015 at 10:02:03AM +0200, Javier Martinez Canillas wrote:
[snip]
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
That would definitely be the preferate way but would involve some additional work in tracking the patches. So, as an initial state, I am fine with a different kernel recipe (with a different name).
Quoted 7 lines
Quoted 1 line
Ok, I was waiting for your feedback before preparing v2.
I guess this is my feedback. We can go on a separate linux provider for now. Something like linux-raspbery-vc.bb . Or, if you want to maintain the patches we can only pull in patches and apply them on top of 4.X based on a FEATURE. What do you think?
Yes, sorry I meant that I didn't post a v2 before because I was waiting for you but now I've all your feedback from your previous emails. I agree that is better to have a separate recipe (with all the patches unconditionally applied) and drop the feature for now.
Is just that I was busy today with other stuff but I'll post a v2 this week for sure!
Quoted 3 lines
--
Andrei Gherzan
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Hi,
Quoted 22 lines · Javier Martinez Canillas
Hello Andrei,
Quoted 1 line · Andrei Gherzan
On Mon, Aug 10, 2015 at 10:02:03AM +0200, Javier Martinez Canillas wrote:
[snip]
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
That would definitely be the preferate way but would involve some additional work in tracking the patches. So, as an initial state, I am fine with a different kernel recipe (with a different name).
Quoted 7 lines
Quoted 1 line
Ok, I was waiting for your feedback before preparing v2.
I guess this is my feedback. We can go on a separate linux provider for now. Something like linux-raspbery-vc.bb . Or, if you want to maintain the patches we can only pull in patches and apply them on top of 4.X based on a FEATURE. What do you think?
Quoted 7 lines
Yes, sorry I meant that I didn't post a v2 before because I was waiting for you but now I've all your feedback from your previous emails. I agree that is better to have a separate recipe (with all the patches unconditionally applied) and drop the feature for now.
Is just that I was busy today with other stuff but I'll post a v2 this week for sure!
No rush Javier. Just keep it in queue.
--
Andrei Gherzan