All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
@ 2016-09-01 22:20 Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 01/16] Convert SOC_FAMILY to MACHINEOVERRIDES Otavio Salvador
                   ` (16 more replies)
  0 siblings, 17 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

We spent some time trying to come up with something which would make
easier to extend the tune-arch support. All we could come up was way
too complex or did not work.

Instead We did a MACHINEOVERRIDES extender.

This enables the machine overrides extender for the i.MX6 devices. It
maps (spaces are used to easy the read):

  - mx6q  ->        imxipu imxvpu imxgpu2d imxgpu3d
  - mx6dl -> imxpxp imxipu imxvpu imxgpu2d imxgpu3d imxepdc
  - mx6sx -> imxpxp               imxgpu2d imxgpu3d
  - mx6sl -> imxpxp               imxgpu2d          imxepdc
  - mx6ul -> imxpxp
  - mx7d  -> imxpxp                                 imxepdc

So it allows for reusing of overrides while keeps this control at the
BSP side. For example, a PACKAGECONFIG setting which is common for
mx6q, mx6dl and mx6sx used to look as:

PACKAGECONFIG_mx6q  = "option"
PACKAGECONFIG_mx6dl = "option"

Now it can be replaced by:

PACKAGECONFIG_imxvpu = "option"

Changes in v2:
- Use BitBake event to insert the extends
- New patch.

Otavio Salvador (16):
  Convert SOC_FAMILY to MACHINEOVERRIDES
  imx-lib: Stop using generic SoC overrides
  imx-test: Stop using generic SoC overrides
  machine-overrides-extender.bbclass: Automatically set extend the
    MACHINEOVERRIDES
  imx-base.inc: Enable machine overrides extender for i.MX6
  chromium: Refactor code to use the the new overrides
  glmark2: Refactor code to use the new overrides
  qtbase: Refactor code to use the new overrides
  cairo: Refactor code to use the new overrides
  eglinfo: Refactor code to use the new overrides
  imx-gpu-viv: Refactor code to use the new overrides
  mesa-gl: Refactor code to use the new overrides
  weston: Refactor code to use the new overrides
  gstreamer1.0-plugins-imx: Refactor code to use the new overrides
  imx-codec: Refactor code to use the new overrides
  gstreamer1.0-plugins-imx: Change EGL platform preference order

 .../recipes-browser/chromium/chromium-imx.inc      |  3 +-
 .../chromium/chromium_48.0.2548.0.bbappend         |  5 +-
 classes/machine-overrides-extender.bbclass         | 29 ++++++++++
 conf/machine/imx23evk.conf                         |  4 +-
 conf/machine/imx28evk.conf                         |  4 +-
 conf/machine/imx51evk.conf                         |  4 +-
 conf/machine/imx53ard.conf                         |  4 +-
 conf/machine/imx53qsb.conf                         |  4 +-
 conf/machine/imx6dlsabreauto.conf                  |  4 +-
 conf/machine/imx6dlsabresd.conf                    |  4 +-
 conf/machine/imx6qpsabreauto.conf                  |  4 +-
 conf/machine/imx6qpsabresd.conf                    |  4 +-
 conf/machine/imx6qsabreauto.conf                   |  4 +-
 conf/machine/imx6qsabresd.conf                     |  4 +-
 conf/machine/imx6slevk.conf                        |  4 +-
 conf/machine/imx6solosabreauto.conf                |  4 +-
 conf/machine/imx6solosabresd.conf                  |  4 +-
 conf/machine/imx6sxsabreauto.conf                  |  4 +-
 conf/machine/imx6sxsabresd.conf                    |  4 +-
 conf/machine/imx6ulevk.conf                        |  4 +-
 conf/machine/imx7dsabresd.conf                     |  4 +-
 conf/machine/include/imx-base.inc                  | 11 +++-
 conf/machine/include/qoriq-arm.inc                 |  2 -
 conf/machine/ls1021atwr.conf                       |  4 +-
 conf/machine/twr-vf65gs10.conf                     |  4 +-
 .../recipes-benchmark/glmark2/glmark2_%.bbappend   |  8 +--
 qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc      |  2 +-
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend         | 19 +++----
 recipes-bsp/imx-lib/imx-lib.inc                    |  6 ++-
 recipes-bsp/imx-test/imx-test.inc                  |  7 +--
 recipes-graphics/cairo/cairo_%.bbappend            | 16 +++---
 recipes-graphics/eglinfo/eglinfo-fb_%.bbappend     |  4 +-
 recipes-graphics/eglinfo/eglinfo-x11_%.bbappend    |  4 +-
 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc       | 13 +++--
 recipes-graphics/mesa/mesa-gl_%.bbappend           |  5 +-
 recipes-graphics/wayland/weston_%.bbappend         | 61 +++++++++++-----------
 .../gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb   | 19 ++++---
 recipes-multimedia/imx-codec/imx-codec.inc         |  3 +-
 38 files changed, 160 insertions(+), 137 deletions(-)
 create mode 100644 classes/machine-overrides-extender.bbclass

-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 01/16] Convert SOC_FAMILY to MACHINEOVERRIDES
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 02/16] imx-lib: Stop using generic SoC overrides Otavio Salvador
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The SOC_FAMILY is an indirection which makes the understanding, from
OpenEmbedded versed developers and users, more difficult. Instead of
using the SOC_FAMILY indirection which is rarely used, we now move to
the MACHINEOVERRIDES mechanism as this is in fact what is in use.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 conf/machine/imx23evk.conf                    | 4 ++--
 conf/machine/imx28evk.conf                    | 4 ++--
 conf/machine/imx51evk.conf                    | 4 ++--
 conf/machine/imx53ard.conf                    | 4 ++--
 conf/machine/imx53qsb.conf                    | 4 ++--
 conf/machine/imx6dlsabreauto.conf             | 4 ++--
 conf/machine/imx6dlsabresd.conf               | 4 ++--
 conf/machine/imx6qpsabreauto.conf             | 4 ++--
 conf/machine/imx6qpsabresd.conf               | 4 ++--
 conf/machine/imx6qsabreauto.conf              | 4 ++--
 conf/machine/imx6qsabresd.conf                | 4 ++--
 conf/machine/imx6slevk.conf                   | 4 ++--
 conf/machine/imx6solosabreauto.conf           | 4 ++--
 conf/machine/imx6solosabresd.conf             | 4 ++--
 conf/machine/imx6sxsabreauto.conf             | 4 ++--
 conf/machine/imx6sxsabresd.conf               | 4 ++--
 conf/machine/imx6ulevk.conf                   | 4 ++--
 conf/machine/imx7dsabresd.conf                | 4 ++--
 conf/machine/include/imx-base.inc             | 2 --
 conf/machine/include/qoriq-arm.inc            | 2 --
 conf/machine/ls1021atwr.conf                  | 4 ++--
 conf/machine/twr-vf65gs10.conf                | 4 ++--
 qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc | 2 +-
 23 files changed, 41 insertions(+), 45 deletions(-)

diff --git a/conf/machine/imx23evk.conf b/conf/machine/imx23evk.conf
index 6ec1f14..6c4daa5 100644
--- a/conf/machine/imx23evk.conf
+++ b/conf/machine/imx23evk.conf
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX23 Evaluation Kit
 #@MAINTAINER: Otavio Salvador <otavio@ossystems.com.br>
 
+MACHINEOVERRIDES =. "mxs:mx23:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-arm926ejs.inc
 
-SOC_FAMILY = "mxs:mx23"
-
 IMXBOOTLETS_MACHINE = "stmp378x_dev"
 UBOOT_MACHINE = "mx23evk_config"
 
diff --git a/conf/machine/imx28evk.conf b/conf/machine/imx28evk.conf
index ac4cef5..5bdbcad 100644
--- a/conf/machine/imx28evk.conf
+++ b/conf/machine/imx28evk.conf
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX28 Evaluation Kit
 #@MAINTAINER: Otavio Salvador <otavio@ossystems.com.br>
 
+MACHINEOVERRIDES =. "mxs:mx28:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-arm926ejs.inc
 
-SOC_FAMILY = "mxs:mx28"
-
 IMXBOOTLETS_MACHINE = "iMX28_EVK"
 
 UBOOT_CONFIG ??= "sd"
diff --git a/conf/machine/imx51evk.conf b/conf/machine/imx51evk.conf
index 9d7d06c..e6904f9 100644
--- a/conf/machine/imx51evk.conf
+++ b/conf/machine/imx51evk.conf
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX51 Evaluation Kit
 #@MAINTAINER: Daiane Angolini <daiane.angolini@freescale.com>
 
+MACHINEOVERRIDES =. "mx5:mx51:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa8.inc
 
-SOC_FAMILY = "mx5:mx51"
-
 # Disable perf features as 2.6.35.3 fails to build otherwise
 PERF_FEATURES_ENABLE = ""
 
diff --git a/conf/machine/imx53ard.conf b/conf/machine/imx53ard.conf
index c338d6b..f416c95 100644
--- a/conf/machine/imx53ard.conf
+++ b/conf/machine/imx53ard.conf
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX53 SABRE Automotive Board
 #@MAINTAINER: Daiane Angolini <daiane.angolini@freescale.com>
 
+MACHINEOVERRIDES =. "mx5:mx53:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa8.inc
 
-SOC_FAMILY = "mx5:mx53"
-
 # Disable perf features as 2.6.35.3 fails to build otherwise
 PERF_FEATURES_ENABLE = ""
 
diff --git a/conf/machine/imx53qsb.conf b/conf/machine/imx53qsb.conf
index 5df85a9..dc264c4 100644
--- a/conf/machine/imx53qsb.conf
+++ b/conf/machine/imx53qsb.conf
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX53 Quick Start Board
 #@MAINTAINER: Trevor Woerner <trevor.woerner@linaro.org>
 
+MACHINEOVERRIDES =. "mx5:mx53:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa8.inc
 
-SOC_FAMILY = "mx5:mx53"
-
 KERNEL_DEVICETREE = "imx53-qsb.dtb imx53-qsrb.dtb"
 
 UBOOT_MACHINE = "mx53loco_config"
diff --git a/conf/machine/imx6dlsabreauto.conf b/conf/machine/imx6dlsabreauto.conf
index a9bdfe5..3df479b 100644
--- a/conf/machine/imx6dlsabreauto.conf
+++ b/conf/machine/imx6dlsabreauto.conf
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6DL SABRE Automotive
 #@MAINTAINER: Daiane Angolini <daiane.angolini@freescale.com>
 
-require conf/machine/include/imx6sabreauto-common.inc
+MACHINEOVERRIDES =. "mx6:mx6dl:"
 
-SOC_FAMILY = "mx6:mx6dl"
+require conf/machine/include/imx6sabreauto-common.inc
 
 KERNEL_DEVICETREE = "imx6dl-sabreauto.dtb imx6dl-sabreauto-gpmi-weim.dtb imx6dl-sabreauto-ecspi.dtb \
                      imx6dl-sabreauto-flexcan1.dtb imx6dl-sabreauto-enetirq.dtb"
diff --git a/conf/machine/imx6dlsabresd.conf b/conf/machine/imx6dlsabresd.conf
index f832666..9943246 100644
--- a/conf/machine/imx6dlsabresd.conf
+++ b/conf/machine/imx6dlsabresd.conf
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6DL SABRE Smart Device
 #@MAINTAINER: Otavio Salvador <otavio@ossystems.com.br>
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6dl:"
 
-SOC_FAMILY = "mx6:mx6dl"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6dl-sabresd.dtb imx6dl-sabresd-ldo.dtb imx6dl-sabresd-hdcp.dtb \
                      imx6dl-sabresd-enetirq.dtb imx6dl-sabresd-btwifi.dtb"
diff --git a/conf/machine/imx6qpsabreauto.conf b/conf/machine/imx6qpsabreauto.conf
index b227338..f8e914a 100644
--- a/conf/machine/imx6qpsabreauto.conf
+++ b/conf/machine/imx6qpsabreauto.conf
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6QP SABRE Automotive
 #@MAINTAINER: Lauren Post <lauren.post@nxp.com>
 
-require conf/machine/include/imx6sabreauto-common.inc
+MACHINEOVERRIDES =. "mx6:mx6q:"
 
-SOC_FAMILY = "mx6:mx6q"
+require conf/machine/include/imx6sabreauto-common.inc
 
 KERNEL_DEVICETREE = "imx6qp-sabreauto.dtb imx6qp-sabreauto-ecspi.dtb imx6qp-sabreauto-flexcan1.dtb \
                      imx6qp-sabreauto-gpmi-weim.dtb"
diff --git a/conf/machine/imx6qpsabresd.conf b/conf/machine/imx6qpsabresd.conf
index 2e7ee47..123a435 100644
--- a/conf/machine/imx6qpsabresd.conf
+++ b/conf/machine/imx6qpsabresd.conf
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6QP SABRE Smart Device
 #@MAINTAINER: Lauren Post <lauren.post@nxp.com>
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6q:"
 
-SOC_FAMILY = "mx6:mx6q"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6qp-sabresd.dtb imx6qp-sabresd-ldo.dtb imx6qp-sabresd-btwifi.dtb imx6qp-sabresd-hdcp.dtb"
 
diff --git a/conf/machine/imx6qsabreauto.conf b/conf/machine/imx6qsabreauto.conf
index 3429551..e25a733 100644
--- a/conf/machine/imx6qsabreauto.conf
+++ b/conf/machine/imx6qsabreauto.conf
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6Q SABRE Automotive
 #@MAINTAINER: Daiane Angolini <daiane.angolini@freescale.com>
 
-require conf/machine/include/imx6sabreauto-common.inc
+MACHINEOVERRIDES =. "mx6:mx6q:"
 
-SOC_FAMILY = "mx6:mx6q"
+require conf/machine/include/imx6sabreauto-common.inc
 
 KERNEL_DEVICETREE = "imx6q-sabreauto.dtb imx6q-sabreauto-gpmi-weim.dtb imx6q-sabreauto-ecspi.dtb \
                      imx6q-sabreauto-flexcan1.dtb imx6q-sabreauto-enetirq.dtb"
diff --git a/conf/machine/imx6qsabresd.conf b/conf/machine/imx6qsabresd.conf
index 8115dfa..33fff89 100644
--- a/conf/machine/imx6qsabresd.conf
+++ b/conf/machine/imx6qsabresd.conf
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6Q SABRE Smart Device
 #@MAINTAINER: Otavio Salvador <otavio@ossystems.com.br>
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6q:"
 
-SOC_FAMILY = "mx6:mx6q"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6q-sabresd.dtb imx6q-sabresd-ldo.dtb imx6q-sabresd-hdcp.dtb \
                      imx6q-sabresd-enetirq.dtb imx6q-sabresd-btwifi.dtb"
diff --git a/conf/machine/imx6slevk.conf b/conf/machine/imx6slevk.conf
index 98402f7..02cb8f0 100644
--- a/conf/machine/imx6slevk.conf
+++ b/conf/machine/imx6slevk.conf
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6SL Evaluation Kit
 #@MAINTAINER: Otavio Salvador <otavio@ossystems.com.br>
 
+MACHINEOVERRIDES =. "mx6:mx6sl:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa9.inc
 
-SOC_FAMILY = "mx6:mx6sl"
-
 KERNEL_DEVICETREE = "imx6sl-evk.dtb imx6sl-evk-csi.dtb imx6sl-evk-ldo.dtb \
                      imx6sl-evk-uart.dtb imx6sl-evk-btwifi.dtb"
 
diff --git a/conf/machine/imx6solosabreauto.conf b/conf/machine/imx6solosabreauto.conf
index ead787d..3ced78d 100644
--- a/conf/machine/imx6solosabreauto.conf
+++ b/conf/machine/imx6solosabreauto.conf
@@ -3,9 +3,9 @@
 #@SOC: i.MX6S
 #@DESCRIPTION: Machine configuration for Freescale i.MX6Solo SABRE Automotive
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6dl:"
 
-SOC_FAMILY = "mx6:mx6dl"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6dl-sabreauto.dtb"
 
diff --git a/conf/machine/imx6solosabresd.conf b/conf/machine/imx6solosabresd.conf
index b123d8c..24fa649 100644
--- a/conf/machine/imx6solosabresd.conf
+++ b/conf/machine/imx6solosabresd.conf
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6Solo SABRE Smart Device
 #@MAINTAINER: Otavio Salvador <otavio@ossystems.com.br>
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6dl:"
 
-SOC_FAMILY = "mx6:mx6dl"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6dl-sabresd.dtb imx6dl-sabresd-ldo.dtb"
 
diff --git a/conf/machine/imx6sxsabreauto.conf b/conf/machine/imx6sxsabreauto.conf
index 9c8a01f..4f399a3 100644
--- a/conf/machine/imx6sxsabreauto.conf
+++ b/conf/machine/imx6sxsabreauto.conf
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6SoloX Sabre Automotive
 #@MAINTAINER: Lauren Post <Lauren.Post@nxp.com>
 
-require conf/machine/include/imx6sabreauto-common.inc
+MACHINEOVERRIDES =. "mx6:mx6sx:"
 
-SOC_FAMILY = "mx6:mx6sx"
+require conf/machine/include/imx6sabreauto-common.inc
 
 KERNEL_DEVICETREE = "imx6sx-sabreauto.dtb imx6sx-sabreauto-m4.dtb"
 
diff --git a/conf/machine/imx6sxsabresd.conf b/conf/machine/imx6sxsabresd.conf
index 2243d1f..857b735 100644
--- a/conf/machine/imx6sxsabresd.conf
+++ b/conf/machine/imx6sxsabresd.conf
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6SoloX Sabre SD
 #@MAINTAINER: Lauren Post <Lauren.Post@nxp.com>
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6sx:"
 
-SOC_FAMILY = "mx6:mx6sx"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6sx-sdb.dtb imx6sx-sdb-emmc.dtb imx6sx-sdb-m4.dtb \
                      imx6sx-sdb-sai.dtb imx6sx-sdb-lcdif1.dtb imx6sx-sdb-ldo.dtb \
diff --git a/conf/machine/imx6ulevk.conf b/conf/machine/imx6ulevk.conf
index 8e2fef0..7ab0963 100644
--- a/conf/machine/imx6ulevk.conf
+++ b/conf/machine/imx6ulevk.conf
@@ -4,13 +4,13 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6UL EVK
 #@MAINTAINER: Lauren Post <lauren.post@nxp.com>
 
+MACHINEOVERRIDES =. "mx6ul:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa7.inc
 
 MACHINE_FEATURES += " pci wifi bluetooth"
 
-SOC_FAMILY = "mx6ul"
-
 KERNEL_DEVICETREE = "imx6ul-14x14-evk.dtb imx6ul-14x14-evk-csi.dtb imx6ul-14x14-evk-btwifi.dtb"
 
 UBOOT_SUFFIX = "img"
diff --git a/conf/machine/imx7dsabresd.conf b/conf/machine/imx7dsabresd.conf
index 673207f..5d74997 100644
--- a/conf/machine/imx7dsabresd.conf
+++ b/conf/machine/imx7dsabresd.conf
@@ -4,13 +4,13 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX7D SABRE Smart Device
 #@MAINTAINER: Lauren Post <Lauren.Post@nxp.com>
 
+MACHINEOVERRIDES =. "mx7:mx7d:"
+
 require conf/machine/include/imx-base.inc
 require conf/machine/include/tune-cortexa7.inc
 
 MACHINE_FEATURES += " pci wifi bluetooth"
 
-SOC_FAMILY = "mx7:mx7d"
-
 KERNEL_DEVICETREE = "imx7d-sdb.dtb imx7d-sdb-epdc.dtb imx7d-sdb-gpmi-weim.dtb \
                      imx7d-sdb-m4.dtb imx7d-sdb-mipi-dsi.dtb imx7d-sdb-qspi.dtb \
                      imx7d-sdb-reva.dtb imx7d-sdb-reva-epdc.dtb imx7d-sdb-reva-gpmi-weim.dtb \
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index 1d7993c..a6db038 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -3,8 +3,6 @@
 include conf/machine/include/fsl-default-settings.inc
 include conf/machine/include/fsl-default-versions.inc
 
-include conf/machine/include/soc-family.inc
-
 # Set specific make target and binary suffix
 PREFERRED_PROVIDER_u-boot ??= "u-boot-fslc"
 PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-fslc"
diff --git a/conf/machine/include/qoriq-arm.inc b/conf/machine/include/qoriq-arm.inc
index 20a7594..2ae1963 100644
--- a/conf/machine/include/qoriq-arm.inc
+++ b/conf/machine/include/qoriq-arm.inc
@@ -1,5 +1,3 @@
-require conf/machine/include/soc-family.inc
-
 # Freescale BSP default providers
 PREFERRED_PROVIDER_u-boot_ls102xa ?= "u-boot-ls1"
 PREFERRED_PROVIDER_virtual/bootloader_ls102xa ?= "u-boot-ls1"
diff --git a/conf/machine/ls1021atwr.conf b/conf/machine/ls1021atwr.conf
index 4478e95..2cf5916 100644
--- a/conf/machine/ls1021atwr.conf
+++ b/conf/machine/ls1021atwr.conf
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for running LS1021ATWR in 32-bit mode
 #@MAINTAINER: Zhenhua Luo <zhenhua.luo@freescale.com>
 
+MACHINEOVERRIDES =. "ls102xa:"
+
 require conf/machine/include/qoriq-arm.inc
 require conf/machine/include/tune-cortexa7.inc
 
-SOC_FAMILY = "ls102xa"
-
 UBOOT_CONFIG ??= "nor"
 UBOOT_CONFIG[nor] = "ls1021atwr_nor_config"
 UBOOT_CONFIG[sdcard] = "ls1021atwr_sdcard_config,sdcard"
diff --git a/conf/machine/twr-vf65gs10.conf b/conf/machine/twr-vf65gs10.conf
index dd5a21a..c14ee5b 100644
--- a/conf/machine/twr-vf65gs10.conf
+++ b/conf/machine/twr-vf65gs10.conf
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale Vybrid TWR-VF65GS10
 #@MAINTAINER: Stefan Agner <stefan.agner@toradex.com>
 
+MACHINEOVERRIDES =. "vf:vf60:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa5.inc
 
-SOC_FAMILY = "vf:vf60"
-
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-fslc"
 
 UBOOT_MACHINE = "vf610twr_config"
diff --git a/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc b/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc
index 0efb564..5c4a39c 100644
--- a/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc
+++ b/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc
@@ -2,7 +2,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/qt4:"
 
 python __anonymous () {
     families = ['mx6']
-    cur_families = (d.getVar('SOC_FAMILY', True) or '').split(':')
+    cur_families = (d.getVar('MACHINEOVERRIDES', True) or '').split(':')
     if any(map(lambda x: x in cur_families,
                families)):
         d.appendVarFlag('do_configure', 'depends', ' virtual/kernel:do_shared_workdir')
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 02/16] imx-lib: Stop using generic SoC overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 01/16] Convert SOC_FAMILY to MACHINEOVERRIDES Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 03/16] imx-test: " Otavio Salvador
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been changed to use the SoC specific override. It makes
the recipe easier to read and to maintain.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 recipes-bsp/imx-lib/imx-lib.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/recipes-bsp/imx-lib/imx-lib.inc b/recipes-bsp/imx-lib/imx-lib.inc
index ff42713..0b21d94 100644
--- a/recipes-bsp/imx-lib/imx-lib.inc
+++ b/recipes-bsp/imx-lib/imx-lib.inc
@@ -1,4 +1,5 @@
 # Copyright (C) 2012-2013 Freescale Semiconductor
+# Copyright (C) 2012-2016 O.S. Systems Software LTDA.
 
 DESCRIPTION = "Platform specific libraries for imx platform"
 LICENSE = "LGPLv2.1"
@@ -7,10 +8,11 @@ DEPENDS = "virtual/kernel"
 
 LIC_FILES_CHKSUM = "file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24"
 
-PLATFORM_mx6 = "IMX6Q"
+PLATFORM_mx6q  = "IMX6Q"
+PLATFORM_mx6dl = "IMX6Q"
 PLATFORM_mx6sl = "IMX6S"
 PLATFORM_mx6sx = "IMX6S"
-PLATFORM_mx7   = "IMX7"
+PLATFORM_mx7d  = "IMX7"
 PLATFORM_mx6ul = "IMX6UL"
 
 PARALLEL_MAKE="-j 1"
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 03/16] imx-test: Stop using generic SoC overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 01/16] Convert SOC_FAMILY to MACHINEOVERRIDES Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 02/16] imx-lib: Stop using generic SoC overrides Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 04/16] machine-overrides-extender.bbclass: Automatically set extend the MACHINEOVERRIDES Otavio Salvador
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been changed to use the SoC specific override. It makes
the recipe easier to read and to maintain.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 recipes-bsp/imx-test/imx-test.inc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/recipes-bsp/imx-test/imx-test.inc b/recipes-bsp/imx-test/imx-test.inc
index f0b26a1..ce24860 100644
--- a/recipes-bsp/imx-test/imx-test.inc
+++ b/recipes-bsp/imx-test/imx-test.inc
@@ -9,7 +9,7 @@ DEPENDS_mx6dl = "virtual/kernel imx-lib imx-vpu"
 DEPENDS_mx6sl = "virtual/kernel imx-lib"
 DEPENDS_mx6sx = "virtual/kernel imx-lib"
 DEPENDS_mx6ul = "virtual/kernel imx-lib"
-DEPENDS_mx7   = "virtual/kernel imx-lib"
+DEPENDS_mx7d  = "virtual/kernel imx-lib"
 
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
@@ -23,10 +23,11 @@ inherit module-base
 INHIBIT_PACKAGE_STRIP = "1"
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 
-PLATFORM_mx6 = "IMX6Q"
+PLATFORM_mx6q  = "IMX6Q"
+PLATFORM_mx6dl = "IMX6Q"
 PLATFORM_mx6sl = "IMX6SL"
 PLATFORM_mx6sx = "IMX6SX"
-PLATFORM_mx7 = "IMX7D"
+PLATFORM_mx7d  = "IMX7D"
 PLATFORM_mx6ul = "IMX6UL"
 
 PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 04/16] machine-overrides-extender.bbclass: Automatically set extend the MACHINEOVERRIDES
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (2 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 03/16] imx-test: " Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 05/16] imx-base.inc: Enable machine overrides extender for i.MX6 Otavio Salvador
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

This allow to grouping of different settings for similar platforms.

To use the class, specify, for example:

 MACHINEOVERRIDES_EXTENDER_soc = "group1:group2"

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2:
- Use BitBake event to insert the extends

 classes/machine-overrides-extender.bbclass | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 classes/machine-overrides-extender.bbclass

diff --git a/classes/machine-overrides-extender.bbclass b/classes/machine-overrides-extender.bbclass
new file mode 100644
index 0000000..89ff99c
--- /dev/null
+++ b/classes/machine-overrides-extender.bbclass
@@ -0,0 +1,29 @@
+# -*- python -*-
+# Automatically set extend the MACHINEOVERRIDES
+#
+# This allow to grouping of different settings for similar platforms.
+#
+# To use the class, specify, for example:
+#
+# MACHINEOVERRIDES_EXTENDER_soc = "group1:group2"
+#
+# Copyright 2016 (C) O.S. Systems Software LTDA.
+
+def machine_overrides_extender(d):
+    machine_overrides = (d.getVar('MACHINEOVERRIDES', True) or '').split(':')
+    for o in machine_overrides:
+        extender = d.getVar('MACHINEOVERRIDES_EXTENDER_%s' % o, True)
+        if extender:
+            extender = extender.split(':')
+            extender.reverse()
+            if not set(extender).issubset(set(machine_overrides)):
+                index = machine_overrides.index(o)
+                for e in extender:
+                    machine_overrides.insert(index, e)
+    d.setVar('MACHINEOVERRIDES', ':'.join(machine_overrides))
+
+python machine_overrides_extender_handler() {
+    machine_overrides_extender(e.data)
+}
+machine_overrides_extender_handler[eventmask] = "bb.event.ConfigParsed"
+addhandler machine_overrides_extender_handler
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 05/16] imx-base.inc: Enable machine overrides extender for i.MX6
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (3 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 04/16] machine-overrides-extender.bbclass: Automatically set extend the MACHINEOVERRIDES Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 06/16] chromium: Refactor code to use the the new overrides Otavio Salvador
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

This enables the machine overrides extender for the i.MX6 devices. It
maps (spaces are used to easy the read):

 - mx6q  ->        imxipu imxvpu imxgpu2d imxgpu3d
 - mx6dl -> imxpxp imxipu imxvpu imxgpu2d imxgpu3d imxepdc
 - mx6sx -> imxpxp               imxgpu2d imxgpu3d
 - mx6sl -> imxpxp               imxgpu2d          imxepdc
 - mx6ul -> imxpxp
 - mx7d  -> imxpxp                                 imxepdc

So it allows for reusing of overrides while keeps this control at the
BSP side.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 conf/machine/include/imx-base.inc | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index a6db038..b54b7f5 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -48,6 +48,15 @@ DEFAULTTUNE_mx6ul ?= "cortexa7thf-neon"
 DEFAULTTUNE_mx7 ?= "cortexa7thf-neon"
 DEFAULTTUNE_vf ?= "cortexa5thf-neon"
 
+INHERIT += "machine-overrides-extender"
+
+MACHINEOVERRIDES_EXTENDER_mx6q  = "imxipu:imxvpu:imxgpu2d:imxgpu3d"
+MACHINEOVERRIDES_EXTENDER_mx6dl = "imxpxp:imxipu:imxvpu:imxgpu2d:imxgpu3d:imxepdc"
+MACHINEOVERRIDES_EXTENDER_mx6sx = "imxpxp:imxgpu2d:imxgpu3d"
+MACHINEOVERRIDES_EXTENDER_mx6sl = "imxpxp:imxgpu2d:imxepdc"
+MACHINEOVERRIDES_EXTENDER_mx6ul = "imxpxp"
+MACHINEOVERRIDES_EXTENDER_mx7d  = "imxpxp:imxepdc"
+
 # Sub-architecture support
 MACHINE_SOCARCH_SUFFIX ?= ""
 MACHINE_SOCARCH_SUFFIX_mx6q = "-mx6qdl"
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 06/16] chromium: Refactor code to use the the new overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (4 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 05/16] imx-base.inc: Enable machine overrides extender for i.MX6 Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 07/16] glmark2: Refactor code to use " Otavio Salvador
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been reworked to use the 'imxvpu' feature override.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 browser-layer/recipes-browser/chromium/chromium-imx.inc              | 3 +--
 browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend | 5 +----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/browser-layer/recipes-browser/chromium/chromium-imx.inc b/browser-layer/recipes-browser/chromium/chromium-imx.inc
index 6b63165..f8ba268 100644
--- a/browser-layer/recipes-browser/chromium/chromium-imx.inc
+++ b/browser-layer/recipes-browser/chromium/chromium-imx.inc
@@ -1,5 +1,4 @@
-DEPENDS_append_mx6q = " imx-vpuwrap"
-DEPENDS_append_mx6dl = " imx-vpuwrap"
+DEPENDS_append_imxvpu = " imx-vpuwrap"
 
 # Additional imx code and patches are included in the chromium-imx git repository.
 # The code below fetches this repository, copies the extra source over to the main
diff --git a/browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend b/browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend
index 8c8f801..54a0a99 100644
--- a/browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend
+++ b/browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend
@@ -4,9 +4,6 @@ CHROMIUM_IMX_BRANCH = "master"
 CHROMIUM_IMX_SRCREV = "4a2d15ab899b9944bb3adb2ddd250530da5b2e1a"
 CHROMIUM_IMX_COMMON_PATCHES += "file://${PATCH_BASE_DIR}/common/0001-Enable-share-group-workaround-for-Vivante-GPUs.patch"
 
-VPU_PATCHES = "file://${PATCH_BASE_DIR}/common/0002-Add-VPU-video-decode-accelerator-to-Chromium-GPU-.patch"
-
-CHROMIUM_IMX_VPU_PATCHES_mx6q += "${VPU_PATCHES}"
-CHROMIUM_IMX_VPU_PATCHES_mx6dl += "${VPU_PATCHES}"
+CHROMIUM_IMX_VPU_PATCHES_imxvpu += "file://${PATCH_BASE_DIR}/common/0002-Add-VPU-video-decode-accelerator-to-Chromium-GPU-.patch"
 
 CHROMIUM_IMX_WAYLAND_PATCHES += "file://${PATCH_BASE_DIR}/wayland/0001-Modify-eglwayland-versions-for-Vivante-GPUs.patch"
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 07/16] glmark2: Refactor code to use the new overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (5 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 06/16] chromium: Refactor code to use the the new overrides Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 08/16] qtbase: " Otavio Salvador
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d'
feature overrides, while on that, the '_remove' operator usage has
been removed as it is impossible to override using a bbappend file.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend b/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend
index 69106a7..b579028 100644
--- a/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend
+++ b/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend
@@ -1,4 +1,4 @@
-PACKAGECONFIG_mx6 = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gles2', \
-                        bb.utils.contains('DISTRO_FEATURES', 'x11 opengl',     'x11-gl x11-gles2', \
-                                                                               '', d), d)}"
-PACKAGECONFIG_remove_mx6sl = "wayland-gles2 x11-gles2"
+PACKAGECONFIG_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gles2', \
+                                bb.utils.contains('DISTRO_FEATURES', 'x11 opengl',     'x11-gl x11-gles2', '', d), d)}"
+PACKAGECONFIG_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', '', \
+                                bb.utils.contains('DISTRO_FEATURES', 'x11 opengl',     'x11-gl', '', d), d)}"
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 08/16] qtbase: Refactor code to use the new overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (6 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 07/16] glmark2: Refactor code to use " Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 09/16] cairo: " Otavio Salvador
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d'
feature overrides. While on that, the i.MX6SL specific code has been
reworked to used when only 2D GPU support is available.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
index d336c0f..fd7cc39 100644
--- a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
+++ b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
@@ -1,25 +1,22 @@
 # Copyright (C) 2013 Eric Bénard - Eukréa Electromatique
+# Copyright (C) 2016 O.S. Systems Software LTDA.
 
 HAS_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 1, 0, d)}"
 
-IS_MX6SL = "0"
-IS_MX6SL_mx6sl = "1"
+IMXGPU_imxgpu3d = "3d"
+IMXGPU_imxgpu2d = "2d"
 
-PACKAGECONFIG_GL_mx6q = "gles2"
-PACKAGECONFIG_GL_mx6dl = "gles2"
-PACKAGECONFIG_GL_mx6sx = "gles2"
-PACKAGECONFIG_GL_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' gl', '', d)}"
-QT_CONFIG_FLAGS_append_mx6q = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
-QT_CONFIG_FLAGS_append_mx6dl = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
-QT_CONFIG_FLAGS_append_mx6sx = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
-QT_CONFIG_FLAGS_append_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', \
+PACKAGECONFIG_GL_imxgpu3d = "gles2"
+PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' gl', '', d)}"
+QT_CONFIG_FLAGS_append_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
+QT_CONFIG_FLAGS_append_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', \
                                                  ' -no-opengl -linuxfb -no-eglfs', d)}"
 
 do_configure_prepend_mx6() {
     # adapt qmake.conf to our needs
     sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
     if test ${HAS_X11} -eq 0; then
-        if test ${IS_MX6SL} -eq 0; then
+        if [ "${IMXGPU}" = "3d"; then
     
             cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
 IMX6_CFLAGS             = -DLINUX=1 -DEGL_API_FB=1
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 09/16] cairo: Refactor code to use the new overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (7 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 08/16] qtbase: " Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 10/16] eglinfo: " Otavio Salvador
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d'
feature overrides.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 recipes-graphics/cairo/cairo_%.bbappend | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/recipes-graphics/cairo/cairo_%.bbappend b/recipes-graphics/cairo/cairo_%.bbappend
index 6f9e09d..c062dba 100644
--- a/recipes-graphics/cairo/cairo_%.bbappend
+++ b/recipes-graphics/cairo/cairo_%.bbappend
@@ -1,8 +1,10 @@
-CFLAGS_append_mx6 = " -DLINUX \
-                      ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
-                                        bb.utils.contains('DISTRO_FEATURES', 'wayland', \
-                                                      '-DEGL_API_FB -DEGL_API_WL',  '-DEGL_API_FB', d), d)}"
+CFLAGS_append_imxgpu2d = " \
+    -DLINUX \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', \
+                          '', \
+                          bb.utils.contains('DISTRO_FEATURES', 'wayland', \
+                                            '-DEGL_API_FB -DEGL_API_WL', \
+                                            '-DEGL_API_FB', d), d)} \
+"
 
-PACKAGECONFIG_append_mx6q = " egl glesv2"
-PACKAGECONFIG_append_mx6dl = " egl glesv2"
-PACKAGECONFIG_append_mx6sx = " egl glesv2"
+PACKAGECONFIG_append_imxgpu3d = " egl glesv2"
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 10/16] eglinfo: Refactor code to use the new overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (8 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 09/16] cairo: " Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: " Otavio Salvador
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been reworked to use the 'imxgpu3d' feature override.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 recipes-graphics/eglinfo/eglinfo-fb_%.bbappend  | 4 +---
 recipes-graphics/eglinfo/eglinfo-x11_%.bbappend | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend b/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend
index 0fd6781..7aa0e50 100644
--- a/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend
+++ b/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend
@@ -1,4 +1,2 @@
 # Set i.MX specific dependencies and device type
-EGLINFO_DEVICE_mx6q  = "imx6"
-EGLINFO_DEVICE_mx6dl = "imx6"
-EGLINFO_DEVICE_mx6sx = "imx6"
+EGLINFO_DEVICE_imxgpu3d = "imx6"
diff --git a/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend b/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend
index 0fd6781..7aa0e50 100644
--- a/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend
+++ b/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend
@@ -1,4 +1,2 @@
 # Set i.MX specific dependencies and device type
-EGLINFO_DEVICE_mx6q  = "imx6"
-EGLINFO_DEVICE_mx6dl = "imx6"
-EGLINFO_DEVICE_mx6sx = "imx6"
+EGLINFO_DEVICE_imxgpu3d = "imx6"
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (9 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 10/16] eglinfo: " Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-06 14:23   ` Tom Hochstein
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 12/16] mesa-gl: " Otavio Salvador
                   ` (5 subsequent siblings)
  16 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d'
feature overrides. While on that, the i.MX6SL specific code has been
reworked to used when only 2D GPU support is available.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
index e99c4a1..8536461 100644
--- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
+++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
@@ -13,9 +13,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxd
             libpng"
 
 EXTRA_PROVIDES = ""
-EXTRA_PROVIDES_mx6q  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6dl  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6sx  = " virtual/libgl virtual/libgles1 virtual/libgles2"
+EXTRA_PROVIDES_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
 PROVIDES += "virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg virtual/libg2d ${EXTRA_PROVIDES}"
 
 PE = "1"
@@ -94,8 +92,8 @@ python __anonymous() {
         d.appendVar("RCONFLICTS_" + fullp, pkgs)
 }
 
-IS_MX6SL = "0"
-IS_MX6SL_mx6sl = "1"
+IMXGPU_imxgpu3d = "3d"
+IMXGPU_imxgpu2d = "2d"
 
 do_install () {
     install -d ${D}${libdir}
@@ -182,8 +180,9 @@ do_install () {
         find ${D}${libdir} -name "*.$backend.so" -exec rm '{}' ';'
     done
 
-    # FIXME: MX6SL does not have 3D support; hack it for now
-    if [ "${IS_MX6SL}" = "1" ]; then
+    # FIXME: For 2D only GPU, we need to remove some content which is
+    #        3D specific.
+    if [ "${IMXGPU}" = "2d" ]; then
         rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \
                \
                ${D}${libdir}/libGL* ${D}${includedir}/GL* \ 
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 12/16] mesa-gl: Refactor code to use the new overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (10 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: " Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 13/16] weston: " Otavio Salvador
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been reworked to use the 'imxgpu2d' feature
override. This override has been taken as it is the common only on the
matching overrides.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 recipes-graphics/mesa/mesa-gl_%.bbappend | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/recipes-graphics/mesa/mesa-gl_%.bbappend b/recipes-graphics/mesa/mesa-gl_%.bbappend
index 881702e..465c893 100644
--- a/recipes-graphics/mesa/mesa-gl_%.bbappend
+++ b/recipes-graphics/mesa/mesa-gl_%.bbappend
@@ -1,4 +1 @@
-COMPATIBLE_MACHINE_mx6q  = "(-)"
-COMPATIBLE_MACHINE_mx6dl = "(-)"
-COMPATIBLE_MACHINE_mx6sx = "(-)"
-COMPATIBLE_MACHINE_mx6sl = "(-)"
+COMPATIBLE_MACHINE_imxgpu2d = "(-)"
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 13/16] weston: Refactor code to use the new overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (11 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 12/16] mesa-gl: " Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 14/16] gstreamer1.0-plugins-imx: " Otavio Salvador
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been reworked to use the 'imxpxp', 'imxgpu2d' and
'imxgpu3d' feature overrides. While on that, the i.MX6UL specific code
has been reworked to used when only PXP-only support is available,
fixing the i.MX7D support as well.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 recipes-graphics/wayland/weston_%.bbappend | 61 +++++++++++++++---------------
 1 file changed, 31 insertions(+), 30 deletions(-)

diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend
index f7bfd35..1b813ab 100644
--- a/recipes-graphics/wayland/weston_%.bbappend
+++ b/recipes-graphics/wayland/weston_%.bbappend
@@ -1,50 +1,51 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI_append_mx6 = " \
+SRC_URI_append_imxgpu2d = " \
     file://0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch \
     file://0003-MGS-1192-xwld-g2d-compositor-dose-not-work.patch \
     file://0004-MGS-1235-Fix-setenv-and-clear-environments.patch \
     file://0005-MGS-1252-Fix-for-Qt5_CinematicExperience-will-meet-s.patch \
     file://0006-MGS-1236-imx6qp-imx6dl-First-frame-distored-when-som.patch \
     file://0007-MGS-1236-1-imx6qp-imx6dl-First-frame-distored-when-s.patch \
-    "
-PACKAGECONFIG_append_mx6q = " cairo-glesv2"
-PACKAGECONFIG_append_mx6dl = " cairo-glesv2"
-PACKAGECONFIG_append_mx6sx = " cairo-glesv2"
-PACKAGECONFIG_remove_mx6sl = "egl"
-PACKAGECONFIG_remove_mx6ul = "egl"
-
-EXTRA_OECONF_append_mx6 = " \
-    --disable-libunwind \
-    --disable-xwayland-test \
-    WESTON_NATIVE_BACKEND=fbdev-backend.so \
 "
-EXTRA_OECONF_append_mx6ul = " \
+
+PACKAGECONFIG_IMX_TO_APPEND = ""
+PACKAGECONFIG_IMX_TO_APPEND_imxgpu3d = "cairo-glesv2"
+PACKAGECONFIG_IMX_TO_REMOVE = ""
+PACKAGECONFIG_IMX_TO_REMOVE_imxpxp   = "egl"
+PACKAGECONFIG_IMX_TO_REMOVE_imxgpu2d = ""
+
+PACKAGECONFIG_append = " ${PACKAGECONFIG_IMX_TO_APPEND}"
+PACKAGECONFIG_remove = " ${PACKAGECONFIG_IMX_TO_REMOVE}"
+
+
+EXTRA_OECONF_IMX = " \
     --disable-libunwind \
     --disable-xwayland-test \
     WESTON_NATIVE_BACKEND=fbdev-backend.so \
 "
 
-EXTRA_OEMAKE_append_mx6 = " \
+EXTRA_OECONF_append_imxpxp   = " ${EXTRA_OECONF_IMX}"
+EXTRA_OECONF_append_imxgpu2d = " ${EXTRA_OECONF_IMX}"
+
+# Use a intermediate step to configure the linking flags
+IMXGPU_LIBS = ""
+IMXGPU_LIBS_imxgpu2d = " \
+    COMPOSITOR_LIBS="-lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
+    FB_COMPOSITOR_LIBS="-lEGL -lwayland-server -lxkbcommon" \
+"
+IMXGPU_LIBS_imxgpu3d = " \
+    COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
+    FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \
+"
+
+# Use the linking flags according to the GPU support
+EXTRA_OEMAKE_append_imxgpu2d = " \
     COMPOSITOR_CFLAGS="-I ${STAGING_INCDIR}/pixman-1 -DLINUX=1 -DEGL_API_FB -DEGL_API_WL" \
     FB_COMPOSITOR_CFLAGS="-DLINUX=1 -DEGL_API_FB -DEGL_API_WL" \
     SIMPLE_EGL_CLIENT_CFLAGS="-DLINUX -DEGL_API_FB -DEGL_API_WL" \
     EGL_TESTS_CFLAGS="-DLINUX -DEGL_API_FB -DEGL_API_WL" \
     CLIENT_CFLAGS="-I ${STAGING_INCDIR}/cairo -I ${STAGING_INCDIR}/pixman-1 -DLINUX -DEGL_API_FB -DEGL_API_WL" \
-"
-EXTRA_OEMAKE_append_mx6q = " \
-    COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
-    FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \
-"
-EXTRA_OEMAKE_append_mx6dl = " \
-    COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
-    FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \
-"
-EXTRA_OEMAKE_append_mx6sx = " \
-    COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
-    FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \
-"
-EXTRA_OEMAKE_append_mx6sl = " \
-    COMPOSITOR_LIBS="-lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
-    FB_COMPOSITOR_LIBS="-lEGL -lwayland-server -lxkbcommon" \
+    \
+    ${IMXGPU_LIBS} \
 "
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 14/16] gstreamer1.0-plugins-imx: Refactor code to use the new overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (12 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 13/16] weston: " Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-06 14:25   ` Tom Hochstein
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 15/16] imx-codec: " Otavio Salvador
                   ` (2 subsequent siblings)
  16 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been reworked to use the 'imxpxp', 'imxipu', 'imxvpu'
and 'imxgpu2d' feature overrides.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 .../gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb              | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb
index eb609bb..e7aeff8 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb
@@ -40,12 +40,11 @@ EGLVIVSINK_DEPENDS = " \
        bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
        '', d),d)}"
 
-PACKAGECONFIG ?= ""
-PACKAGECONFIG_mx6q = "uniaudiodec mp3encoder v4l2src g2d eglvivsink ipu vpu"
-PACKAGECONFIG_mx6dl = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink ipu vpu"
-PACKAGECONFIG_mx6sx = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink"
-PACKAGECONFIG_mx6sl = "uniaudiodec mp3encoder v4l2src pxp g2d"
-PACKAGECONFIG_mx7 = "uniaudiodec mp3encoder v4l2src pxp"
+PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src"
+PACKAGECONFIG_append_imxgpu2d = " g2d eglvivsink"
+PACKAGECONFIG_append_imxipu   = " ipu"
+PACKAGECONFIG_append_imxvpu   = " vpu"
+PACKAGECONFIG_append_imxpxp   = " pxp"
 
 PACKAGECONFIG[g2d] = ",--disable-g2d,imx-gpu-viv"
 PACKAGECONFIG[pxp] = ",--disable-pxp,"
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 15/16] imx-codec: Refactor code to use the new overrides
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (13 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 14/16] gstreamer1.0-plugins-imx: " Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 16/16] gstreamer1.0-plugins-imx: Change EGL platform preference order Otavio Salvador
  2016-09-02  3:42 ` [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Tom Hochstein
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The recipe has been reworked to use the 'imxvpu' feature override.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 recipes-multimedia/imx-codec/imx-codec.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/recipes-multimedia/imx-codec/imx-codec.inc b/recipes-multimedia/imx-codec/imx-codec.inc
index 7711661..2bbb2e3 100644
--- a/recipes-multimedia/imx-codec/imx-codec.inc
+++ b/recipes-multimedia/imx-codec/imx-codec.inc
@@ -16,8 +16,7 @@ SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
 EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d)}"
 
 PACKAGECONFIG ?= ""
-PACKAGECONFIG_mx6q = "vpu"
-PACKAGECONFIG_mx6dl = "vpu"
+PACKAGECONFIG_imxvpu = "vpu"
 
 PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,imx-vpu"
 
-- 
2.9.3



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

* [meta-fsl-arm PATCH v2 16/16] gstreamer1.0-plugins-imx: Change EGL platform preference order
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (14 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 15/16] imx-codec: " Otavio Salvador
@ 2016-09-01 22:20 ` Otavio Salvador
  2016-09-02  3:42 ` [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Tom Hochstein
  16 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-01 22:20 UTC (permalink / raw)
  To: meta-freescale Mailing List
  Cc: Otavio Salvador, prabhu.sundararaj, white.weng

The i.MX BSP now defaults for XWayland when both X11 and Wayland
support is available, so we ought to use the Wayland backend for this
case as well.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2:
- New patch.

 recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb
index e7aeff8..22ad011 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb
@@ -24,11 +24,11 @@ inherit waf
 do_compile[depends] += "virtual/kernel:do_shared_workdir"
 
 # configure the eglvivsink element to use the appropriate EGL platform code
-# X11 if x11 is present in DISTRO_FEATURES
-# Wayland if x11 is not present in DISTRO_FEATURES, but wayland is
+# Wayland if 'wayland' is present in DISTRO_FEATURES, if not,
+# X11 if x11 is present in DISTRO_FEATURES,
 # Framebuffer otherwise
-EGLVIVSINK_PLATFORM = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \
-                          bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
+EGLVIVSINK_PLATFORM = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
+                          bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \
                           'fb', d),d)}"
 
 EGL_PLATFORM_CONF = "--egl-platform=${EGLVIVSINK_PLATFORM}"
