From: Robert Foss Subject: Re: Android i.mx6 drm_hwcomposer Date: Fri, 17 Nov 2017 16:06:26 +0100 Message-ID: <1510931186.2262.5.camel@collabora.com> References: <8456d2f7-5b97-a2c2-9cf6-ec844e8466ff@parkeon.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1681940966==" Return-path: Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 104196E1F6 for ; Fri, 17 Nov 2017 15:06:30 +0000 (UTC) In-Reply-To: <8456d2f7-5b97-a2c2-9cf6-ec844e8466ff@parkeon.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Martin Fuzzey , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1681940966== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-jsj6GL25MbjvsGn+BX7a" --=-jsj6GL25MbjvsGn+BX7a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey Martin, On Fri, 2017-11-17 at 15:27 +0100, Martin Fuzzey wrote: > Hi, >=20 > I'm trying to get Android graphics working on i.MX6 using upstream=20 > versions: >=20 > Kernel 4.14 >=20 > Mesa: mesa-17.3.0-rc2 >=20 > Libdrm: libdrm-2.4.88 >=20 > drm_hwcomposer (git head) >=20 > gbm_gralloc (git head from git://github.com/robherring) >=20 >=20 > I want to run on Android 5, which only has HWC1, the code for that > is=20 > still in drm_hwcomposer but is not built anymore. > So I added that back and fixed up a few minor build errors. >=20 > The first problem I ran into was > E/GRALLOC-GBM( 437): failed to create BO, size=3D1024x600, > fmt=3D2,=20 > usage=3D5 > W/GraphicBufferAllocator( 437): alloc(1024, 600, 2, 00001a00, > ...)=20 > failed -13 (Permission denied) >=20 > This was due to an GBM attempting to issue DRM_IOCTL_MODE_CREATE_DUMB > on=20 > a render node. >=20 > Setting gralloc.gbm.device /dev/dri/card1 (the imx-drm node) instead > of=20 > the default /dev/dri/renderD128 fixed that but then HWC couldn't > become=20 > master on the DRI node to issue KMS commands since gralloc had > already=20 > opened the device. >=20 > Adding a patch similar to: >=20 > commit 4f4cb902517f5caacea075fb9724e4ce0c435e3d > Author: Robert Foss > Date: Wed May 17 18:08:14 2017 -0400 >=20 > drm_hwcomposer: Get KMS FD from gbm_gralloc >=20 > To make drm_hwc and gbm_gralloc use the same FD fixed that. >=20 >=20 > But the problem I now have that when HWC tries to import the first=20 > client buffers (from bootanimation) there are errors like: >=20 > 01-01 17:27:02.282 443 443 E hwc-platform-drm-generic: failed to=20 > import prime fd 25 ret=3D-1 >=20 > This is because the imx-drm kernel driver wants physically > contiguous=20 > buffers for import (it uses drm_gem_cma_prime_import_sg_table()) but > the=20 > buffer allocated by drm etnaviv isn't contiguous... >=20 > Not sure what to do about that one. >=20 > Any help appreciated. >=20 > Martin >=20 Remarkably this is an issue have not encountered. I would suggest poking the fine folks on the etnaviv ML, like Lucas/Wladimir/Christian. Rob. --=-jsj6GL25MbjvsGn+BX7a Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJaDvryAAoJELeaC2oR7vcnF1YP/1Jn6Q/8li/vIOorP6Gw2uyB nhY+j6QPRdTeL3VW56lqP0ho5O5IaY6dnLtXb5ddTrvq0cJMC5VDsOcREVTGKuzL Ey6fgcDulMsjGDxijSLK/f8xYYqW8j42SKrLfz8b4vjo+LDkttFAfE82YZbc6h56 Jant6cjbD01xAodask083xFfKYo/7JzsQe3ffzLdzhWRuM1q5kbLQI4zEjs8WX4r TxxYPSLExom/GCnWmh+jhhqQp1tN0jkVOwdd8kSbtQXw/Ak9rhze7/tpoflCsisH /l5OCBJ07+/hJN18pppE7+5VRkHYkuqaJYeS8EogInV2vwGyXfUtYc2whjPKWJ3j raMSgq9UKWqb0MNW2Kya3a09OojkDpbFyW9YOHOadvKBFWPEb92WmIPF8EQ3Tfyq jvKsosMaN+5D/vYsJoFfCftgYMkAv94c+sia6cCBovqya8D5OEqb1zWaFmcu5Mo5 CLQfMdNEtRA7WFvG8dtFX3mWjOxGF+2TBQlNKdc+cXGr+F1QHSrvfGj4z8G7R00k fxMzm4zx8PCPlcgSBvxAhl0ccIcIZ3SFgm3RLs7NNQVC7mts+x5AJGpbuv/mkhBM JzXPm24kf7ci9OC1YaHGSKjVbqbmBhiFV0MxLJC4hTezWFXFO7e40at17yGDNNfu eVUltYqS2ENjDs9A1dM+ =OlCQ -----END PGP SIGNATURE----- --=-jsj6GL25MbjvsGn+BX7a-- --===============1681940966== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1681940966==--