Vivante meets devicetree

It took me some time to rework the device tree bindings but it looks like it starts to work! View the code on [Gist](https://gist.github.com/austriancoder/6196fa33011a120a01dd54dbd077a60d).Gets loaded into : [ 3.358155] vivante: module is from the staging directory, the quality is unknown, you have been warned. [ 3.373087] imx-sgtl5000 sound.15: sgtl5000 2028000.ssi mapping ok [ 3.379150] [drm] add child gpu2d [ 3.379154] [drm] add child gpu3d [ 3.380395] vivante-gpu 134000.gpu2d: pre gpu[idx]: 0x00000000 [ 3.380401] vivante-gpu 134000.gpu2d: adding core @idx 1 [ 3.380408] vivante-gpu 134000.gpu2d: post gpu[idx]: 0xecb56c10 [ 3.380460] vivante gpu-subsystem.11: bound 134000.gpu2d (ops gpu_ops [vivante]) [ 3.380467] vivante-gpu 130000.gpu3d: pre gpu[idx]: 0x00000000 [ 3.380473] vivante-gpu 130000.gpu3d: adding core @idx 0 [ 3.380479] vivante-gpu 130000.gpu3d: post gpu[idx]: 0xecb57210 [ 3.380502] vivante gpu-subsystem.11: bound 130000.gpu3d (ops gpu_ops [vivante]) [ 3.380533] IO:R f0200018 14010000 [ 3.380537] IO:R f0200020 00002000 [ 3.380540] IO:R f0200024 00005108 [ 3.380546] vivante gpu-subsystem.11: model: 2000 [ 3.380551] vivante gpu-subsystem.11: revision: 5108 [ 3.380554] IO:R f020001c e0296cad [ 3.380558] IO:R f0200034 c9799eff [ 3.380561] IO:R f0200074 2efbf2d9 [ 3.380564] IO:R f0200084 00000000 [ 3.380567] IO:R f0200088 00000000 [ 3.380572] vivante gpu-subsystem.11: minor_features: c9799eff [ 3.380578] vivante gpu-subsystem.11: minor_features1: 2efbf2d9 [ 3.380583] vivante gpu-subsystem.11: minor_features2: 0 [ 3.380588] vivante gpu-subsystem.11: minor_features3: 0 [ 3.380592] IO:R f0200000 00070100 [ 3.408629] IO:R f0200004 7fffffff [ 3.408632] IO:R f0200000 00070100 [ 3.412940] vivante gpu-subsystem.11: 130000.gpu3d: using IOMMU [ 3.413080] IO:R f01f8018 14010000 [ 3.413083] IO:R f01f8020 00000320 [ 3.413087] IO:R f01f8024 00005007 [ 3.413093] vivante gpu-subsystem.11: model: 320 [ 3.413098] vivante gpu-subsystem.11: revision: 5007 [ 3.413101] IO:R f01f801c e02c7eca [ 3.413105] IO:R f01f8034 c1399eff [ 3.413108] IO:R f01f8074 020fb2db [ 3.413111] IO:R f01f8084 00000000 [ 3.413114] IO:R f01f8088 00000000 [ 3.413120] vivante gpu-subsystem.11: minor_features: c1399eff [ 3.413126] vivante gpu-subsystem.11: minor_features1: 20fb2db [ 3.413131] vivante gpu-subsystem.11: minor_features2: 0 [ 3.413136] vivante gpu-subsystem.11: minor_features3: 0 [ 3.413139] IO:R f01f8000 00070100 [ 3.438615] IO:R f01f8004 7fffffff [ 3.438619] IO:R f01f8000 00070100 [ 3.442583] vivante gpu-subsystem.11: 134000.gpu2d: using IOMMU [ 3.442681] [drm] Initialized vivante 1.0.0 20130625 on minor 1

May 24, 2014 · 2 min · Christian Gmeiner

Vivante MMU v1

I did spend quite some time the last days to figure out how the MMU v1 could work and what all the code in the v4 Kernel sources does. It took quite some time and a little hint from Russel to finally understand it. So lets start with the technical details. The MMU uses a page table with a maximum size of 256KB. Where each Page Table Entry (PTE) is 4 byte long. The used page size is 4K and can not be changed via some registers etc. Lets have a look at the bit layout of a PTE. ...

May 3, 2014 · 1 min · Christian Gmeiner

GC2000 support for etnaviv

Today I hit an important milestone for etnaviv – an open source user-space driver for the Vivante GCxxx series of embedded GPUs. I finally got GC2000 support to a level that it seems to work. It took me some months to get there. At the beginning it sounds easy to rebuild a ‘driver’ if you get readable command buffer dumps. I did start with working on a simple replay program to render a cube in the same was as the binary blob does it. But what should I say… it is quite boring to do everything by hand and not taking advantage of libetnaviv and the ‘driver’ at all. So I decided to go the hard way and try to fix/add all missing bits until it renders something. The good thing is that I have now some knowledge about the structure of libetnaviv, the dirver and mesa in general. It helps a lot if you know why stuff is done that way. ...

February 9, 2014 · 2 min · Christian Gmeiner