Project

General

Profile

Actions

Action Item #1064

closed

Get accelerated X.org on rk3399

Added by Hammel 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Target version:
Start date:
31 Oct 2023
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description


Related issues

Blocks Xeon - Feature #1076: Enable opengl-demos in buildroot config for testing graphicsIn ProgressHammel15 Nov 2023

Actions
Actions #1

Updated by Hammel 6 months ago

  • Description updated (diff)
Actions #2

Updated by Hammel 6 months ago

  • Severity changed from 03 - Medium to 01 - Critical
Actions #3

Updated by Hammel 6 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

An initial test build using the wrapper template fails because the autoconf build of the xserver thinks Buildroot's staging tree doesn't have xorg-marcos > 1.4.

The next option will be to create a Buildroot package and use a tarball download instead of the git repo. This may work better than building outside of Buildroot, though it may also require extending the existing builds to include rebuilding the configure script.

Test build source tree is in p64x using cdtools.

Actions #4

Updated by Hammel 6 months ago

To test this I need to port the existing fbdev package tree to an armsoc directory.
Then I need add

LIBFOO_AUTORECONF=YES

to the armsoc.mk to have it regenerate the configure script. It's not clear if this is all I need, but it's a start.

After looking over the freedesktop source for X11 drivers, it might be better to copy the xdriver_xf86-video-amdgpu package tree as a base for the armsoc build.

Actions #5

Updated by Hammel 5 months ago

To check if Mali is supported in device tree (it likely is):

dtc -I fs /proc/device-tree | grep mali
Actions #6

Updated by Hammel 5 months ago

  • Description updated (diff)
Actions #7

Updated by Hammel 5 months ago

  • Description updated (diff)
Actions #8

Updated by Hammel 5 months ago

  • Blocks Feature #1076: Enable opengl-demos in buildroot config for testing graphics added
Actions #9

Updated by Hammel 5 months ago

Identified the latest repo (of the ones I've found) that has the rockchip support via drm and have a working Buildroot package. The driver has been built in the target output tree.

Next up is to try the driver. I may need to add the xorg.conf shown on an Armbian discussion. Other links:
Actions #10

Updated by Hammel 5 months ago

Driver doesn't boot. It fails with the following message in Xorg.0.log.

[    18.106] (WW) Falling back to old probe method for armsoc
[    18.106] (II) No BusID or DriverName specified - opening /dev/dri/card0
[    18.107] (II) Got BusID ff9a0000.gpu
[    18.107] (II) Opened DRM
[    18.107] (II)    DeviceName is [/dev/dri/card0]
[    18.107] (II)    bus_id is [ff9a0000.gpu]
[    18.107] (II)    DriverName is [panfrost]
[    18.107] (II)    version is [1.2.0]
[    18.107] (II) Screen:0,  CRTC:-1
[    18.110] (==) ARMSOC(0): Depth 24, (==) framebuffer bpp 32
[    18.110] (==) ARMSOC(0): RGB weight 888
[    18.110] (==) ARMSOC(0): Using gamma correction (1.0, 1.0, 1.0)
[    18.110] (==) ARMSOC(0): Default visual is TrueColor
[    18.110] (II) No BusID or DriverName specified - opening /dev/dri/card0
[    18.110] (II) Got BusID ff9a0000.gpu
[    18.110] (II) Opened DRM
[    18.110] (II)    DeviceName is [/dev/dri/card0]
[    18.110] (II)    bus_id is [ff9a0000.gpu]
[    18.110] (II)    DriverName is [panfrost]
[    18.110] (II)    version is [1.2.0]
[    18.110] (II) UnloadModule: "armsoc" 
[    18.110] (EE) Screen(s) found, but none have a usable configuration.
[    18.110] (EE) 
Fatal server error:
[    18.110] (EE) no screens found(EE) 

There are reports that DietPi works with rk3399. Try this xorg.conf.

Section "Device" 
    Identifier  "Rockchip Graphics" 
    Driver      "modesetting" 
    Option      "AccelMethod"    "glamor" 
    Option      "DRI"            "2" 
EndSection

Actions #11

Updated by Hammel 5 months ago

  • % Done changed from 10 to 40

That xorg.conf worked - X is up and it's using the dri configs. I'll add it to the Buildroot skeleton and drop the armsoc driver.

None of the glxYYY programs work. They still give

Error: couldn't find RGB GLX visual or fbconfig

But I've heard I might be able to use glmark2 if I add it to Buildroot.

Actions #12

Updated by Hammel 5 months ago

  • % Done changed from 40 to 100

glmark2 doesn't build. So that's as far as I'm going with this. The x-server has been updated to use the mesa-capable modesetting server and that's good enough.

All changes (re: the required xorg.conf) committed and pushed.

Closing issue.

Actions #13

Updated by Hammel 5 months ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF