On May 16, 2016 2:36 AM, "Sumit Agrawal" <sumi...@gmail.com> wrote:
>
> Hi,
>
> Can someone help me understand what are the requirements to enable software renderer path on Chromium OS with the ozone/freon stack? (I am using a private arm64 board overlay)
>
> I was under the impression that I need to just disable all the video cards and keep swrast in mesa. But that doesn't seem to work.
> I am able to see the boot splash screen, but nothing after that.
The arm64-llvmpipe public overlay uses the Mesa software pipe for graphics and as far as I can tell it does work. You can use it as a basis for your own work.
>
> This is what my mesa configuration looks like:
>
> ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=armv7a-cros-linux-gnueabi --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-option-checking --with-driver=dri --disable-glu --disable-glut --disable-omx --disable-va --disable-vdpau --disable-xvmc --without-demos --enable-texture-float --disable-dri3 --disable-llvm-shared-libs --disable-glx --enable-llvm-gallium --enable-egl --disable-gbm --disable-gles1 --enable-gles2 --enable-shared-glapi --enable-gallium --disable-debug --enable-glx-tls --enable-asm --disable-xlib-glx --enable-dri --with-dri-drivers=,swrast --with-gallium-drivers=,swrast --with-egl-platforms=surfaceless
>
> Would the chromium browser be able to figure out that there is no gpu involved (does it really need to know at all?), or I do I need to set any flags for ozone layer?
The browser won't think there is no GPU, as Mesa will provide the GL implementation.
>
> Also, minigbm should not come into picture for software rendering, right?
It still needs to support the actual driver you are using to display.
If you are using a custom kernel config, you might want to have also DRM_VGEM enabled.
Before starting the browsing, the drm-tests package is providing more self contained tests which are easier to debug. You should try to run null_platform_test from there.
>
> --
> --
> Chromium OS Developers mailing list: chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
>
Vincent, I am not sure if I understand your earlier comment about minigbm completely.
Did you mean that minigbm implementation is needed for drm/vgem device, to enable the software rendering path?
I am trying to debug the vgem path further. I have DRM_VGEM enabled, and vgem device is listed as below:
localhost ~ # ls -la /sys/class/drm
drwxr-xr-x 2 root root 0 Dec 31 1969 .
drwxr-xr-x 50 root root 0 Dec 31 1969 ..
lrwxrwxrwx 1 root root 0 Dec 31 1969 card0 -> ../../devices/platform/vgem/drm/card0
lrwxrwxrwx 1 root root 0 Dec 31 1969 card1 -> ../../devices/platform/soc/900000.qcom,mdss_mdp/drm/card1
lrwxrwxrwx 1 root root 0 Dec 31 1969 card1-HDMI-A-1 -> ../../devices/platform/soc/900000.qcom,mdss_mdp/drm/card1/card1-HDMI-A-1
lrwxrwxrwx 1 root root 0 Dec 31 1969 controlD64 -> ../../devices/platform/soc/900000.qcom,mdss_mdp/drm/controlD64
lrwxrwxrwx 1 root root 0 Dec 31 1969 renderD128 -> ../../devices/platform/vgem/drm/renderD128
lrwxrwxrwx 1 root root 0 Dec 31 1969 renderD129 -> ../../devices/platform/soc/900000.qcom,mdss_mdp/drm/renderD129
lrwxrwxrwx 1 root root 0 Dec 31 1969 ttm -> ../../devices/virtual/drm/ttm
-r--r--r-- 1 root root 4096 Dec 31 1969 version
1. With Chromium browser, I get this error:
[4971:4990:0422/143205:ERROR:drm_device_manager.cc(53)] Could not initialize DRM device for /sys/devices/platform/vgem/drm/card0
I figured that devices that cannot perform modesetting (like vgem) are ignored in ozone/platform/drm. So, the call doesn't even reach minigbm for vgem device.
2. With null_platform_test, I get below error: (I put some extra logs in minigbm/gbm.c)
localhost ~ # null_platform_test /dev/dri/card0
minigbm: gbm_create_device
minigbm: gbm_get_driver
minigbm: drm_version->name=vgem
minigbm: NOT FOUND drm_version->name=vgem
minigbm: gbm_get_driver failed
ERROR:main():null_platform_test.c:81:failed to create gbm
It tries to find a gbm driver with name "vgem" and fails, as there is no such driver in the driver_list.
https://chromium.googlesource.com/chromiumos/platform/minigbm/+/master/gbm.c#53
3. I built an image with arm64-llvmpipe public overlay, and tried to boot it with my kernel. But it produces the same result with chromium browser as well as null_platform_test.
What next?
1. May be something is missing in my kernel (although this seems less likely to me)
2. I bumped upon this code which suggests that software rendering is not supported with GBM platform. Not sure if it's about the same thing.
3. Does software rendering with ozone-gbm platform really work? This patch suggests that it should work with vgem+swrast, which is what I am trying.
https://codereview.chromium.org/1345703002
May be any other configurations are required?
4. I got a references to ozone-dri platform, which supposedly supports software rendering. But I couldn't find the corresponding code. Has it been removed?
https://software.intel.com/en-us/blogs/2014/10/23/chromium-ozone-gbm-explained
Vincent, I am not sure if I understand your earlier comment about minigbm completely.
Did you mean that minigbm implementation is needed for drm/vgem device, to enable the software rendering path?
I am trying to debug the vgem path further.
I have DRM_VGEM enabled, and vgem device is listed as below:
localhost ~ # ls -la /sys/class/drm
drwxr-xr-x 2 root root 0 Dec 31 1969 .
drwxr-xr-x 50 root root 0 Dec 31 1969 ..
lrwxrwxrwx 1 root root 0 Dec 31 1969 card0 -> ../../devices/platform/vgem/drm/card0
lrwxrwxrwx 1 root root 0 Dec 31 1969 card1 -> ../../devices/platform/soc/900000.qcom,mdss_mdp/drm/card1
lrwxrwxrwx 1 root root 0 Dec 31 1969 card1-HDMI-A-1 -> ../../devices/platform/soc/900000.qcom,mdss_mdp/drm/card1/card1-HDMI-A-1
lrwxrwxrwx 1 root root 0 Dec 31 1969 controlD64 -> ../../devices/platform/soc/900000.qcom,mdss_mdp/drm/controlD64
lrwxrwxrwx 1 root root 0 Dec 31 1969 renderD128 -> ../../devices/platform/vgem/drm/renderD128
lrwxrwxrwx 1 root root 0 Dec 31 1969 renderD129 -> ../../devices/platform/soc/900000.qcom,mdss_mdp/drm/renderD129
lrwxrwxrwx 1 root root 0 Dec 31 1969 ttm -> ../../devices/virtual/drm/ttm
-r--r--r-- 1 root root 4096 Dec 31 1969 version
1. With Chromium browser, I get this error:
[4971:4990:0422/143205:ERROR:drm_device_manager.cc(53)] Could not initialize DRM device for /sys/devices/platform/vgem/drm/card0
I figured that devices that cannot perform modesetting (like vgem) are ignored in ozone/platform/drm. So, the call doesn't even reach minigbm for vgem device.
2. With null_platform_test, I get below error: (I put some extra logs in minigbm/gbm.c)
localhost ~ # null_platform_test /dev/dri/card0
minigbm: gbm_create_device
minigbm: gbm_get_driver
minigbm: drm_version->name=vgem
minigbm: NOT FOUND drm_version->name=vgem
minigbm: gbm_get_driver failed
ERROR:main():null_platform_test.c:81:failed to create gbm
It tries to find a gbm driver with name "vgem" and fails, as there is no such driver in the driver_list.
https://chromium.googlesource.com/chromiumos/platform/minigbm/+/master/gbm.c#53
3. I built an image with arm64-llvmpipe public overlay, and tried to boot it with my kernel. But it produces the same result with chromium browser as well as null_platform_test.
What next?
1. May be something is missing in my kernel (although this seems less likely to me)
2. I bumped upon this code which suggests that software rendering is not supported with GBM platform. Not sure if it's about the same thing.
3. Does software rendering with ozone-gbm platform really work?
This patch suggests that it should work with vgem+swrast, which is what I am trying.
https://codereview.chromium.org/1345703002
May be any other configurations are required?
4. I got a references to ozone-dri platform, which supposedly supports software rendering. But I couldn't find the corresponding code. Has it been removed?
https://software.intel.com/en-us/blogs/2014/10/23/chromium-ozone-gbm-explained
Devs, could someone help me get on the right track?
Sorry for being ambiguous earlier. I probably forgot to mention that my GPU driver is not ready yet, and will take some more time. Meanwhile, I want to run the rest of my system with software rendering.Vincent, I take your word. For you, arm64-llvmpipe works as-is probably because you have an actual GPU driver,
which is not the case with me.Stephane, my DRM/KMS display driver is functional and I am able to run modetest successfully. As mentioned earlier, I am able to see the boot-splash screen as well.
Given my peculiar situation, could you guys help me figure out the requirements to enable software rendering?
Does ozone-gbm platform support this scenario?
If yes, is minigbm implementation still required? If yes, for which device and what purpose?
What about vgem/swrast?Is there any other platform like ozone-dri or something else, which I should try?
PS: I also tried --disable-gpu flag, but it seems it's not supported on CrOS.