Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jul 2015 12:09:42 +0200
From:      Svatopluk Kraus <onwahe@gmail.com>
To:        =?UTF-8?Q?Mika=C3=ABl_Urankar?= <mikael.urankar@gmail.com>
Cc:        Oleksandr Tymoshenko <gonzo@bluezbox.com>,  "freebsd-arm@freebsd.org List" <freebsd-arm@freebsd.org>
Subject:   Re: WIP: IPU and HDMI drivers for i.MX6
Message-ID:  <CAFHCsPXApDmOiFxEpNztJkCWegb7P1k79eXeKu3iGqVZpVdKEg@mail.gmail.com>
In-Reply-To: <CAJwjRmT%2BjbkYT43Wo9=MPWD7qK-vGLW3XzROhR2Sdr7JpcG9SA@mail.gmail.com>
References:  <5569347D-EA8B-46C9-97D3-6BF7CC1952B8@bluezbox.com> <CAJwjRmQFJn89UtLdzgJ28Ys9M-FbqOgVfVnFSJmRgtrVykfK%2Bw@mail.gmail.com> <14BBEBB2-E77E-45BC-89C1-1BE59D0871E6@bluezbox.com> <CAJwjRmT%2BjbkYT43Wo9=MPWD7qK-vGLW3XzROhR2Sdr7JpcG9SA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 21, 2015 at 10:04 AM, Mika=C3=ABl Urankar
<mikael.urankar@gmail.com> wrote:
> 2015-07-20 22:43 GMT+02:00 Oleksandr Tymoshenko <gonzo@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 attac=
hed.
>>
>> https://people.freebsd.org/~gonzo/arm/patches/imx6-ipu-hdmi-20150720.dif=
f
>
> 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 =3D VM_MEMATTR_UNCACHEABLE;
+
        if (offset >=3D 0 && offset < info->fb_size) {
                if (info->fb_pbase =3D=3D 0)
                        *paddr =3D vtophys((uint8_t *)info->fb_vbase + offs=
et);


Svata



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFHCsPXApDmOiFxEpNztJkCWegb7P1k79eXeKu3iGqVZpVdKEg>