Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Bisson <gary.bisson@boundarydevices.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC: 3/4] package/x11r7/xdriver_xf86-video-imx-viv: bump to version rel_imx_5.4.24_2.1.0
Date: Mon, 11 Jan 2021 14:12:08 +0100	[thread overview]
Message-ID: <X/xOqBw1AkEKB3SP@p1g2> (raw)
In-Reply-To: <53e43012-7460-6954-2467-dea1ddcf0be7@gmail.com>

Hi Romain,

On Sun, Jan 10, 2021 at 06:46:38PM +0100, Romain Naour wrote:
> Hello,
> 
> Le 07/01/2021 ? 12:04, Romain Naour a ?crit?:
> > This package needs to be updated to build with the NXP imx_5.4.x_2.1.0 release.
> > 
> > Don't override CFLAGS on the command line otherwise we loose some include paths
> > (ex: -I./vivante_gal).
> > CFLAGS is already provided by TARGET_CONFIGURE_OPTS in make environment.
> 
> What's the status of vivante gpu support for X11 ? especially for kernel >= 5.4.

Don't know. To be honest, i.MX6 will soon be a legacy product for NXP
releases so I strongly suggest moving to mainline + Etnaviv.

> Because it's currently broken with several issues:
> 
> 0) glxinfo fail to report OpenGL informations
> 
> # glxinfo -B -display :0
> name of display: :0
> Error: glXMakeCurrent failed
> X Error of failed request:  GLXBadContext
>   Major opcode of failed request:  148 (GLX)
>   Minor opcode of failed request:  4 (X_GLXDestroyContext)
>   Serial number of failed request:  20
>   Current serial number in output stream:  25
> Perform final cleanup before process termination!
> 
> (I'm using a patch that replace glWindowPos2iARB calls with glWindowPos2i:
> https://github.com/Freescale/meta-freescale/blob/dunfell/recipes-graphics/mesa/mesa-demos/Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch)

Have you tried NXP pre-built image from latest release? Although it
seems they now use Wayland/XWayland. Yet it'd be surprising they'd
release a broken X11 package.

> 1) vivante_fbdev is looking for a device with "platform:Vivante GCCore" using
> drmOpen() [1]
> 
>  strcpy(pDRIInfo->busIdString,"platform:Vivante GCCore");
>  fd = drmOpen(NULL,pDRIInfo->busIdString);
> 
> This string "platform:Vivante GCCore" is present in the linux-imx kernel up to
> the version imx_4.19.35_1.1.0. The DRM_VIVANTE driver is missing in
> imx_5.4.70_2.3.0.
> 
> 2) I was able to workaround this issue by using "130000.gpu" instead of
> "platform:Vivante GCCore" but the dri driver still fail to load.
> 
> drmOpenByBusid: Searching for BusID 130000.gpu
> drmOpenDevice: node name is /dev/dri/card0
> drmOpenDevice: open result is 12, (OK)
> drmOpenByBusid: drmOpenMinor returns 12
> drmOpenByBusid: drmGetBusid reports 130000.gpu
> (II) [drm] DRM interface version 1.4
> (II) [drm] Could not create SAREA for DRM lock.
> (EE) VIVANTE(0): [dri] DRIScreenInit failed.  Disabling DRI
> 
> 3) I tried to enable X11_DRI3 but xdriver_xf86-video-imx-viv doesn't even build
> due to recent change [2] (removing pScrPriv variable before using it along with
> other issues).
> See patch [3] that try to fix the issue.
> (Note, X11_DRI3 needs libdrm-vivante fork to build)
> 
> 
> To compare with a working system, I'm using the Debian (xfce) image provided by
> Boundarydevices [4] but the kernel is 4.14.98-28-boundary-17b (DRM_VIVANTE is
> still present). I noticed that the SWRAST DRI driver is used along with the
> vivante driver:
> 
> [    21.503] (II) Initializing extension GLX
> [    21.504] (II) AIGLX: Screen 0 is not DRI2 capable
> [    22.142] (II) IGLX: Loaded and initialized swrast
> [    22.143] (II) GLX: Initialized DRISWRAST GL provider for screen 0

FYI, we haven't updated to 5.4 for i.MX6 and don't plan to.

> It means that we really need two LIBGL providers enabled at the same time in the
> Buildroot configuration.

OpenGL is another issue though, you can get X11 working without it. But
yes the implementation on libGL from imx-gpu-viv is messy. Thomas did
implement it once but never submitted it as the change was pretty
intrusive & hacky.

> I have the feeling that I need to switch to Yocto to use meta-freescale and all
> the imx hacks and imx forks (libdrm-imx) to get vivante GPU working with X11
> (maybe).

Please let us know how that goes. Once again it feels like it would be
better to move to Etnaviv at this point.

Regards,
Gary

  reply	other threads:[~2021-01-11 13:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 11:04 [Buildroot] [RFC: 1/4] package/freescale-imx/imx-gpu-viv: BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_{X11, WL} are libgl provider Romain Naour
2021-01-07 11:04 ` [Buildroot] [RFC: 2/4] package/freescale-imx/imx-gpu-viv: avoid removing openGL headers when mesa3d is also selected Romain Naour
2021-01-07 11:04 ` [Buildroot] [RFC: 3/4] package/x11r7/xdriver_xf86-video-imx-viv: bump to version rel_imx_5.4.24_2.1.0 Romain Naour
2021-01-10 17:46   ` Romain Naour
2021-01-11 13:12     ` Gary Bisson [this message]
2021-01-12 10:53       ` Romain Naour
     [not found]       ` <7856829.T7Z3S40VBb@pc-42>
2021-01-12 11:05         ` Romain Naour
2021-01-12 19:32           ` Peter Seiderer
2021-01-12 21:52             ` Romain Naour
2021-01-07 11:04 ` [Buildroot] [RFC: 4/4] package/x11r7/xdriver_xf86-video-imx-viv: select dri swrast driver Romain Naour
2021-01-07 17:04 ` [Buildroot] [RFC: 1/4] package/freescale-imx/imx-gpu-viv: BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_{X11, WL} are libgl provider Yann E. MORIN
2021-01-07 17:05   ` Yann E. MORIN
2021-01-07 20:19   ` Romain Naour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X/xOqBw1AkEKB3SP@p1g2 \
    --to=gary.bisson@boundarydevices.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox