[yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-02 Thread Javier Martinez Canillas
From: Derek Foreman 

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 
[javier: Extend commit msg and made conditional instead removing userland]
Signed-off-by: Javier Martinez Canillas 

---

 conf/machine/include/rpi-default-providers.inc | 8 
 conf/machine/include/rpi-default-versions.inc  | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/conf/machine/include/rpi-default-providers.inc 
b/conf/machine/include/rpi-default-providers.inc
index ee3a3acce7bd..233f177bd16e 100644
--- a/conf/machine/include/rpi-default-providers.inc
+++ b/conf/machine/include/rpi-default-providers.inc
@@ -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"
diff --git a/conf/machine/include/rpi-default-versions.inc 
b/conf/machine/include/rpi-default-versions.inc
index bcf78281b6ff..c07ecac5924b 100644
--- a/conf/machine/include/rpi-default-versions.inc
+++ b/conf/machine/include/rpi-default-versions.inc
@@ -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
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition

2015-08-02 Thread Javier Martinez Canillas
From: Derek Foreman 

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.

Signed-off-by: Derek Foreman 
[javier: Extended the commit message]
Signed-off-by: Javier Martinez Canillas 

---

 classes/sdcard_image-rpi.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index 7592cc170451..4211fd438989 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -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"
-- 
2.4.3

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH 1/5] linux-raspberrypi.inc: Make kgdboc kernel param optional

2015-08-02 Thread Javier Martinez Canillas
From: Mauro Carvalho Chehab 

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.

Signed-off-by: Mauro Carvalho Chehab 
[javier: Extended commit message and made it conditional]
Signed-off-by: Javier Martinez Canillas 

---

 README | 23 +++
 recipes-kernel/linux/linux-raspberrypi.inc |  5 -
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/README b/README
index 3913f415bbc1..d70f21fe06ed 100644
--- a/README
+++ b/README
@@ -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.
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc 
b/recipes-kernel/linux/linux-raspberrypi.inc
index 7e36408ae071..d60a3e941027 100644
--- a/recipes-kernel/linux/linux-raspberrypi.inc
+++ b/recipes-kernel/linux/linux-raspberrypi.inc
@@ -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"
 
-- 
2.4.3

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver

2015-08-02 Thread 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_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

-- 
2.4.3

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs

2015-08-02 Thread Javier Martinez Canillas
From: Derek Foreman 

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.

Signed-off-by: Derek Foreman 
[javier: Made it a config option]
Signed-off-by: Javier Martinez Canillas 

---

 README  | 22 ++
 recipes-bsp/bootfiles/rpi-config_git.bb |  6 ++
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/README b/README
index d70f21fe06ed..678c0eb4a4e3 100644
--- a/README
+++ b/README
@@ -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.
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb 
b/recipes-bsp/bootfiles/rpi-config_git.bb
index 29ced342426c..56477a8821bb 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -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
-- 
2.4.3

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support

2015-08-02 Thread Javier Martinez Canillas
From: Derek Foreman 

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.

Signed-off-by: Derek Foreman 
[javier: Extended commit message and set default preference to -1]
Signed-off-by: Javier Martinez Canillas 

---

 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

diff --git a/README b/README
index 678c0eb4a4e3..20788d6f48cb 100644
--- a/README
+++ b/README
@@ -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
 =
 
diff --git 
a/recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
 
b/recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
new file mode 100644
index ..1ea62489e077
--- /dev/null
+++ 
b/recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
@@ -0,0 +1,48 @@
+From 5908700d3cb88114002aa66f920e91961ebe91e4 Mon Sep 17 00:00:00 2001
+From: Derek Foreman 
+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 
+---
+ 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
+
diff --git 
a/recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch
 
b/recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch
new file mode 100644
index ..acc09760e820
--- /dev/null
+++ 
b/recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch
@@ -0,0 +1,85 @@
+From 8882728be24f35f81da4558c84fb18658e23fcc9 Mon Sep 17 00:00:00 2001
+From: Derek Foreman 
+Date: Wed, 27 May 2015 13:20:21 -0500
+Subject: [PATCH 2/5] ARM: dts: Fix i2c for bcm2709 RPI2 B board
+

Re: [yocto] [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver

2015-08-04 Thread Javier Martinez Canillas
Hello Petter,

Thanks a lot for your feedback.

On 08/04/2015 11:16 AM, Petter Mabäcker wrote:
> On 07/30/2015 10:34 AM, Javier Martinez Canillas wrote:
>> 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:
> 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.
>

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.
 
>>
>> 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 ++

Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-04 Thread Javier Martinez Canillas
Hello Andreas,

On 08/03/2015 10:14 PM, Andreas Müller wrote:
> On Thu, Jul 30, 2015 at 10:34 AM, Javier Martinez Canillas
>  wrote:
>> From: Derek Foreman 
>>
>> 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 
>> [javier: Extend commit msg and made conditional instead removing userland]
>> Signed-off-by: Javier Martinez Canillas 
>>
>> ---
>>
>>  conf/machine/include/rpi-default-providers.inc | 8 
>>  conf/machine/include/rpi-default-versions.inc  | 2 +-
>>  2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/conf/machine/include/rpi-default-providers.inc 
>> b/conf/machine/include/rpi-default-providers.inc
>> index ee3a3acce7bd..233f177bd16e 100644
>> --- a/conf/machine/include/rpi-default-providers.inc
>> +++ b/conf/machine/include/rpi-default-providers.inc
>> @@ -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"
>> diff --git a/conf/machine/include/rpi-default-versions.inc 
>> b/conf/machine/include/rpi-default-versions.inc
>> index bcf78281b6ff..c07ecac5924b 100644
>> --- a/conf/machine/include/rpi-default-versions.inc
>> +++ b/conf/machine/include/rpi-default-versions.inc
>> @@ -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
>>
>> --
> 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.

> Andreas
> 
> [1] http://dri.freedesktop.org/wiki/VC4/
> 

[0]: https://github.com/martinezjavier/meta-raspberrypi/commits/rpi2-vc4-gfx

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-04 Thread Javier Martinez Canillas
Hello Andreas,

On 08/04/2015 06:55 PM, Andreas Müller wrote:

[snip]

> Another thing: With witch version of RasPi did you test. With V2 I get
>

I also tested on a RPI2 model B.

> [1.342175] [drm:vc4_hdmi_bind] *ERROR* Failed to get ddc i2c adapter by 
> node
> [1.349359] vc4-drm soc:vc4@0x7e4c: failed to bind
> 3f902000.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"
 
> Andreas
> 

[0]: http://dri.freedesktop.org/wiki/VC4/

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-04 Thread Javier Martinez Canillas
Hello Khem,

On 08/04/2015 09:01 PM, Khem Raj wrote:
> 
>> On Jul 30, 2015, at 1:34 AM, Javier Martinez Canillas 
>>  wrote:
>>
>> From: Derek Foreman 
>>
>> 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 
>> [javier: Extend commit msg and made conditional instead removing userland]
>> Signed-off-by: Javier Martinez Canillas 
>>
>> ---
>>
>> conf/machine/include/rpi-default-providers.inc | 8 
>> conf/machine/include/rpi-default-versions.inc  | 2 +-
>> 2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/conf/machine/include/rpi-default-providers.inc 
>> b/conf/machine/include/rpi-default-providers.inc
>> index ee3a3acce7bd..233f177bd16e 100644
>> --- a/conf/machine/include/rpi-default-providers.inc
>> +++ b/conf/machine/include/rpi-default-providers.inc
>> @@ -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)}”
> 
> 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,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-06 Thread Javier Martinez Canillas
Hello Khem,

On 08/06/2015 04:54 AM, Khem Raj wrote:
> On Tue, Aug 4, 2015 at 11:34 PM, Javier Martinez Canillas
>  wrote:
>>> 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

Ok, sorry. But I believe it's more productive to just do suggestions
instead of asking rhetorical questions that can be misunderstood :-)

> 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

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.

> 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,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver

2015-08-06 Thread Javier Martinez Canillas
Hello Petter,

On 08/05/2015 10:48 PM, Petter Mabäcker wrote:
>  
> 
> 2015-08-04 18:07 skrev Javier Martinez Canillas: 
> 
>> Hello Petter,
>>
> 
>> Thanks a lot for your feedback.
>>
>> On 08/04/2015 11:16 AM, Petter
> Mabäcker wrote:
>>
>>> On 07/30/2015 10:34 AM, Javier Martinez Canillas
> wrote: 
>>>
>>>> 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:
>>> 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.
>>
>> 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.
> 
> 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. 
>

Awesome.
 
>>>
> 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
>

Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-07 Thread Javier Martinez Canillas
Hello Andreas,

Thanks a lot for your feedback.

On 08/06/2015 09:41 AM, Andreas Müller wrote:
> On Thu, Aug 6, 2015 at 8:59 AM, Javier Martinez Canillas
>  wrote:
>> 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.
> 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.

> (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.
 
> * 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.

> 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.

> Andreas
>

[0]: http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/vc4?h=10.4

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-07 Thread Javier Martinez Canillas
Hello Andreas,

On 08/07/2015 01:30 PM, Andreas Müller wrote:
> On Fri, Aug 7, 2015 at 12:45 PM, Javier Martinez Canillas
>  wrote:
>> Hello Andreas,
>>
>> Thanks a lot for your feedback.
>>
>> On 08/06/2015 09:41 AM, Andreas Müller wrote:
>>> On Thu, Aug 6, 2015 at 8:59 AM, Javier Martinez Canillas
>>>  wrote:
>>>> 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.
>>> 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.
>>
>>> (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)...
>

Awesome, thanks a lot for all your feedback, suggestions and tests!
 
> Andreas
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs

2015-08-10 Thread Javier Martinez Canillas
Hello Andrei,

Thanks a lot for your feedback and for picking patches #1 and #3!

On 08/10/2015 12:44 AM, Andrei Gherzan wrote:
> Hello,
> 
> On Thu, Jul 30, 2015 at 10:34:08AM +0200, Javier Martinez Canillas wrote:
>> From: Derek Foreman 
>>
>> 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.
>>
> 
> 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.
 
> --
> Andrei Gherzan
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support

2015-08-10 Thread Javier Martinez Canillas
Hello Andrei,

On 08/10/2015 12:54 AM, Andrei Gherzan wrote:
> Hi,
> 
> On Thu, Jul 30, 2015 at 10:34:10AM +0200, Javier Martinez Canillas wrote:
>> From: Derek Foreman 
>>
>> 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.
>>
> 
> 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,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver

2015-08-10 Thread Javier Martinez Canillas
Hello Andrei,

On 08/10/2015 01:01 AM, Andrei Gherzan wrote:
> Cheers!
> 
> First of all good work. Additionally to the comments I made in patches, find
> some here.
>

Thanks a lot.
 
> On Thu, Aug 06, 2015 at 09:03:34AM +0200, Javier Martinez Canillas wrote:
>> Hello Petter,
>>
>> On 08/05/2015 10:48 PM, Petter Mabäcker wrote:
>>>
>>>
>>> 2015-08-04 18:07 skrev Javier Martinez Canillas:
>>>
>>>> Hello Petter,
>>>>
>>>
>>>> Thanks a lot for your feedback.
>>>>
>>>> On 08/04/2015 11:16 AM, Petter
>>> Mabäcker wrote:
>>>>
>>>>> On 07/30/2015 10:34 AM, Javier Martinez Canillas
>>> wrote:
>>>>>
>>>>>> 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:
>>>>> 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.
>>>>
>>>> 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.
>>>
>>> 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.
>>>
>>
>> Awesome.
>>
> 
> Yes. This will be address along with rpi kernel bump to 4.X.
>

Great.
 
>>>>>
>>> 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, --- Jav

Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-10 Thread Javier Martinez Canillas
Hello Andrei,

On 08/10/2015 01:05 AM, Andrei Gherzan wrote:
> On Thu, Aug 06, 2015 at 08:59:56AM +0200, Javier Martinez Canillas wrote:
>> Hello Khem,
>>
>> On 08/06/2015 04:54 AM, Khem Raj wrote:
>>> On Tue, Aug 4, 2015 at 11:34 PM, Javier Martinez Canillas
>>>  wrote:
>>>>> 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
>>
>> Ok, sorry. But I believe it's more productive to just do suggestions
>> instead of asking rhetorical questions that can be misunderstood :-)
>>
>>> 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
>>
> 
> 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.
 