-- 
2.9.3



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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
                   ` (15 preceding siblings ...)
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 16/16] gstreamer1.0-plugins-imx: Change EGL platform preference order Otavio Salvador
@ 2016-09-02  3:42 ` Tom Hochstein
  2016-09-02 10:13   ` Otavio Salvador
  16 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-02  3:42 UTC (permalink / raw)
  To: Otavio Salvador, meta-freescale Mailing List
  Cc: Prabhu Sundararaj, White Weng

Hi Otavio,
       
This looks good, but what do you think of implementing the new items as MACHINE_FEATURES instead of overrides?
	
Tom

-----Original Message-----
From: Otavio Salvador [mailto:otavio@ossystems.com.br] 
Sent: Thursday, September 01, 2016 5:20 PM
To: meta-freescale Mailing List <meta-freescale@yoctoproject.org>
Cc: Neena Busireddy <neenareddy.busireddy@nxp.com>; Daiane Angolini <daiane.angolini@nxp.com>; Prabhu Sundararaj <prabhu.sundararaj@nxp.com>; Tom Hochstein <tom.hochstein@nxp.com>; Zhenhua Luo <zhenhua.luo@nxp.com>; White Weng <white.weng@nxp.com>; Lauren Post <lauren.post@nxp.com>; Otavio Salvador <otavio@ossystems.com.br>
Subject: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication

We spent some time trying to come up with something which would make
easier to extend the tune-arch support. All we could come up was way
too complex or did not work.

Instead We did a MACHINEOVERRIDES extender.

This enables the machine overrides extender for the i.MX6 devices. It
maps (spaces are used to easy the read):

  - mx6q  ->        imxipu imxvpu imxgpu2d imxgpu3d
  - mx6dl -> imxpxp imxipu imxvpu imxgpu2d imxgpu3d imxepdc
  - mx6sx -> imxpxp               imxgpu2d imxgpu3d
  - mx6sl -> imxpxp               imxgpu2d          imxepdc
  - mx6ul -> imxpxp
  - mx7d  -> imxpxp                                 imxepdc

So it allows for reusing of overrides while keeps this control at the
BSP side. For example, a PACKAGECONFIG setting which is common for
mx6q, mx6dl and mx6sx used to look as:

PACKAGECONFIG_mx6q  = "option"
PACKAGECONFIG_mx6dl = "option"

Now it can be replaced by:

PACKAGECONFIG_imxvpu = "option"

Changes in v2:
- Use BitBake event to insert the extends
- New patch.

Otavio Salvador (16):
  Convert SOC_FAMILY to MACHINEOVERRIDES
  imx-lib: Stop using generic SoC overrides
  imx-test: Stop using generic SoC overrides
  machine-overrides-extender.bbclass: Automatically set extend the
    MACHINEOVERRIDES
  imx-base.inc: Enable machine overrides extender for i.MX6
  chromium: Refactor code to use the the new overrides
  glmark2: Refactor code to use the new overrides
  qtbase: Refactor code to use the new overrides
  cairo: Refactor code to use the new overrides
  eglinfo: Refactor code to use the new overrides
  imx-gpu-viv: Refactor code to use the new overrides
  mesa-gl: Refactor code to use the new overrides
  weston: Refactor code to use the new overrides
  gstreamer1.0-plugins-imx: Refactor code to use the new overrides
  imx-codec: Refactor code to use the new overrides
  gstreamer1.0-plugins-imx: Change EGL platform preference order

 .../recipes-browser/chromium/chromium-imx.inc      |  3 +-
 .../chromium/chromium_48.0.2548.0.bbappend         |  5 +-
 classes/machine-overrides-extender.bbclass         | 29 ++++++++++
 conf/machine/imx23evk.conf                         |  4 +-
 conf/machine/imx28evk.conf                         |  4 +-
 conf/machine/imx51evk.conf                         |  4 +-
 conf/machine/imx53ard.conf                         |  4 +-
 conf/machine/imx53qsb.conf                         |  4 +-
 conf/machine/imx6dlsabreauto.conf                  |  4 +-
 conf/machine/imx6dlsabresd.conf                    |  4 +-
 conf/machine/imx6qpsabreauto.conf                  |  4 +-
 conf/machine/imx6qpsabresd.conf                    |  4 +-
 conf/machine/imx6qsabreauto.conf                   |  4 +-
 conf/machine/imx6qsabresd.conf                     |  4 +-
 conf/machine/imx6slevk.conf                        |  4 +-
 conf/machine/imx6solosabreauto.conf                |  4 +-
 conf/machine/imx6solosabresd.conf                  |  4 +-
 conf/machine/imx6sxsabreauto.conf                  |  4 +-
 conf/machine/imx6sxsabresd.conf                    |  4 +-
 conf/machine/imx6ulevk.conf                        |  4 +-
 conf/machine/imx7dsabresd.conf                     |  4 +-
 conf/machine/include/imx-base.inc                  | 11 +++-
 conf/machine/include/qoriq-arm.inc                 |  2 -
 conf/machine/ls1021atwr.conf                       |  4 +-
 conf/machine/twr-vf65gs10.conf                     |  4 +-
 .../recipes-benchmark/glmark2/glmark2_%.bbappend   |  8 +--
 qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc      |  2 +-
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend         | 19 +++----
 recipes-bsp/imx-lib/imx-lib.inc                    |  6 ++-
 recipes-bsp/imx-test/imx-test.inc                  |  7 +--
 recipes-graphics/cairo/cairo_%.bbappend            | 16 +++---
 recipes-graphics/eglinfo/eglinfo-fb_%.bbappend     |  4 +-
 recipes-graphics/eglinfo/eglinfo-x11_%.bbappend    |  4 +-
 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc       | 13 +++--
 recipes-graphics/mesa/mesa-gl_%.bbappend           |  5 +-
 recipes-graphics/wayland/weston_%.bbappend         | 61 +++++++++++-----------
 .../gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb   | 19 ++++---
 recipes-multimedia/imx-codec/imx-codec.inc         |  3 +-
 38 files changed, 160 insertions(+), 137 deletions(-)
 create mode 100644 classes/machine-overrides-extender.bbclass

-- 
2.9.3



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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-02  3:42 ` [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Tom Hochstein
@ 2016-09-02 10:13   ` Otavio Salvador
  2016-09-02 14:46     ` Tom Hochstein
  0 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-02 10:13 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

On Fri, Sep 2, 2016 at 12:42 AM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
> This looks good, but what do you think of implementing the new items as MACHINE_FEATURES instead of overrides?

It should be possible indeed however, thinking about it, I think using
overrides offers an easier to use mechanism.

For example, using the overrides we can:

PACKAGECONFIG_append_imxgpu3d = " egl"

To use the MACHINE_FEATURES we would need to use:

PACKAGECONFIG_append = " $@{bb.utils.contains('MACHINE_FEATURES',
'imxgpu3d', 'egl', '', d}"

Another benefit is that with the extender, we define the features on a
single place (imx-base.inc) and every board using the respective SoC
will use it. For machine features we would need to set it in every
board which is easy to get wrong.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-02 10:13   ` Otavio Salvador
@ 2016-09-02 14:46     ` Tom Hochstein
  2016-09-02 18:55       ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-02 14:46 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> Sent: Friday, September 02, 2016 5:13 AM

> It should be possible indeed however, thinking about it, I think using
> overrides offers an easier to use mechanism.

It's shorter, but I don't see the difference in syntax as a problem. The 'bb.utils.contains('*FEATURES'' is an existing idiom.

The way I see it is the Yocto framework has a high level construct of machines and a finer grained mechanism for specifying the features supported by a machine.

What you are proposing is to take our list of i.MX-specific 'items' and add them through an extension of the machine mechanism. The downside of this is it dilutes the existing Yocto framework, and makes it harder to understand.

On the other hand, it seems correct to just treat these 'items' as machine features, with no changes to the existing Yocto framework required. Furthermore, by implementing this as a set of machine features, we gain the existing capabilities of the framework, mainly that the user can choose to not use an i.MX machine feature even if it is on his SOC. (See the COMBINED_FEATURES variable.)

> Another benefit is that with the extender, we define the features on a
> single place (imx-base.inc) and every board using the respective SoC
> will use it. For machine features we would need to set it in every
> board which is easy to get wrong.

