Android i.mx6 drm_hwcomposer
Martin Fuzzey
mfuzzey at parkeon.com
Fri Nov 17 14:27:07 UTC 2017
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 <robert.foss at collabora.com>
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
More information about the dri-devel
mailing list