> --
> Andrei Gherzan
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-10 Thread Javier Martinez Canillas
Hello Andreas,

On 08/10/2015 01:37 AM, Andreas Müller wrote:
>> 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 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.

> 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.
 
> 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,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver

2015-08-10 Thread Javier Martinez Canillas
Hello Andrei,

On 08/10/2015 11:34 PM, Andrei Gherzan wrote:
> On Mon, Aug 10, 2015 at 10:02:03AM +0200, Javier Martinez Canillas wrote:

[snip]

>>>>>
>>>
>>> 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?
>

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!

> --
> Andrei Gherzan
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-12 Thread Javier Martinez Canillas
Hello,

On 08/10/2015 10:22 AM, Javier Martinez Canillas wrote:
> Hello Andreas,
> 
> On 08/10/2015 01:37 AM, Andreas Müller wrote:
>>> 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.

> 
> 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.
> 
>> 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,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-13 Thread Javier Martinez Canillas
Hello Andreas,

On 08/12/2015 10:22 PM, Andreas Müller wrote:
> On Wed, Aug 12, 2015 at 7:15 PM, Andreas Müller
>  wrote:
>> 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!

>> 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
>

Yes, I was able to reproduce the issue. My X -verbose output:

http://hastebin.com/onovosojuw.md

> 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.

> Andreas
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-13 Thread Javier Martinez Canillas
Hello,

On 08/13/2015 09:22 AM, Javier Martinez Canillas wrote:
> Hello Andreas,
> 
> On 08/12/2015 10:22 PM, Andreas Müller wrote:
>> On Wed, Aug 12, 2015 at 7:15 PM, Andreas Müller
>>  wrote:
>>> 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!
> 
>>> 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
>>
> 
> Yes, I was able to reproduce the issue. My X -verbose output:
> 
> http://hastebin.com/onovosojuw.md
> 
>> 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.
>

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,
-- 
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
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack

2015-08-13 Thread Javier Martinez Canillas
Hello Andreas,

On 08/13/2015 06:00 PM, Andreas Müller wrote:
> On Thu, Aug 13, 2015 at 5:43 PM, Javier Martinez Canillas
>  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?
> 

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.

> Andreas
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH v2 1/4] rpi-config: Allow to mask GPU irqs

2015-08-13 Thread Javier Martinez Canillas
From: Derek Foreman 

The rpi firmware has support for a mask_gpu_interrupt option that can be
defined in the boot/config.txt file. The option makes the VPU not handle
certain interrupts such as V3D. This option is needed by the VC4 DRM/KMS
driver but it is not possible to set it from the meta-raspberrypi layer.

Signed-off-by: Derek Foreman 
[javier: Made it a config option]
Signed-off-by: Javier Martinez Canillas 

---

Changes in v2:
 - Fix commit message about mask GPU irq option. Suggested by Andrei Gherzan.

 README  | 22 ++
 recipes-bsp/bootfiles/rpi-config_git.bb |  6 ++
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/README b/README
index d70f21fe06ed..678c0eb4a4e3 100644
--- a/README
+++ b/README
@@ -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.
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb 
b/recipes-bsp/bootfiles/rpi-config_git.bb
index 29ced342426c..56477a8821bb 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -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
-- 
2.4.3

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH v2 0/4] Add support for 4.1 kernel with vc4 DRM/KMS driver

2015-08-13 Thread 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.

This is a second version of the series which addresses feedback provided
by Andreas Müller, Khem Raj, Petter Mabäcker and you. The first version
of the series can be found at [0]. Some of the v1 patches have already
been picked and are now in the meta-raspberrypi master branch.

The v4.1 kernel is under heavy development so is a work-in-progress and
should not be used in production. That's why it's not set as the default
virtual/kernel provider but the user can change the default providers in
case wants to use the VC4 driver.

But even when it's still a development kernel, having the recipe in the
meta-raspberrypi will allow people to test it. We have been using it in
the Tizen RPi2 port [1] for some time. The patches in the series are for:

Patch 1/4 allows to set the mask_gpu_interrupt0 option in config.txt

Patch 2/4 adds a recipe for the 4.1 and some patches to make it stable

Patch 3/4 Documents how to switch the default providers for vc4 gfx stack

Patch 4/4 Adds a section to the README that explains that two gfx stacks
are available and that the user can change the default providers.

As discussed in v1, the following has to be added in local.conf to 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]: https://www.mail-archive.com/yocto@yoctoproject.org/msg25164.html
[1]: http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/

Best regards,
Javier

Changes in v2:
 - Fix commit message about mask GPU irq option. Suggested by Andrei Gherzan.
- Add a linux-raspberrypi-vc4 recipe insted of a linux-raspberrypi one.
  Suggested by Petter Mabäcker, Andreas Müller and Andrei Gherzan.
