All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver
@ 2015-07-30  8:34 Javier Martinez Canillas
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 1/5] linux-raspberrypi.inc: Make kgdboc kernel param optional Javier Martinez Canillas
                   ` (5 more replies)
  0 siblings, 6 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-07-30  8:34 UTC (permalink / raw)
  To: Andrei Gherzan
  Cc: yocto, Derek Foreman, Javier Martinez Canillas, Mauro Carvalho Chehab

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



^ permalink raw reply	[flat|nested] 49+ messages in thread

* [meta-raspberrypi][PATCH 1/5] linux-raspberrypi.inc: Make kgdboc kernel param optional
  2015-07-30  8:34 [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Javier Martinez Canillas
@ 2015-07-30  8:34 ` Javier Martinez Canillas
  2015-08-09 22:37   ` Andrei Gherzan
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs Javier Martinez Canillas
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-07-30  8:34 UTC (permalink / raw)
  To: Andrei Gherzan
  Cc: yocto, Derek Foreman, Javier Martinez Canillas, Mauro Carvalho Chehab

From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

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 <mchehab@osg.samsung.com>
[javier: Extended commit message and made it conditional]
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 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



^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs
  2015-07-30  8:34 [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Javier Martinez Canillas
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 1/5] linux-raspberrypi.inc: Make kgdboc kernel param optional Javier Martinez Canillas
@ 2015-07-30  8:34 ` Javier Martinez Canillas
  2015-08-09 22:44   ` Andrei Gherzan
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition Javier Martinez Canillas
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-07-30  8:34 UTC (permalink / raw)
  To: Andrei Gherzan
  Cc: yocto, Derek Foreman, Javier Martinez Canillas, Mauro Carvalho Chehab

From: Derek Foreman <derekf@osg.samsung.com>

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 <derekf@osg.samsung.com>
[javier: Made it a config option]
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 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



^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition
  2015-07-30  8:34 [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Javier Martinez Canillas
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 1/5] linux-raspberrypi.inc: Make kgdboc kernel param optional Javier Martinez Canillas
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs Javier Martinez Canillas
@ 2015-07-30  8:34 ` Javier Martinez Canillas
  2015-08-09 21:17   ` Andreas Müller
  2015-08-09 21:57   ` Andrei Gherzan
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support Javier Martinez Canillas
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-07-30  8:34 UTC (permalink / raw)
  To: Andrei Gherzan
  Cc: yocto, Derek Foreman, Javier Martinez Canillas, Mauro Carvalho Chehab

From: Derek Foreman <derekf@osg.samsung.com>

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 <derekf@osg.samsung.com>
[javier: Extended the commit message]
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 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



^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
  2015-07-30  8:34 [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Javier Martinez Canillas
                   ` (2 preceding siblings ...)
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition Javier Martinez Canillas
@ 2015-07-30  8:34 ` Javier Martinez Canillas
  2015-08-09 22:54   ` Andrei Gherzan
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack Javier Martinez Canillas
  2015-08-04  9:16 ` [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Petter Mabäcker
  5 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-07-30  8:34 UTC (permalink / raw)
  To: Andrei Gherzan
  Cc: yocto, Derek Foreman, Javier Martinez Canillas, Mauro Carvalho Chehab

From: Derek Foreman <derekf@osg.samsung.com>

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 <derekf@osg.samsung.com>
[javier: Extended commit message and set default preference to -1]
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 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 000000000000..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 <derekf@osg.samsung.com>
+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 <derekf@osg.samsung.com>
+---
+ 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 000000000000..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 <derekf@osg.samsung.com>
+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 <derekf@osg.samsung.com
+---
+ arch/arm/boot/dts/bcm2708_common.dtsi | 2 +-
+ arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 6 ++++++
+ drivers/i2c/busses/i2c-bcm2708.c      | 6 +++++-
+ 3 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi
+index ccf01a568cb6..15277d2765bb 100644
+--- a/arch/arm/boot/dts/bcm2708_common.dtsi
++++ b/arch/arm/boot/dts/bcm2708_common.dtsi
+@@ -155,7 +155,7 @@
+ 		};
+ 
+ 		i2c2: i2c@7e805000 {
+-			compatible = "brcm,bcm2835-i2c";
++			compatible = "brcm,bcm2708-i2c";
+ 			reg = <0x7e805000 0x1000>;
+ 			interrupts = <2 21>;
+ 			clocks = <&clk_i2c>;
+diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
+index 8aaaf1fb7143..712ca455cc46 100644
+--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
+@@ -11,6 +11,7 @@
+ 		spi0 = &spi0;
+ 		i2c0 = &i2c0;
+ 		i2c1 = &i2c1;
++		i2c2 = &i2c2;
+ 		i2s  = &i2s;
+ 		gpio = &gpio;
+ 		intc = &intc;
+@@ -94,6 +95,11 @@
+ 	clock-frequency = <100000>;
+ };
+ 
++&i2c2 {
++	pinctrl-names = "default";
++	clock-frequency = <100000>;
++};
++
+ &i2s {
+ 	#sound-dai-cells = <0>;
+ 	pinctrl-names = "default";
+diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c
+index 8773203b34eb..2054ff44e744 100644
+--- a/drivers/i2c/busses/i2c-bcm2708.c
++++ b/drivers/i2c/busses/i2c-bcm2708.c
+@@ -109,6 +109,7 @@ static void bcm2708_i2c_init_pinmode(int id)
+ #define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3))
+ 
+ 	int pin;
++
+ 	u32 *gpio = ioremap(GPIO_BASE, SZ_16K);
+ 
+ 	BUG_ON(id != 0 && id != 1);
+@@ -382,7 +383,7 @@ static int bcm2708_i2c_probe(struct platform_device *pdev)
+ 		goto out_clk_put;
+ 	}
+ 
+-	if (!pdev->dev.of_node)
++	if (pdev->id < 2)
+ 		bcm2708_i2c_init_pinmode(pdev->id);
+ 
+ 	bi = kzalloc(sizeof(*bi), GFP_KERNEL);
+@@ -407,6 +408,9 @@ static int bcm2708_i2c_probe(struct platform_device *pdev)
+ 	case 1:
+ 		adap->class = I2C_CLASS_DDC;
+ 		break;
++	case 2:
++		adap->class = I2C_CLASS_DDC;
++		break;
+ 	default:
+ 		dev_err(&pdev->dev, "can only bind to BSC 0 or 1\n");
+ 		err = -ENXIO;
+-- 
+2.4.3
+
diff --git a/recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch b/recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch
new file mode 100644
index 000000000000..bc50992dcdbe
--- /dev/null
+++ b/recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch
@@ -0,0 +1,115 @@
+From e877e76e5d723eb14bce9c58af40b962eced02bf Mon Sep 17 00:00:00 2001
+From: Derek Foreman <derekf@osg.samsung.com>
+Date: Thu, 2 Jul 2015 11:19:54 -0500
+Subject: [PATCH 3/5] drm/vc4: Use the fbdev_cma helpers
+
+Keep the fbdev_cma pointer around so we can use it on hotplog and close
+to ensure the frame buffer console is in a useful state.
+
+Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
+---
+ drivers/gpu/drm/vc4/vc4_drv.c | 15 +++++++++++++++
+ drivers/gpu/drm/vc4/vc4_drv.h |  2 ++
+ drivers/gpu/drm/vc4/vc4_kms.c | 18 +++++++++++++++---
+ 3 files changed, 32 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
+index 5c023ba4f6ad..04f1f738ebc2 100644
+--- a/drivers/gpu/drm/vc4/vc4_drv.c
++++ b/drivers/gpu/drm/vc4/vc4_drv.c
+@@ -13,6 +13,7 @@
+ #include <linux/module.h>
+ #include <linux/of_platform.h>
+ #include <linux/platform_device.h>
++#include <drm/drm_fb_cma_helper.h>
+ 
+ #include "uapi/drm/vc4_drm.h"
+ #include "vc4_drv.h"
+@@ -78,6 +79,11 @@ vc4_drm_load(struct drm_device *dev, unsigned long flags)
+ 
+ static int vc4_drm_unload(struct drm_device *dev)
+ {
++	struct vc4_dev *vc4 = to_vc4_dev(dev);
++
++	if (vc4->fbdev)
++		drm_fbdev_cma_fini(vc4->fbdev);
++
+ 	drm_mode_config_cleanup(dev);
+ 
+ 	component_unbind_all(dev->dev, dev);
+@@ -93,6 +99,14 @@ static void vc4_drm_preclose(struct drm_device *dev, struct drm_file *file)
+ 		vc4_cancel_page_flip(crtc, file);
+ }
+ 
++static void vc4_lastclose(struct drm_device *dev)
++{
++	struct vc4_dev *vc4 = to_vc4_dev(dev);
++
++	if (vc4->fbdev)
++		drm_fbdev_cma_restore_mode(vc4->fbdev);
++}
++
+ static const struct file_operations vc4_drm_fops = {
+ 	.owner = THIS_MODULE,
+ 	.open = drm_open,
+@@ -123,6 +137,7 @@ static struct drm_driver vc4_drm_driver = {
+ 			    DRIVER_PRIME),
+ 	.load = vc4_drm_load,
+ 	.unload = vc4_drm_unload,
++	.lastclose = vc4_lastclose,
+ 	.set_busid = drm_platform_set_busid,
+ 	.preclose = vc4_drm_preclose,
+ 
+diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
+index 13b475785ca0..d460bb3e6b64 100644
+--- a/drivers/gpu/drm/vc4/vc4_drv.h
++++ b/drivers/gpu/drm/vc4/vc4_drv.h
+@@ -81,6 +81,8 @@ struct vc4_dev {
+ 	} hangcheck;
+ 
+ 	struct semaphore async_modeset;
++
++	struct drm_fbdev_cma *fbdev;
+ };
+ 
+ static inline struct vc4_dev *
+diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
+index acfd1b23ab4a..cb18d8f0e387 100644
+--- a/drivers/gpu/drm/vc4/vc4_kms.c
++++ b/drivers/gpu/drm/vc4/vc4_kms.c
+@@ -155,7 +155,17 @@ static int vc4_atomic_commit(struct drm_device *dev,
+ 	return 0;
+ }
+ 
++static void vc4_output_poll_changed(struct drm_device *dev)
++{
++	struct vc4_dev *vc4 = to_vc4_dev(dev);
++
++	if (vc4->fbdev)
++		drm_fbdev_cma_hotplug_event(vc4->fbdev);
++}
++
++
+ static const struct drm_mode_config_funcs vc4_mode_funcs = {
++	.output_poll_changed = vc4_output_poll_changed,
+ 	.atomic_check = drm_atomic_helper_check,
+ 	.atomic_commit = vc4_atomic_commit,
+ 	.fb_create = drm_fb_cma_create,
+@@ -214,9 +224,11 @@ vc4_kms_load(struct drm_device *dev)
+ 
+ 	drm_mode_config_reset(dev);
+ 
+-	drm_fbdev_cma_init(dev, 32,
+-			   dev->mode_config.num_crtc,
+-			   dev->mode_config.num_connector);
++	vc4->fbdev = drm_fbdev_cma_init(dev, 32,
++					dev->mode_config.num_crtc,
++					dev->mode_config.num_connector);
++	if (IS_ERR(vc4->fbdev))
++		vc4->fbdev = NULL;
+ 
+ 	drm_kms_helper_poll_init(dev);
+ 
+-- 
+2.4.3
+
diff --git a/recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch b/recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch
new file mode 100644
index 000000000000..0293ed713c3e
--- /dev/null
+++ b/recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch
@@ -0,0 +1,26 @@
+From 4388ed0f2d66399a6ad3133b91bd438cdb25e37b Mon Sep 17 00:00:00 2001
+From: Derek Foreman <derekf@osg.samsung.com>
+Date: Thu, 2 Jul 2015 11:20:21 -0500
+Subject: [PATCH 4/5] drm/vc4: Allow vblank to be disabled
+
+Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
+---
+ drivers/gpu/drm/vc4/vc4_kms.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
+index cb18d8f0e387..1473df9ef4a1 100644
+--- a/drivers/gpu/drm/vc4/vc4_kms.c
++++ b/drivers/gpu/drm/vc4/vc4_kms.c
+@@ -218,6 +218,8 @@ vc4_kms_load(struct drm_device *dev)
+ 	dev->mode_config.funcs = &vc4_mode_funcs;
+ 	dev->mode_config.preferred_depth = 24;
+ 
++	dev->vblank_disable_allowed = true;
++
+ 	ret = vc4_init_modeset_objects(dev);
+ 	if (ret)
+ 		goto fail;
+-- 
+2.4.3
+
diff --git a/recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch b/recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch
new file mode 100644
index 000000000000..eff5058aeda7
--- /dev/null
+++ b/recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch
@@ -0,0 +1,95 @@
+From 844a32b8444a38b6378c98ad4a4b8b8c3522c020 Mon Sep 17 00:00:00 2001
+From: Derek Foreman <derekf@osg.samsung.com>
+Date: Fri, 24 Jul 2015 03:29:15 +0200
+Subject: [PATCH 5/5] drm/vc4: Disable KMS operations
+
+The vc4 driver KMS implementation still has some issues so
+for now skip most of the codepaths to avoid system hangs.
+
+Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
+---
+ drivers/gpu/drm/drm_atomic_helper.c | 2 +-
+ drivers/gpu/drm/vc4/vc4_crtc.c      | 2 +-
+ drivers/gpu/drm/vc4/vc4_hdmi.c      | 6 ++++--
+ drivers/gpu/drm/vc4/vc4_kms.c       | 1 +
+ 4 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
+index 1d2ca52530d5..ba7f355bcced 100644
+--- a/drivers/gpu/drm/drm_atomic_helper.c
++++ b/drivers/gpu/drm/drm_atomic_helper.c
+@@ -1876,7 +1876,7 @@ void drm_atomic_helper_connector_dpms(struct drm_connector *connector,
+ 	struct drm_connector *tmp_connector;
+ 	int ret;
+ 	bool active = false;
+-
++return;
+ 	if (mode != DRM_MODE_DPMS_ON)
+ 		mode = DRM_MODE_DPMS_OFF;
+ 
+diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
+index f9960ac34fd7..1b85355baef0 100644
+--- a/drivers/gpu/drm/vc4/vc4_crtc.c
++++ b/drivers/gpu/drm/vc4/vc4_crtc.c
+@@ -91,7 +91,7 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc)
+ 		       ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? 1 : 0));
+ 	u32 format = PV_CONTROL_FORMAT_24;
+ 	bool debug_dump_regs = false;
+-
++return;
+ 	if (debug_dump_regs) {
+ 		DRM_INFO("CRTC %d regs before:\n", drm_crtc_index(crtc));
+ 		vc4_crtc_dump_regs(vc4_crtc);
+diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
+index 8c41fdc4ef2e..2a212b08e108 100644
+--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
+@@ -273,7 +273,7 @@ vc4_set_pixel_clock(struct vc4_dev *vc4, u32 clock)
+ {
+ 	u32 packet[2];
+ 	int ret;
+-
++return;
+ 	packet[0] = 8; /* Pixel clock. */
+ 	packet[1] = clock;
+ 
+@@ -295,6 +295,7 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
+ 	bool debug_dump_regs = false;
+ 	bool hsync_pos = !(mode->flags & DRM_MODE_FLAG_NHSYNC);
+ 	bool vsync_pos = !(mode->flags & DRM_MODE_FLAG_NVSYNC);
++return;
+ 	u32 vactive = (mode->vdisplay >>
+ 		       ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? 1 : 0));
+ 	u32 verta = (VC4_SET_FIELD(mode->vsync_end - mode->vsync_start,
+@@ -405,7 +406,7 @@ static void vc4_hdmi_encoder_disable(struct drm_encoder *encoder)
+ {
+ 	struct drm_device *dev = encoder->dev;
+ 	struct vc4_dev *vc4 = to_vc4_dev(dev);
+-
++return;
+ 	HDMI_WRITE(VC4_HDMI_TX_PHY_RESET_CTL, 0xf << 16);
+ }
+ 
+@@ -413,6 +414,7 @@ static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder)
+ {
+ 	struct drm_device *dev = encoder->dev;
+ 	struct vc4_dev *vc4 = to_vc4_dev(dev);
++return;
+ 
+ 	HDMI_WRITE(VC4_HDMI_TX_PHY_RESET_CTL, 0);
+ }
+diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
+index 1473df9ef4a1..5ddc5d9beaae 100644
+--- a/drivers/gpu/drm/vc4/vc4_kms.c
++++ b/drivers/gpu/drm/vc4/vc4_kms.c
+@@ -144,6 +144,7 @@ static int vc4_atomic_commit(struct drm_device *dev,
+ 	 * current layout.
+ 	 */
+ 
++	async=0;
+ 	if (async) {
+ 		vc4_queue_seqno_cb(dev, &c->cb, wait_seqno,
+ 				   vc4_atomic_complete_commit_seqno_cb);
+-- 
+2.4.3
+
diff --git a/recipes-kernel/linux/linux-raspberrypi_4.1.bb b/recipes-kernel/linux/linux-raspberrypi_4.1.bb
new file mode 100644
index 000000000000..a8e1863ddf2c
--- /dev/null
+++ b/recipes-kernel/linux/linux-raspberrypi_4.1.bb
@@ -0,0 +1,16 @@
+LINUX_VERSION ?= "4.1.0"
+
+# Don't make this the default kernel, right now it is only for testing purposes
+DEFAULT_PREFERENCE = "-1"
+
+SRCREV = "07009cab090ade3dd180e8a55d590b1a00072eed"
+SRC_URI = "git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2"
+
+# Add patches needed for the vc4 driver but only if enabled as distro feature since are experimental
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch', '', d)}"
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch', '', d)}"
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0003-drm-vc4-Use-the-fbdev_cma-helpers.patch', '', d)}"
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0004-drm-vc4-Allow-vblank-to-be-disabled.patch', '', d)}"
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0005-drm-vc4-Disable-KMS-operations.patch', '', d)}"
+
+require linux-raspberrypi.inc
-- 
2.4.3



^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-07-30  8:34 [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Javier Martinez Canillas
                   ` (3 preceding siblings ...)
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support Javier Martinez Canillas
@ 2015-07-30  8:34 ` Javier Martinez Canillas
  2015-08-03 20:14   ` Andreas Müller
  2015-08-04 19:01   ` Khem Raj
  2015-08-04  9:16 ` [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Petter Mabäcker
  5 siblings, 2 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-07-30  8:34 UTC (permalink / raw)
  To: Andrei Gherzan
  Cc: yocto, Derek Foreman, Javier Martinez Canillas, Mauro Carvalho Chehab

From: Derek Foreman <derekf@osg.samsung.com>

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

---

 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



^ permalink raw reply related	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack Javier Martinez Canillas
@ 2015-08-03 20:14   ` Andreas Müller
  2015-08-04 16:17     ` Javier Martinez Canillas
  2015-08-04 19:01   ` Khem Raj
  1 sibling, 1 reply; 49+ messages in thread
From: Andreas Müller @ 2015-08-03 20:14 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Yocto Project, Mauro Carvalho Chehab, Derek Foreman

On Thu, Jul 30, 2015 at 10:34 AM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> From: Derek Foreman <derekf@osg.samsung.com>
>
> 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 <derekf@osg.samsung.com>
> [javier: Extend commit msg and made conditional instead removing userland]
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
>  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]

Andreas

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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver
  2015-07-30  8:34 [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Javier Martinez Canillas
                   ` (4 preceding siblings ...)
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack Javier Martinez Canillas
@ 2015-08-04  9:16 ` Petter Mabäcker
  2015-08-04 16:07   ` Javier Martinez Canillas
  5 siblings, 1 reply; 49+ messages in thread
From: Petter Mabäcker @ 2015-08-04  9:16 UTC (permalink / raw)
  To: Javier Martinez Canillas, Andrei Gherzan, ajlennon
  Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

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.

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

Nice and interesting changes, but you really should sync this with Alex 
Lennon as well since he currently are working with integrating 4.1 into 
meta-raspberrypi. An other opinion is that you should start by trying to 
integrate relevant kernel changes both from 
'git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2' 
and the integration patches into the currently used upstream 
(https://github.com/raspberrypi/linux) and I also think it's a good idea 
to ensure that the new code is added within kernel config options so 
it's easy to enable/disable the vc4 support. Then at least I think this 
more easily can be integrated in meta-raspberrypi.

BR,
Petter


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver
  2015-08-04  9:16 ` [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Petter Mabäcker
@ 2015-08-04 16:07   ` Javier Martinez Canillas
  2015-08-05 20:48     ` Petter Mabäcker
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-04 16:07 UTC (permalink / raw)
  To: Petter Mabäcker, Andrei Gherzan, ajlennon
  Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

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 +++++++++++++++
>>   .../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
>>
> 
> Nice and interesting changes, but you really should sync this with Alex Lennon as well since he currently are working with integrating 4.1 into meta-raspberrypi. An other opinion is that you should start by trying to integrate relevant kernel changes both from 'git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2' and the integration patches into the currently used upstream (https://github.com/raspberrypi/linux) and I also think it's a good idea to ensure that the new code is added within kernel config options so it's easy to enable/disable the vc4 support. Then at least I think this more easily can be integrated in meta-raspberrypi.
>

I didn't know there was a work in progress to integrate the 4.1 tree.
Although that is for the branch in https://github.com/raspberrypi/linux
that does not have the Broadcom VC4 DRM/KMS driver. I agree that ideally
Eric's changes should be integrated back to that tree but I don't expect
that to be a trivial task. I certainly don't know if have the bandwidth
to do it. Also, it is under heavy development so will be hard to track.

Another option is to have two recipes for 4.1, one for the raspberrypi
tree with userland and another one with the tree with the VC4 DRM/KMS
driver. Or use the same recipe but with a different SRC_URI for each case.

I tried to isolate all the VC4 support so is enabled and disable easily
using a config option.

> BR,
> Petter

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-03 20:14   ` Andreas Müller
@ 2015-08-04 16:17     ` Javier Martinez Canillas
  2015-08-04 16:55       ` Andreas Müller
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-04 16:17 UTC (permalink / raw)
  To: Andreas Müller; +Cc: Yocto Project, Mauro Carvalho Chehab, Derek Foreman

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
> <javier@osg.samsung.com> wrote:
>> From: Derek Foreman <derekf@osg.samsung.com>
>>
>> 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 <derekf@osg.samsung.com>
>> [javier: Extend commit msg and made conditional instead removing userland]
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>> ---
>>
>>  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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-04 16:17     ` Javier Martinez Canillas
@ 2015-08-04 16:55       ` Andreas Müller
  2015-08-05  6:25         ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Andreas Müller @ 2015-08-04 16:55 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Yocto Project, Mauro Carvalho Chehab, Derek Foreman

On Tue, Aug 4, 2015 at 6:17 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> 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
>> <javier@osg.samsung.com> wrote:
>>> From: Derek Foreman <derekf@osg.samsung.com>
>>>
>>> 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 <derekf@osg.samsung.com>
>>> [javier: Extend commit msg and made conditional instead removing userland]
>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>>
>>> ---
>>>
>>>  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
Another thing: With witch version of RasPi did you test. With V2 I get

[    1.342175] [drm:vc4_hdmi_bind] *ERROR* Failed to get ddc i2c adapter by node
[    1.349359] vc4-drm soc:vc4@0x7e4c0000: failed to bind
3f902000.brcm,vc4-hdmi (ops vc4_hdmi_ops): -517

Andreas


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack Javier Martinez Canillas
  2015-08-03 20:14   ` Andreas Müller
@ 2015-08-04 19:01   ` Khem Raj
  2015-08-05  6:34     ` Javier Martinez Canillas
  1 sibling, 1 reply; 49+ messages in thread
From: Khem Raj @ 2015-08-04 19:01 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

[-- Attachment #1: Type: text/plain, Size: 2675 bytes --]


> On Jul 30, 2015, at 1:34 AM, Javier Martinez Canillas <javier@osg.samsung.com> wrote:
> 
> From: Derek Foreman <derekf@osg.samsung.com>
> 
> 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 <derekf@osg.samsung.com>
> [javier: Extend commit msg and made conditional instead removing userland]
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> ---
> 
> 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 ?


> 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


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-04 16:55       ` Andreas Müller
@ 2015-08-05  6:25         ` Javier Martinez Canillas
  0 siblings, 0 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-05  6:25 UTC (permalink / raw)
  To: Andreas Müller; +Cc: Yocto Project, Mauro Carvalho Chehab, Derek Foreman

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@0x7e4c0000: 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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-04 19:01   ` Khem Raj
@ 2015-08-05  6:34     ` Javier Martinez Canillas
  2015-08-06  2:54       ` Khem Raj
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-05  6:34 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

Hello Khem,

On 08/04/2015 09:01 PM, Khem Raj wrote:
> 
>> On Jul 30, 2015, at 1:34 AM, Javier Martinez Canillas <javier@osg.samsung.com> wrote:
>>
>> From: Derek Foreman <derekf@osg.samsung.com>
>>
>> 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 <derekf@osg.samsung.com>
>> [javier: Extend commit msg and made conditional instead removing userland]
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>> ---
>>
>> 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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver
  2015-08-04 16:07   ` Javier Martinez Canillas
@ 2015-08-05 20:48     ` Petter Mabäcker
  2015-08-06  7:03       ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Petter Mabäcker @ 2015-08-05 20:48 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

[-- Attachment #1: Type: text/plain, Size: 7011 bytes --]

 

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. 

>>
KERNEL_DEVICETREE = " bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb
bcm2709-rpi-2-b.dtb overlays/hifiberry-amp-overlay.dtb
overlays/hifiberry-dac-overlay.dtb
overlays/hifiberry-dacplus-overlay.dtb
overlays/hifiberry-digi-overlay.dtb overlays/iqaudio-dac-overlay.dtb
overlays/iqaudio-dacplus-overlay.dtb overlays/lirc-rpi-overlay.dtb
overlays/pps-gpio-overlay.dtb overlays/w1-gpio-overlay.dtb
overlays/w1-gpio-pullup-overlay.dtb " [0]:
http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/ [1]
[1]: https://github.com/raspberrypi/linux/commit/739c586c8757 [2] Best
regards, --- Javier Martinez Canillas Open Source Group Samsung Research
America Derek Foreman (4): rpi-config: Allow to mask GPU irqs
sdcard_image-rpi.bbclass: Allocate more space for boot partition
linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
rpi-default-providers: Switch providers according to used gfx stack
Mauro Carvalho Chehab (1): linux-raspberrypi.inc: Make kgdboc kernel
param optional README | 38 +++++-- classes/sdcard_image-rpi.bbclass | 6
+- conf/machine/include/rpi-default-providers.inc | 8 +-
conf/machine/include/rpi-default-versions.inc | 2 +-
recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++
recipes-kernel/linux/linux-raspberrypi.inc | 5 +-
..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++
...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++
.../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115
+++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch
| 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95
+++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++
12 files changed, 433 insertions(+), 17 deletions(-) create mode 100644
recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
create mode 100644
recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch
create mode 100644
recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch
create mode 100644
recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch
create mode 100644
recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch
create mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bb
> Nice
and interesting changes, but you really should sync this with Alex
Lennon as well since he currently are working with integrating 4.1 into
meta-raspberrypi. An other opinion is that you should start by trying to
integrate relevant kernel changes both from
'git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2'
and the integration patches into the currently used upstream
(https://github.com/raspberrypi/linux [3]) and I also think it's a good
idea to ensure that the new code is added within kernel config options
so it's easy to enable/disable the vc4 support. Then at least I think
this more easily can be integrated in meta-raspberrypi.

I didn't know
there was a work in progress to integrate the 4.1 tree.
Although that is
for the branch in https://github.com/raspberrypi/linux [3]that does not
have the Broa> n't expect that to be a trivial task. I certainly don't
know if have the bandwidth to do it. Also, it is under heavy development
so will be hard to track. Another option is to have two recipes for 4.1,
one for the raspberrypi tree with userland and another one with the tree
with the VC4 DRM/KMS driver. Or use the same recipe but with a different
SRC_URI for each case. I tried to isolate all the VC4 support so is
enabled and disable easily using a config option.
> 
> Ok, in that case
I think we don't have so much options. I vote for two recipes in that
case (at least to start with) something like
recipe-kernel/linux/linux-raspberrypi-vc4 or similar.
r 

Best
regards,

> 


Links:
------
[1]
http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/
[2]
https://github.com/raspberrypi/linux/commit/739c586c8757
[3]
https://github.com/raspberrypi/linux

[-- Attachment #2: Type: text/html, Size: 8208 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-05  6:34     ` Javier Martinez Canillas
@ 2015-08-06  2:54       ` Khem Raj
  2015-08-06  6:59         ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Khem Raj @ 2015-08-06  2:54 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

On Tue, Aug 4, 2015 at 11:34 PM, Javier Martinez Canillas
<javier@osg.samsung.com> 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
was trying to define a lot more than a BSP layer is supposed to do. So
if its a distro feature, I would like it to work as expected on other
machines besides raspberrypi. If thats not applicable then we should
rethink if it could be folded into MACHINE_FEATURES if it needs to be
a distro feature then propose it to OE-Core, at the very least
document them in README of this layer. Or separate it out into a
common layer which rpi BSPs will depend on.
but think beyond single machine when deciding on adding distro
features, there are distros based on OE which support multiple
machines


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-06  2:54       ` Khem Raj
@ 2015-08-06  6:59         ` Javier Martinez Canillas
  2015-08-06  7:41           ` Andreas Müller
  2015-08-09 23:05           ` Andrei Gherzan
  0 siblings, 2 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-06  6:59 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

Hello Khem,

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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver
  2015-08-05 20:48     ` Petter Mabäcker
@ 2015-08-06  7:03       ` Javier Martinez Canillas
  2015-08-09 23:01         ` Andrei Gherzan
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-06  7:03 UTC (permalink / raw)
  To: petter; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

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
> | 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
>> Nice
> and interesting changes, but you really should sync this with Alex
> Lennon as well since he currently are working with integrating 4.1 into
> meta-raspberrypi. An other opinion is that you should start by trying to
> integrate relevant kernel changes both from
> 'git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2'
> and the integration patches into the currently used upstream
> (https://github.com/raspberrypi/linux [3]) and I also think it's a good
> idea to ensure that the new code is added within kernel config options
> so it's easy to enable/disable the vc4 support. Then at least I think
> this more easily can be integrated in meta-raspberrypi.
> 
> I didn't know
> there was a work in progress to integrate the 4.1 tree.
> Although that is
> for the branch in https://github.com/raspberrypi/linux [3]that does not
> have the Broa> n't expect that to be a trivial task. I certainly don't
> know if have the bandwidth to do it. Also, it is under heavy development
> so will be hard to track. Another option is to have two recipes for 4.1,
> one for the raspberrypi tree with userland and another one with the tree
> with the VC4 DRM/KMS driver. Or use the same recipe but with a different
> SRC_URI for each case. I tried to isolate all the VC4 support so is
> enabled and disable easily using a config option.
>>
>> Ok, in that case
> I think we don't have so much options. I vote for two recipes in that
> case (at least to start with) something like
> recipe-kernel/linux/linux-raspberrypi-vc4 or similar.
> r 
>

Ok, that makes sense for me. I'll wait a couple of days to see if there
are more feedback and post a v2 based on your (an others) suggestions.

Thanks a lot!

> Best
> regards,
> 
 
Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-06  6:59         ` Javier Martinez Canillas
@ 2015-08-06  7:41           ` Andreas Müller
  2015-08-07 10:45             ` Javier Martinez Canillas
  2015-08-09 23:05           ` Andrei Gherzan
  1 sibling, 1 reply; 49+ messages in thread
From: Andreas Müller @ 2015-08-06  7:41 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

On Thu, Aug 6, 2015 at 8:59 AM, Javier Martinez Canillas
<javier@osg.samsung.com> 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
(we might have to wait for a more recent mesa expected in September).

* kernel: have different name e.g linux-raspberrypi-vc4

The selection is done in this layer by changing default providers. In
a first step this could be done manually - aided by a helpful comment.

Andreas


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-06  7:41           ` Andreas Müller
@ 2015-08-07 10:45             ` Javier Martinez Canillas
  2015-08-07 11:30               ` Andreas Müller
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-07 10:45 UTC (permalink / raw)
  To: Andreas Müller; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

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
> <javier@osg.samsung.com> 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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-07 10:45             ` Javier Martinez Canillas
@ 2015-08-07 11:30               ` Andreas Müller
  2015-08-07 11:32                 ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Andreas Müller @ 2015-08-07 11:30 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

On Fri, Aug 7, 2015 at 12:45 PM, Javier Martinez Canillas
<javier@osg.samsung.com> 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
>> <javier@osg.samsung.com> 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)...

Andreas


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-07 11:30               ` Andreas Müller
@ 2015-08-07 11:32                 ` Javier Martinez Canillas
  0 siblings, 0 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-07 11:32 UTC (permalink / raw)
  To: Andreas Müller; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

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
> <javier@osg.samsung.com> 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
>>> <javier@osg.samsung.com> 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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition Javier Martinez Canillas
@ 2015-08-09 21:17   ` Andreas Müller
  2015-08-09 21:18     ` Andreas Müller
  2015-08-09 21:57   ` Andrei Gherzan
  1 sibling, 1 reply; 49+ messages in thread
From: Andreas Müller @ 2015-08-09 21:17 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Yocto Project, Mauro Carvalho Chehab, Derek Foreman

I am not the author - but ping for this one

Andreas


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition
  2015-08-09 21:17   ` Andreas Müller
@ 2015-08-09 21:18     ` Andreas Müller
  0 siblings, 0 replies; 49+ messages in thread
From: Andreas Müller @ 2015-08-09 21:18 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Yocto Project, Mauro Carvalho Chehab, Derek Foreman

Aaargh wrong patch - sorry

On Sun, Aug 9, 2015 at 11:17 PM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> I am not the author - but ping for this one
>
> Andreas


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition Javier Martinez Canillas
  2015-08-09 21:17   ` Andreas Müller
@ 2015-08-09 21:57   ` Andrei Gherzan
  1 sibling, 0 replies; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-09 21:57 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

Cheers guys,

On Thu, Jul 30, 2015 at 10:34:09AM +0200, Javier Martinez Canillas wrote:
> From: Derek Foreman <derekf@osg.samsung.com>
>
> 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 <derekf@osg.samsung.com>
> [javier: Extended the commit message]
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
>  classes/sdcard_image-rpi.bbclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>

Merged to master. Thanks.

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 1/5] linux-raspberrypi.inc: Make kgdboc kernel param optional
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 1/5] linux-raspberrypi.inc: Make kgdboc kernel param optional Javier Martinez Canillas
@ 2015-08-09 22:37   ` Andrei Gherzan
  0 siblings, 0 replies; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-09 22:37 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

On Thu, Jul 30, 2015 at 10:34:07AM +0200, Javier Martinez Canillas wrote:
> From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>
> 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 <mchehab@osg.samsung.com>
> [javier: Extended commit message and made it conditional]
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
>  README                                     | 23 +++++++++++++++--------
>  recipes-kernel/linux/linux-raspberrypi.inc |  5 ++++-
>  2 files changed, 19 insertions(+), 9 deletions(-)

Merged to master. Thanks.

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs Javier Martinez Canillas
@ 2015-08-09 22:44   ` Andrei Gherzan
  2015-08-10  7:48     ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-09 22:44 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

Hello,

On Thu, Jul 30, 2015 at 10:34:08AM +0200, Javier Martinez Canillas wrote:
> From: Derek Foreman <derekf@osg.samsung.com>
>
> 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?

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
  2015-07-30  8:34 ` [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support Javier Martinez Canillas
@ 2015-08-09 22:54   ` Andrei Gherzan
  2015-08-10  7:59     ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-09 22:54 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

Hi,

On Thu, Jul 30, 2015 at 10:34:10AM +0200, Javier Martinez Canillas wrote:
> From: Derek Foreman <derekf@osg.samsung.com>
>
> 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.

> Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
> [javier: Extended commit message and set default preference to -1]
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
>  README                                             |   9 ++

Please split this change in another patch.

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

Userland / binaries : vc-*. I'm wondering if we should actually define a
feature for this or just let the users configure the providers as they want. We
do this for vc-* / userland. We don't have a feature to switch from binaries to
userland or so.

> +
>  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 000000000000..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 <derekf@osg.samsung.com>
> +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 <derekf@osg.samsung.com>
> +---
> + 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 000000000000..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 <derekf@osg.samsung.com>
> +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 <derekf@osg.samsung.com
> +---
> + arch/arm/boot/dts/bcm2708_common.dtsi | 2 +-
> + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 6 ++++++
> + drivers/i2c/busses/i2c-bcm2708.c      | 6 +++++-
> + 3 files changed, 12 insertions(+), 2 deletions(-)
> +
> +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi
> +index ccf01a568cb6..15277d2765bb 100644
> +--- a/arch/arm/boot/dts/bcm2708_common.dtsi
> ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi
> +@@ -155,7 +155,7 @@
> + 		};
> +
> + 		i2c2: i2c@7e805000 {
> +-			compatible = "brcm,bcm2835-i2c";
> ++			compatible = "brcm,bcm2708-i2c";
> + 			reg = <0x7e805000 0x1000>;
> + 			interrupts = <2 21>;
> + 			clocks = <&clk_i2c>;
> +diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
> +index 8aaaf1fb7143..712ca455cc46 100644
> +--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
> ++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
> +@@ -11,6 +11,7 @@
> + 		spi0 = &spi0;
> + 		i2c0 = &i2c0;
> + 		i2c1 = &i2c1;
> ++		i2c2 = &i2c2;
> + 		i2s  = &i2s;
> + 		gpio = &gpio;
> + 		intc = &intc;
> +@@ -94,6 +95,11 @@
> + 	clock-frequency = <100000>;
> + };
> +
> ++&i2c2 {
> ++	pinctrl-names = "default";
> ++	clock-frequency = <100000>;
> ++};
> ++
> + &i2s {
> + 	#sound-dai-cells = <0>;
> + 	pinctrl-names = "default";
> +diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c
> +index 8773203b34eb..2054ff44e744 100644
> +--- a/drivers/i2c/busses/i2c-bcm2708.c
> ++++ b/drivers/i2c/busses/i2c-bcm2708.c
> +@@ -109,6 +109,7 @@ static void bcm2708_i2c_init_pinmode(int id)
> + #define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3))
> +
> + 	int pin;
> ++
> + 	u32 *gpio = ioremap(GPIO_BASE, SZ_16K);
> +
> + 	BUG_ON(id != 0 && id != 1);
> +@@ -382,7 +383,7 @@ static int bcm2708_i2c_probe(struct platform_device *pdev)
> + 		goto out_clk_put;
> + 	}
> +
> +-	if (!pdev->dev.of_node)
> ++	if (pdev->id < 2)
> + 		bcm2708_i2c_init_pinmode(pdev->id);
> +
> + 	bi = kzalloc(sizeof(*bi), GFP_KERNEL);
> +@@ -407,6 +408,9 @@ static int bcm2708_i2c_probe(struct platform_device *pdev)
> + 	case 1:
> + 		adap->class = I2C_CLASS_DDC;
> + 		break;
> ++	case 2:
> ++		adap->class = I2C_CLASS_DDC;
> ++		break;
> + 	default:
> + 		dev_err(&pdev->dev, "can only bind to BSC 0 or 1\n");
> + 		err = -ENXIO;
> +--
> +2.4.3
> +
> diff --git a/recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch b/recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch
> new file mode 100644
> index 000000000000..bc50992dcdbe
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch
> @@ -0,0 +1,115 @@
> +From e877e76e5d723eb14bce9c58af40b962eced02bf Mon Sep 17 00:00:00 2001
> +From: Derek Foreman <derekf@osg.samsung.com>
> +Date: Thu, 2 Jul 2015 11:19:54 -0500
> +Subject: [PATCH 3/5] drm/vc4: Use the fbdev_cma helpers
> +
> +Keep the fbdev_cma pointer around so we can use it on hotplog and close
> +to ensure the frame buffer console is in a useful state.
> +
> +Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
> +---
> + drivers/gpu/drm/vc4/vc4_drv.c | 15 +++++++++++++++
> + drivers/gpu/drm/vc4/vc4_drv.h |  2 ++
> + drivers/gpu/drm/vc4/vc4_kms.c | 18 +++++++++++++++---
> + 3 files changed, 32 insertions(+), 3 deletions(-)
> +
> +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
> +index 5c023ba4f6ad..04f1f738ebc2 100644
> +--- a/drivers/gpu/drm/vc4/vc4_drv.c
> ++++ b/drivers/gpu/drm/vc4/vc4_drv.c
> +@@ -13,6 +13,7 @@
> + #include <linux/module.h>
> + #include <linux/of_platform.h>
> + #include <linux/platform_device.h>
> ++#include <drm/drm_fb_cma_helper.h>
> +
> + #include "uapi/drm/vc4_drm.h"
> + #include "vc4_drv.h"
> +@@ -78,6 +79,11 @@ vc4_drm_load(struct drm_device *dev, unsigned long flags)
> +
> + static int vc4_drm_unload(struct drm_device *dev)
> + {
> ++	struct vc4_dev *vc4 = to_vc4_dev(dev);
> ++
> ++	if (vc4->fbdev)
> ++		drm_fbdev_cma_fini(vc4->fbdev);
> ++
> + 	drm_mode_config_cleanup(dev);
> +
> + 	component_unbind_all(dev->dev, dev);
> +@@ -93,6 +99,14 @@ static void vc4_drm_preclose(struct drm_device *dev, struct drm_file *file)
> + 		vc4_cancel_page_flip(crtc, file);
> + }
> +
> ++static void vc4_lastclose(struct drm_device *dev)
> ++{
> ++	struct vc4_dev *vc4 = to_vc4_dev(dev);
> ++
> ++	if (vc4->fbdev)
> ++		drm_fbdev_cma_restore_mode(vc4->fbdev);
> ++}
> ++
> + static const struct file_operations vc4_drm_fops = {
> + 	.owner = THIS_MODULE,
> + 	.open = drm_open,
> +@@ -123,6 +137,7 @@ static struct drm_driver vc4_drm_driver = {
> + 			    DRIVER_PRIME),
> + 	.load = vc4_drm_load,
> + 	.unload = vc4_drm_unload,
> ++	.lastclose = vc4_lastclose,
> + 	.set_busid = drm_platform_set_busid,
> + 	.preclose = vc4_drm_preclose,
> +
> +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
> +index 13b475785ca0..d460bb3e6b64 100644
> +--- a/drivers/gpu/drm/vc4/vc4_drv.h
> ++++ b/drivers/gpu/drm/vc4/vc4_drv.h
> +@@ -81,6 +81,8 @@ struct vc4_dev {
> + 	} hangcheck;
> +
> + 	struct semaphore async_modeset;
> ++
> ++	struct drm_fbdev_cma *fbdev;
> + };
> +
> + static inline struct vc4_dev *
> +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
> +index acfd1b23ab4a..cb18d8f0e387 100644
> +--- a/drivers/gpu/drm/vc4/vc4_kms.c
> ++++ b/drivers/gpu/drm/vc4/vc4_kms.c
> +@@ -155,7 +155,17 @@ static int vc4_atomic_commit(struct drm_device *dev,
> + 	return 0;
> + }
> +
> ++static void vc4_output_poll_changed(struct drm_device *dev)
> ++{
> ++	struct vc4_dev *vc4 = to_vc4_dev(dev);
> ++
> ++	if (vc4->fbdev)
> ++		drm_fbdev_cma_hotplug_event(vc4->fbdev);
> ++}
> ++
> ++
> + static const struct drm_mode_config_funcs vc4_mode_funcs = {
> ++	.output_poll_changed = vc4_output_poll_changed,
> + 	.atomic_check = drm_atomic_helper_check,
> + 	.atomic_commit = vc4_atomic_commit,
> + 	.fb_create = drm_fb_cma_create,
> +@@ -214,9 +224,11 @@ vc4_kms_load(struct drm_device *dev)
> +
> + 	drm_mode_config_reset(dev);
> +
> +-	drm_fbdev_cma_init(dev, 32,
> +-			   dev->mode_config.num_crtc,
> +-			   dev->mode_config.num_connector);
> ++	vc4->fbdev = drm_fbdev_cma_init(dev, 32,
> ++					dev->mode_config.num_crtc,
> ++					dev->mode_config.num_connector);
> ++	if (IS_ERR(vc4->fbdev))
> ++		vc4->fbdev = NULL;
> +
> + 	drm_kms_helper_poll_init(dev);
> +
> +--
> +2.4.3
> +
> diff --git a/recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch b/recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch
> new file mode 100644
> index 000000000000..0293ed713c3e
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch
> @@ -0,0 +1,26 @@
> +From 4388ed0f2d66399a6ad3133b91bd438cdb25e37b Mon Sep 17 00:00:00 2001
> +From: Derek Foreman <derekf@osg.samsung.com>
> +Date: Thu, 2 Jul 2015 11:20:21 -0500
> +Subject: [PATCH 4/5] drm/vc4: Allow vblank to be disabled
> +
> +Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
> +---
> + drivers/gpu/drm/vc4/vc4_kms.c | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
> +index cb18d8f0e387..1473df9ef4a1 100644
> +--- a/drivers/gpu/drm/vc4/vc4_kms.c
> ++++ b/drivers/gpu/drm/vc4/vc4_kms.c
> +@@ -218,6 +218,8 @@ vc4_kms_load(struct drm_device *dev)
> + 	dev->mode_config.funcs = &vc4_mode_funcs;
> + 	dev->mode_config.preferred_depth = 24;
> +
> ++	dev->vblank_disable_allowed = true;
> ++
> + 	ret = vc4_init_modeset_objects(dev);
> + 	if (ret)
> + 		goto fail;
> +--
> +2.4.3
> +
> diff --git a/recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch b/recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch
> new file mode 100644
> index 000000000000..eff5058aeda7
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch
> @@ -0,0 +1,95 @@
> +From 844a32b8444a38b6378c98ad4a4b8b8c3522c020 Mon Sep 17 00:00:00 2001
> +From: Derek Foreman <derekf@osg.samsung.com>
> +Date: Fri, 24 Jul 2015 03:29:15 +0200
> +Subject: [PATCH 5/5] drm/vc4: Disable KMS operations
> +
> +The vc4 driver KMS implementation still has some issues so
> +for now skip most of the codepaths to avoid system hangs.
> +
> +Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
> +---
> + drivers/gpu/drm/drm_atomic_helper.c | 2 +-
> + drivers/gpu/drm/vc4/vc4_crtc.c      | 2 +-
> + drivers/gpu/drm/vc4/vc4_hdmi.c      | 6 ++++--
> + drivers/gpu/drm/vc4/vc4_kms.c       | 1 +
> + 4 files changed, 7 insertions(+), 4 deletions(-)
> +
> +diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> +index 1d2ca52530d5..ba7f355bcced 100644
> +--- a/drivers/gpu/drm/drm_atomic_helper.c
> ++++ b/drivers/gpu/drm/drm_atomic_helper.c
> +@@ -1876,7 +1876,7 @@ void drm_atomic_helper_connector_dpms(struct drm_connector *connector,
> + 	struct drm_connector *tmp_connector;
> + 	int ret;
> + 	bool active = false;
> +-
> ++return;
> + 	if (mode != DRM_MODE_DPMS_ON)
> + 		mode = DRM_MODE_DPMS_OFF;
> +
> +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
> +index f9960ac34fd7..1b85355baef0 100644
> +--- a/drivers/gpu/drm/vc4/vc4_crtc.c
> ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c
> +@@ -91,7 +91,7 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc)
> + 		       ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? 1 : 0));
> + 	u32 format = PV_CONTROL_FORMAT_24;
> + 	bool debug_dump_regs = false;
> +-
> ++return;
> + 	if (debug_dump_regs) {
> + 		DRM_INFO("CRTC %d regs before:\n", drm_crtc_index(crtc));
> + 		vc4_crtc_dump_regs(vc4_crtc);
> +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> +index 8c41fdc4ef2e..2a212b08e108 100644
> +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> +@@ -273,7 +273,7 @@ vc4_set_pixel_clock(struct vc4_dev *vc4, u32 clock)
> + {
> + 	u32 packet[2];
> + 	int ret;
> +-
> ++return;
> + 	packet[0] = 8; /* Pixel clock. */
> + 	packet[1] = clock;
> +
> +@@ -295,6 +295,7 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
> + 	bool debug_dump_regs = false;
> + 	bool hsync_pos = !(mode->flags & DRM_MODE_FLAG_NHSYNC);
> + 	bool vsync_pos = !(mode->flags & DRM_MODE_FLAG_NVSYNC);
> ++return;
> + 	u32 vactive = (mode->vdisplay >>
> + 		       ((mode->flags & DRM_MODE_FLAG_INTERLACE) ? 1 : 0));
> + 	u32 verta = (VC4_SET_FIELD(mode->vsync_end - mode->vsync_start,
> +@@ -405,7 +406,7 @@ static void vc4_hdmi_encoder_disable(struct drm_encoder *encoder)
> + {
> + 	struct drm_device *dev = encoder->dev;
> + 	struct vc4_dev *vc4 = to_vc4_dev(dev);
> +-
> ++return;
> + 	HDMI_WRITE(VC4_HDMI_TX_PHY_RESET_CTL, 0xf << 16);
> + }
> +
> +@@ -413,6 +414,7 @@ static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder)
> + {
> + 	struct drm_device *dev = encoder->dev;
> + 	struct vc4_dev *vc4 = to_vc4_dev(dev);
> ++return;
> +
> + 	HDMI_WRITE(VC4_HDMI_TX_PHY_RESET_CTL, 0);
> + }
> +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
> +index 1473df9ef4a1..5ddc5d9beaae 100644
> +--- a/drivers/gpu/drm/vc4/vc4_kms.c
> ++++ b/drivers/gpu/drm/vc4/vc4_kms.c
> +@@ -144,6 +144,7 @@ static int vc4_atomic_commit(struct drm_device *dev,
> + 	 * current layout.
> + 	 */
> +
> ++	async=0;
> + 	if (async) {
> + 		vc4_queue_seqno_cb(dev, &c->cb, wait_seqno,
> + 				   vc4_atomic_complete_commit_seqno_cb);
> +--
> +2.4.3
> +
> diff --git a/recipes-kernel/linux/linux-raspberrypi_4.1.bb b/recipes-kernel/linux/linux-raspberrypi_4.1.bb

We will have to rename this because the linux-raspberrypi recipes are known
from the raspberrypi linux fork. So maybe havinf something like:
linux-raspberrypi-vc4?

> new file mode 100644
> index 000000000000..a8e1863ddf2c
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-raspberrypi_4.1.bb
> @@ -0,0 +1,16 @@
> +LINUX_VERSION ?= "4.1.0"
> +
> +# Don't make this the default kernel, right now it is only for testing purposes
> +DEFAULT_PREFERENCE = "-1"
> +
> +SRCREV = "07009cab090ade3dd180e8a55d590b1a00072eed"
> +SRC_URI = "git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2"
> +
> +# Add patches needed for the vc4 driver but only if enabled as distro feature since are experimental
> +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch', '', d)}"
> +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch', '', d)}"
> +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0003-drm-vc4-Use-the-fbdev_cma-helpers.patch', '', d)}"
> +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0004-drm-vc4-Allow-vblank-to-be-disabled.patch', '', d)}"
> +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'vc4-gfx', 'file://0005-drm-vc4-Disable-KMS-operations.patch', '', d)}"
> +

I don't see the need of the selective inclusion as this fork is a vc4 one. So,
as long as you select this provider, you will need the patches.

> +require linux-raspberrypi.inc
> --
> 2.4.3
>

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver
  2015-08-06  7:03       ` Javier Martinez Canillas
@ 2015-08-09 23:01         ` Andrei Gherzan
  2015-08-10  8:02           ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-09 23:01 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

Cheers!

First of all good work. Additionally to the comments I made in patches, find
some here.

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.

> >>>
> > KERNEL_DEVICETREE = " bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb
> > bcm2709-rpi-2-b.dtb overlays/hifiberry-amp-overlay.dtb
> > overlays/hifiberry-dac-overlay.dtb
> > overlays/hifiberry-dacplus-overlay.dtb
> > overlays/hifiberry-digi-overlay.dtb overlays/iqaudio-dac-overlay.dtb
> > overlays/iqaudio-dacplus-overlay.dtb overlays/lirc-rpi-overlay.dtb
> > overlays/pps-gpio-overlay.dtb overlays/w1-gpio-overlay.dtb
> > overlays/w1-gpio-pullup-overlay.dtb " [0]:
> > http://blogs.s-osg.org/tizen-rpi2-now-supporting-3d-acceleration/ [1]
> > [1]: https://github.com/raspberrypi/linux/commit/739c586c8757 [2] Best
> > regards, --- Javier Martinez Canillas Open Source Group Samsung Research
> > America Derek Foreman (4): rpi-config: Allow to mask GPU irqs
> > sdcard_image-rpi.bbclass: Allocate more space for boot partition
> > linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
> > rpi-default-providers: Switch providers according to used gfx stack
> > Mauro Carvalho Chehab (1): linux-raspberrypi.inc: Make kgdboc kernel
> > param optional README | 38 +++++-- classes/sdcard_image-rpi.bbclass | 6
> > +- conf/machine/include/rpi-default-providers.inc | 8 +-
> > conf/machine/include/rpi-default-versions.inc | 2 +-
> > recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++
> > recipes-kernel/linux/linux-raspberrypi.inc | 5 +-
> > ..._defconfig-Enable-config-options-for-vc4-.patch | 48 +++++++++
> > ...-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch | 85 +++++++++++++++
> > .../0003-drm-vc4-Use-the-fbdev_cma-helpers.patch | 115
> > +++++++++++++++++++++ .../0004-drm-vc4-Allow-vblank-to-be-disabled.patch
> > | 26 +++++ .../0005-drm-vc4-Disable-KMS-operations.patch | 95
> > +++++++++++++++++ recipes-kernel/linux/linux-raspberrypi_4.1.bb | 16 +++
> > 12 files changed, 433 insertions(+), 17 deletions(-) create mode 100644
> > recipes-kernel/linux/linux-raspberrypi/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
> > create mode 100644
> > recipes-kernel/linux/linux-raspberrypi/0002-ARM-dts-Fix-i2c-for-bcm2709-RPI2-B-board.patch
> > create mode 100644
> > recipes-kernel/linux/linux-raspberrypi/0003-drm-vc4-Use-the-fbdev_cma-helpers.patch
> > create mode 100644
> > recipes-kernel/linux/linux-raspberrypi/0004-drm-vc4-Allow-vblank-to-be-disabled.patch
> > create mode 100644
> > recipes-kernel/linux/linux-raspberrypi/0005-drm-vc4-Disable-KMS-operations.patch
> > create mode 100644 recipes-kernel/linux/linux-raspberrypi_4.1.bb
> >> Nice
> > and interesting changes, but you really should sync this with Alex
> > Lennon as well since he currently are working with integrating 4.1 into
> > meta-raspberrypi. An other opinion is that you should start by trying to
> > integrate relevant kernel changes both from
> > 'git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2'
> > and the integration patches into the currently used upstream
> > (https://github.com/raspberrypi/linux [3]) and I also think it's a good
> > idea to ensure that the new code is added within kernel config options
> > so it's easy to enable/disable the vc4 support. Then at least I think
> > this more easily can be integrated in meta-raspberrypi.
> >

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

> > I didn't know
> > there was a work in progress to integrate the 4.1 tree.
> > Although that is
> > for the branch in https://github.com/raspberrypi/linux [3]that does not
> > have the Broa> n't expect that to be a trivial task. I certainly don't
> > know if have the bandwidth to do it. Also, it is under heavy development
> > so will be hard to track. Another option is to have two recipes for 4.1,
> > one for the raspberrypi tree with userland and another one with the tree
> > with the VC4 DRM/KMS driver. Or use the same recipe but with a different
> > SRC_URI for each case. I tried to isolate all the VC4 support so is
> > enabled and disable easily using a config option.
> >>
> >> Ok, in that case
> > I think we don't have so much options. I vote for two recipes in that
> > case (at least to start with) something like
> > recipe-kernel/linux/linux-raspberrypi-vc4 or similar.
> > r
> >
>

Vote++

> Ok, that makes sense for me. I'll wait a couple of days to see if there
> are more feedback and post a v2 based on your (an others) suggestions.
>
> Thanks a lot!
>
> > Best
> > regards,
> >
>
> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-06  6:59         ` Javier Martinez Canillas
  2015-08-06  7:41           ` Andreas Müller
@ 2015-08-09 23:05           ` Andrei Gherzan
  2015-08-09 23:37             ` Andreas Müller
  2015-08-10  8:04             ` Javier Martinez Canillas
  1 sibling, 2 replies; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-09 23:05 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

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
> > <javier@osg.samsung.com> 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.

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-09 23:05           ` Andrei Gherzan
@ 2015-08-09 23:37             ` Andreas Müller
  2015-08-10  8:22               ` Javier Martinez Canillas
  2015-08-10  8:04             ` Javier Martinez Canillas
  1 sibling, 1 reply; 49+ messages in thread
From: Andreas Müller @ 2015-08-09 23:37 UTC (permalink / raw)
  To: Andrei Gherzan
  Cc: Javier Martinez Canillas, Mauro Carvalho Chehab, Derek Foreman, yocto

> 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

Question: What setting does the trick getting vc4 driver created by
mesa doing the OpenGL work. I see only swrast which is bulls...

Andreas

[1] https://github.com/schnitzeltony/meta-raspberrypi/commit/4a626add25c1d13dfa6d22c61f9804764f49301a


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs
  2015-08-09 22:44   ` Andrei Gherzan
@ 2015-08-10  7:48     ` Javier Martinez Canillas
  2015-08-10 21:27       ` Andrei Gherzan
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-10  7:48 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

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 <derekf@osg.samsung.com>
>>
>> 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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
  2015-08-09 22:54   ` Andrei Gherzan
@ 2015-08-10  7:59     ` Javier Martinez Canillas
  2015-08-10 21:35       ` Andrei Gherzan
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-10  7:59 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

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 <derekf@osg.samsung.com>
>>
>> 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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver
  2015-08-09 23:01         ` Andrei Gherzan
@ 2015-08-10  8:02           ` Javier Martinez Canillas
  2015-08-10 21:34             ` Andrei Gherzan
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-10  8:02 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

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, --- 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
>>>> Nice
>>> and interesting changes, but you really should sync this with Alex
>>> Lennon as well since he currently are working with integrating 4.1 into
>>> meta-raspberrypi. An other opinion is that you should start by trying to
>>> integrate relevant kernel changes both from
>>> 'git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2'
>>> and the integration patches into the currently used upstream
>>> (https://github.com/raspberrypi/linux [3]) and I also think it's a good
>>> idea to ensure that the new code is added within kernel config options
>>> so it's easy to enable/disable the vc4 support. Then at least I think
>>> this more easily can be integrated in meta-raspberrypi.
>>>
> 
> 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 didn't know
>>> there was a work in progress to integrate the 4.1 tree.
>>> Although that is
>>> for the branch in https://github.com/raspberrypi/linux [3]that does not
>>> have the Broa> n't expect that to be a trivial task. I certainly don't
>>> know if have the bandwidth to do it. Also, it is under heavy development
>>> so will be hard to track. Another option is to have two recipes for 4.1,
>>> one for the raspberrypi tree with userland and another one with the tree
>>> with the VC4 DRM/KMS driver. Or use the same recipe but with a different
>>> SRC_URI for each case. I tried to isolate all the VC4 support so is
>>> enabled and disable easily using a config option.
>>>>
>>>> Ok, in that case
>>> I think we don't have so much options. I vote for two recipes in that
>>> case (at least to start with) something like
>>> recipe-kernel/linux/linux-raspberrypi-vc4 or similar.
>>> r
>>>
>>
> 
> Vote++
>

Ok.
 
>> Ok, that makes sense for me. I'll wait a couple of days to see if there
>> are more feedback and post a v2 based on your (an others) suggestions.
>>
>> Thanks a lot!
>>
>>> Best
>>> regards,
>>>
>>
>> Best regards,
>> --
>> Javier Martinez Canillas
>> Open Source Group
>> Samsung Research America
> 
> --
> Andrei Gherzan
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-09 23:05           ` Andrei Gherzan
  2015-08-09 23:37             ` Andreas Müller
@ 2015-08-10  8:04             ` Javier Martinez Canillas
  1 sibling, 0 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-10  8:04 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

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
>>> <javier@osg.samsung.com> 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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-09 23:37             ` Andreas Müller
@ 2015-08-10  8:22               ` Javier Martinez Canillas
  2015-08-10 21:30                 ` Andrei Gherzan
  2015-08-12 14:59                 ` Javier Martinez Canillas
  0 siblings, 2 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-10  8:22 UTC (permalink / raw)
  To: Andreas Müller, Andrei Gherzan
  Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs
  2015-08-10  7:48     ` Javier Martinez Canillas
@ 2015-08-10 21:27       ` Andrei Gherzan
  0 siblings, 0 replies; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-10 21:27 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

On Mon, Aug 10, 2015 at 09:48:43AM +0200, Javier Martinez Canillas wrote:
> 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 <derekf@osg.samsung.com>
> >>
> >> 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.
>

Uh. Got it now. Thanks. Waiting for V2s.

Cheers!

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-10  8:22               ` Javier Martinez Canillas
@ 2015-08-10 21:30                 ` Andrei Gherzan
  2015-08-12 14:59                 ` Javier Martinez Canillas
  1 sibling, 0 replies; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-10 21:30 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: Mauro Carvalho Chehab, Derek Foreman, yocto

Hi,

On Mon, Aug 10, 2015 at 10:22:06AM +0200, 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 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.
>

Guys, I really appreciate this. Thanks.

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver
  2015-08-10  8:02           ` Javier Martinez Canillas
@ 2015-08-10 21:34             ` Andrei Gherzan
  2015-08-10 21:54               ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-10 21:34 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

On Mon, Aug 10, 2015 at 10:02:03AM +0200, Javier Martinez Canillas wrote:
> 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, --- 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
> >>>> Nice
> >>> and interesting changes, but you really should sync this with Alex
> >>> Lennon as well since he currently are working with integrating 4.1 into
> >>> meta-raspberrypi. An other opinion is that you should start by trying to
> >>> integrate relevant kernel changes both from
> >>> 'git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2'
> >>> and the integration patches into the currently used upstream
> >>> (https://github.com/raspberrypi/linux [3]) and I also think it's a good
> >>> idea to ensure that the new code is added within kernel config options
> >>> so it's easy to enable/disable the vc4 support. Then at least I think
> >>> this more easily can be integrated in meta-raspberrypi.
> >>>
> >
> > That would definitely be the preferate way but would involve some additional
> > work in tracking the patches. So, as an initial state, I am fine with a
> > different kernel recipe (with a different name).
> >
>
> Ok, I was waiting for your feedback before preparing v2.

I guess this is my feedback. We can go on a separate linux provider for now.
Something like linux-raspbery-vc.bb . Or, if you want to maintain the patches
we can only pull in patches and apply them on top of 4.X based on a FEATURE.
What do you think?

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support
  2015-08-10  7:59     ` Javier Martinez Canillas
@ 2015-08-10 21:35       ` Andrei Gherzan
  0 siblings, 0 replies; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-10 21:35 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

On Mon, Aug 10, 2015 at 09:59:30AM +0200, Javier Martinez Canillas wrote:
> 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 <derekf@osg.samsung.com>
> >>
> >> 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.
>

Yup. Let's have this as the first step. And we will see if additional bits are
needed.

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver
  2015-08-10 21:34             ` Andrei Gherzan
@ 2015-08-10 21:54               ` Javier Martinez Canillas
  2015-08-10 22:00                 ` Andrei Gherzan
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-10 21:54 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver
  2015-08-10 21:54               ` Javier Martinez Canillas
@ 2015-08-10 22:00                 ` Andrei Gherzan
  0 siblings, 0 replies; 49+ messages in thread
From: Andrei Gherzan @ 2015-08-10 22:00 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Mauro Carvalho Chehab, Derek Foreman

Hi,

On Mon, Aug 10, 2015 at 11:54:13PM +0200, Javier Martinez Canillas wrote:
> 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!

No rush Javier. Just keep it in queue.

--
Andrei Gherzan


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-10  8:22               ` Javier Martinez Canillas
  2015-08-10 21:30                 ` Andrei Gherzan
@ 2015-08-12 14:59                 ` Javier Martinez Canillas
  2015-08-12 17:15                   ` Andreas Müller
  1 sibling, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-12 14:59 UTC (permalink / raw)
  To: Andreas Müller, Andrei Gherzan
  Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-12 14:59                 ` Javier Martinez Canillas
@ 2015-08-12 17:15                   ` Andreas Müller
  2015-08-12 20:22                     ` Andreas Müller
  0 siblings, 1 reply; 49+ messages in thread
From: Andreas Müller @ 2015-08-12 17:15 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

On Wed, Aug 12, 2015 at 4:59 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> 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?
>
FYI: I managed to get the vc4 driver loaded (should be in my repo
branch vc4-2). With this I get some repeating kernel error messages
(don't have them here). I am sure that I read something about these
messages when preparing vc4 (yes I started similar before you sent
patches).

Hope I have some energy left tonight to check further and let you know...

Andreas


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-12 17:15                   ` Andreas Müller
@ 2015-08-12 20:22                     ` Andreas Müller
  2015-08-13  7:22                       ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Andreas Müller @ 2015-08-12 20:22 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

On Wed, Aug 12, 2015 at 7:15 PM, Andreas Müller
<schnitzeltony@googlemail.com> 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).
>
> Hope I have some energy left tonight to check further and let you know...
>
From xorg perspective all looks fine

[595923.730] (II) modeset(0): [DRI2] Setup complete
[595923.730] (II) modeset(0): [DRI2]   DRI driver: vc4
[595923.730] (II) modeset(0): [DRI2]   VDPAU driver: vc4
[595923.740] (--) RandR disabled
[595923.745] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[595923.745] (II) AIGLX: enabled GLX_ARB_create_context
[595923.745] (II) AIGLX: enabled GLX_ARB_create_context_profile
[595923.745] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile
[595923.745] (II) AIGLX: enabled GLX_INTEL_swap_event
[595923.745] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[595923.745] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[595923.745] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[595923.745] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[595923.747] (II) AIGLX: Loaded and initialized vc4
[595923.747] (II) GLX: Initialized DRI2 GL provider for screen 0
[595923.782] (II) modeset(0): Setting screen physical size to 338 x 270

but kernel complains periodically ~6s with

[   36.814922] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires
BOs to validate
[   43.060516] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires
BOs to validate
[   49.325115] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires
BOs to validate
[   55.558433] [drm:vc4_submit_cl_ioctl] *ERROR* Rendering requires
BOs to validate

Will check what this message want me to say - anybody out there with
helping hints?

Andreas


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-12 20:22                     ` Andreas Müller
@ 2015-08-13  7:22                       ` Javier Martinez Canillas
  2015-08-13 15:43                         ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-13  7:22 UTC (permalink / raw)
  To: Andreas Müller; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

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
> <schnitzeltony@googlemail.com> 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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-13  7:22                       ` Javier Martinez Canillas
@ 2015-08-13 15:43                         ` Javier Martinez Canillas
  2015-08-13 16:00                           ` Andreas Müller
  0 siblings, 1 reply; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-13 15:43 UTC (permalink / raw)
  To: Andreas Müller; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

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
>> <schnitzeltony@googlemail.com> 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


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-13 15:43                         ` Javier Martinez Canillas
@ 2015-08-13 16:00                           ` Andreas Müller
  2015-08-13 16:20                             ` Javier Martinez Canillas
  0 siblings, 1 reply; 49+ messages in thread
From: Andreas Müller @ 2015-08-13 16:00 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

On Thu, Aug 13, 2015 at 5:43 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
Hi

Thanks a lot!l. I am afraid my build machine at home (RPi is hobby) is
about to die for hard-disk issues. As soon as it's back I will try
with updated mesa.

As I cannot do myself currently: Can you give glmark-es2 a try?

Andreas


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack
  2015-08-13 16:00                           ` Andreas Müller
@ 2015-08-13 16:20                             ` Javier Martinez Canillas
  0 siblings, 0 replies; 49+ messages in thread
From: Javier Martinez Canillas @ 2015-08-13 16:20 UTC (permalink / raw)
  To: Andreas Müller; +Cc: yocto, Derek Foreman, Mauro Carvalho Chehab

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
> <javier@osg.samsung.com> 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


^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2015-08-13 16:20 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-30  8:34 [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Javier Martinez Canillas
2015-07-30  8:34 ` [meta-raspberrypi][PATCH 1/5] linux-raspberrypi.inc: Make kgdboc kernel param optional Javier Martinez Canillas
2015-08-09 22:37   ` Andrei Gherzan
2015-07-30  8:34 ` [meta-raspberrypi][PATCH 2/5] rpi-config: Allow to mask GPU irqs Javier Martinez Canillas
2015-08-09 22:44   ` Andrei Gherzan
2015-08-10  7:48     ` Javier Martinez Canillas
2015-08-10 21:27       ` Andrei Gherzan
2015-07-30  8:34 ` [meta-raspberrypi][PATCH 3/5] sdcard_image-rpi.bbclass: Allocate more space for boot partition Javier Martinez Canillas
2015-08-09 21:17   ` Andreas Müller
2015-08-09 21:18     ` Andreas Müller
2015-08-09 21:57   ` Andrei Gherzan
2015-07-30  8:34 ` [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Add a 4.1 linux kernel with vc4 support Javier Martinez Canillas
2015-08-09 22:54   ` Andrei Gherzan
2015-08-10  7:59     ` Javier Martinez Canillas
2015-08-10 21:35       ` Andrei Gherzan
2015-07-30  8:34 ` [meta-raspberrypi][PATCH 5/5] rpi-default-providers: Switch providers according to used gfx stack Javier Martinez Canillas
2015-08-03 20:14   ` Andreas Müller
2015-08-04 16:17     ` Javier Martinez Canillas
2015-08-04 16:55       ` Andreas Müller
2015-08-05  6:25         ` Javier Martinez Canillas
2015-08-04 19:01   ` Khem Raj
2015-08-05  6:34     ` Javier Martinez Canillas
2015-08-06  2:54       ` Khem Raj
2015-08-06  6:59         ` Javier Martinez Canillas
2015-08-06  7:41           ` Andreas Müller
2015-08-07 10:45             ` Javier Martinez Canillas
2015-08-07 11:30               ` Andreas Müller
2015-08-07 11:32                 ` Javier Martinez Canillas
2015-08-09 23:05           ` Andrei Gherzan
2015-08-09 23:37             ` Andreas Müller
2015-08-10  8:22               ` Javier Martinez Canillas
2015-08-10 21:30                 ` Andrei Gherzan
2015-08-12 14:59                 ` Javier Martinez Canillas
2015-08-12 17:15                   ` Andreas Müller
2015-08-12 20:22                     ` Andreas Müller
2015-08-13  7:22                       ` Javier Martinez Canillas
2015-08-13 15:43                         ` Javier Martinez Canillas
2015-08-13 16:00                           ` Andreas Müller
2015-08-13 16:20                             ` Javier Martinez Canillas
2015-08-10  8:04             ` Javier Martinez Canillas
2015-08-04  9:16 ` [meta-raspberrypi][PATCH 0/5] Add support for 4.1 kernel with vc4 DRM/KMS driver Petter Mabäcker
2015-08-04 16:07   ` Javier Martinez Canillas
2015-08-05 20:48     ` Petter Mabäcker
2015-08-06  7:03       ` Javier Martinez Canillas
2015-08-09 23:01         ` Andrei Gherzan
2015-08-10  8:02           ` Javier Martinez Canillas
2015-08-10 21:34             ` Andrei Gherzan
2015-08-10 21:54               ` Javier Martinez Canillas
2015-08-10 22:00                 ` Andrei Gherzan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.