We would need an extra require line from each machine configuration file to specify the SOC configuration. This line replaces the proposed MACHINEOVERRIDES line in the machine configuration file, and so it is no easier to get wrong.

Tom

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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-02 14:46     ` Tom Hochstein
@ 2016-09-02 18:55       ` Otavio Salvador
  2016-09-02 19:56         ` Tom Hochstein
  0 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-02 18:55 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

On Fri, Sep 2, 2016 at 11:46 AM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
>> Sent: Friday, September 02, 2016 5:13 AM
>
>> It should be possible indeed however, thinking about it, I think using
>> overrides offers an easier to use mechanism.
>
> It's shorter, but I don't see the difference in syntax as a problem. The 'bb.utils.contains('*FEATURES'' is an existing idiom.
>
> The way I see it is the Yocto framework has a high level construct of machines and a finer grained mechanism for specifying the features supported by a machine.
>
> What you are proposing is to take our list of i.MX-specific 'items' and add them through an extension of the machine mechanism. The downside of this is it dilutes the existing Yocto framework, and makes it harder to understand.
>
> On the other hand, it seems correct to just treat these 'items' as machine features, with no changes to the existing Yocto framework required. Furthermore, by implementing this as a set of machine features, we gain the existing capabilities of the framework, mainly that the user can choose to not use an i.MX machine feature even if it is on his SOC. (See the COMBINED_FEATURES variable.)
>
>> Another benefit is that with the extender, we define the features on a
>> single place (imx-base.inc) and every board using the respective SoC
>> will use it. For machine features we would need to set it in every
>> board which is easy to get wrong.
>
> We would need an extra require line from each machine configuration file to specify the SOC configuration. This line replaces the proposed MACHINEOVERRIDES line in the machine configuration file, and so it is no easier to get wrong.

The MACHINE_FEATURES including that kind of information will have a
huge impact on the number of machine specific package. In summary we
would not be able to share the binaries across different machines of
same SoC. Currently we share the Q, DL binaries as they are binary
compatible however if this could change on the board we would need to
make they are machine specific (Qt, Chromium, GStreamer, ...)

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-02 18:55       ` Otavio Salvador
@ 2016-09-02 19:56         ` Tom Hochstein
  2016-09-02 20:11           ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-02 19:56 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> Sent: Friday, September 02, 2016 1:55 PM

> The MACHINE_FEATURES including that kind of information will have a
> huge impact on the number of machine specific package. In summary we
> would not be able to share the binaries across different machines of
> same SoC. Currently we share the Q, DL binaries as they are binary
> compatible however if this could change on the board we would need to
> make they are machine specific (Qt, Chromium, GStreamer, ...)

Not sure I understand. Those recipes work today across different machines, and it seems like using MACHINE_FEATURES doesn't change that at all. Each binary will vary only because of different machine features, so if Q and DL have the same features, the binary will still be compatible. Do I misunderstand how this works?

Tom

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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-02 19:56         ` Tom Hochstein
@ 2016-09-02 20:11           ` Otavio Salvador
  2016-09-02 22:29             ` Tom Hochstein
  0 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-02 20:11 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

On Fri, Sep 2, 2016 at 4:56 PM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
>> Sent: Friday, September 02, 2016 1:55 PM
>
>> The MACHINE_FEATURES including that kind of information will have a
>> huge impact on the number of machine specific package. In summary we
>> would not be able to share the binaries across different machines of
>> same SoC. Currently we share the Q, DL binaries as they are binary
>> compatible however if this could change on the board we would need to
>> make they are machine specific (Qt, Chromium, GStreamer, ...)
>
> Not sure I understand. Those recipes work today across different machines, and it seems like using MACHINE_FEATURES doesn't change that at all. Each binary will vary only because of different machine features, so if Q and DL have the same features, the binary will still be compatible. Do I misunderstand how this works?

Yes; see the packages generated and how we enable the MACHINE_SOCARCH;
it shares binaries across same SoC families[1]

1. https://github.com/Freescale/meta-fsl-arm/blob/master/conf/machine/include/imx-base.inc#L53

So what would happens is that all recipes we have on -mx6qdl would
change and be MACHINE_ARCH. This is a bad side effect.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-02 20:11           ` Otavio Salvador
@ 2016-09-02 22:29             ` Tom Hochstein
  2016-09-03 20:23               ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-02 22:29 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng



> -----Original Message-----
> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> Sent: Friday, September 02, 2016 3:12 PM
> To: Tom Hochstein <tom.hochstein@nxp.com>
> Cc: Otavio Salvador <otavio@ossystems.com.br>; meta-freescale Mailing List <meta-freescale@yoctoproject.org>; Neena Busireddy
> <neenareddy.busireddy@nxp.com>; Daiane Angolini <daiane.angolini@nxp.com>; Prabhu Sundararaj <prabhu.sundararaj@nxp.com>;
> Zhenhua Luo <zhenhua.luo@nxp.com>; White Weng <white.weng@nxp.com>; Lauren Post <lauren.post@nxp.com>
> Subject: Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
> 
> On Fri, Sep 2, 2016 at 4:56 PM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
> >> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> >> Sent: Friday, September 02, 2016 1:55 PM
> >
> >> The MACHINE_FEATURES including that kind of information will have a
> >> huge impact on the number of machine specific package. In summary we
> >> would not be able to share the binaries across different machines of
> >> same SoC. Currently we share the Q, DL binaries as they are binary
> >> compatible however if this could change on the board we would need to
> >> make they are machine specific (Qt, Chromium, GStreamer, ...)
> >
> > Not sure I understand. Those recipes work today across different machines, and it seems like using MACHINE_FEATURES doesn't change
> that at all. Each binary will vary only because of different machine features, so if Q and DL have the same features, the binary will still be
> compatible. Do I misunderstand how this works?
> 
> Yes; see the packages generated and how we enable the MACHINE_SOCARCH;
> it shares binaries across same SoC families[1]
> 
> 1. https://github.com/Freescale/meta-fsl-arm/blob/master/conf/machine/include/imx-base.inc#L53
> 
> So what would happens is that all recipes we have on -mx6qdl would
> change and be MACHINE_ARCH. This is a bad side effect.

Okay, so now I know a little about packaging levels :-)

I found a comment in poky packagegroup_base.bb that seems relevant here. It basically says "set PACKAGE_ARCH to MACHINE_ARCH to use MACHINE_FEATURES". I guess that's why there could be a problem since we rely on MACHINE_SOCARCH for increased reuse.

However, I wonder if the rule is overstated and can be relaxed to say "set PACKAGE_ARCH to a machine-specific value to use MACHINE FEATURES". If so then we could continue to use MACHINE_SOCARCH with a MACHINE_FEATURES-based design and no loss of binary reuse.

