Date: Sun, 30 Mar 2014 14:42:53 +0000 (UTC) From: Ruslan Bukin <br@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263934 - head/sys/arm/samsung/exynos Message-ID: <201403301442.s2UEgrGK018883@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: br Date: Sun Mar 30 14:42:53 2014 New Revision: 263934 URL: http://svnweb.freebsd.org/changeset/base/263934 Log: Directly call kmem_alloc_contig to allocate framebuffer memory and pass VM_MEMATTR_UNCACHEABLE (no-cache, no-buffer). This fixes screen refreshing problem when data is updated too slowly. Discussed with: ian Modified: head/sys/arm/samsung/exynos/exynos5_fimd.c Modified: head/sys/arm/samsung/exynos/exynos5_fimd.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_fimd.c Sun Mar 30 14:25:14 2014 (r263933) +++ head/sys/arm/samsung/exynos/exynos5_fimd.c Sun Mar 30 14:42:53 2014 (r263934) @@ -47,6 +47,10 @@ __FBSDID("$FreeBSD$"); #include <sys/eventhandler.h> #include <sys/gpio.h> +#include <vm/vm.h> +#include <vm/vm_extern.h> +#include <vm/vm_kern.h> + #include <dev/fdt/fdt_common.h> #include <dev/ofw/openfirm.h> #include <dev/ofw/ofw_bus.h> @@ -351,8 +355,8 @@ fimd_attach(device_t dev) sc->sc_info.fb_stride = sc->sc_info.fb_width * 2; sc->sc_info.fb_bpp = sc->sc_info.fb_depth = 16; sc->sc_info.fb_size = sc->sc_info.fb_height * sc->sc_info.fb_stride; - sc->sc_info.fb_vbase = (intptr_t)contigmalloc(sc->sc_info.fb_size, - M_DEVBUF, M_ZERO, 0, ~0, PAGE_SIZE, 0); + sc->sc_info.fb_vbase = (intptr_t)kmem_alloc_contig(kernel_arena, + sc->sc_info.fb_size, M_ZERO, 0, ~0, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); sc->sc_info.fb_pbase = (intptr_t)vtophys(sc->sc_info.fb_vbase); #if 0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403301442.s2UEgrGK018883>