Android i.mx6 drm_hwcomposer
Robert Foss
robert.foss at collabora.com
Fri Nov 17 15:06:26 UTC 2017
Hey Martin,
On Fri, 2017-11-17 at 15:27 +0100, Martin Fuzzey wrote:
> 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
>
Remarkably this is an issue have not encountered. I would suggest
poking the fine folks on the etnaviv ML, like Lucas/Wladimir/Christian.
Rob.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171117/37c760c4/attachment-0001.sig>
More information about the dri-devel
mailing list