Tom

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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-02 22:29             ` Tom Hochstein
@ 2016-09-03 20:23               ` Otavio Salvador
  2016-09-04 17:15                 ` Tom Hochstein
  0 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-03 20:23 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

On Fri, Sep 2, 2016 at 7:29 PM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>
>
>> -----Original Message-----
>> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
>> Sent: Friday, September 02, 2016 3:12 PM
>> To: Tom Hochstein <tom.hochstein@nxp.com>
>> Cc: Otavio Salvador <otavio@ossystems.com.br>; meta-freescale Mailing List <meta-freescale@yoctoproject.org>; Neena Busireddy
>> <neenareddy.busireddy@nxp.com>; Daiane Angolini <daiane.angolini@nxp.com>; Prabhu Sundararaj <prabhu.sundararaj@nxp.com>;
>> Zhenhua Luo <zhenhua.luo@nxp.com>; White Weng <white.weng@nxp.com>; Lauren Post <lauren.post@nxp.com>
>> Subject: Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
>>
>> On Fri, Sep 2, 2016 at 4:56 PM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> >> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
>> >> Sent: Friday, September 02, 2016 1:55 PM
>> >
>> >> The MACHINE_FEATURES including that kind of information will have a
>> >> huge impact on the number of machine specific package. In summary we
>> >> would not be able to share the binaries across different machines of
>> >> same SoC. Currently we share the Q, DL binaries as they are binary
>> >> compatible however if this could change on the board we would need to
>> >> make they are machine specific (Qt, Chromium, GStreamer, ...)
>> >
>> > Not sure I understand. Those recipes work today across different machines, and it seems like using MACHINE_FEATURES doesn't change
>> that at all. Each binary will vary only because of different machine features, so if Q and DL have the same features, the binary will still be
>> compatible. Do I misunderstand how this works?
>>
>> Yes; see the packages generated and how we enable the MACHINE_SOCARCH;
>> it shares binaries across same SoC families[1]
>>
>> 1. https://github.com/Freescale/meta-fsl-arm/blob/master/conf/machine/include/imx-base.inc#L53
>>
>> So what would happens is that all recipes we have on -mx6qdl would
>> change and be MACHINE_ARCH. This is a bad side effect.
>
> Okay, so now I know a little about packaging levels :-)
>
> I found a comment in poky packagegroup_base.bb that seems relevant here. It basically says "set PACKAGE_ARCH to MACHINE_ARCH to use MACHINE_FEATURES". I guess that's why there could be a problem since we rely on MACHINE_SOCARCH for increased reuse.
>
> However, I wonder if the rule is overstated and can be relaxed to say "set PACKAGE_ARCH to a machine-specific value to use MACHINE FEATURES". If so then we could continue to use MACHINE_SOCARCH with a MACHINE_FEATURES-based design and no loss of binary reuse.

It cannot as it would generate same package with different compile
options every time its value is changed.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-03 20:23               ` Otavio Salvador
@ 2016-09-04 17:15                 ` Tom Hochstein
  2016-09-05 12:55                   ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-04 17:15 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> Sent: Saturday, September 03, 2016 3:24 PM
> 
> On Fri, Sep 2, 2016 at 7:29 PM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
> >> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> >> Sent: Friday, September 02, 2016 3:12 PM
> >>
> >> On Fri, Sep 2, 2016 at 4:56 PM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
> >> >> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> >> >> Sent: Friday, September 02, 2016 1:55 PM
> >> >
> >> >> The MACHINE_FEATURES including that kind of information will have a
> >> >> huge impact on the number of machine specific package. In summary we
> >> >> would not be able to share the binaries across different machines of
> >> >> same SoC. Currently we share the Q, DL binaries as they are binary
> >> >> compatible however if this could change on the board we would need to
> >> >> make they are machine specific (Qt, Chromium, GStreamer, ...)
> >> >
> >> > Not sure I understand. Those recipes work today across different machines, and it seems like using MACHINE_FEATURES doesn't change
> >> that at all. Each binary will vary only because of different machine features, so if Q and DL have the same features, the binary will still be
> >> compatible. Do I misunderstand how this works?
> >>
> >> Yes; see the packages generated and how we enable the MACHINE_SOCARCH;
> >> it shares binaries across same SoC families[1]
> >>
> >> 1. https://github.com/Freescale/meta-fsl-arm/blob/master/conf/machine/include/imx-base.inc#L53
> >>
> >> So what would happens is that all recipes we have on -mx6qdl would
> >> change and be MACHINE_ARCH. This is a bad side effect.
> >
> > Okay, so now I know a little about packaging levels :-)
> >
> > I found a comment in poky packagegroup_base.bb that seems relevant here. It basically says "set PACKAGE_ARCH to MACHINE_ARCH to
> use MACHINE_FEATURES". I guess that's why there could be a problem since we rely on MACHINE_SOCARCH for increased reuse.
> >
> > However, I wonder if the rule is overstated and can be relaxed to say "set PACKAGE_ARCH to a machine-specific value to use MACHINE
> FEATURES". If so then we could continue to use MACHINE_SOCARCH with a MACHINE_FEATURES-based design and no loss of binary reuse.
> 
> It cannot as it would generate same package with different compile
> options every time its value is changed.

To be sure I understand, when you say 'its value is changed', do you mean 'MACHINE value is changed'?

I tested the MACHINE_FEATURES idea with the following steps to see if I could detect any changes in reuse:

1. Set MACHINE=imx6qsabresd in local.conf
2. bitbake gstreamer1.0-plugins-imx imx-gst1.0-plugin
3. Set MACHINE=imx6dlsabresd in local.conf
4. bitbake gstreamer1.0-plugins-imx imx-gst1.0-plugin
5. Repeat steps 1-4 and observe behavior
6. Add MACHINE_FEATURES += "imx-vpu" to imx6qsabresd.conf and imx6dlsabresd.conf
7. Add DISTRO_FEATURES_append = " imx-vpu" to local.conf
8. Replace PACKAGECONFIG overrides in gstreamer1.0-plugins-imx_0.12.2.bb with:
PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src g2d eglvivsink ipu \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imx-vpu', 'vpu', '', d)}"
9. Replace DEPENDS and DEPENDS_append overrides in imx-gst1.0-plugin_4.0.9.bb with:
DEPENDS = "imx-codec imx-parser virtual/kernel gstreamer1.0 gstreamer1.0-plugins-base imx-lib \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imx-vpu', 'imx-vpu imx-vpuwrap', '', d)}"
10. Repeat steps 1-5

The original implementation and the MACHINE_FEATURES implementation behaved identically as far as I could tell. No tasks were performed at step 5 when the MACHINE was changed from DL to Q and back, and packages seemed to be in the correct place for reuse:

r60874@tx30imx-01:~/upstream/build-xwayland/tmp/work$ for i in `find . -maxdepth 2 -name gstreamer1.0-plugins*`; do ls -d -l $i/*/deploy-rpms/*; done
drwxr-xr-x 2 r60874 r60874 4096 Sep  4 10:43 ./imx6qsabresd-poky-linux-gnueabi/gstreamer1.0-plugins-imx/0.12.2-r0/deploy-rpms/imx6qsabresd
drwxr-xr-x 2 r60874 r60874 4096 Sep  4 10:45 ./imx6dlsabresd-poky-linux-gnueabi/gstreamer1.0-plugins-imx/0.12.2-r0/deploy-rpms/imx6dlsabresd
drwxr-xr-x 2 r60874 r60874 24576 Sep  4 09:22 ./cortexa9hf-neon-poky-linux-gnueabi/gstreamer1.0-plugins-good/1.8.2-r0/deploy-rpms/cortexa9hf_neon
drwxr-xr-x 2 r60874 r60874 20480 Sep  4 09:20 ./cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/gstreamer1.0-plugins-base/1.8.2-r0/deploy-rpms/cortexa9hf_neon_mx6qdl
drwxr-xr-x 2 r60874 r60874 36864 Sep  4 09:23 ./cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/gstreamer1.0-plugins-bad/1.8.2-r0/deploy-rpms/cortexa9hf_neon_mx6qdl

Am I missing something?

Tom


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-04 17:15                 ` Tom Hochstein
@ 2016-09-05 12:55                   ` Otavio Salvador
  2016-09-05 16:37                     ` Tom Hochstein
  0 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-05 12:55 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

On Sun, Sep 4, 2016 at 2:15 PM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
> Am I missing something?

Yes; you are :-)

The problem of the use of a machine setting is the meaning of it. It
says you can change it for every machine and you can't.

Imagine following case:

Machine A - imxgpu3d
Machine B - without imxgpu3d

and consider both are Quad. How qtbase will be build? Both will end on
cortexa9hf_neon_mx6qdl causing the package to be generated with
different contents for A and B. This is the reason I said it end being
machine specific.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-05 12:55                   ` Otavio Salvador
@ 2016-09-05 16:37                     ` Tom Hochstein
  2016-09-05 17:18                       ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-05 16:37 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

> -----Original Message-----
> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> Sent: Monday, September 05, 2016 7:56 AM

> The problem of the use of a machine setting is the meaning of it. It
> says you can change it for every machine and you can't.

This is not the meaning of a machine feature. The manual gives the definition as a "hardware feature the MACHINE is capable of supporting [1]". Note the word 'capable'. A machine feature is in fact inherent to a given machine and not something that can vary.

> Machine A - imxgpu3d
> Machine B - without imxgpu3d
> 
> and consider both are Quad. How qtbase will be build? Both will end on
> cortexa9hf_neon_mx6qdl causing the package to be generated with
> different contents for A and B. This is the reason I said it end being
> machine specific.

This example should not be implemented through MACHINE_FEATURES solely, but instead through a combination of MACHINE_FEATURES, DISTRO_FEATURES, and COMBINED_FEATURES. COMBINED_FEATURES is defined thus:

Provides a list of hardware features that are enabled in both MACHINE_FEATURES and DISTRO_FEATURES. This select list of features contains features that make sense to be controlled both at the machine and distribution configuration level. For example, the "bluetooth" feature requires hardware support but should also be optional at the distribution level, in case the hardware supports Bluetooth but you do not ever intend to use it. [2]

To express this succinctly: MACHINE_FEATURES = capability, DISTRO_FEATURES = enablement, and COMBINED_FEATURES = capability and enablement. This is how the example should be implemented:

MACHINE_FEATURES 	- contains imxgpu3d for Machine A and Machine B
DISTRO_FEATURES	- contains imxgpu3d for Machine A only
COMBINED_FEATURES	- contains imxgpu3d for Machine A only

So, different distro, different tmpdir, and no reuse problem :-)

Tom

[1] http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-MACHINE_FEATURES
[2] http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-COMBINED_FEATURES


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-05 16:37                     ` Tom Hochstein
@ 2016-09-05 17:18                       ` Otavio Salvador
  2016-09-06  1:13                         ` Tom Hochstein
  0 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-05 17:18 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

On Mon, Sep 5, 2016 at 1:37 PM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
> To express this succinctly: MACHINE_FEATURES = capability, DISTRO_FEATURES = enablement, and COMBINED_FEATURES = capability and enablement. This is how the example should be implemented:
>
> MACHINE_FEATURES        - contains imxgpu3d for Machine A and Machine B
> DISTRO_FEATURES - contains imxgpu3d for Machine A only
> COMBINED_FEATURES       - contains imxgpu3d for Machine A only

I know how this works BUT people assumes machine features are to be
enabled/disabled on machine basis, that is the main reason I did not
use it.

The way I designed it, the extender is applied on the BSP level so it
provides the lift of features the SoC supports. If you want to change
something in a recipe or so, it will be applied globally and then
making it harder for people to make a frankenstein.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-05 17:18                       ` Otavio Salvador
@ 2016-09-06  1:13                         ` Tom Hochstein
  2016-09-06 12:39                           ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-06  1:13 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> Sent: Monday, September 05, 2016 12:18 PM

> I know how this works BUT people assumes machine features are to be
> enabled/disabled on machine basis, that is the main reason I did not
> use it.

Okay, so assume we chose to implement using machine features, and a user has disabled a machine feature using MACHINE_FEATURES_remove. I guess he will have no problem (other than his faulty understanding) since the feature will be disabled as he wants. Is there some other problem?

> The way I designed it, the extender is applied on the BSP level so it
> provides the lift of features the SoC supports. If you want to change
> something in a recipe or so, it will be applied globally and then
> making it harder for people to make a frankenstein.

Okay, but an implementation using MACHINE_FEATURES would not be any different. Each machine configuration file would include a new SOC configuration file, like this one for 6 Quad:

GPU_FEATURES = "imxipu imxvpu imxgpu2d imxgpu3d"
MACHINE_FEATURES += "${GPU_FEATURES}"
DISTRO_FEATURES_DEFAULT += "${GPU_FEATURES}"

And here's how the gstreamer1.0-plugins-imx recipe would set its package config:

PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imxpxp', 'pxp', '', d)} \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imxgpu2d', 'g2d', '', d)} \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imxgpu3d', 'eglvivsink', '', d)} \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imxipu', 'ipu', '', d)} \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imxvpu', 'vpu', '', d)} \
"

I see no problems with this design. It provides all the required functionality, plus it relies on a well-defined, existing model for enabling and disabling hardware features.

On the other hand, the override extender design adds complexity to the implementation of MACHINE, and complicates the model by adding this new SOC type of hardware feature. Also, relying on the variable override mechanism is a weakness, as we have seen the existing SOC override design to be error-prone due to the intricacies of the override mechanism. The override extender design does reduce the use of overrides, but it seems to me like we could still have some trouble with the 2d and 3d overrides.
	
Tom


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-06  1:13                         ` Tom Hochstein
@ 2016-09-06 12:39                           ` Otavio Salvador
  2016-09-06 13:25                             ` Tom Hochstein
  0 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-06 12:39 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

On Mon, Sep 5, 2016 at 10:13 PM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
>> Sent: Monday, September 05, 2016 12:18 PM
>
>> I know how this works BUT people assumes machine features are to be
>> enabled/disabled on machine basis, that is the main reason I did not
>> use it.
>
> Okay, so assume we chose to implement using machine features, and a user has disabled a machine feature using MACHINE_FEATURES_remove. I guess he will have no problem (other than his faulty understanding) since the feature will be disabled as he wants. Is there some other problem?
>
>> The way I designed it, the extender is applied on the BSP level so it
>> provides the lift of features the SoC supports. If you want to change
>> something in a recipe or so, it will be applied globally and then
>> making it harder for people to make a frankenstein.
>
> Okay, but an implementation using MACHINE_FEATURES would not be any different. Each machine configuration file would include a new SOC configuration file, like this one for 6 Quad:
>
> GPU_FEATURES = "imxipu imxvpu imxgpu2d imxgpu3d"
> MACHINE_FEATURES += "${GPU_FEATURES}"
> DISTRO_FEATURES_DEFAULT += "${GPU_FEATURES}"

Adding DISTRO things in a machine file is a clear indication something
is wrong. Anything related to distro features cannot be change in
machine level or it makes it incompatible across different machines.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-06 12:39                           ` Otavio Salvador
@ 2016-09-06 13:25                             ` Tom Hochstein
  2016-09-06 13:45                               ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-06 13:25 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> Sent: Tuesday, September 06, 2016 7:40 AM

> Adding DISTRO things in a machine file is a clear indication something
> is wrong. Anything related to distro features cannot be change in
> machine level or it makes it incompatible across different machines.

Yes, I wasn't sure if that would be a problem. Lauren has advocated for adding distros, and I guess that would be a better location for this. What is the latest status on that?

Tom

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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-06 13:25                             ` Tom Hochstein
@ 2016-09-06 13:45                               ` Otavio Salvador
  2016-09-06 14:54                                 ` Tom Hochstein
  0 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-06 13:45 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: meta-freescale Mailing List, Prabhu Sundararaj, White Weng,
	Otavio Salvador

On Tue, Sep 6, 2016 at 10:25 AM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
>> Sent: Tuesday, September 06, 2016 7:40 AM
>
>> Adding DISTRO things in a machine file is a clear indication something
>> is wrong. Anything related to distro features cannot be change in
>> machine level or it makes it incompatible across different machines.
>
> Yes, I wasn't sure if that would be a problem. Lauren has advocated for adding distros, and I guess that would be a better location for this. What is the latest status on that?

A BSP must be DISTRO agnostic; I won't merge something that does not
preserve that.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: " Otavio Salvador
@ 2016-09-06 14:23   ` Tom Hochstein
  2016-09-06 14:54     ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-06 14:23 UTC (permalink / raw)
  To: Otavio Salvador, meta-freescale Mailing List
  Cc: Prabhu Sundararaj, White Weng

> From: Otavio Salvador [mailto:otavio@ossystems.com.br]
> Sent: Thursday, September 01, 2016 5:21 PM
> 
> The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d'
> feature overrides. While on that, the i.MX6SL specific code has been
> reworked to used when only 2D GPU support is available.
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
> 
> Changes in v2: None
> 
>  recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
> index e99c4a1..8536461 100644
> --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
> +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
> @@ -13,9 +13,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxd
>              libpng"
> 
>  EXTRA_PROVIDES = ""
> -EXTRA_PROVIDES_mx6q  = " virtual/libgl virtual/libgles1 virtual/libgles2"
> -EXTRA_PROVIDES_mx6dl  = " virtual/libgl virtual/libgles1 virtual/libgles2"
> -EXTRA_PROVIDES_mx6sx  = " virtual/libgl virtual/libgles1 virtual/libgles2"
> +EXTRA_PROVIDES_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
>  PROVIDES += "virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg virtual/libg2d ${EXTRA_PROVIDES}"
> 
>  PE = "1"
> @@ -94,8 +92,8 @@ python __anonymous() {
>          d.appendVar("RCONFLICTS_" + fullp, pkgs)
>  }
> 
> -IS_MX6SL = "0"
> -IS_MX6SL_mx6sl = "1"
> +IMXGPU_imxgpu3d = "3d"
> +IMXGPU_imxgpu2d = "2d"

I thought the 'bare' variable was required as well, no?

IMXGPU = ""

Otherwise, I'm not sure if I understand the logic of the 2d/3d overrides. It looks like the intent is that we will have two cases, either 2d only or 2d and 3d, right? Perhaps a variable name change would make this logic a bit clearer:

IMXGPU2D_ONLY = "yes"
IMXGPU2D_ONLY_imxgpu3d = "no"