- Split the readme change in a separate patch. Suggested by Andrei Gherzan.
- Don't make the vc4 patches inclusion conditional since will always be
  needed when choosing the recipe. Suggested by Andrei Gherzan.
- Don't add a feature and allow users to change the default provider manually
  aided by a comment. Suggested by Andreas Müller and Andrei Gherzan.

Derek Foreman (3):
  rpi-config: Allow to mask GPU irqs
  linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
  rpi-default-providers: Document how to switch providers for vc4 gfx
stack

Javier Martinez Canillas (1):
  README: Add a section about graphic stacks

 README |  31 --
 conf/machine/include/rpi-default-providers.inc |  10 ++
 recipes-bsp/bootfiles/rpi-config_git.bb|   6 ++
 ..._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 +
 .../linux/linux-raspberrypi-vc4/defconfig  |   1 +
 recipes-kernel/linux/linux-raspberrypi-vc4_4.1.bb  |  12 +++
 10 files changed, 421 insertions(+), 8 deletions(-)
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0004-drm-vc4-Allow-vblank-to-be-disabled.patch
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0005-drm-vc4-Disable-KMS-operations.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4/defconfig
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4_4.1.bb

-- 
2.4.3

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH v2 2/4] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support

2015-08-13 Thread Javier Martinez Canillas
From: Derek Foreman 

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 but can be chosen by changing the default providers.

Signed-off-by: Derek Foreman 
[javier: Extended commit message and set default preference to -1]
Signed-off-by: Javier Martinez Canillas 

---

Changes in v2:
- Add a linux-raspberrypi-vc4 recipe insted of a linux-raspberrypi one.
  Suggested by Petter Mabäcker, Andreas Müller and Andrei Gherzan.
- Split the readme change in a separate patch. Suggested by Andrei Gherzan.
- Don't make the vc4 patches inclusion conditional since will always be
  needed when choosing the recipe. Suggested by Andrei Gherzan.

 ..._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 +
 .../linux/linux-raspberrypi-vc4/defconfig  |   1 +
 recipes-kernel/linux/linux-raspberrypi-vc4_4.1.bb  |  12 +++
 7 files changed, 382 insertions(+)
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0004-drm-vc4-Allow-vblank-to-be-disabled.patch
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0005-drm-vc4-Disable-KMS-operations.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4/defconfig
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4_4.1.bb

diff --git 
a/recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
 
b/recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
new file mode 100644
index ..1ea62489e077
--- /dev/null
+++ 
b/recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
@@ -0,0 +1,48 @@
+From 5908700d3cb88114002aa66f920e91961ebe91e4 Mon Sep 17 00:00:00 2001
+From: Derek Foreman 
+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 
+---
+ 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
+
diff --git 
a/recipes-kernel/linux/linux-raspberrypi-vc4/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch
 
b/recipes-kernel/linux/linux-raspberrypi-vc4/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch
new file mode 100644
index ..acc09760e820
--- /dev/null
+++ 
b/recipes-kernel/linux/linux-raspberrypi-vc4/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch
@@ -0,0 +1,85 @@
+From 8882728be24f35f81da4558c84fb18658e23fcc9 Mon Sep 17 00:00:00 2001
+From: Derek Foreman 
+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 ;
+   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/bcm2

[yocto] [meta-raspberrypi][PATCH v2 3/4] rpi-default-providers: Document how to switch providers for vc4 gfx stack

2015-08-13 Thread Javier Martinez Canillas
From: Derek Foreman 

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 documents
how the user user can choose if the VC4 driver has to be used instead and
set the right preferred providers for that case.

Signed-off-by: Derek Foreman 
[javier: Extend commit msg and made conditional instead removing userland]
Signed-off-by: Javier Martinez Canillas 

---

Changes in v2:
- Don't add a feature and allow users to change the default provider manually
  aided by a comment. Suggested by Andreas Müller and Andrei Gherzan.

 conf/machine/include/rpi-default-providers.inc | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/conf/machine/include/rpi-default-providers.inc 
b/conf/machine/include/rpi-default-providers.inc
index ee3a3acce7bd..e007bbb60216 100644
--- a/conf/machine/include/rpi-default-providers.inc
+++ b/conf/machine/include/rpi-default-providers.inc
@@ -8,3 +8,13 @@ PREFERRED_PROVIDER_virtual/libgles2 ?= "userland"
 PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl"
 PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl"
 PREFERRED_PROVIDER_jpeg = "jpeg"
+
+# To use a kernel with the VC4 DRM/KMS driver instead, comment the
+# virtual kernel, egl, libgles2, libgl and mesa preferred provider
+# above and uncomment the following lines.
+#
+# PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi-vc4"
+# PREFERRED_PROVIDER_virtual/egl ?= "mesa"
+# PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
+# PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
+# PREFERRED_PROVIDER_virtual/mesa ?= "mesa"
-- 
2.4.3

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH v2 4/4] README: Add a section about graphic stacks

2015-08-13 Thread Javier Martinez Canillas
This patch adds to the README a section that explains the RPi can different
graphics stacks and that the user can choose by manually changing providers.

Signed-off-by: Javier Martinez Canillas 

---

Changes in v2: None

 README | 9 +
 1 file changed, 9 insertions(+)

diff --git a/README b/README
index 678c0eb4a4e3..0569b353870c 100644
--- a/README
+++ b/README
@@ -25,6 +25,7 @@ Contents:
 2.K. Boot to U-Boot
 2.L. Image with Initramfs
 2.M. Device tree support
+2.O. Graphic stacks
 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
+modifying the defaults for the kernel, egl, gles2, libgl and mesa providers.
+This is explained in the conf/machine/include/rpi-default-providers.inc file.
+
 3. Extra apps
 =
 
-- 
2.4.3

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH v2 4/4] README: Add a section about graphic stacks

2015-08-17 Thread Javier Martinez Canillas
Hello Andrei and Khem,

Thanks a lot for your feedback.

On 08/17/2015 09:57 AM, Andrei Gherzan wrote:
> Hello,
> 
> On Thursday, August 13, 2015, Khem Raj  wrote:
> 
>>
>>> On Aug 13, 2015, at 10:07 AM, Javier Martinez Canillas <
>> jav...@osg.samsung.com > wrote:
>>>
>>> This patch adds to the README a section that explains the RPi can
>> different
>>> graphics stacks and that the user can choose by manually changing
>> providers.
>>>
>>> Signed-off-by: Javier Martinez Canillas > >
>>>
>>> ---
>>>
>>> Changes in v2: None
>>>
>>> README | 9 +
>>> 1 file changed, 9 insertions(+)
>>>
>>> diff --git a/README b/README
>>> index 678c0eb4a4e3..0569b353870c 100644
>>> --- a/README
>>> +++ b/README
>>> @@ -25,6 +25,7 @@ Contents:
>>> 2.K. Boot to U-Boot
>>> 2.L. Image with Initramfs
>>> 2.M. Device tree support
>>> +2.O. Graphic stacks
>>> 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
>>> +modifying the defaults for the kernel, egl, gles2, libgl and mesa
>> providers.
>>> +This is explained in the conf/machine/include/rpi-default-providers.inc
>> file.
>>> +
>>
>> you may want to add pointer to the commented out code that you have added
>> to select them
>> in rpi-default-providers.inc
>>
> 
> It would be nice to have some detailed info on what and where to comment
> out the configuration.
>

On patch 3/4 I added that documentation to rpi-default-providers but didn't
add it to the README and instead pointed out to rpi-default-providers to
have a level of indirection in case the providers change and to not have
duplicated information but I will add it to the README as well.

Do you have comments on the other patches in the series so I can address
all of them before re-spinning?

> --
> Andrei Gherzan
> 
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH v2 4/4] README: Add a section about graphic stacks

2015-08-24 Thread Javier Martinez Canillas
Hello,

On 08/17/2015 11:58 AM, Javier Martinez Canillas wrote:
> On 08/17/2015 09:57 AM, Andrei Gherzan wrote:
>> On Thursday, August 13, 2015, Khem Raj  wrote:

[snip]

>>>>
>>>> +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
>>>> +modifying the defaults for the kernel, egl, gles2, libgl and mesa
>>> providers.
>>>> +This is explained in the conf/machine/include/rpi-default-providers.inc
>>> file.
>>>> +
>>>
>>> you may want to add pointer to the commented out code that you have added
>>> to select them
>>> in rpi-default-providers.inc
>>>
>>
>> It would be nice to have some detailed info on what and where to comment
>> out the configuration.
>>
> 
> On patch 3/4 I added that documentation to rpi-default-providers but didn't
> add it to the README and instead pointed out to rpi-default-providers to
> have a level of indirection in case the providers change and to not have
> duplicated information but I will add it to the README as well.
> 
> Do you have comments on the other patches in the series so I can address
> all of them before re-spinning?
> 

Gentle ping about this. Thanks!

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH v2 4/4] README: Add a section about graphic stacks

2015-10-21 Thread Javier Martinez Canillas
Hello Andrei,

On 10/21/2015 02:32 PM, Andrei Gherzan wrote:
> Hello Javier,
> 
> On Mon, Aug 24, 2015 at 10:25:30PM +0200, Javier Martinez Canillas wrote:
>> Hello,
>>
>> On 08/17/2015 11:58 AM, Javier Martinez Canillas wrote:
>>> On 08/17/2015 09:57 AM, Andrei Gherzan wrote:
>>>> On Thursday, August 13, 2015, Khem Raj  wrote:
>>
>> [snip]
>>
>>>>>>
>>>>>> +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
>>>>>> +modifying the defaults for the kernel, egl, gles2, libgl and mesa
>>>>> providers.
>>>>>> +This is explained in the conf/machine/include/rpi-default-providers.inc
>>>>> file.
>>>>>> +
>>>>>
>>>>> you may want to add pointer to the commented out code that you have added
>>>>> to select them
>>>>> in rpi-default-providers.inc
>>>>>
>>>>
>>>> It would be nice to have some detailed info on what and where to comment
>>>> out the configuration.
>>>>
>>>
>>> On patch 3/4 I added that documentation to rpi-default-providers but didn't
>>> add it to the README and instead pointed out to rpi-default-providers to
>>> have a level of indirection in case the providers change and to not have
>>> duplicated information but I will add it to the README as well.
>>>
>>> Do you have comments on the other patches in the series so I can address
>>> all of them before re-spinning?
>>>
>>
> 
> Really sorry on this late reply. So my only recommendation is to move things

No worries, I've also been very busy with other stuff.

> you wrote in 3/4 in the 4/4 (README). Basically you would describe what a user
> needs to overwrite as providers in order to use VC4 as graphics stack.
>

Ok, I'm traveling to Korea next week for KLF and KS so I'll probably resend
a v3 (addressing your suggestions) later next week when I'm back.
 
> As well, how do you handle the devicetrees for 4.1? Aren't changed in 4+?
>

For now, I'm defining a KERNEL_DEVICETREE in my conf/local.conf file since
that is what was agreed with Petter Mabäcker on v1 of this series [0 and
I also mentioned in the cover letter [1].

But the new device tree overlay dir layout is not only for 4+ but also it
is used in the latest version of the older branches. So once all recipes'
SRCREV are bumped, overwriting the variable won't be necessary anymore.

>> Gentle ping about this. Thanks!
>>
>> Best regards,
>> --
>> Javier Martinez Canillas
>> Open Source Group
>> Samsung Research America
> 
> --
> Andrei Gherzan
> 

[0]: https://lists.yoctoproject.org/pipermail/yocto/2015-August/025961.html
[1]: https://lists.yoctoproject.org/pipermail/yocto/2015-August/026151.html

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH v2 4/4] README: Add a section about graphic stacks

