Android i.mx6 drm_hwcomposer
Hi,
I'm trying to get Android graphics working on i.MX6 using upstream versions:
Kernel 4.14
Mesa: mesa-17.3.0-rc2
Libdrm: libdrm-2.4.88
drm_hwcomposer (git head)
gbm_gralloc (git head from git://github.com/robherring)
I want to run on Android 5, which only has HWC1, the code for that is still in drm_hwcomposer but is not built anymore. So I added that back and fixed up a few minor build errors.
The first problem I ran into was
E/GRALLOC-GBM( 437): failed to create BO, size=1024x600, fmt=2,
usage=5
W/GraphicBufferAllocator( 437): alloc(1024, 600, 2, 00001a00, ...) failed -13 (Permission denied)
This was due to an GBM attempting to issue DRM_IOCTL_MODE_CREATE_DUMB on a render node.
Setting gralloc.gbm.device /dev/dri/card1 (the imx-drm node) instead of the default /dev/dri/renderD128 fixed that but then HWC couldn't become master on the DRI node to issue KMS commands since gralloc had already opened the device.
Adding a patch similar to:
commit 4f4cb902517f5caacea075fb9724e4ce0c435e3d
Author: Robert Foss <[email protected]> Date: Wed May 17 18:08:14 2017 -0400
drm_hwcomposer: Get KMS FD from gbm_gralloc
To make drm_hwc and gbm_gralloc use the same FD fixed that.
But the problem I now have that when HWC tries to import the first client buffers (from bootanimation) there are errors like:
01-01 17:27:02.282 443 443 E hwc-platform-drm-generic: failed to import prime fd 25 ret=-1
This is because the imx-drm kernel driver wants physically contiguous buffers for import (it uses drm_gem_cma_prime_import_sg_table()) but the buffer allocated by drm etnaviv isn't contiguous...
Not sure what to do about that one.
Any help appreciated.
Martin
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hey Martin,
Quoted 64 lines · Martin Fuzzey
Hi,
I'm trying to get Android graphics working on i.MX6 using upstream versions:
Kernel 4.14
Mesa: mesa-17.3.0-rc2
Libdrm: libdrm-2.4.88
drm_hwcomposer(git head)
gbm_gralloc(git head fromgit://github.com/robherring)I want to run on Android 5, which only has HWC1, the code for that is
still indrm_hwcomposerbut is not built anymore.
So I added that back and fixed up a few minor build errors.The first problem I ran into was
E/GRALLOC-GBM( 437): failed to create BO, size=1024x600, fmt=2, usage=5 W/GraphicBufferAllocator( 437): alloc(1024, 600, 2, 00001a00,...)
failed -13 (Permission denied)This was due to an GBM attempting to issue
DRM_IOCTL_MODE_CREATE_DUMBon
a render node.Setting gralloc.gbm.device
/dev/dri/card1(the imx-drm node) instead of
the default/dev/dri/renderD128fixed that but then HWC couldn't become
master on the DRI node to issue KMS commands since gralloc had already
opened the device.Adding a patch similar to:
commit
4f4cb902517f5caacea075fb9724e4ce0c435e3dAuthor: Robert Foss <[email protected]> Date: Wed May 17 18:08:14 2017 -0400
drm_hwcomposer: Get KMS FD fromgbm_grallocTo make
drm_hwcandgbm_grallocuse the same FD fixed that.But the problem I now have that when HWC tries to import the first client buffers (from bootanimation) there are errors like:
01-01 17:27:02.282 443 443 E hwc-platform-drm-generic: failed to
import prime fd 25 ret=-1This is because the imx-drm kernel driver wants physically contiguous
buffers for import (it usesdrm_gem_cma_prime_import_sg_table()) but the
buffer allocated by drm etnaviv isn't contiguous...
Quoted 6 lines
Not sure what to do about that one.
Any help appreciated.
Martin
Remarkably this is an issue have not encountered. I would suggest poking the fine folks on the etnaviv ML, like Lucas/Wladimir/Christian.
Rob.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel