All of lore.kernel.org
 help / color / mirror / Atom feed
* Mali on Mainline Linux
@ 2017-06-14 16:59 Joseph Kogut
  2017-06-15  5:31 ` Neil Armstrong
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph Kogut @ 2017-06-14 16:59 UTC (permalink / raw)
  To: linus-amlogic

Hi Neil,

I've been following your work on mainlining support for Amlogic SoCs
for a while now, and I really appreciate what you and BayLibre are
doing. These devices are extremely popular, and only getting moreso.

I have a GXL S905X device, and I'm working on getting Xorg with GLES
running on a mainline kernel (4.12.0-rc5). I found your repository on
GitHub for compiling the kernel driver for mainline kernels:
https://github.com/superna9999/meson_gx_mali_450

It only took a couple of patches to compile the kernel driver
(mali.ko), which I'm using with meson_drm. The driver appears to load
successfully, but upon starting X, I get the error:

    Fatal server error:
    (EE) no screens found(EE)

Checking the log reveals:

    [ 55706.674] (II) xfree86: Adding drm device (/dev/dri/card0)
    [ 55706.675] (II) no primary bus or device found
    [ 55706.675]    falling back to
/sys/devices/platform/soc/d0100000.vpu/drm/card0
    <snip>
    [ 55706.777] (EE) MALI(0): [mali_drm_open_master:1036] Error:
mali_drm_open_master Unable to open DRM: No such file or directory
    <snip>
    [ 55706.777] (EE) MALI(0): [MaliPreInit:1169] Error: Failed to be
master of DRM!

I'm using Arch Linux ARM with the HardKernel X11 DDX for the ODROID C2
(S905 platform), and their Mali LibGL package.

It seems there's an incompatibility between some Mali driver
components, and the drm driver. I did some googling, and found this
thread on the ODROID forums that you started:

https://forum.odroid.com/viewtopic.php?t=26969

Does the Mali 450 driver for X11 currently not work at all on the
mainline kernel because of DRM differences? Is this something that
requires modifications to the blob to fix?

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

* Mali on Mainline Linux
  2017-06-14 16:59 Mali on Mainline Linux Joseph Kogut
@ 2017-06-15  5:31 ` Neil Armstrong
  2017-06-15  7:35   ` Joseph Kogut
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Armstrong @ 2017-06-15  5:31 UTC (permalink / raw)
  To: linus-amlogic

Hi Joseph,

On 06/14/2017 06:59 PM, Joseph Kogut wrote:
> Hi Neil,
> 
> I've been following your work on mainlining support for Amlogic SoCs
> for a while now, and I really appreciate what you and BayLibre are
> doing. These devices are extremely popular, and only getting moreso.

Thanks !!

> 
> I have a GXL S905X device, and I'm working on getting Xorg with GLES
> running on a mainline kernel (4.12.0-rc5). I found your repository on
> GitHub for compiling the kernel driver for mainline kernels:
> https://github.com/superna9999/meson_gx_mali_450

Right

> 
> It only took a couple of patches to compile the kernel driver
> (mali.ko), which I'm using with meson_drm. The driver appears to load
> successfully, but upon starting X, I get the error:
> 
>     Fatal server error:
>     (EE) no screens found(EE)
> 
> Checking the log reveals:
> 
>     [ 55706.674] (II) xfree86: Adding drm device (/dev/dri/card0)
>     [ 55706.675] (II) no primary bus or device found
>     [ 55706.675]    falling back to
> /sys/devices/platform/soc/d0100000.vpu/drm/card0
>     <snip>
>     [ 55706.777] (EE) MALI(0): [mali_drm_open_master:1036] Error:
> mali_drm_open_master Unable to open DRM: No such file or directory
>     <snip>
>     [ 55706.777] (EE) MALI(0): [MaliPreInit:1169] Error: Failed to be
> master of DRM!

Yes, it seems you are using the xf86-video-mali, but this X11 driver needs
a special DRM driver to allocate Mali memory, but this one is hard to build with
recent kernels.

> I'm using Arch Linux ARM with the HardKernel X11 DDX for the ODROID C2
> (S905 platform), and their Mali LibGL package.
> 
> It seems there's an incompatibility between some Mali driver
> components, and the drm driver. I did some googling, and found this
> thread on the ODROID forums that you started:
> 
> https://forum.odroid.com/viewtopic.php?t=26969
> 
> Does the Mali 450 driver for X11 currently not work at all on the
> mainline kernel because of DRM differences? Is this something that
> requires modifications to the blob to fix?

The blobs delivered by HardKernel has been tweaked to work with their Amlogic kernel
fork, and it will won't work on mainline.

To have X11 running :
- a mainline meson version of xf86-video-armsoc : https://github.com/superna9999/xf86-video-armsoc
- you need to get the Amlogic libMali in : http://openlinux.amlogic.com:8000/download/ARM/filesystem/arm-buildroot-2016-08-18-5aaca1b35f.tar.gz

You can follow the HOWTO at :
https://github.com/superna9999/meson_gx_mali_450#howto
to find the correct libMali for X11.

- add an udev rule for mali (if not already the case) :
 Add a file to /etc/udev/rules.d/, perhaps called 50-mali.rules, with the following content:
KERNEL=="mali", MODE="0660", GROUP="video"

- Change the xorg configuration :
Then you should also change the /etc/X11/xorg.conf to something like :

Section "Device"
	Identifier	"Amlogic Meson DRM driver"
	Driver		"armsoc"
	Option	"DRI2"	"true"
EndSection

When X11 is running, you can get the status by running the glesgears.

There is some more docs here :
https://github.com/superna9999/OpenArenaPandora#amlogic-s905-mainline-linux

Neil

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

* Mali on Mainline Linux
  2017-06-15  5:31 ` Neil Armstrong
@ 2017-06-15  7:35   ` Joseph Kogut
  2017-06-19 23:53     ` Joseph Kogut
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph Kogut @ 2017-06-15  7:35 UTC (permalink / raw)
  To: linus-amlogic

Awesome, thanks so much for the pointers!

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

* Mali on Mainline Linux
  2017-06-15  7:35   ` Joseph Kogut
@ 2017-06-19 23:53     ` Joseph Kogut
  0 siblings, 0 replies; 4+ messages in thread
From: Joseph Kogut @ 2017-06-19 23:53 UTC (permalink / raw)
  To: linus-amlogic

Hi Neil,

Just a friendly heads up. I rebased your patches for xf86-video-armsoc
onto https://github.com/endlessm/xf86-video-armsoc, and got the Xorg
DDX working with meson_drm on Linux 4.12-rc5 with Xorg 1.19.

My repo is here:

https://github.com/jakogut/xf86-video-armsoc

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

end of thread, other threads:[~2017-06-19 23:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-14 16:59 Mali on Mainline Linux Joseph Kogut
2017-06-15  5:31 ` Neil Armstrong
2017-06-15  7:35   ` Joseph Kogut
2017-06-19 23:53     ` Joseph Kogut

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.