WIP: IPU and HDMI drivers for i.MX6

Svatopluk Kraus onwahe at gmail.com
Tue Jul 21 10:09:43 UTC 2015


On Tue, Jul 21, 2015 at 10:04 AM, Mikaël Urankar
<mikael.urankar at gmail.com> wrote:
> 2015-07-20 22:43 GMT+02:00 Oleksandr Tymoshenko <gonzo at bluezbox.com>:
>> Looks like i4pro has two IPU enabled and my code does not handle
>> this case well yet. New patch has hack that make sure only IPU1 is attached.
>>
>> https://people.freebsd.org/~gonzo/arm/patches/imx6-ipu-hdmi-20150720.diff
>
> It works now:
> http://mikael.urankar.free.fr/FreeBSD/cubox_hdmi_20150720.txt
>
> I have these warnings in the console when I shutdown X:
> WARNING: A device driver has set "memattr" inconsistently


When I played with gonzo's BBB wip patches some time ago, I got same
messages. My proof-of-concept hack was to return correct memory
attribute of frame buffer (it was VM_MEMATTR_UNCACHEABLE) thru
argument passed to fb_mmap() in sys/dev/fb/fbd.c file.

--- a/sys/dev/fb/fbd.c
+++ b/sys/dev/fb/fbd.c
@@ -173,6 +173,8 @@ fb_mmap(struct cdev *dev, vm_ooffset_t offset,
vm_paddr_t *paddr, int nprot,
        if (info->fb_flags & FB_FLAG_NOMMAP)
                return (ENODEV);

+*memattr = VM_MEMATTR_UNCACHEABLE;
+
        if (offset >= 0 && offset < info->fb_size) {
                if (info->fb_pbase == 0)
                        *paddr = vtophys((uint8_t *)info->fb_vbase + offset);


Svata


More information about the freebsd-arm mailing list