etnaviv: *ERROR* relocation N outside object in kernel log
Wladimir J. van der Laan
laanwj at gmail.com
Tue Jul 25 08:45:26 UTC 2017
On Tue, Jul 25, 2017 at 09:47:32AM +0200, Wladimir J. van der Laan wrote:
> Lucas,
>
> > My guess would be some stale relocation again, possibly with only a
> > stale offset or something. But that's hard to track down.
>
> I added some further debugging and it looks like the relocation points to
> offset 000ffffc of a 00100000-sized bo.
>
> Haven't found out which state this is for yet, but is there any specific reason
> this would not be allowed, or is the check off-by-one here?
>
> As a reminder, the code is:
>
> if (r->reloc_offset >= bo->obj->base.size - sizeof(*ptr)) {
> error...
> }
I've checked the state: it is 00694, so a vertex stream base address.
This is the annotated command buffer around where it happens:
[ 208.130431] 058e 0801019d SET_STATE 1 at 00674
[ 208.133148] 058f 00000000
[ 208.135864] 0590 080601a1 SET_STATE 6 at 00684 (FE.VERTEX_STREAMS.BASE_ADDR)
[ 208.138580] 0591 883dd00c
[ 208.141318] 0592 884ddff4
[ 208.144036] 0593 883dd014
[ 208.146751] 0594 884ddff8
[ 208.149489] 0595* 00000000 (warning: relocation to offset 000ffffc of size 00100000 of some bo)
[ 208.152206] 0596 00000000
[ 208.154922] 0597 deadbeef
[ 208.157638] 0598 080601a9 SET_STATE 6 at 006a4 (FE.VERTEX_STREAMS.CONTROL)
[ 208.160377] 0599 00000024
[ 208.163094] 059a 00000000
[ 208.165811] 059b 00000024
[ 208.168528] 059c 00000000
[ 208.171267] 059d 00000000 (associated stride=0)
[ 208.173985] 059e 00000000
[ 208.176701] 059f deadbeef
[ 208.179440] 05a0 08010e02 SET_STATE 1 at 03808 (stall token)
[ 208.182159] 05a1 00000701
[ 208.184876] 05a2 48000000 STALL
[ 208.187591] 05a3 00000701
[ 208.190330] 05a4 0803140c SET_STATE 3 at 05030 (vs uniforms)
[ 208.193049] 05a5 c3c5b342
[ 208.195766] 05a6 43e09672
[ 208.198481] 05a7 41a903ec
[ 208.201219] 05a8 08081418 SET_STATE 8 at 05060 (vs uniforms)
[ 208.203936] 05a9 bf7ff14b
[ 208.206654] 05aa 3ae7a09a
[ 208.209369] 05ab bcaddd5e
[ 208.212111] 05ac bcad52a0
[ 208.214828] 05ad 3cad8f20
[ 208.217543] 05ae 3daac96f
[ 208.220281] 05af bf803265
[ 208.222999] 05b0 bf7f9832
[ 208.225715] 05b1 deadbeef
[ 208.228431] 05b2 08031425 SET_STATE 3 at 05094 (vs uniforms)
[ 208.231170] 05b3 c28d0830
[ 208.233887] 05b4 43d82db2
[ 208.236603] 05b5 43db7f98
[ 208.239318] 05b6 30000000 DRAW_INDEXED_PRIMITIVES
[ 208.242056] 05b7 00000004 COMMAND TYPE=TRIANGLES
[ 208.244773] 05b8 00000000 START
[ 208.247489] 05b9 0000004e COUNT
[ 208.250227] 05ba 00000000 OFFSET
[ 208.252944] 05bb 00000000
Vertex stream 5 points to the last four bytes of a buffer, and a draw of 0x4e
triangles is being done, so on first sight it seems wrong.
However, the stream has a stride of 0, so the same value will be reused for
every vertex. I checked the vertex elements config, and it appears to be
loading a single float.
So I suspect the check is a false positive.
Regards,
Wladimir
More information about the etnaviv
mailing list