[meta-freescale] [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides

Otavio Salvador otavio.salvador at ossystems.com.br
Tue Sep 6 09:14:45 PDT 2016


On Tue, Sep 6, 2016 at 12:04 PM, Tom Hochstein <tom.hochstein at nxp.com> wrote:
>> From: Otavio Salvador [mailto:otavio.salvador at ossystems.com.br]
>> Sent: Tuesday, September 06, 2016 9:54 AM
>> To: Tom Hochstein <tom.hochstein at nxp.com>
>> Cc: Otavio Salvador <otavio at ossystems.com.br>; meta-freescale Mailing List <meta-freescale at yoctoproject.org>; Neena Busireddy
>> <neenareddy.busireddy at nxp.com>; Daiane Angolini <daiane.angolini at nxp.com>; Prabhu Sundararaj <prabhu.sundararaj at nxp.com>;
>> Zhenhua Luo <zhenhua.luo at nxp.com>; White Weng <white.weng at nxp.com>; Lauren Post <lauren.post at 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 at nxp.com> wrote:
>> >> From: Otavio Salvador [mailto:otavio at 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 at 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


More information about the meta-freescale mailing list