All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver
@ 2016-05-20 11:51 Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 01/13] rpi-default-providers.inc: change default providers to support vc4graphics Herve Jourdain
                   ` (14 more replies)
  0 siblings, 15 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

This v2 series addresses the following issues with the first series:
a. Fix the 4.4.10 kernel revision
b. Effectively add vc4-kms-v3d overlay to the list of overlays to build (forgotten previously)
c. Make the parameter to the v4c-kms-v3d overlay configurable
d. Add default values for the cma parameter to the v4c-kms-v3d overlay, depending on the board (and the memory it has)

This patch series enables the support for the VC4 graphics driver from Eric Anholt.
There was a previous patch series by Javier Martinez Canillas, but it required use of a different kernel.
VC4 is now supported in the raspberrypi official kernel, at least for 4.4.9+.
The support in 4.1 exists, but it is NOT STABLE, so it has been deemed unreasonable to support VC4 with 4.1 kernels.

THEREFORE, VC4 graphics is supported ONLY for kernel versions 4.4.9 and later.

This patch series proposes to support VC4 by only adding 'vc4graphics' to MACHINE_FEATURES, for raspberrypi. If this is set, it will trigger all the necessary configuration/changes to use the VC4 driver, including mesa/wayland/weston currently, and adding the overlay required.
In order for this series to work, some previous patches are needed (support for .dtbo, and fix of the mesa packaging when there is no DRI driver).
The memory reserved for the VC4 driver has default values depending on the version of the board used, but it can be configured by setting VC4_CMA_SIZE to a value supported by the overlay ('cma-256', 'cma-192', 'cma-128', 'cma-96', 'cma-64').
'cma-256' is the recommended value, but it might not be possible on boards with 512MB or DRAM, or less...
'cma-64' is known to not being able to support FHD/1080p.

It was tested with wayland/weston, without the support for X11.

This patch series depends on two other patch series previously posted, that enable the support for .dtbo overlay files.

Herve Jourdain (13):
  rpi-default-providers.inc: change default providers to support
    vc4graphics
  rpi-base.inc: add vc4-kms-v3d to the overlays to support vc4graphics
  raspberrypi.conf: set the default value of VC4_CMA_SIZE to support
    vc4graphics
  raspberrypi0.conf: set the default value of VC4_CMA_SIZE to support
    vc4graphics
  raspberrypi2.conf: set the default value of VC4_CMA_SIZE to support
    vc4graphics
  raspberrypi3.conf: set the default value of VC4_CMA_SIZE to support
    vc4graphics
  firmware.inc: bump version to support vc4graphics
  rpi-config_git.bb: add v4c overlay to config.txt to support
    vc4graphics
  wayland/weston_%.bbappend: modify configuration options to support
    vc4graphics
  weston/weston_%.bbappend: modify configuration options to support
    vc4graphics
  mesa_%.bbappend: new file to add the correct configuration options to
    support vc4graphics
  linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 to
    support vc4graphics
  linux-rpi.inc: add the configuration options required to support
    vc4graphics

 conf/machine/include/rpi-base.inc              |  1 +
 conf/machine/include/rpi-default-providers.inc |  8 ++++----
 conf/machine/raspberrypi.conf                  |  2 ++
 conf/machine/raspberrypi0.conf                 |  2 ++
 conf/machine/raspberrypi2.conf                 |  2 ++
 conf/machine/raspberrypi3.conf                 |  2 ++
 recipes-bsp/bootfiles/rpi-config_git.bb        | 10 +++++++++-
 recipes-bsp/common/firmware.inc                |  4 ++--
 recipes-graphics/mesa/mesa_%.bbappend          |  4 ++++
 recipes-graphics/wayland/weston_%.bbappend     |  6 ++----
 recipes-graphics/weston/weston_%.bbappend      | 13 +++++++------
 recipes-kernel/linux/linux-raspberrypi_4.4.bb  |  4 ++--
 recipes-kernel/linux/linux-rpi.inc             | 10 ++++++++++
 13 files changed, 49 insertions(+), 19 deletions(-)
 create mode 100644 recipes-graphics/mesa/mesa_%.bbappend

-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 01/13] rpi-default-providers.inc: change default providers to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 02/13] rpi-base.inc: add vc4-kms-v3d to the overlays " Herve Jourdain
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 conf/machine/include/rpi-default-providers.inc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/conf/machine/include/rpi-default-providers.inc b/conf/machine/include/rpi-default-providers.inc
index cabbd43..0bc8838 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("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"
+PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"
+PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
+PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
 PREFERRED_PROVIDER_jpeg ?= "jpeg"
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 02/13] rpi-base.inc: add vc4-kms-v3d to the overlays to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 01/13] rpi-default-providers.inc: change default providers to support vc4graphics Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 03/13] raspberrypi.conf: set the default value of VC4_CMA_SIZE " Herve Jourdain
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 conf/machine/include/rpi-base.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index 2c9d8e0..23f8619 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -59,6 +59,7 @@ KERNEL_DEVICETREE_OVERLAYS_DTBO = " \
     overlays/w1-gpio.dtbo \
     overlays/w1-gpio-pullup.dtbo \
     overlays/pi3-miniuart-bt.dtbo \
+    overlays/vc4-kms-v3d.dtbo \
     "
 
 def cmpver_strings(ver1, ver2, truevalue, falsevalue):
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 03/13] raspberrypi.conf: set the default value of VC4_CMA_SIZE to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 01/13] rpi-default-providers.inc: change default providers to support vc4graphics Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 02/13] rpi-base.inc: add vc4-kms-v3d to the overlays " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 04/13] raspberrypi0.conf: " Herve Jourdain
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 conf/machine/raspberrypi.conf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/conf/machine/raspberrypi.conf b/conf/machine/raspberrypi.conf
index 0f95f1a..b369c67 100644
--- a/conf/machine/raspberrypi.conf
+++ b/conf/machine/raspberrypi.conf
@@ -8,3 +8,5 @@ require conf/machine/include/tune-arm1176jzf-s.inc
 include conf/machine/include/rpi-base.inc
 
 SERIAL_CONSOLE = "115200 ttyAMA0"
+VC4_CMA_SIZE_raspberrypi ?= "cma-64"
+
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 04/13] raspberrypi0.conf: set the default value of VC4_CMA_SIZE to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (2 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 03/13] raspberrypi.conf: set the default value of VC4_CMA_SIZE " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 05/13] raspberrypi2.conf: " Herve Jourdain
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 conf/machine/raspberrypi0.conf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/conf/machine/raspberrypi0.conf b/conf/machine/raspberrypi0.conf
index ccf9ae7..0df9121 100644
--- a/conf/machine/raspberrypi0.conf
+++ b/conf/machine/raspberrypi0.conf
@@ -6,3 +6,5 @@ MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
 include conf/machine/raspberrypi.conf
 
 SERIAL_CONSOLE = "115200 ttyAMA0"
+VC4_CMA_SIZE ?= "cma-128"
+
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 05/13] raspberrypi2.conf: set the default value of VC4_CMA_SIZE to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (3 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 04/13] raspberrypi0.conf: " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 06/13] raspberrypi3.conf: " Herve Jourdain
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 conf/machine/raspberrypi2.conf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/conf/machine/raspberrypi2.conf b/conf/machine/raspberrypi2.conf
index b6346e6..3a82d66 100644
--- a/conf/machine/raspberrypi2.conf
+++ b/conf/machine/raspberrypi2.conf
@@ -8,3 +8,5 @@ require conf/machine/include/tune-cortexa7.inc
 include conf/machine/include/rpi-base.inc
 
 SERIAL_CONSOLE = "115200 ttyAMA0"
+VC4_CMA_SIZE ?= "cma-256"
+
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 06/13] raspberrypi3.conf: set the default value of VC4_CMA_SIZE to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (4 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 05/13] raspberrypi2.conf: " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 07/13] firmware.inc: bump version " Herve Jourdain
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 conf/machine/raspberrypi3.conf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/conf/machine/raspberrypi3.conf b/conf/machine/raspberrypi3.conf
index cb6056e..438c6e6 100644
--- a/conf/machine/raspberrypi3.conf
+++ b/conf/machine/raspberrypi3.conf
@@ -9,3 +9,5 @@ MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-brcm43430"
 include conf/machine/raspberrypi2.conf
 
 SERIAL_CONSOLE = "115200 ttyS0"
+VC4_CMA_SIZE ?= "cma-256"
+
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 07/13] firmware.inc: bump version to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (5 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 06/13] raspberrypi3.conf: " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 08/13] rpi-config_git.bb: add v4c overlay to config.txt " Herve Jourdain
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 recipes-bsp/common/firmware.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-bsp/common/firmware.inc b/recipes-bsp/common/firmware.inc
index 8f095b9..b467fc6 100644
--- a/recipes-bsp/common/firmware.inc
+++ b/recipes-bsp/common/firmware.inc
@@ -1,5 +1,5 @@
-RPIFW_SRCREV ?= "c5e131971c323f5658c7c5d4b1dd105d37903a99"
-RPIFW_DATE ?= "20160421"
+RPIFW_SRCREV ?= "c17fa41b8e8321d891230f97837fee98feebc1ac"
+RPIFW_DATE ?= "20160513"
 RPIFW_SRC_URI ?= "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master"
 RPIFW_S ?= "${WORKDIR}/git"
 
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 08/13] rpi-config_git.bb: add v4c overlay to config.txt to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (6 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 07/13] firmware.inc: bump version " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 09/13] wayland/weston_%.bbappend: modify configuration options " Herve Jourdain
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 recipes-bsp/bootfiles/rpi-config_git.bb | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
index 4bc8eb7..f610718 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -13,12 +13,14 @@ SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
 
 S = "${WORKDIR}/git"
 
-PR = "r4"
+PR = "r5"
 
 PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
 PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
 PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
 
+VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
+
 inherit deploy
 
 do_deploy() {
@@ -102,6 +104,12 @@ do_deploy() {
         echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
+
+    # VC4 Graphics support
+    if [ "${VC4GRAPHICS}" = "1" ]; then
+        echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        echo "dtoverlay=vc4-kms-v3d,${VC4_CMA_SIZE}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
 }
 
 addtask deploy before do_package after do_install
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 09/13] wayland/weston_%.bbappend: modify configuration options to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (7 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 08/13] rpi-config_git.bb: add v4c overlay to config.txt " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 10/13] weston/weston_%.bbappend: " Herve Jourdain
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 recipes-graphics/wayland/weston_%.bbappend | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend
index c3a7421..57b8079 100644
--- a/recipes-graphics/wayland/weston_%.bbappend
+++ b/recipes-graphics/wayland/weston_%.bbappend
@@ -1,4 +1,2 @@
-EXTRA_OECONF_append_rpi = "\
-        --enable-rpi-compositor \
-        WESTON_NATIVE_BACKEND=rpi-backend.so \
-       "
+EXTRA_OECONF_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' --enable-rpi-compositor WESTON_NATIVE_BACKEND=rpi-backend.so', d)}"
+
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 10/13] weston/weston_%.bbappend: modify configuration options to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (8 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 09/13] wayland/weston_%.bbappend: modify configuration options " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 11/13] mesa_%.bbappend: new file to add the correct " Herve Jourdain
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 recipes-graphics/weston/weston_%.bbappend | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/recipes-graphics/weston/weston_%.bbappend b/recipes-graphics/weston/weston_%.bbappend
index 3ec311d..70f4360 100644
--- a/recipes-graphics/weston/weston_%.bbappend
+++ b/recipes-graphics/weston/weston_%.bbappend
@@ -1,7 +1,8 @@
-EXTRA_OECONF += "--enable-rpi-compositor \
-             --disable-resize-optimization \
-             --disable-setuid-install \
-             --disable-xwayland-test \
-             --disable-simple-egl-clients \
-             WESTON_NATIVE_BACKEND=rpi-backend.so \
+PACKAGECONFIG_rpi_remove = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ' fbdev', '', d)}"
+EXTRA_OECONF += "--disable-xwayland-test \
+                 --disable-simple-egl-clients \
 "
+EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--enable-rpi-compositor', d)}"
+EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--disable-resize-optimization', d)}"
+EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--disable-setuid-install', d)}"
+EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'WESTON_NATIVE_BACKEND=rpi-backend.so', d)}"
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 11/13] mesa_%.bbappend: new file to add the correct configuration options to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (9 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 10/13] weston/weston_%.bbappend: " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 12/13] linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 " Herve Jourdain
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 recipes-graphics/mesa/mesa_%.bbappend | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 recipes-graphics/mesa/mesa_%.bbappend

diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend
new file mode 100644
index 0000000..b182388
--- /dev/null
+++ b/recipes-graphics/mesa/mesa_%.bbappend
@@ -0,0 +1,4 @@
+PACKAGECONFIG_append_rpi = " gallium"
+GALLIUMDRIVERS_rpi = "vc4"
+DRIDRIVERS_rpi = ""
+
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 12/13] linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (10 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 11/13] mesa_%.bbappend: new file to add the correct " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 13/13] linux-rpi.inc: add the configuration options required " Herve Jourdain
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 recipes-kernel/linux/linux-raspberrypi_4.4.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-kernel/linux/linux-raspberrypi_4.4.bb b/recipes-kernel/linux/linux-raspberrypi_4.4.bb
index 831ac5a..79a6e65 100644
--- a/recipes-kernel/linux/linux-raspberrypi_4.4.bb
+++ b/recipes-kernel/linux/linux-raspberrypi_4.4.bb
@@ -1,8 +1,8 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
 
-LINUX_VERSION ?= "4.4.8"
+LINUX_VERSION ?= "4.4.10"
 
-SRCREV = "fe7ad6aa5c6940817fe971d80a7b2a1d6052190a"
+SRCREV = "c317a023583b17a4350f066924d5fff47a81f91e"
 SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.4.y \
            file://0001-fix-dtbo-rules.patch \
 "
-- 
2.7.4



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

* [meta-raspberrypi][PATCH v2 13/13] linux-rpi.inc: add the configuration options required to support vc4graphics
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (11 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 12/13] linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 " Herve Jourdain
@ 2016-05-20 11:51 ` Herve Jourdain
  2016-05-20 15:54 ` [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Khem Raj
  2016-05-24  9:59 ` piotr.lewicki
  14 siblings, 0 replies; 20+ messages in thread
