MCPcopy Create free account
hub / github.com/F-Stack/f-stack / a10fb_allocfb

Function a10fb_allocfb

freebsd/arm/allwinner/a10_fb.c:178–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176#define TCON_WRITE(sc, reg, val) bus_write_4((sc)->res[1], (reg), (val))
177
178static int
179a10fb_allocfb(struct a10fb_softc *sc)
180{
181 sc->vaddr = kmem_alloc_contig(sc->fbsize, M_NOWAIT | M_ZERO, 0, ~0,
182 FB_ALIGN, 0, VM_MEMATTR_WRITE_COMBINING);
183 if (sc->vaddr == 0) {
184 device_printf(sc->dev, "failed to allocate FB memory\n");
185 return (ENOMEM);
186 }
187 sc->paddr = pmap_kextract(sc->vaddr);
188
189 return (0);
190}
191
192static void
193a10fb_freefb(struct a10fb_softc *sc)

Callers 1

a10fb_configureFunction · 0.85

Calls 3

device_printfFunction · 0.85
kmem_alloc_contigFunction · 0.50
pmap_kextractFunction · 0.50

Tested by

no test coverage detected