2015-10-21 Thread Javier Martinez Canillas
Hello Andreas,

On 10/21/2015 04:55 PM, Andreas Müller wrote:
> On Wed, Oct 21, 2015 at 3:48 PM, Javier Martinez Canillas
>  wrote:
>> Hello Andrei,
>>
>> On 10/21/2015 02:32 PM, Andrei Gherzan wrote:
>>> Hello Javier,
>>>
>>> On Mon, Aug 24, 2015 at 10:25:30PM +0200, Javier Martinez Canillas wrote:
>>>> Hello,
>>>>
>>>> On 08/17/2015 11:58 AM, Javier Martinez Canillas wrote:
>>>>> On 08/17/2015 09:57 AM, Andrei Gherzan wrote:
>>>>>> On Thursday, August 13, 2015, Khem Raj  wrote:
>>>>
>>>> [snip]
>>>>
>>>>>>>>
>>>>>>>> +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
>>>>>>>> +modifying the defaults for the kernel, egl, gles2, libgl and mesa
>>>>>>> providers.
>>>>>>>> +This is explained in the 
>>>>>>>> conf/machine/include/rpi-default-providers.inc
>>>>>>> file.
>>>>>>>> +
>>>>>>>
>>>>>>> you may want to add pointer to the commented out code that you have 
>>>>>>> added
>>>>>>> to select them
>>>>>>> in rpi-default-providers.inc
>>>>>>>
>>>>>>
>>>>>> It would be nice to have some detailed info on what and where to comment
>>>>>> out the configuration.
>>>>>>
>>>>>
>>>>> On patch 3/4 I added that documentation to rpi-default-providers but 
>>>>> didn't
>>>>> add it to the README and instead pointed out to rpi-default-providers to
>>>>> have a level of indirection in case the providers change and to not have
>>>>> duplicated information but I will add it to the README as well.
>>>>>
>>>>> Do you have comments on the other patches in the series so I can address
>>>>> all of them before re-spinning?
>>>>>
>>>>
>>>
>>> Really sorry on this late reply. So my only recommendation is to move things
>>
>> No worries, I've also been very busy with other stuff.
>>
>>> you wrote in 3/4 in the 4/4 (README). Basically you would describe what a 
>>> user
>>> needs to overwrite as providers in order to use VC4 as graphics stack.
>>>
>>
>> Ok, I'm traveling to Korea next week for KLF and KS so I'll probably resend
>> a v3 (addressing your suggestions) later next week when I'm back.
>>
>>> As well, how do you handle the devicetrees for 4.1? Aren't changed in 4+?
>>>
>>
>> For now, I'm defining a KERNEL_DEVICETREE in my conf/local.conf file since
>> that is what was agreed with Petter Mabäcker on v1 of this series [0 and
>> I also mentioned in the cover letter [1].
>>
>> But the new device tree overlay dir layout is not only for 4+ but also it
>> is used in the latest version of the older branches. So once all recipes'
>> SRCREV are bumped, overwriting the variable won't be necessary anymore.
>>
>>>> Gentle ping about this. Thanks!
>>>>
>>>> Best regards,
>>>> --
>>>> Javier Martinez Canillas
>>>> Open Source Group
>>>> Samsung Research America
>>>
>>> --
>>> Andrei Gherzan
>>>
>>
>> [0]: https://lists.yoctoproject.org/pipermail/yocto/2015-August/025961.html
>> [1]: https://lists.yoctoproject.org/pipermail/yocto/2015-August/026151.html
>>
>> Best regards,
>> --
>> Javier Martinez Canillas
>> Open Source Group
>> Samsung Research America
> When reworking: If I am not mistaken there is a chance that
> modesetting will work when using latest kernel versions from Eric
> Anholt. So would you mind to rebase the patches to these changes? I
> would again play tester role.
>

Yes, I will. I know Derek was also playing with Eric's latest branch
so I'll coordinate with him and bump the sha-1 id if necessary.
 
> Andreas
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH v3 0/2] Add support for 4.2 kernel with vc4 DRM/KMS driver

2015-11-10 Thread Javier Martinez Canillas
Hello Andrei,

This series adds support for Eric Anholt's v4.2 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.

This is a third version of the series which addresses feedback provided
by Andreas Müller, Khem Raj and you. The first version and second version
of the series can be found at [0] and [1]. Some of the v2 patches have
been dropped since are no longer necessary so the delta is smaller in v3.

The v4.2 kernel is under heavy development so is a work-in-progress and
should not be used in production. That's why it's not set as the default
virtual/kernel provider but the user can change the default providers in
case that wants to use the VC4 DRM/KMS driver.

But even when it's still a development kernel, having the recipe in the
meta-raspberrypi will allow people to test it. We have been using it in
the Tizen RPi2 port [2] for some time. The patches in the series are:

Patch 1/2 adds a recipe for the 4.2 and some patches to make it build.

Patch 2/2 Adds a section to the README that explains that two gfx stacks
are available and that the user can change the default providers.

To test it, besides this series I picked some patches from Andreas' git
tree that are in his vc4-3 branch [3]:

f5865b4b1bc4 libsdl2: enable glesv2
c8666982c1bc xserver-xf86-config: setup for VC4 hardware acceleration
b1082f5aeebe rpi-base.inc: add xf86-video-modesetting and 
xserver-xorg-extension-glx to XSERVER
5568cd057d07 xserver-xorg: align to vc4 needs
d9881d3ccb58 mesa: align to vc4 needs