From: Herve Jourdain @ 2016-05-20 11:51 UTC (permalink / raw)
  To: yocto

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
---
 recipes-kernel/linux/linux-rpi.inc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/recipes-kernel/linux/linux-rpi.inc b/recipes-kernel/linux/linux-rpi.inc
index fae78b7..9b91bd5 100644
--- a/recipes-kernel/linux/linux-rpi.inc
+++ b/recipes-kernel/linux/linux-rpi.inc
@@ -107,6 +107,16 @@ do_configure_prepend() {
     # Activate CONFIG_LEGACY_PTYS
     kernel_configure_variable LEGACY_PTYS y
 
+    # Activate the configuration options for VC4
+    VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
+    if [ ${VC4GRAPHICS} = "1" ]; then
+        kernel_configure_variable I2C_BCM2835 y
+        kernel_configure_variable DRM y
+        kernel_configure_variable DRM_FBDEV_EMULATION n
+        kernel_configure_variable DRM_VC4 y
+        kernel_configure_variable FB_BCM2708 n
+    fi
+
     # Keep this the last line
     # Remove all modified configs and add the rest to .config
     sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
-- 
2.7.4



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

* Re: [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (12 preceding siblings ...)
  2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 13/13] linux-rpi.inc: add the configuration options required " Herve Jourdain
@ 2016-05-20 15:54 ` Khem Raj
  2016-05-24  9:59 ` piotr.lewicki
  14 siblings, 0 replies; 20+ messages in thread
From: Khem Raj @ 2016-05-20 15:54 UTC (permalink / raw)
  To: Herve Jourdain; +Cc: yocto

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


> On May 20, 2016, at 4:51 AM, Herve Jourdain <herve.jourdain@neuf.fr> wrote:
> 
> This v2 series addresses the following issues with the first series:
> a. Fix the 4.4.10 kernel revision
> b. Effectively add vc4-kms-v3d overlay to the list of overlays to build (forgotten previously)
> c. Make the parameter to the v4c-kms-v3d overlay configurable
> d. Add default values for the cma parameter to the v4c-kms-v3d overlay, depending on the board (and the memory it has)
> 
> This patch series enables the support for the VC4 graphics driver from Eric Anholt.
> There was a previous patch series by Javier Martinez Canillas, but it required use of a different kernel.
> VC4 is now supported in the raspberrypi official kernel, at least for 4.4.9+.
> The support in 4.1 exists, but it is NOT STABLE, so it has been deemed unreasonable to support VC4 with 4.1 kernels.
> 
> THEREFORE, VC4 graphics is supported ONLY for kernel versions 4.4.9 and later.
> 
> This patch series proposes to support VC4 by only adding 'vc4graphics' to MACHINE_FEATURES, for raspberrypi. If this is set, it will trigger all the necessary configuration/changes to use the VC4 driver, including mesa/wayland/weston currently, and adding the overlay required.
> In order for this series to work, some previous patches are needed (support for .dtbo, and fix of the mesa packaging when there is no DRI driver).
> The memory reserved for the VC4 driver has default values depending on the version of the board used, but it can be configured by setting VC4_CMA_SIZE to a value supported by the overlay ('cma-256', 'cma-192', 'cma-128', 'cma-96', 'cma-64').
> 'cma-256' is the recommended value, but it might not be possible on boards with 512MB or DRAM, or less...
> 'cma-64' is known to not being able to support FHD/1080p.
> 
> It was tested with wayland/weston, without the support for X11.

Looks good to me now.

> 
> This patch series depends on two other patch series previously posted, that enable the support for .dtbo overlay files.
> 
> Herve Jourdain (13):
>  rpi-default-providers.inc: change default providers to support
>    vc4graphics
>  rpi-base.inc: add vc4-kms-v3d to the overlays to support vc4graphics
>  raspberrypi.conf: set the default value of VC4_CMA_SIZE to support
>    vc4graphics
>  raspberrypi0.conf: set the default value of VC4_CMA_SIZE to support
>    vc4graphics
>  raspberrypi2.conf: set the default value of VC4_CMA_SIZE to support
>    vc4graphics
>  raspberrypi3.conf: set the default value of VC4_CMA_SIZE to support
>    vc4graphics
>  firmware.inc: bump version to support vc4graphics
>  rpi-config_git.bb: add v4c overlay to config.txt to support
>    vc4graphics
>  wayland/weston_%.bbappend: modify configuration options to support
>    vc4graphics
>  weston/weston_%.bbappend: modify configuration options to support
>    vc4graphics
>  mesa_%.bbappend: new file to add the correct configuration options to
>    support vc4graphics
>  linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 to
>    support vc4graphics
>  linux-rpi.inc: add the configuration options required to support
>    vc4graphics
> 
> conf/machine/include/rpi-base.inc              |  1 +
> conf/machine/include/rpi-default-providers.inc |  8 ++++----
> conf/machine/raspberrypi.conf                  |  2 ++
> conf/machine/raspberrypi0.conf                 |  2 ++
> conf/machine/raspberrypi2.conf                 |  2 ++
> conf/machine/raspberrypi3.conf                 |  2 ++
> recipes-bsp/bootfiles/rpi-config_git.bb        | 10 +++++++++-
> recipes-bsp/common/firmware.inc                |  4 ++--
> recipes-graphics/mesa/mesa_%.bbappend          |  4 ++++
> recipes-graphics/wayland/weston_%.bbappend     |  6 ++----
> recipes-graphics/weston/weston_%.bbappend      | 13 +++++++------
> recipes-kernel/linux/linux-raspberrypi_4.4.bb  |  4 ++--
> recipes-kernel/linux/linux-rpi.inc             | 10 ++++++++++
> 13 files changed, 49 insertions(+), 19 deletions(-)
> create mode 100644 recipes-graphics/mesa/mesa_%.bbappend
> 
> --
> 2.7.4
> 
> --
> _______________________________________________
> 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] 20+ messages in thread

* Re: [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver
  2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
                   ` (13 preceding siblings ...)
  2016-05-20 15:54 ` [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Khem Raj
@ 2016-05-24  9:59 ` piotr.lewicki
  2016-05-24 10:42   ` Herve Jourdain
  14 siblings, 1 reply; 20+ messages in thread
From: piotr.lewicki @ 2016-05-24  9:59 UTC (permalink / raw)
  To: Herve Jourdain, yocto

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

I have tried these patches, but there were some hunks and errors during 
applying to current master revision 
(69840c0bbe03c2e61601e2377c8e2adc264e0478).
Building 'rpi-hwup-image' passed, but while building 'rpi-test-image' 
(omxplayer recipe) I have noticed some errors due to missing files:
- IL/OMX_Core.h
- VG/openvg.h
- bcm_host.h

I'm attaching omxplayer_build_errors.txt with build log and my patch 
with changes created by Herve (adapted to current master revision) - 
Support_for_VC4_graphics_driver.patch (Herve- if you decide to use that 
and resend v3 of patches - please remove my TODO from 
"conf/machine/include/rpi-base.inc"

Could you take a look at that and help me resolve those issues?


I currently have a problem that I'm forced to use Raspbian because 
playing FHD/1080p videos with omxplayer from Yocto runs choppy (I'm not 
sure if that's the right word, but playback is not smooth) while with 
Raspbian it works perfect.
Do you think that enabling VC4 graphics driver can solve my issue?
Did any of you experienced similar problems? Do you have some other 
solution or do you know what's the cause of this?


Thanks,
Piotr Lewicki


On 20.05.2016 13:51, Herve Jourdain wrote:
> This v2 series addresses the following issues with the first series:
> a. Fix the 4.4.10 kernel revision
> b. Effectively add vc4-kms-v3d overlay to the list of overlays to build (forgotten previously)
> c. Make the parameter to the v4c-kms-v3d overlay configurable
> d. Add default values for the cma parameter to the v4c-kms-v3d overlay, depending on the board (and the memory it has)
>
> This patch series enables the support for the VC4 graphics driver from Eric Anholt.
> There was a previous patch series by Javier Martinez Canillas, but it required use of a different kernel.
> VC4 is now supported in the raspberrypi official kernel, at least for 4.4.9+.
> The support in 4.1 exists, but it is NOT STABLE, so it has been deemed unreasonable to support VC4 with 4.1 kernels.
>
> THEREFORE, VC4 graphics is supported ONLY for kernel versions 4.4.9 and later.
>
> This patch series proposes to support VC4 by only adding 'vc4graphics' to MACHINE_FEATURES, for raspberrypi. If this is set, it will trigger all the necessary configuration/changes to use the VC4 driver, including mesa/wayland/weston currently, and adding the overlay required.
> In order for this series to work, some previous patches are needed (support for .dtbo, and fix of the mesa packaging when there is no DRI driver).
> The memory reserved for the VC4 driver has default values depending on the version of the board used, but it can be configured by setting VC4_CMA_SIZE to a value supported by the overlay ('cma-256', 'cma-192', 'cma-128', 'cma-96', 'cma-64').
> 'cma-256' is the recommended value, but it might not be possible on boards with 512MB or DRAM, or less...
> 'cma-64' is known to not being able to support FHD/1080p.
>
> It was tested with wayland/weston, without the support for X11.
>
> This patch series depends on two other patch series previously posted, that enable the support for .dtbo overlay files.
>
> Herve Jourdain (13):
>    rpi-default-providers.inc: change default providers to support
>      vc4graphics
>    rpi-base.inc: add vc4-kms-v3d to the overlays to support vc4graphics
>    raspberrypi.conf: set the default value of VC4_CMA_SIZE to support
>      vc4graphics
>    raspberrypi0.conf: set the default value of VC4_CMA_SIZE to support
>      vc4graphics
>    raspberrypi2.conf: set the default value of VC4_CMA_SIZE to support
>      vc4graphics
>    raspberrypi3.conf: set the default value of VC4_CMA_SIZE to support
>      vc4graphics
>    firmware.inc: bump version to support vc4graphics
>    rpi-config_git.bb: add v4c overlay to config.txt to support
>      vc4graphics
>    wayland/weston_%.bbappend: modify configuration options to support
>      vc4graphics
>    weston/weston_%.bbappend: modify configuration options to support
>      vc4graphics
>    mesa_%.bbappend: new file to add the correct configuration options to
>      support vc4graphics
>    linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 to
>      support vc4graphics
>    linux-rpi.inc: add the configuration options required to support
>      vc4graphics
>
>   conf/machine/include/rpi-base.inc              |  1 +
>   conf/machine/include/rpi-default-providers.inc |  8 ++++----
>   conf/machine/raspberrypi.conf                  |  2 ++
>   conf/machine/raspberrypi0.conf                 |  2 ++
>   conf/machine/raspberrypi2.conf                 |  2 ++
>   conf/machine/raspberrypi3.conf                 |  2 ++
>   recipes-bsp/bootfiles/rpi-config_git.bb        | 10 +++++++++-
>   recipes-bsp/common/firmware.inc                |  4 ++--
>   recipes-graphics/mesa/mesa_%.bbappend          |  4 ++++
>   recipes-graphics/wayland/weston_%.bbappend     |  6 ++----
>   recipes-graphics/weston/weston_%.bbappend      | 13 +++++++------
>   recipes-kernel/linux/linux-raspberrypi_4.4.bb  |  4 ++--
>   recipes-kernel/linux/linux-rpi.inc             | 10 ++++++++++
>   13 files changed, 49 insertions(+), 19 deletions(-)
>   create mode 100644 recipes-graphics/mesa/mesa_%.bbappend
>


[-- Attachment #2: omxplayer_build_errors.txt --]
[-- Type: text/plain, Size: 3460 bytes --]

| In file included from linux/RBP.h:45:0,
|                  from linux/RBP.cpp:22:
| ./DllBCM.h:34:22: fatal error: bcm_host.h: No such file or directory
| compilation terminated.
| make: *** [linux/RBP.o] Error 1
| make: *** Waiting for unfinished jobs....
| In file included from SubtitleRenderer.cpp:27:0:
| SubtitleRenderer.h:30:23: fatal error: VG/openvg.h: No such file or directory
| compilation terminated.
| make: *** [SubtitleRenderer.o] Error 1
| In file included from OMXCore.h:32:0,
|                  from OMXVideo.h:25,
|                  from OMXVideo.cpp:28:
| DllOMX.h:36:25: fatal error: IL/OMX_Core.h: No such file or directory
| compilation terminated.
| make: *** [OMXVideo.o] Error 1
| In file included from OMXCore.h:32:0,
|                  from OMXCore.cpp:31:
| DllOMX.h:36:25: fatal error: IL/OMX_Core.h: No such file or directory
| compilation terminated.
| make: *** [OMXCore.o] Error 1
| In file included from OMXCore.h:32:0,
|                  from OMXAudio.h:34,
|                  from OMXAudio.cpp:27:
| DllOMX.h:36:25: fatal error: IL/OMX_Core.h: No such file or directory
| compilation terminated.
| make: *** [OMXAudio.o] Error 1
| In file included from OMXCore.h:32:0,
|                  from OMXClock.h:27,
|                  from OMXReader.cpp:29:
| DllOMX.h:36:25: fatal error: IL/OMX_Core.h: No such file or directory
| compilation terminated.
| In file included from OMXCore.h:32:0,
|                  from OMXClock.h:27,
|                  from OMXPlayerAudio.h:32,
|                  from OMXPlayerAudio.cpp:28:
| DllOMX.h:36:25: fatal error: IL/OMX_Core.h: No such file or directory
| compilation terminated.
| In file included from OMXCore.h:32:0,
|                  from OMXClock.h:27,
|                  from OMXClock.cpp:32:
| DllOMX.h:36:25: fatal error: IL/OMX_Core.h: No such file or directory
| compilation terminated.
| In file included from OMXCore.h:32:0,
|                  from OMXClock.h:27,
|                  from OMXPlayerSubtitles.h:23,
|                  from OMXPlayerSubtitles.cpp:19:
| DllOMX.h:36:25: fatal error: IL/OMX_Core.h: No such file or directory
| compilation terminated.
| In file included from OMXCore.h:32:0,
|                  from OMXClock.h:27,
|                  from OMXPlayerVideo.h:30,
|                  from OMXPlayerVideo.cpp:28:
| DllOMX.h:36:25: fatal error: IL/OMX_Core.h: No such file or directory
| compilation terminated.
| make: *** [OMXReader.o] Error 1
| make: *** [OMXPlayerAudio.o] Error 1
| make: *** [OMXClock.o] Error 1
| make: *** [OMXPlayerSubtitles.o] Error 1
| make: *** [OMXPlayerVideo.o] Error 1
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/piotr.lewicki/yocto-raspberry/pi3-16.05.19/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/omxplayer/git-r4/temp/log.do_compile.6167)
ERROR: Task 928 (/home/piotr.lewicki/yocto-raspberry/pi3-16.05.19/layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3680 tasks of which 3639 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
  /home/piotr.lewicki/yocto-raspberry/pi3-16.05.19/layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb, do_compile
  Summary: There were 2 ERROR messages shown, returning a non-zero exit code.


[-- Attachment #3: Support_for_VC4_graphics_driver.patch --]
[-- Type: text/x-patch, Size: 8574 bytes --]

diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index 56ca83e..21bf9c0 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -37,7 +37,9 @@ KERNEL_DEVICETREE ?= " \
     overlays/w1-gpio-overlay.dtb \
     overlays/w1-gpio-pullup-overlay.dtb \
     overlays/pi3-miniuart-bt-overlay.dtb \
+    overlays/vc4-kms-v3d-overlay.dtb \
     "
+# TODO line with overlays/vc4-kms-v3d.dtbo : decide whether it is .dtb or .dtbo
 KERNEL_IMAGETYPE ?= "Image"
 
 MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
diff --git a/conf/machine/include/rpi-default-providers.inc b/conf/machine/include/rpi-default-providers.inc
index cabbd43..0bc8838 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("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"
+PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"
+PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
+PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
 PREFERRED_PROVIDER_jpeg ?= "jpeg"
diff --git a/conf/machine/raspberrypi.conf b/conf/machine/raspberrypi.conf
index 0f95f1a..b369c67 100644
--- a/conf/machine/raspberrypi.conf
+++ b/conf/machine/raspberrypi.conf
@@ -8,3 +8,5 @@ require conf/machine/include/tune-arm1176jzf-s.inc
 include conf/machine/include/rpi-base.inc
 
 SERIAL_CONSOLE = "115200 ttyAMA0"
+VC4_CMA_SIZE_raspberrypi ?= "cma-64"
+
diff --git a/conf/machine/raspberrypi0.conf b/conf/machine/raspberrypi0.conf
index ccf9ae7..0df9121 100644
--- a/conf/machine/raspberrypi0.conf
+++ b/conf/machine/raspberrypi0.conf
@@ -6,3 +6,5 @@ MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
 include conf/machine/raspberrypi.conf
 
 SERIAL_CONSOLE = "115200 ttyAMA0"
+VC4_CMA_SIZE ?= "cma-128"
+
diff --git a/conf/machine/raspberrypi2.conf b/conf/machine/raspberrypi2.conf
index b6346e6..3a82d66 100644
--- a/conf/machine/raspberrypi2.conf
+++ b/conf/machine/raspberrypi2.conf
@@ -8,3 +8,5 @@ require conf/machine/include/tune-cortexa7.inc
 include conf/machine/include/rpi-base.inc
 
 SERIAL_CONSOLE = "115200 ttyAMA0"
+VC4_CMA_SIZE ?= "cma-256"
+
diff --git a/conf/machine/raspberrypi3.conf b/conf/machine/raspberrypi3.conf
index cb6056e..438c6e6 100644
--- a/conf/machine/raspberrypi3.conf
+++ b/conf/machine/raspberrypi3.conf
@@ -9,3 +9,5 @@ MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-brcm43430"
 include conf/machine/raspberrypi2.conf
 
 SERIAL_CONSOLE = "115200 ttyS0"
+VC4_CMA_SIZE ?= "cma-256"
+
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
index 4bc8eb7..f610718 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -13,12 +13,14 @@ SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
 
 S = "${WORKDIR}/git"
 
-PR = "r4"
+PR = "r5"
 
 PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
 PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
 PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
 
+VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
+
 inherit deploy
 
 do_deploy() {
@@ -102,6 +104,12 @@ do_deploy() {
         echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
+
+    # VC4 Graphics support
+    if [ "${VC4GRAPHICS}" = "1" ]; then
+        echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        echo "dtoverlay=vc4-kms-v3d,${VC4_CMA_SIZE}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
 }
 
 addtask deploy before do_package after do_install
diff --git a/recipes-bsp/common/firmware.inc b/recipes-bsp/common/firmware.inc
index bf11e4c..b467fc6 100644
--- a/recipes-bsp/common/firmware.inc
+++ b/recipes-bsp/common/firmware.inc
@@ -1,5 +1,5 @@
-RPIFW_SRCREV ?= "3816e1ce1e6ebc6d2bf0596dbd52849e16aa7e94"
-RPIFW_DATE ?= "20160512"
+RPIFW_SRCREV ?= "c17fa41b8e8321d891230f97837fee98feebc1ac"
+RPIFW_DATE ?= "20160513"
 RPIFW_SRC_URI ?= "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master"
 RPIFW_S ?= "${WORKDIR}/git"
 
diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend
new file mode 100644
index 0000000..b182388
--- /dev/null
+++ b/recipes-graphics/mesa/mesa_%.bbappend
@@ -0,0 +1,4 @@
+PACKAGECONFIG_append_rpi = " gallium"
+GALLIUMDRIVERS_rpi = "vc4"
+DRIDRIVERS_rpi = ""
+
diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend
index c3a7421..57b8079 100644
--- a/recipes-graphics/wayland/weston_%.bbappend
+++ b/recipes-graphics/wayland/weston_%.bbappend
@@ -1,4 +1,2 @@
-EXTRA_OECONF_append_rpi = "\
-        --enable-rpi-compositor \
-        WESTON_NATIVE_BACKEND=rpi-backend.so \
-       "
+EXTRA_OECONF_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' --enable-rpi-compositor WESTON_NATIVE_BACKEND=rpi-backend.so', d)}"
+
diff --git a/recipes-graphics/weston/weston_%.bbappend b/recipes-graphics/weston/weston_%.bbappend
index 3ec311d..70f4360 100644
--- a/recipes-graphics/weston/weston_%.bbappend
+++ b/recipes-graphics/weston/weston_%.bbappend
@@ -1,7 +1,8 @@
-EXTRA_OECONF += "--enable-rpi-compositor \
-             --disable-resize-optimization \
-             --disable-setuid-install \
-             --disable-xwayland-test \
-             --disable-simple-egl-clients \
-             WESTON_NATIVE_BACKEND=rpi-backend.so \
+PACKAGECONFIG_rpi_remove = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ' fbdev', '', d)}"
+EXTRA_OECONF += "--disable-xwayland-test \
+                 --disable-simple-egl-clients \
 "
+EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--enable-rpi-compositor', d)}"
+EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--disable-resize-optimization', d)}"
+EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--disable-setuid-install', d)}"
+EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'WESTON_NATIVE_BACKEND=rpi-backend.so', d)}"
diff --git a/recipes-kernel/linux/linux-raspberrypi_4.4.bb b/recipes-kernel/linux/linux-raspberrypi_4.4.bb
index ba47b22..b8d6028 100644
--- a/recipes-kernel/linux/linux-raspberrypi_4.4.bb
+++ b/recipes-kernel/linux/linux-raspberrypi_4.4.bb
@@ -1,8 +1,8 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
 
-LINUX_VERSION ?= "4.4.9"
+LINUX_VERSION ?= "4.4.10"
 
-SRCREV = "3b440738b5c1adc3ec3ee72ceca799d1b8d264df"
+SRCREV = "c317a023583b17a4350f066924d5fff47a81f91e"
 SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.4.y \
 "
 require linux-raspberrypi.inc
diff --git a/recipes-kernel/linux/linux-rpi.inc b/recipes-kernel/linux/linux-rpi.inc
index 1755685..c120dbd 100644
--- a/recipes-kernel/linux/linux-rpi.inc
+++ b/recipes-kernel/linux/linux-rpi.inc
@@ -111,6 +111,16 @@ do_configure_prepend() {
     # Activate CONFIG_LEGACY_PTYS
     kernel_configure_variable LEGACY_PTYS y
 
+    # Activate the configuration options for VC4
+    VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
+    if [ ${VC4GRAPHICS} = "1" ]; then
+        kernel_configure_variable I2C_BCM2835 y
+        kernel_configure_variable DRM y
+        kernel_configure_variable DRM_FBDEV_EMULATION n
+        kernel_configure_variable DRM_VC4 y
+        kernel_configure_variable FB_BCM2708 n
+    fi
+
     # Keep this the last line
     # Remove all modified configs and add the rest to .config
     sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'

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

* Re: [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver
  2016-05-24  9:59 ` piotr.lewicki
@ 2016-05-24 10:42   ` Herve Jourdain
  2016-05-24 11:08     ` piotr.lewicki
  0 siblings, 1 reply; 20+ messages in thread
From: Herve Jourdain @ 2016-05-24 10:42 UTC (permalink / raw)
  To: 'piotr.lewicki', yocto

Hi Piotr,

I know that the omxplayer would not build at this time, because VC4 and
userland will conflict, and currently omxplayer depends on userland.
I will check if it can be supported with VC4 driver enabled, but for the
moment it's true I disabled it in my build.

Regarding your patches:
1. Are you using linux kernel 4.4? You should set
PREFERRED_VERSION_linux-raspberrypi = "4.4.%" somewhere, either in your
distro configuration file, or your local.conf.
    If you do so, it should get kernel 4.4.10, which requires .dtbo files
for overlay. As mentioned in the patch, support for VC4 in 4.1 is not
stable, and therefore not supported.
2. I've seen only one TODO, did you make only one modification?
3. There are other patches that are needed to be applied, before this patch
series is applied: 2 for .dtbo support (1 in meta-raspberrypi, 1 in meta), 1
for mesa (to allow packaging with empty DRI).

I'll take a look at the omxplayer issue as soon as I can, in the meanwhile I
recommend to not use it...

Herve

-----Original Message-----
From: piotr.lewicki [mailto:piotr.lewicki@elfin.de] 
Sent: mardi 24 mai 2016 11:59
To: Herve Jourdain <herve.jourdain@neuf.fr>; yocto@yoctoproject.org
Subject: Re: [yocto] [meta-raspberrypi][PATCH v2 00/13] Support for VC4
graphics driver

I have tried these patches, but there were some hunks and errors during
applying to current master revision
(69840c0bbe03c2e61601e2377c8e2adc264e0478).
Building 'rpi-hwup-image' passed, but while building 'rpi-test-image' 
(omxplayer recipe) I have noticed some errors due to missing files:
- IL/OMX_Core.h
- VG/openvg.h
- bcm_host.h

I'm attaching omxplayer_build_errors.txt with build log and my patch with
changes created by Herve (adapted to current master revision) -
Support_for_VC4_graphics_driver.patch (Herve- if you decide to use that and
resend v3 of patches - please remove my TODO from
"conf/machine/include/rpi-base.inc"

Could you take a look at that and help me resolve those issues?


I currently have a problem that I'm forced to use Raspbian because playing
FHD/1080p videos with omxplayer from Yocto runs choppy (I'm not sure if
that's the right word, but playback is not smooth) while with Raspbian it
works perfect.
Do you think that enabling VC4 graphics driver can solve my issue?
Did any of you experienced similar problems? Do you have some other solution
or do you know what's the cause of this?


Thanks,
Piotr Lewicki


On 20.05.2016 13:51, Herve Jourdain wrote:
> This v2 series addresses the following issues with the first series:
> a. Fix the 4.4.10 kernel revision
> b. Effectively add vc4-kms-v3d overlay to the list of overlays to 
> build (forgotten previously) c. Make the parameter to the v4c-kms-v3d 
> overlay configurable d. Add default values for the cma parameter to 
> the v4c-kms-v3d overlay, depending on the board (and the memory it 
> has)
>
> This patch series enables the support for the VC4 graphics driver from
Eric Anholt.
> There was a previous patch series by Javier Martinez Canillas, but it
required use of a different kernel.
> VC4 is now supported in the raspberrypi official kernel, at least for
4.4.9+.
> The support in 4.1 exists, but it is NOT STABLE, so it has been deemed
unreasonable to support VC4 with 4.1 kernels.
>
> THEREFORE, VC4 graphics is supported ONLY for kernel versions 4.4.9 and
later.
>
> This patch series proposes to support VC4 by only adding 'vc4graphics' to
MACHINE_FEATURES, for raspberrypi. If this is set, it will trigger all the
necessary configuration/changes to use the VC4 driver, including
mesa/wayland/weston currently, and adding the overlay required.
> In order for this series to work, some previous patches are needed
(support for .dtbo, and fix of the mesa packaging when there is no DRI
driver).
> The memory reserved for the VC4 driver has default values depending on the
version of the board used, but it can be configured by setting VC4_CMA_SIZE
to a value supported by the overlay ('cma-256', 'cma-192', 'cma-128',
'cma-96', 'cma-64').
> 'cma-256' is the recommended value, but it might not be possible on boards
with 512MB or DRAM, or less...
> 'cma-64' is known to not being able to support FHD/1080p.
>
> It was tested with wayland/weston, without the support for X11.
>
> This patch series depends on two other patch series previously posted,
that enable the support for .dtbo overlay files.
>
> Herve Jourdain (13):
>    rpi-default-providers.inc: change default providers to support
>      vc4graphics
>    rpi-base.inc: add vc4-kms-v3d to the overlays to support vc4graphics
>    raspberrypi.conf: set the default value of VC4_CMA_SIZE to support
>      vc4graphics
>    raspberrypi0.conf: set the default value of VC4_CMA_SIZE to support
>      vc4graphics
>    raspberrypi2.conf: set the default value of VC4_CMA_SIZE to support
>      vc4graphics
>    raspberrypi3.conf: set the default value of VC4_CMA_SIZE to support
>      vc4graphics
>    firmware.inc: bump version to support vc4graphics
>    rpi-config_git.bb: add v4c overlay to config.txt to support
>      vc4graphics
>    wayland/weston_%.bbappend: modify configuration options to support
>      vc4graphics
>    weston/weston_%.bbappend: modify configuration options to support
>      vc4graphics
>    mesa_%.bbappend: new file to add the correct configuration options to
>      support vc4graphics
>    linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 to
>      support vc4graphics
>    linux-rpi.inc: add the configuration options required to support
>      vc4graphics
>
>   conf/machine/include/rpi-base.inc              |  1 +
>   conf/machine/include/rpi-default-providers.inc |  8 ++++----
>   conf/machine/raspberrypi.conf                  |  2 ++
>   conf/machine/raspberrypi0.conf                 |  2 ++
>   conf/machine/raspberrypi2.conf                 |  2 ++
>   conf/machine/raspberrypi3.conf                 |  2 ++
>   recipes-bsp/bootfiles/rpi-config_git.bb        | 10 +++++++++-
>   recipes-bsp/common/firmware.inc                |  4 ++--
>   recipes-graphics/mesa/mesa_%.bbappend          |  4 ++++
>   recipes-graphics/wayland/weston_%.bbappend     |  6 ++----
>   recipes-graphics/weston/weston_%.bbappend      | 13 +++++++------
>   recipes-kernel/linux/linux-raspberrypi_4.4.bb  |  4 ++--
>   recipes-kernel/linux/linux-rpi.inc             | 10 ++++++++++
>   13 files changed, 49 insertions(+), 19 deletions(-)
>   create mode 100644 recipes-graphics/mesa/mesa_%.bbappend
>




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

* Re: [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver
  2016-05-24 10:42   ` Herve Jourdain
@ 2016-05-24 11:08     ` piotr.lewicki
  2016-05-24 12:06       ` Herve Jourdain
  0 siblings, 1 reply; 20+ messages in thread
From: piotr.lewicki @ 2016-05-24 11:08 UTC (permalink / raw)
  To: Herve Jourdain, yocto

On 24.05.2016 12:42, Herve Jourdain wrote:
> Hi Piotr,
Hi,
There were issues with patches 02, 07 and 12.
02- due to different overlay naming (overlays/vc4-kms-v3d-overlay.dtb 
instead of overlays/vc4-kms-v3d.dtbo) and 07 and 12 due to bump of 
linux-raspberrypi from 4.4.8 to 4.4.9 (on master).
> I know that the omxplayer would not build at this time, because VC4 and
> userland will conflict, and currently omxplayer depends on userland.
> I will check if it can be supported with VC4 driver enabled, but for the
> moment it's true I disabled it in my build.
>
> Regarding your patches:
> 1. Are you using linux kernel 4.4? You should set
> PREFERRED_VERSION_linux-raspberrypi = "4.4.%" somewhere, either in your
> distro configuration file, or your local.conf.
>      If you do so, it should get kernel 4.4.10, which requires .dtbo files
> for overlay. As mentioned in the patch, support for VC4 in 4.1 is not
> stable, and therefore not supported.
I did that :-)
> 2. I've seen only one TODO, did you make only one modification?
There were issues with patches 02, 07 and 12.
02- due to different overlay naming (overlays/vc4-kms-v3d-overlay.dtb 
instead of overlays/vc4-kms-v3d.dtbo) and 07 and 12 due to bump of 
linux-raspberrypi from 4.4.8 to 4.4.9 (on master).

Now I see that 02 whas not necessary- I just missed the patch you 
provided earlier.
> 3. There are other patches that are needed to be applied, before this patch
> series is applied: 2 for .dtbo support (1 in meta-raspberrypi, 1 in meta), 1
> for mesa (to allow packaging with empty DRI).
Ok. I didn't know. Can you confirm that I have the right patches?
Patch for meta is from thread "[yocto] [PATCH v2 0/1] Support for .dtbo 
files for dtb overlays"?
Patch for meta-raspberrypi is "[yocto] [meta-raspberrypi][PATCH 0/8] 
Support for vc4 graphics driver"?
Patch for mesa is part of those patches above?
> I'll take a look at the omxplayer issue as soon as I can, in the meanwhile I
> recommend to not use it...
This would be great. Thank you.
>
> Herve
>
> -----Original Message-----
> From: piotr.lewicki [mailto:piotr.lewicki@elfin.de]
> Sent: mardi 24 mai 2016 11:59
> To: Herve Jourdain <herve.jourdain@neuf.fr>; yocto@yoctoproject.org
> Subject: Re: [yocto] [meta-raspberrypi][PATCH v2 00/13] Support for VC4
> graphics driver
>
> I have tried these patches, but there were some hunks and errors during
> applying to current master revision
> (69840c0bbe03c2e61601e2377c8e2adc264e0478).
> Building 'rpi-hwup-image' passed, but while building 'rpi-test-image'
> (omxplayer recipe) I have noticed some errors due to missing files:
> - IL/OMX_Core.h
> - VG/openvg.h
> - bcm_host.h
>
> I'm attaching omxplayer_build_errors.txt with build log and my patch with
> changes created by Herve (adapted to current master revision) -
> Support_for_VC4_graphics_driver.patch (Herve- if you decide to use that and
> resend v3 of patches - please remove my TODO from
> "conf/machine/include/rpi-base.inc"
>
> Could you take a look at that and help me resolve those issues?
>
>
> I currently have a problem that I'm forced to use Raspbian because playing
> FHD/1080p videos with omxplayer from Yocto runs choppy (I'm not sure if
> that's the right word, but playback is not smooth) while with Raspbian it
> works perfect.
> Do you think that enabling VC4 graphics driver can solve my issue?
> Did any of you experienced similar problems? Do you have some other solution
> or do you know what's the cause of this?
>
>
> Thanks,
> Piotr Lewicki
>
>
> On 20.05.2016 13:51, Herve Jourdain wrote:
>> This v2 series addresses the following issues with the first series:
>> a. Fix the 4.4.10 kernel revision
>> b. Effectively add vc4-kms-v3d overlay to the list of overlays to
>> build (forgotten previously) c. Make the parameter to the v4c-kms-v3d
>> overlay configurable d. Add default values for the cma parameter to
>> the v4c-kms-v3d overlay, depending on the board (and the memory it
>> has)
>>
>> This patch series enables the support for the VC4 graphics driver from
> Eric Anholt.
>> There was a previous patch series by Javier Martinez Canillas, but it
> required use of a different kernel.
>> VC4 is now supported in the raspberrypi official kernel, at least for
> 4.4.9+.
>> The support in 4.1 exists, but it is NOT STABLE, so it has been deemed
> unreasonable to support VC4 with 4.1 kernels.
>> THEREFORE, VC4 graphics is supported ONLY for kernel versions 4.4.9 and
> later.
>> This patch series proposes to support VC4 by only adding 'vc4graphics' to
> MACHINE_FEATURES, for raspberrypi. If this is set, it will trigger all the
> necessary configuration/changes to use the VC4 driver, including
> mesa/wayland/weston currently, and adding the overlay required.
>> In order for this series to work, some previous patches are needed
> (support for .dtbo, and fix of the mesa packaging when there is no DRI
> driver).
>> The memory reserved for the VC4 driver has default values depending on the
> version of the board used, but it can be configured by setting VC4_CMA_SIZE
> to a value supported by the overlay ('cma-256', 'cma-192', 'cma-128',
> 'cma-96', 'cma-64').
>> 'cma-256' is the recommended value, but it might not be possible on boards
> with 512MB or DRAM, or less...
>> 'cma-64' is known to not being able to support FHD/1080p.
>>
>> It was tested with wayland/weston, without the support for X11.
>>
>> This patch series depends on two other patch series previously posted,
> that enable the support for .dtbo overlay files.
>> Herve Jourdain (13):
>>     rpi-default-providers.inc: change default providers to support
>>       vc4graphics
>>     rpi-base.inc: add vc4-kms-v3d to the overlays to support vc4graphics
>>     raspberrypi.conf: set the default value of VC4_CMA_SIZE to support
>>       vc4graphics
>>     raspberrypi0.conf: set the default value of VC4_CMA_SIZE to support
>>       vc4graphics
>>     raspberrypi2.conf: set the default value of VC4_CMA_SIZE to support
>>       vc4graphics
>>     raspberrypi3.conf: set the default value of VC4_CMA_SIZE to support
>>       vc4graphics
>>     firmware.inc: bump version to support vc4graphics
>>     rpi-config_git.bb: add v4c overlay to config.txt to support
>>       vc4graphics
>>     wayland/weston_%.bbappend: modify configuration options to support
>>       vc4graphics
>>     weston/weston_%.bbappend: modify configuration options to support
>>       vc4graphics
>>     mesa_%.bbappend: new file to add the correct configuration options to
>>       support vc4graphics
>>     linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 to
>>       support vc4graphics
>>     linux-rpi.inc: add the configuration options required to support
>>       vc4graphics
>>
>>    conf/machine/include/rpi-base.inc              |  1 +
>>    conf/machine/include/rpi-default-providers.inc |  8 ++++----
>>    conf/machine/raspberrypi.conf                  |  2 ++
>>    conf/machine/raspberrypi0.conf                 |  2 ++
>>    conf/machine/raspberrypi2.conf                 |  2 ++
>>    conf/machine/raspberrypi3.conf                 |  2 ++
>>    recipes-bsp/bootfiles/rpi-config_git.bb        | 10 +++++++++-
>>    recipes-bsp/common/firmware.inc                |  4 ++--
>>    recipes-graphics/mesa/mesa_%.bbappend          |  4 ++++
>>    recipes-graphics/wayland/weston_%.bbappend     |  6 ++----
>>    recipes-graphics/weston/weston_%.bbappend      | 13 +++++++------
>>    recipes-kernel/linux/linux-raspberrypi_4.4.bb  |  4 ++--
>>    recipes-kernel/linux/linux-rpi.inc             | 10 ++++++++++
>>    13 files changed, 49 insertions(+), 19 deletions(-)
>>    create mode 100644 recipes-graphics/mesa/mesa_%.bbappend
>>
>
Thanks,
Piotr Lewicki


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

* Re: [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver
  2016-05-24 11:08     ` piotr.lewicki
@ 2016-05-24 12:06       ` Herve Jourdain
  2016-05-24 12:27         ` piotr.lewicki
  0 siblings, 1 reply; 20+ messages in thread
From: Herve Jourdain @ 2016-05-24 12:06 UTC (permalink / raw)
  To: 'piotr.lewicki', yocto

Hi Piotr,

Please make sure you have the latest series, the 02 was modified actually,
and is different from what you have.
If meta-raspberrypi was changed since I sent the patch, then there might be
some need to rebase it. Dear list, do you need me to send a v3 taking into
account the latest modifications of the meta-raspberrypi master, if any?
The other patch threads, that are needed, are:
1. [yocto][meta-raspberrypi][PATCH v3 0/5] Support for .dtbo files for dtb
overlays, required by kernels 4.4.6+
2. [yocto][PATCH v2 0/1] Support for .dtbo files for dtb overlays
3. [OE-core][mesa][PATCH v2 0/1] Fix mesa_populate_packages() when dri is
disabled [I believe Ross Burton has modified the original one to use
oe.path.join() when committing it]

To be more specific, I will most likely start by fixing gst-omx (which
currently wants to use userland on RPI), then go for omxplayer.

Herve

-----Original Message-----
From: piotr.lewicki [mailto:piotr.lewicki@elfin.de] 
Sent: mardi 24 mai 2016 13:08
To: Herve Jourdain <herve.jourdain@neuf.fr>; yocto@yoctoproject.org
Subject: Re: [yocto] [meta-raspberrypi][PATCH v2 00/13] Support for VC4
graphics driver

On 24.05.2016 12:42, Herve Jourdain wrote:
> Hi Piotr,
Hi,
There were issues with patches 02, 07 and 12.
02- due to different overlay naming (overlays/vc4-kms-v3d-overlay.dtb
instead of overlays/vc4-kms-v3d.dtbo) and 07 and 12 due to bump of
linux-raspberrypi from 4.4.8 to 4.4.9 (on master).
> I know that the omxplayer would not build at this time, because VC4 
> and userland will conflict, and currently omxplayer depends on userland.
> I will check if it can be supported with VC4 driver enabled, but for 
> the moment it's true I disabled it in my build.
>
> Regarding your patches:
> 1. Are you using linux kernel 4.4? You should set 
> PREFERRED_VERSION_linux-raspberrypi = "4.4.%" somewhere, either in 
> your distro configuration file, or your local.conf.
>      If you do so, it should get kernel 4.4.10, which requires .dtbo 
> files for overlay. As mentioned in the patch, support for VC4 in 4.1 
> is not stable, and therefore not supported.
I did that :-)
> 2. I've seen only one TODO, did you make only one modification?
There were issues with patches 02, 07 and 12.
02- due to different overlay naming (overlays/vc4-kms-v3d-overlay.dtb
instead of overlays/vc4-kms-v3d.dtbo) and 07 and 12 due to bump of
linux-raspberrypi from 4.4.8 to 4.4.9 (on master).

Now I see that 02 whas not necessary- I just missed the patch you provided
earlier.
> 3. There are other patches that are needed to be applied, before this 
> patch series is applied: 2 for .dtbo support (1 in meta-raspberrypi, 1 
> in meta), 1 for mesa (to allow packaging with empty DRI).
Ok. I didn't know. Can you confirm that I have the right patches?
Patch for meta is from thread "[yocto] [PATCH v2 0/1] Support for .dtbo
files for dtb overlays"?
Patch for meta-raspberrypi is "[yocto] [meta-raspberrypi][PATCH 0/8] Support
for vc4 graphics driver"?
Patch for mesa is part of those patches above?
> I'll take a look at the omxplayer issue as soon as I can, in the 
> meanwhile I recommend to not use it...
This would be great. Thank you.
>
> Herve
>
> -----Original Message-----
> From: piotr.lewicki [mailto:piotr.lewicki@elfin.de]
> Sent: mardi 24 mai 2016 11:59
> To: Herve Jourdain <herve.jourdain@neuf.fr>; yocto@yoctoproject.org
> Subject: Re: [yocto] [meta-raspberrypi][PATCH v2 00/13] Support for 
> VC4 graphics driver
>
> I have tried these patches, but there were some hunks and errors 
> during applying to current master revision 
> (69840c0bbe03c2e61601e2377c8e2adc264e0478).
> Building 'rpi-hwup-image' passed, but while building 'rpi-test-image'
> (omxplayer recipe) I have noticed some errors due to missing files:
> - IL/OMX_Core.h
> - VG/openvg.h
> - bcm_host.h
>
> I'm attaching omxplayer_build_errors.txt with build log and my patch 
> with changes created by Herve (adapted to current master revision) - 
> Support_for_VC4_graphics_driver.patch (Herve- if you decide to use 
> that and resend v3 of patches - please remove my TODO from 
> "conf/machine/include/rpi-base.inc"
>
> Could you take a look at that and help me resolve those issues?
>
>
> I currently have a problem that I'm forced to use Raspbian because 
> playing FHD/1080p videos with omxplayer from Yocto runs choppy (I'm 
> not sure if that's the right word, but playback is not smooth) while 
> with Raspbian it works perfect.
> Do you think that enabling VC4 graphics driver can solve my issue?
> Did any of you experienced similar problems? Do you have some other 
> solution or do you know what's the cause of this?
>
>
> Thanks,
> Piotr Lewicki
>
>
> On 20.05.2016 13:51, Herve Jourdain wrote:
>> This v2 series addresses the following issues with the first series:
>> a. Fix the 4.4.10 kernel revision
>> b. Effectively add vc4-kms-v3d overlay to the list of overlays to 
>> build (forgotten previously) c. Make the parameter to the v4c-kms-v3d 
>> overlay configurable d. Add default values for the cma parameter to 
>> the v4c-kms-v3d overlay, depending on the board (and the memory it
>> has)
>>
>> This patch series enables the support for the VC4 graphics driver 
>> from
> Eric Anholt.
>> There was a previous patch series by Javier Martinez Canillas, but it
> required use of a different kernel.
>> VC4 is now supported in the raspberrypi official kernel, at least for
> 4.4.9+.
>> The support in 4.1 exists, but it is NOT STABLE, so it has been 
>> deemed
> unreasonable to support VC4 with 4.1 kernels.
>> THEREFORE, VC4 graphics is supported ONLY for kernel versions 4.4.9 
>> and
> later.
>> This patch series proposes to support VC4 by only adding 
>> 'vc4graphics' to
> MACHINE_FEATURES, for raspberrypi. If this is set, it will trigger all 
> the necessary configuration/changes to use the VC4 driver, including 
> mesa/wayland/weston currently, and adding the overlay required.
>> In order for this series to work, some previous patches are needed
> (support for .dtbo, and fix of the mesa packaging when there is no DRI 
> driver).
>> The memory reserved for the VC4 driver has default values depending 
>> on the
> version of the board used, but it can be configured by setting 
> VC4_CMA_SIZE to a value supported by the overlay ('cma-256', 
> 'cma-192', 'cma-128', 'cma-96', 'cma-64').
>> 'cma-256' is the recommended value, but it might not be possible on 
>> boards
> with 512MB or DRAM, or less...
>> 'cma-64' is known to not being able to support FHD/1080p.
>>
>> It was tested with wayland/weston, without the support for X11.
>>
>> This patch series depends on two other patch series previously 
>> posted,
> that enable the support for .dtbo overlay files.
>> Herve Jourdain (13):
>>     rpi-default-providers.inc: change default providers to support
>>       vc4graphics
>>     rpi-base.inc: add vc4-kms-v3d to the overlays to support vc4graphics
>>     raspberrypi.conf: set the default value of VC4_CMA_SIZE to support
>>       vc4graphics
>>     raspberrypi0.conf: set the default value of VC4_CMA_SIZE to support
>>       vc4graphics
>>     raspberrypi2.conf: set the default value of VC4_CMA_SIZE to support
>>       vc4graphics
>>     raspberrypi3.conf: set the default value of VC4_CMA_SIZE to support
>>       vc4graphics
>>     firmware.inc: bump version to support vc4graphics
>>     rpi-config_git.bb: add v4c overlay to config.txt to support
>>       vc4graphics
>>     wayland/weston_%.bbappend: modify configuration options to support
>>       vc4graphics
>>     weston/weston_%.bbappend: modify configuration options to support
>>       vc4graphics
>>     mesa_%.bbappend: new file to add the correct configuration options to
>>       support vc4graphics
>>     linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 to
>>       support vc4graphics
>>     linux-rpi.inc: add the configuration options required to support
>>       vc4graphics
>>
>>    conf/machine/include/rpi-base.inc              |  1 +
>>    conf/machine/include/rpi-default-providers.inc |  8 ++++----
>>    conf/machine/raspberrypi.conf                  |  2 ++
>>    conf/machine/raspberrypi0.conf                 |  2 ++
>>    conf/machine/raspberrypi2.conf                 |  2 ++
>>    conf/machine/raspberrypi3.conf                 |  2 ++
>>    recipes-bsp/bootfiles/rpi-config_git.bb        | 10 +++++++++-
>>    recipes-bsp/common/firmware.inc                |  4 ++--
>>    recipes-graphics/mesa/mesa_%.bbappend          |  4 ++++
>>    recipes-graphics/wayland/weston_%.bbappend     |  6 ++----
>>    recipes-graphics/weston/weston_%.bbappend      | 13 +++++++------
>>    recipes-kernel/linux/linux-raspberrypi_4.4.bb  |  4 ++--
>>    recipes-kernel/linux/linux-rpi.inc             | 10 ++++++++++
>>    13 files changed, 49 insertions(+), 19 deletions(-)
>>    create mode 100644 recipes-graphics/mesa/mesa_%.bbappend
>>
>
Thanks,
Piotr Lewicki



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

* Re: [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver
  2016-05-24 12:06       ` Herve Jourdain
@ 2016-05-24 12:27         ` piotr.lewicki
  0 siblings, 0 replies; 20+ messages in thread
From: piotr.lewicki @ 2016-05-24 12:27 UTC (permalink / raw)
  To: Herve Jourdain, yocto

So I understand that 1 and 2 should be applied and 3rd is already merged 
into master (of poky).
I cannot wait to for your fixes for gst-omx and later omxplayer.

Thanks,
Piotr

On 24.05.2016 14:06, Herve Jourdain wrote:
> Hi Piotr,
>
> Please make sure you have the latest series, the 02 was modified actually,
> and is different from what you have.
> If meta-raspberrypi was changed since I sent the patch, then there might be
> some need to rebase it. Dear list, do you need me to send a v3 taking into
> account the latest modifications of the meta-raspberrypi master, if any?
> The other patch threads, that are needed, are:
> 1. [yocto][meta-raspberrypi][PATCH v3 0/5] Support for .dtbo files for dtb
> overlays, required by kernels 4.4.6+
> 2. [yocto][PATCH v2 0/1] Support for .dtbo files for dtb overlays
> 3. [OE-core][mesa][PATCH v2 0/1] Fix mesa_populate_packages() when dri is
> disabled [I believe Ross Burton has modified the original one to use
> oe.path.join() when committing it]
>
> To be more specific, I will most likely start by fixing gst-omx (which
> currently wants to use userland on RPI), then go for omxplayer.
>
> Herve
>
> -----Original Message-----
> From: piotr.lewicki [mailto:piotr.lewicki@elfin.de]
> Sent: mardi 24 mai 2016 13:08
> To: Herve Jourdain <herve.jourdain@neuf.fr>; yocto@yoctoproject.org
> Subject: Re: [yocto] [meta-raspberrypi][PATCH v2 00/13] Support for VC4
> graphics driver
>
> On 24.05.2016 12:42, Herve Jourdain wrote:
>> Hi Piotr,
> Hi,
> There were issues with patches 02, 07 and 12.
> 02- due to different overlay naming (overlays/vc4-kms-v3d-overlay.dtb
> instead of overlays/vc4-kms-v3d.dtbo) and 07 and 12 due to bump of
> linux-raspberrypi from 4.4.8 to 4.4.9 (on master).
>> I know that the omxplayer would not build at this time, because VC4
>> and userland will conflict, and currently omxplayer depends on userland.
>> I will check if it can be supported with VC4 driver enabled, but for
>> the moment it's true I disabled it in my build.
>>
>> Regarding your patches:
>> 1. Are you using linux kernel 4.4? You should set
>> PREFERRED_VERSION_linux-raspberrypi = "4.4.%" somewhere, either in
>> your distro configuration file, or your local.conf.
>>       If you do so, it should get kernel 4.4.10, which requires .dtbo
>> files for overlay. As mentioned in the patch, support for VC4 in 4.1
>> is not stable, and therefore not supported.
> I did that :-)
>> 2. I've seen only one TODO, did you make only one modification?
> There were issues with patches 02, 07 and 12.
> 02- due to different overlay naming (overlays/vc4-kms-v3d-overlay.dtb
> instead of overlays/vc4-kms-v3d.dtbo) and 07 and 12 due to bump of
> linux-raspberrypi from 4.4.8 to 4.4.9 (on master).
>
> Now I see that 02 whas not necessary- I just missed the patch you provided
> earlier.
>> 3. There are other patches that are needed to be applied, before this
>> patch series is applied: 2 for .dtbo support (1 in meta-raspberrypi, 1
>> in meta), 1 for mesa (to allow packaging with empty DRI).
> Ok. I didn't know. Can you confirm that I have the right patches?
> Patch for meta is from thread "[yocto] [PATCH v2 0/1] Support for .dtbo
> files for dtb overlays"?
> Patch for meta-raspberrypi is "[yocto] [meta-raspberrypi][PATCH 0/8] Support
> for vc4 graphics driver"?
> Patch for mesa is part of those patches above?
>> I'll take a look at the omxplayer issue as soon as I can, in the
>> meanwhile I recommend to not use it...
> This would be great. Thank you.
>> Herve
>>
>> -----Original Message-----
>> From: piotr.lewicki [mailto:piotr.lewicki@elfin.de]
>> Sent: mardi 24 mai 2016 11:59
>> To: Herve Jourdain <herve.jourdain@neuf.fr>; yocto@yoctoproject.org
>> Subject: Re: [yocto] [meta-raspberrypi][PATCH v2 00/13] Support for
>> VC4 graphics driver
>>
>> I have tried these patches, but there were some hunks and errors
>> during applying to current master revision
>> (69840c0bbe03c2e61601e2377c8e2adc264e0478).
>> Building 'rpi-hwup-image' passed, but while building 'rpi-test-image'
>> (omxplayer recipe) I have noticed some errors due to missing files:
>> - IL/OMX_Core.h
>> - VG/openvg.h
>> - bcm_host.h
>>
>> I'm attaching omxplayer_build_errors.txt with build log and my patch
>> with changes created by Herve (adapted to current master revision) -
>> Support_for_VC4_graphics_driver.patch (Herve- if you decide to use
>> that and resend v3 of patches - please remove my TODO from
>> "conf/machine/include/rpi-base.inc"
>>
>> Could you take a look at that and help me resolve those issues?
>>
>>
>> I currently have a problem that I'm forced to use Raspbian because
>> playing FHD/1080p videos with omxplayer from Yocto runs choppy (I'm
>> not sure if that's the right word, but playback is not smooth) while
>> with Raspbian it works perfect.
>> Do you think that enabling VC4 graphics driver can solve my issue?
>> Did any of you experienced similar problems? Do you have some other
>> solution or do you know what's the cause of this?
>>
>>
>> Thanks,
>> Piotr Lewicki
>>
>>
>> On 20.05.2016 13:51, Herve Jourdain wrote:
>>> This v2 series addresses the following issues with the first series:
>>> a. Fix the 4.4.10 kernel revision
>>> b. Effectively add vc4-kms-v3d overlay to the list of overlays to
>>> build (forgotten previously) c. Make the parameter to the v4c-kms-v3d
>>> overlay configurable d. Add default values for the cma parameter to
>>> the v4c-kms-v3d overlay, depending on the board (and the memory it
>>> has)
>>>
>>> This patch series enables the support for the VC4 graphics driver
>>> from
>> Eric Anholt.
>>> There was a previous patch series by Javier Martinez Canillas, but it
>> required use of a different kernel.
>>> VC4 is now supported in the raspberrypi official kernel, at least for
>> 4.4.9+.
>>> The support in 4.1 exists, but it is NOT STABLE, so it has been
>>> deemed
>> unreasonable to support VC4 with 4.1 kernels.
>>> THEREFORE, VC4 graphics is supported ONLY for kernel versions 4.4.9
>>> and
>> later.
>>> This patch series proposes to support VC4 by only adding
>>> 'vc4graphics' to
>> MACHINE_FEATURES, for raspberrypi. If this is set, it will trigger all
>> the necessary configuration/changes to use the VC4 driver, including
>> mesa/wayland/weston currently, and adding the overlay required.
>>> In order for this series to work, some previous patches are needed
>> (support for .dtbo, and fix of the mesa packaging when there is no DRI
>> driver).
>>> The memory reserved for the VC4 driver has default values depending
>>> on the
>> version of the board used, but it can be configured by setting
>> VC4_CMA_SIZE to a value supported by the overlay ('cma-256',
>> 'cma-192', 'cma-128', 'cma-96', 'cma-64').
>>> 'cma-256' is the recommended value, but it might not be possible on
>>> boards
>> with 512MB or DRAM, or less...
>>> 'cma-64' is known to not being able to support FHD/1080p.
>>>
>>> It was tested with wayland/weston, without the support for X11.
>>>
>>> This patch series depends on two other patch series previously
>>> posted,
>> that enable the support for .dtbo overlay files.
>>> Herve Jourdain (13):
>>>      rpi-default-providers.inc: change default providers to support
>>>        vc4graphics
>>>      rpi-base.inc: add vc4-kms-v3d to the overlays to support vc4graphics
>>>      raspberrypi.conf: set the default value of VC4_CMA_SIZE to support
>>>        vc4graphics
>>>      raspberrypi0.conf: set the default value of VC4_CMA_SIZE to support
>>>        vc4graphics
>>>      raspberrypi2.conf: set the default value of VC4_CMA_SIZE to support
>>>        vc4graphics
>>>      raspberrypi3.conf: set the default value of VC4_CMA_SIZE to support
>>>        vc4graphics
>>>      firmware.inc: bump version to support vc4graphics
>>>      rpi-config_git.bb: add v4c overlay to config.txt to support
>>>        vc4graphics
>>>      wayland/weston_%.bbappend: modify configuration options to support
>>>        vc4graphics
>>>      weston/weston_%.bbappend: modify configuration options to support
>>>        vc4graphics
>>>      mesa_%.bbappend: new file to add the correct configuration options to
>>>        support vc4graphics
>>>      linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 to
>>>        support vc4graphics
>>>      linux-rpi.inc: add the configuration options required to support
>>>        vc4graphics
>>>
>>>     conf/machine/include/rpi-base.inc              |  1 +
>>>     conf/machine/include/rpi-default-providers.inc |  8 ++++----
>>>     conf/machine/raspberrypi.conf                  |  2 ++
>>>     conf/machine/raspberrypi0.conf                 |  2 ++
>>>     conf/machine/raspberrypi2.conf                 |  2 ++
>>>     conf/machine/raspberrypi3.conf                 |  2 ++
>>>     recipes-bsp/bootfiles/rpi-config_git.bb        | 10 +++++++++-
>>>     recipes-bsp/common/firmware.inc                |  4 ++--
>>>     recipes-graphics/mesa/mesa_%.bbappend          |  4 ++++
>>>     recipes-graphics/wayland/weston_%.bbappend     |  6 ++----
>>>     recipes-graphics/weston/weston_%.bbappend      | 13 +++++++------
>>>     recipes-kernel/linux/linux-raspberrypi_4.4.bb  |  4 ++--
>>>     recipes-kernel/linux/linux-rpi.inc             | 10 ++++++++++
>>>     13 files changed, 49 insertions(+), 19 deletions(-)
>>>     create mode 100644 recipes-graphics/mesa/mesa_%.bbappend
>>>
> Thanks,
> Piotr Lewicki
>



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

end of thread, other threads:[~2016-05-24 12:27 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-20 11:51 [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 01/13] rpi-default-providers.inc: change default providers to support vc4graphics Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 02/13] rpi-base.inc: add vc4-kms-v3d to the overlays " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 03/13] raspberrypi.conf: set the default value of VC4_CMA_SIZE " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 04/13] raspberrypi0.conf: " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 05/13] raspberrypi2.conf: " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 06/13] raspberrypi3.conf: " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 07/13] firmware.inc: bump version " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 08/13] rpi-config_git.bb: add v4c overlay to config.txt " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 09/13] wayland/weston_%.bbappend: modify configuration options " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 10/13] weston/weston_%.bbappend: " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 11/13] mesa_%.bbappend: new file to add the correct " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 12/13] linux-raspberrypi_4.4.bb: bump the kernel revision to 4.4.10 " Herve Jourdain
2016-05-20 11:51 ` [meta-raspberrypi][PATCH v2 13/13] linux-rpi.inc: add the configuration options required " Herve Jourdain
2016-05-20 15:54 ` [meta-raspberrypi][PATCH v2 00/13] Support for VC4 graphics driver Khem Raj
2016-05-24  9:59 ` piotr.lewicki
2016-05-24 10:42   ` Herve Jourdain
2016-05-24 11:08     ` piotr.lewicki
2016-05-24 12:06       ` Herve Jourdain
2016-05-24 12:27         ` piotr.lewicki

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.