> 
>  do_install () {
>      install -d ${D}${libdir}
> @@ -182,8 +180,9 @@ do_install () {
>          find ${D}${libdir} -name "*.$backend.so" -exec rm '{}' ';'
>      done
> 
> -    # FIXME: MX6SL does not have 3D support; hack it for now
> -    if [ "${IS_MX6SL}" = "1" ]; then
> +    # FIXME: For 2D only GPU, we need to remove some content which is
> +    #        3D specific.
> +    if [ "${IMXGPU}" = "2d" ]; then
>          rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \
>                 \
>                 ${D}${libdir}/libGL* ${D}${includedir}/GL* \
> --
> 2.9.3



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

* Re: [meta-fsl-arm PATCH v2 14/16] gstreamer1.0-plugins-imx: Refactor code to use the new overrides
  2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 14/16] gstreamer1.0-plugins-imx: " Otavio Salvador
@ 2016-09-06 14:25   ` Tom Hochstein
  2016-09-06 14:42     ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-06 14:25 UTC (permalink / raw)
  To: Otavio Salvador, meta-freescale Mailing List
  Cc: Prabhu Sundararaj, White Weng

> From: Otavio Salvador [mailto:otavio@ossystems.com.br]
> Sent: Thursday, September 01, 2016 5:21 PM
> 
> The recipe has been reworked to use the 'imxpxp', 'imxipu', 'imxvpu'
> and 'imxgpu2d' feature overrides.
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
> 
> Changes in v2: None
> 
>  .../gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb              | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
> imx_0.12.2.bb
> index eb609bb..e7aeff8 100644
> --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb
> +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb
> @@ -40,12 +40,11 @@ EGLVIVSINK_DEPENDS = " \
>         bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
>         '', d),d)}"
> 
> -PACKAGECONFIG ?= ""
> -PACKAGECONFIG_mx6q = "uniaudiodec mp3encoder v4l2src g2d eglvivsink ipu vpu"
> -PACKAGECONFIG_mx6dl = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink ipu vpu"
> -PACKAGECONFIG_mx6sx = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink"
> -PACKAGECONFIG_mx6sl = "uniaudiodec mp3encoder v4l2src pxp g2d"
> -PACKAGECONFIG_mx7 = "uniaudiodec mp3encoder v4l2src pxp"
> +PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src"
> +PACKAGECONFIG_append_imxgpu2d = " g2d eglvivsink"

This doesn't look equivalent to me. It adds eglvivsink to mx6sl, right?

> +PACKAGECONFIG_append_imxipu   = " ipu"
> +PACKAGECONFIG_append_imxvpu   = " vpu"
> +PACKAGECONFIG_append_imxpxp   = " pxp"
> 
>  PACKAGECONFIG[g2d] = ",--disable-g2d,imx-gpu-viv"
>  PACKAGECONFIG[pxp] = ",--disable-pxp,"
> --
> 2.9.3



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

* Re: [meta-fsl-arm PATCH v2 14/16] gstreamer1.0-plugins-imx: Refactor code to use the new overrides
  2016-09-06 14:25   ` Tom Hochstein
@ 2016-09-06 14:42     ` Otavio Salvador
  0 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-06 14:42 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: meta-freescale Mailing List, Prabhu Sundararaj, White Weng,
	Otavio Salvador

On Tue, Sep 6, 2016 at 11:25 AM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> From: Otavio Salvador [mailto:otavio@ossystems.com.br]
>> Sent: Thursday, September 01, 2016 5:21 PM
>>
>> The recipe has been reworked to use the 'imxpxp', 'imxipu', 'imxvpu'
>> and 'imxgpu2d' feature overrides.
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>>
>> Changes in v2: None
>>
>>  .../gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb              | 11 +++++------
>>  1 file changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
>> imx_0.12.2.bb
>> index eb609bb..e7aeff8 100644
>> --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb
>> +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb
>> @@ -40,12 +40,11 @@ EGLVIVSINK_DEPENDS = " \
>>         bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
>>         '', d),d)}"
>>
>> -PACKAGECONFIG ?= ""
>> -PACKAGECONFIG_mx6q = "uniaudiodec mp3encoder v4l2src g2d eglvivsink ipu vpu"
>> -PACKAGECONFIG_mx6dl = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink ipu vpu"
>> -PACKAGECONFIG_mx6sx = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink"
>> -PACKAGECONFIG_mx6sl = "uniaudiodec mp3encoder v4l2src pxp g2d"
>> -PACKAGECONFIG_mx7 = "uniaudiodec mp3encoder v4l2src pxp"
>> +PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src"
>> +PACKAGECONFIG_append_imxgpu2d = " g2d eglvivsink"
>
> This doesn't look equivalent to me. It adds eglvivsink to mx6sl, right?

Indeed :-) I will fix this for v3 :-D \m/ Thanks for catching it :-)


-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides
  2016-09-06 14:23   ` Tom Hochstein
@ 2016-09-06 14:54     ` Otavio Salvador
  2016-09-06 15:04       ` Tom Hochstein
  0 siblings, 1 reply; 41+ messages in thread
From: Otavio Salvador @ 2016-09-06 14:54 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

On Tue, Sep 6, 2016 at 11:23 AM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> From: Otavio Salvador [mailto:otavio@ossystems.com.br]
>> Sent: Thursday, September 01, 2016 5:21 PM
>>
>> The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d'
>> feature overrides. While on that, the i.MX6SL specific code has been
>> reworked to used when only 2D GPU support is available.
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>>
>> Changes in v2: None
>>
>>  recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 13 ++++++-------
>>  1 file changed, 6 insertions(+), 7 deletions(-)
>>
>> diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
>> index e99c4a1..8536461 100644
>> --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
>> +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
>> @@ -13,9 +13,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxd
>>              libpng"
>>
>>  EXTRA_PROVIDES = ""
>> -EXTRA_PROVIDES_mx6q  = " virtual/libgl virtual/libgles1 virtual/libgles2"
>> -EXTRA_PROVIDES_mx6dl  = " virtual/libgl virtual/libgles1 virtual/libgles2"
>> -EXTRA_PROVIDES_mx6sx  = " virtual/libgl virtual/libgles1 virtual/libgles2"
>> +EXTRA_PROVIDES_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
>>  PROVIDES += "virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg virtual/libg2d ${EXTRA_PROVIDES}"
>>
>>  PE = "1"
>> @@ -94,8 +92,8 @@ python __anonymous() {
>>          d.appendVar("RCONFLICTS_" + fullp, pkgs)
>>  }
>>
>> -IS_MX6SL = "0"
>> -IS_MX6SL_mx6sl = "1"
>> +IMXGPU_imxgpu3d = "3d"
>> +IMXGPU_imxgpu2d = "2d"
>
> I thought the 'bare' variable was required as well, no?
>
> IMXGPU = ""
>
> Otherwise, I'm not sure if I understand the logic of the 2d/3d overrides. It looks like the intent is that we will have two cases, either 2d only or 2d and 3d, right? Perhaps a variable name change would make this logic a bit clearer:

Only if it is possible to have other value and this is not the case here.

> IMXGPU2D_ONLY = "yes"
> IMXGPU2D_ONLY_imxgpu3d = "no"

IMXGPU = "2d" or "3d" is clear enough no?

>>  do_install () {
>>      install -d ${D}${libdir}
>> @@ -182,8 +180,9 @@ do_install () {
>>          find ${D}${libdir} -name "*.$backend.so" -exec rm '{}' ';'
>>      done
>>
>> -    # FIXME: MX6SL does not have 3D support; hack it for now
>> -    if [ "${IS_MX6SL}" = "1" ]; then
>> +    # FIXME: For 2D only GPU, we need to remove some content which is
>> +    #        3D specific.
>> +    if [ "${IMXGPU}" = "2d" ]; then

and this is also clear here.

>>          rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \
>>                 \
>>                 ${D}${libdir}/libGL* ${D}${includedir}/GL* \
>> --
>> 2.9.3
>

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-06 13:45                               ` Otavio Salvador
@ 2016-09-06 14:54                                 ` Tom Hochstein
  2016-09-06 16:11                                   ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-06 14:54 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: meta-freescale Mailing List, Prabhu Sundararaj, White Weng,
	Otavio Salvador

> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> Sent: Tuesday, September 06, 2016 8:45 AM
> To: Tom Hochstein <tom.hochstein@nxp.com>
> Cc: Otavio Salvador <otavio@ossystems.com.br>; Prabhu Sundararaj <prabhu.sundararaj@nxp.com>; meta-freescale Mailing List <meta-
> freescale@yoctoproject.org>; White Weng <white.weng@nxp.com>
> Subject: Re: [meta-freescale] [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
> 
> On Tue, Sep 6, 2016 at 10:25 AM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
> >> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> >> Sent: Tuesday, September 06, 2016 7:40 AM
> >
> >> Adding DISTRO things in a machine file is a clear indication something
> >> is wrong. Anything related to distro features cannot be change in
> >> machine level or it makes it incompatible across different machines.
> >
> > Yes, I wasn't sure if that would be a problem. Lauren has advocated for adding distros, and I guess that would be a better location for this.
> What is the latest status on that?
> 
> A BSP must be DISTRO agnostic; I won't merge something that does not
> preserve that.

Okay, then that is a problem. Can we push these hardware features into poky so that they are treated identical to the other COMBINED_FEATURES?

Tom

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

* Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides
  2016-09-06 14:54     ` Otavio Salvador
@ 2016-09-06 15:04       ` Tom Hochstein
  2016-09-06 16:14         ` Otavio Salvador
  0 siblings, 1 reply; 41+ messages in thread
From: Tom Hochstein @ 2016-09-06 15:04 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
> Sent: Tuesday, September 06, 2016 9:54 AM
> To: Tom Hochstein <tom.hochstein@nxp.com>
> Cc: Otavio Salvador <otavio@ossystems.com.br>; meta-freescale Mailing List <meta-freescale@yoctoproject.org>; Neena Busireddy
> <neenareddy.busireddy@nxp.com>; Daiane Angolini <daiane.angolini@nxp.com>; Prabhu Sundararaj <prabhu.sundararaj@nxp.com>;
> Zhenhua Luo <zhenhua.luo@nxp.com>; White Weng <white.weng@nxp.com>; Lauren Post <lauren.post@nxp.com>
> Subject: Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides
> 
> On Tue, Sep 6, 2016 at 11:23 AM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
> >> From: Otavio Salvador [mailto:otavio@ossystems.com.br]
> >> Sent: Thursday, September 01, 2016 5:21 PM
> >>
> >> The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d'
> >> feature overrides. While on that, the i.MX6SL specific code has been
> >> reworked to used when only 2D GPU support is available.
> >>
> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >> ---
> >>
> >> Changes in v2: None
> >>
> >>  recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 13 ++++++-------
> >>  1 file changed, 6 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
> >> index e99c4a1..8536461 100644
> >> --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
> >> +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
> >> @@ -13,9 +13,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxd
> >>              libpng"
> >>
> >>  EXTRA_PROVIDES = ""
> >> -EXTRA_PROVIDES_mx6q  = " virtual/libgl virtual/libgles1 virtual/libgles2"
> >> -EXTRA_PROVIDES_mx6dl  = " virtual/libgl virtual/libgles1 virtual/libgles2"
> >> -EXTRA_PROVIDES_mx6sx  = " virtual/libgl virtual/libgles1 virtual/libgles2"
> >> +EXTRA_PROVIDES_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
> >>  PROVIDES += "virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg virtual/libg2d ${EXTRA_PROVIDES}"
> >>
> >>  PE = "1"
> >> @@ -94,8 +92,8 @@ python __anonymous() {
> >>          d.appendVar("RCONFLICTS_" + fullp, pkgs)
> >>  }
> >>
> >> -IS_MX6SL = "0"
> >> -IS_MX6SL_mx6sl = "1"
> >> +IMXGPU_imxgpu3d = "3d"
> >> +IMXGPU_imxgpu2d = "2d"
> >
> > I thought the 'bare' variable was required as well, no?
> >
> > IMXGPU = ""
> >
> > Otherwise, I'm not sure if I understand the logic of the 2d/3d overrides. It looks like the intent is that we will have two cases, either 2d
> only or 2d and 3d, right? Perhaps a variable name change would make this logic a bit clearer:
> 
> Only if it is possible to have other value and this is not the case here.
> 
> > IMXGPU2D_ONLY = "yes"
> > IMXGPU2D_ONLY_imxgpu3d = "no"
> 
> IMXGPU = "2d" or "3d" is clear enough no?
> 
> >>  do_install () {
> >>      install -d ${D}${libdir}
> >> @@ -182,8 +180,9 @@ do_install () {
> >>          find ${D}${libdir} -name "*.$backend.so" -exec rm '{}' ';'
> >>      done
> >>
> >> -    # FIXME: MX6SL does not have 3D support; hack it for now
> >> -    if [ "${IS_MX6SL}" = "1" ]; then
> >> +    # FIXME: For 2D only GPU, we need to remove some content which is
> >> +    #        3D specific.
> >> +    if [ "${IMXGPU}" = "2d" ]; then
> 
> and this is also clear here.

The logic looks like 'gpu has 2d', but In fact what it is doing is 'gpu does not have 3d', right? This is not clear at all.

> 
> >>          rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \
> >>                 \
> >>                 ${D}${libdir}/libGL* ${D}${includedir}/GL* \
> >> --
> >> 2.9.3
> >
> 
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

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

* Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
  2016-09-06 14:54                                 ` Tom Hochstein
@ 2016-09-06 16:11                                   ` Otavio Salvador
  0 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-06 16:11 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: meta-freescale Mailing List, Prabhu Sundararaj, White Weng,
	Otavio Salvador

On Tue, Sep 6, 2016 at 11:54 AM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
>> Sent: Tuesday, September 06, 2016 8:45 AM
>> To: Tom Hochstein <tom.hochstein@nxp.com>
>> Cc: Otavio Salvador <otavio@ossystems.com.br>; Prabhu Sundararaj <prabhu.sundararaj@nxp.com>; meta-freescale Mailing List <meta-
>> freescale@yoctoproject.org>; White Weng <white.weng@nxp.com>
>> Subject: Re: [meta-freescale] [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication
>>
>> On Tue, Sep 6, 2016 at 10:25 AM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> >> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
>> >> Sent: Tuesday, September 06, 2016 7:40 AM
>> >
>> >> Adding DISTRO things in a machine file is a clear indication something
>> >> is wrong. Anything related to distro features cannot be change in
>> >> machine level or it makes it incompatible across different machines.
>> >
>> > Yes, I wasn't sure if that would be a problem. Lauren has advocated for adding distros, and I guess that would be a better location for this.
>> What is the latest status on that?
>>
>> A BSP must be DISTRO agnostic; I won't merge something that does not
>> preserve that.
>
> Okay, then that is a problem. Can we push these hardware features into poky so that they are treated identical to the other COMBINED_FEATURES?

DISTRO agnostic does not mean Poky; at O.S. Systems we have a number
of custom distros based on OE-Core.

As I said, machine features are not intended for this use.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides
  2016-09-06 15:04       ` Tom Hochstein
@ 2016-09-06 16:14         ` Otavio Salvador
  0 siblings, 0 replies; 41+ messages in thread
From: Otavio Salvador @ 2016-09-06 16:14 UTC (permalink / raw)
  To: Tom Hochstein
  Cc: Otavio Salvador, Prabhu Sundararaj, meta-freescale Mailing List,
	White Weng

On Tue, Sep 6, 2016 at 12:04 PM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
>> Sent: Tuesday, September 06, 2016 9:54 AM
>> To: Tom Hochstein <tom.hochstein@nxp.com>
>> Cc: Otavio Salvador <otavio@ossystems.com.br>; meta-freescale Mailing List <meta-freescale@yoctoproject.org>; Neena Busireddy
>> <neenareddy.busireddy@nxp.com>; Daiane Angolini <daiane.angolini@nxp.com>; Prabhu Sundararaj <prabhu.sundararaj@nxp.com>;
>> Zhenhua Luo <zhenhua.luo@nxp.com>; White Weng <white.weng@nxp.com>; Lauren Post <lauren.post@nxp.com>
>> Subject: Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides
>>
>> On Tue, Sep 6, 2016 at 11:23 AM, Tom Hochstein <tom.hochstein@nxp.com> wrote:
>> >> From: Otavio Salvador [mailto:otavio@ossystems.com.br]
>> >> Sent: Thursday, September 01, 2016 5:21 PM
>> >>
>> >> The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d'
>> >> feature overrides. While on that, the i.MX6SL specific code has been
>> >> reworked to used when only 2D GPU support is available.
>> >>
>> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> >> ---
>> >>
>> >> Changes in v2: None
>> >>
>> >>  recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 13 ++++++-------
>> >>  1 file changed, 6 insertions(+), 7 deletions(-)
>> >>
>> >> diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
>> >> index e99c4a1..8536461 100644
>> >> --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
>> >> +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc
>> >> @@ -13,9 +13,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxd
>> >>              libpng"
>> >>
>> >>  EXTRA_PROVIDES = ""
>> >> -EXTRA_PROVIDES_mx6q  = " virtual/libgl virtual/libgles1 virtual/libgles2"
>> >> -EXTRA_PROVIDES_mx6dl  = " virtual/libgl virtual/libgles1 virtual/libgles2"
>> >> -EXTRA_PROVIDES_mx6sx  = " virtual/libgl virtual/libgles1 virtual/libgles2"
>> >> +EXTRA_PROVIDES_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
>> >>  PROVIDES += "virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg virtual/libg2d ${EXTRA_PROVIDES}"
>> >>
>> >>  PE = "1"
>> >> @@ -94,8 +92,8 @@ python __anonymous() {
>> >>          d.appendVar("RCONFLICTS_" + fullp, pkgs)
>> >>  }
>> >>
>> >> -IS_MX6SL = "0"
>> >> -IS_MX6SL_mx6sl = "1"
>> >> +IMXGPU_imxgpu3d = "3d"
>> >> +IMXGPU_imxgpu2d = "2d"
>> >
>> > I thought the 'bare' variable was required as well, no?
>> >
>> > IMXGPU = ""
>> >
>> > Otherwise, I'm not sure if I understand the logic of the 2d/3d overrides. It looks like the intent is that we will have two cases, either 2d
>> only or 2d and 3d, right? Perhaps a variable name change would make this logic a bit clearer:
>>
>> Only if it is possible to have other value and this is not the case here.
>>
>> > IMXGPU2D_ONLY = "yes"
>> > IMXGPU2D_ONLY_imxgpu3d = "no"
>>
>> IMXGPU = "2d" or "3d" is clear enough no?
>>
>> >>  do_install () {
>> >>      install -d ${D}${libdir}
>> >> @@ -182,8 +180,9 @@ do_install () {
>> >>          find ${D}${libdir} -name "*.$backend.so" -exec rm '{}' ';'
>> >>      done
>> >>
>> >> -    # FIXME: MX6SL does not have 3D support; hack it for now
>> >> -    if [ "${IS_MX6SL}" = "1" ]; then
>> >> +    # FIXME: For 2D only GPU, we need to remove some content which is
>> >> +    #        3D specific.
>> >> +    if [ "${IMXGPU}" = "2d" ]; then
>>
>> and this is also clear here.
>
> The logic looks like 'gpu has 2d', but In fact what it is doing is 'gpu does not have 3d', right? This is not clear at all.

This is a HACK! and ought to be fixed by the GPU Team; ideally we
should have different tarballs or subdirs for it. I used same logic
here as I did in Qt Base recipe.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

end of thread, other threads:[~2016-09-06 17:38 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 22:20 [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 01/16] Convert SOC_FAMILY to MACHINEOVERRIDES Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 02/16] imx-lib: Stop using generic SoC overrides Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 03/16] imx-test: " Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 04/16] machine-overrides-extender.bbclass: Automatically set extend the MACHINEOVERRIDES Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 05/16] imx-base.inc: Enable machine overrides extender for i.MX6 Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 06/16] chromium: Refactor code to use the the new overrides Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 07/16] glmark2: Refactor code to use " Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 08/16] qtbase: " Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 09/16] cairo: " Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 10/16] eglinfo: " Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: " Otavio Salvador
2016-09-06 14:23   ` Tom Hochstein
2016-09-06 14:54     ` Otavio Salvador
2016-09-06 15:04       ` Tom Hochstein
2016-09-06 16:14         ` Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 12/16] mesa-gl: " Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 13/16] weston: " Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 14/16] gstreamer1.0-plugins-imx: " Otavio Salvador
2016-09-06 14:25   ` Tom Hochstein
2016-09-06 14:42     ` Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 15/16] imx-codec: " Otavio Salvador
2016-09-01 22:20 ` [meta-fsl-arm PATCH v2 16/16] gstreamer1.0-plugins-imx: Change EGL platform preference order Otavio Salvador
2016-09-02  3:42 ` [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication Tom Hochstein
2016-09-02 10:13   ` Otavio Salvador
2016-09-02 14:46     ` Tom Hochstein
2016-09-02 18:55       ` Otavio Salvador
2016-09-02 19:56         ` Tom Hochstein
2016-09-02 20:11           ` Otavio Salvador
2016-09-02 22:29             ` Tom Hochstein
2016-09-03 20:23               ` Otavio Salvador
2016-09-04 17:15                 ` Tom Hochstein
2016-09-05 12:55                   ` Otavio Salvador
2016-09-05 16:37                     ` Tom Hochstein
2016-09-05 17:18                       ` Otavio Salvador
2016-09-06  1:13                         ` Tom Hochstein
2016-09-06 12:39                           ` Otavio Salvador
2016-09-06 13:25                             ` Tom Hochstein
2016-09-06 13:45                               ` Otavio Salvador
2016-09-06 14:54                                 ` Tom Hochstein
2016-09-06 16:11                                   ` Otavio Salvador

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.