and also needed to bump the mesa SRCREV to master HEAD (commit sha1
51694072218b5ae84b5d8f98ee2172d7c5d61b31).

X starts and also I'm able to run the glmark2-es benchmark and the VC4
EGL rendering is used:

root@raspberrypi2:~# glmark2-es2
===
glmark2 2014.03
===
OpenGL Information
GL_VENDOR: Broadcom
GL_RENDERER:   Gallium 0.4 on VC4
GL_VERSION:OpenGL ES 2.0 Mesa 11.1.0-devel (git-51694072218b)
===
[build] use-vbo=false: FPS: 36 FrameTime: 27.778 ms
[build] use-vbo=true: FPS: 38 FrameTime: 26.316 ms
[texture] texture-filter=nearest: FPS: 39 FrameTime: 25.641 ms
[texture] texture-filter=linear: FPS: 38 FrameTime: 26.316 ms
[texture] texture-filter=mipmap: FPS: 38 FrameTime: 26.316 ms

In theory this kernel should have KMS support but setting a different mode
than the one configured in the firmware config.txt did not work for me.
Only xrandr --output HDMI-0 --auto works and xrandr --output HDMI-0 --mode
using a different mode than the config.txt does not work.

But I think that could be solved as a follow up once these patches are
merged.

[0]: https://www.mail-archive.com/yocto@yoctoproject.org/msg25164.html
[1]: https://lists.yoctoproject.org/pipermail/yocto/2015-August/026151.html
[2]: http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/
[3]: git://github.com/schnitzeltony/meta-raspberrypi.git

Best regards,
Javier

Changes in v3:
- Update to latest vc4-kms-v3d-rpi2 branch sha1. Suggested by Andreas Müller.
- Drop patches that were already merged in the vc4-kms-v3d-rpi2 branch.
- Bump Linux version from 4.1 to 4.2.
- Add explanation in the README graphics section how to choose the kernel
  that has vc4 DRM/KMS support. Suggested by Khem Raj and Andrei Gherzan.

Changes in v2:
- Add a linux-raspberrypi-vc4 recipe insted of a linux-raspberrypi one.
  Suggested by Petter Mabäcker, Andreas Müller and Andrei Gherzan.
- Split the readme change in a separate patch. Suggested by Andrei Gherzan.
- Don't make the vc4 patches inclusion conditional since will always be
  needed when choosing the recipe. Suggested by Andrei Gherzan.

Derek Foreman (1):
  linux-raspberrypi: Add a 4.2.3 linux kernel with vc4 support

Javier Martinez Canillas (1):
  README: Add a section about graphic stacks

 README | 17 +
 ..._defconfig-Enable-config-options-for-vc4-.patch | 40 ++
 .../0002-bcm2708-Fix-DTC-build-error.patch | 38 
 .../linux/linux-raspberrypi-vc4/defconfig  |  1 +
 recipes-kernel/linux/linux-raspberrypi-vc4_4.2.bb  |  9 +
 5 files changed, 105 insertions(+)
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0002-bcm2708-Fix-DTC-build-error.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4/defconfig
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4_4.2.bb

-- 
2.4.3

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH v3 1/2] linux-raspberrypi: Add a 4.2.3 linux kernel with vc4 support

2015-11-10 Thread Javier Martinez Canillas
From: Derek Foreman 

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 but can be chosen by changing the default providers.

Signed-off-by: Derek Foreman 
[javier: Extended commit message and set default preference to -1]
Signed-off-by: Javier Martinez Canillas 

---

Changes in v3:
- Update to latest vc4-kms-v3d-rpi2 branch sha1. Suggested by Andreas Müller.
- Drop patches that were already merged in the vc4-kms-v3d-rpi2 branch.
- Bump Linux version from 4.1 to 4.2.

Changes in v2:
- Add a linux-raspberrypi-vc4 recipe insted of a linux-raspberrypi one.
  Suggested by Petter Mabäcker, Andreas Müller and Andrei Gherzan.
- Split the readme change in a separate patch. Suggested by Andrei Gherzan.
- Don't make the vc4 patches inclusion conditional since will always be
  needed when choosing the recipe. Suggested by Andrei Gherzan.

 ..._defconfig-Enable-config-options-for-vc4-.patch | 40 ++
 .../0002-bcm2708-Fix-DTC-build-error.patch | 38 
 .../linux/linux-raspberrypi-vc4/defconfig  |  1 +
 recipes-kernel/linux/linux-raspberrypi-vc4_4.2.bb  |  9 +
 4 files changed, 88 insertions(+)
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
 create mode 100644 
recipes-kernel/linux/linux-raspberrypi-vc4/0002-bcm2708-Fix-DTC-build-error.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4/defconfig
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4_4.2.bb

diff --git 
a/recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
 
b/recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
new file mode 100644
index ..d7b722dd35df
--- /dev/null
+++ 
b/recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
@@ -0,0 +1,40 @@
+From 10e0beec47def7813e2e256697018f3d0a4559fe Mon Sep 17 00:00:00 2001
+From: Derek Foreman 
+Date: Fri, 6 Nov 2015 13:15:35 -0300
+Subject: [PATCH 1/1] 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 
+---
+ arch/arm/configs/bcm2709_defconfig | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/configs/bcm2709_defconfig 
b/arch/arm/configs/bcm2709_defconfig
+index c2ddd10dc106..4312906bfe0f 100644
+--- a/arch/arm/configs/bcm2709_defconfig
 b/arch/arm/configs/bcm2709_defconfig
+@@ -394,7 +394,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_MTD=m
+ CONFIG_MTD_BLOCK=m
+ CONFIG_MTD_NAND=m
+@@ -807,6 +807,8 @@ CONFIG_FB=y
+ CONFIG_FB_BCM2708=y
+ CONFIG_FB_SSD1307=m
+ CONFIG_FB_RPISENSE=m
++CONFIG_DRM=y
++CONFIG_DRM_VC4=y
+ # CONFIG_BACKLIGHT_GENERIC is not set
+ CONFIG_BACKLIGHT_GPIO=m
+ CONFIG_FRAMEBUFFER_CONSOLE=y
+-- 
+2.4.3
+
diff --git 
a/recipes-kernel/linux/linux-raspberrypi-vc4/0002-bcm2708-Fix-DTC-build-error.patch
 
b/recipes-kernel/linux/linux-raspberrypi-vc4/0002-bcm2708-Fix-DTC-build-error.patch
new file mode 100644
index ..59aa0e54d353
--- /dev/null
+++ 
b/recipes-kernel/linux/linux-raspberrypi-vc4/0002-bcm2708-Fix-DTC-build-error.patch
@@ -0,0 +1,38 @@
+From 2d0adbb07ef248173af3ac090ca867cf3460 Mon Sep 17 00:00:00 2001
+From: Javier Martinez Canillas 
+Date: Mon, 9 Nov 2015 16:17:28 -0300
+Subject: [PATCH 1/1] bcm2708: Fix DTC build error
+
+Commit fa6a6d220c4c ("bcm2708: Use #include in dtsi files") changed the bcm*
+DTSI files to use the pre-processor #include directive instead the /include/
+but forgot to change the arch/arm/boot/dts/bcm2708.dtsi file. Later commit
+7f04e14bebf1 ("fixup! bcm2708: Use #include in dtsi files") tried to do that
+change but introduced a build error:
+
+DTC arch/arm/boot/dts/bcm2708-rpi-b.dtb
+In file included from arch/arm/boot/dts/bcm2708-rpi-b.dts:3:0:
+arch/arm/boot/dts/bcm2708.dtsi:1:9: error: #include expects "FILENAME" or 

+^
+scripts/Makefile.lib:293: recipe for target 
'arch/arm/boot/dts/bcm2708-rpi-b.dtb' failed
+make[1]: *** [arch/arm/boot/dts/bcm2708-rpi-b.dtb] Error 1
+arch/arm/Makefile:327: recipe for target 'bcm2708-rpi-b.dtb' failed
+make: *** [bcm2708-rpi-b.dtb] Error 2
+
+Signed-off-by: Javier Martinez Canillas 
+---
+ arch/arm/boot/dts/bcm2708.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/

[yocto] [meta-raspberrypi][PATCH v3 2/2] README: Add a section about graphic stacks

2015-11-10 Thread Javier Martinez Canillas
This patch adds a section to the README that explains the RPi have
different graphics stacks and that the user can choose by manually
changing providers.

Signed-off-by: Javier Martinez Canillas 

---

Changes in v3:
- Add explanation in the README graphics section how to choose the kernel
  that has vc4 DRM/KMS support. Suggested by Khem Raj and Andrei Gherzan.

Changes in v2: None

 README | 17 +
 1 file changed, 17 insertions(+)

diff --git a/README b/README
index e16dee9ca7e5..e6cabb7c1f63 100644
--- a/README
+++ b/README
@@ -24,6 +24,7 @@ Contents:
 2.J. Boot to U-Boot
 2.K. Image with Initramfs
 2.L. Device tree support
+2.M. Graphic stacks
 3. Extra apps
 3.A. omxplayer
 4. Source code and mirrors
@@ -189,6 +190,22 @@ kernels.
 NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always 
disabled for
   older kernel versions.
 
+2.M. 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
+modifying the defaults for the kernel, egl, gles2, libgl and mesa providers.
+
+So to use the experimental vc4 DRM/KMS kernel, add the following to the
+conf/local.conf file:
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi-vc4"
+PREFERRED_PROVIDER_virtual/egl = "mesa"
+PREFERRED_PROVIDER_virtual/libgles2 = "mesa"
+PREFERRED_PROVIDER_virtual/libgl = "mesa"
+PREFERRED_PROVIDER_virtual/mesa = "mesa"
+
 3. Extra apps
 =
 
-- 
2.4.3

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH v3 0/2] Add support for 4.2 kernel with vc4 DRM/KMS driver

2015-11-20 Thread Javier Martinez Canillas
On 11/10/2015 11:45 AM, Javier Martinez Canillas wrote:
> Hello Andrei,
> 
> This series adds support for Eric Anholt's v4.2 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.
> 
> This is a third version of the series which addresses feedback provided
> by Andreas Müller, Khem Raj and you. The first version and second version
> of the series can be found at [0] and [1]. Some of the v2 patches have
> been dropped since are no longer necessary so the delta is smaller in v3.
> 

Any comments about this series?

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH v3 0/2] Add support for 4.2 kernel with vc4 DRM/KMS driver

2015-11-30 Thread Javier Martinez Canillas
On 11/20/2015 02:30 PM, Andreas Müller wrote:
> On Fri, Nov 20, 2015 at 5:09 PM, Khem Raj  wrote:
>> On Fri, Nov 20, 2015 at 7:34 AM, Javier Martinez Canillas
>>  wrote:
>>> On 11/10/2015 11:45 AM, Javier Martinez Canillas wrote:
>>>> Hello Andrei,
>>>>
>>>> This series adds support for Eric Anholt's v4.2 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.
>>>>
>>>> This is a third version of the series which addresses feedback provided
>>>> by Andreas Müller, Khem Raj and you. The first version and second version
>>>> of the series can be found at [0] and [1]. Some of the v2 patches have
>>>> been dropped since are no longer necessary so the delta is smaller in v3.
>>>>
>>>
>>> Any comments about this series?
>>
>> Whole series looks good to me.
>>

Thanks Khem.

> Hop to find some time to test this weekend.
>

Andreas, did you find time to test?
 
> Andreas
> 

Andrei, gentle ping about this series again.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto