Page MenuHomeFreeBSD

Allow framebuffer driver control memory mapping type for mmap(2) call

Authored by gonzo on Sep 29 2016, 2:31 AM.



At the moment framebuffer driver does not have control over
mapping type for mmap(2). So when on ARM userland app mmaps
/dev/fb0 it gets default mapping which is write-back. So most of
the changes to fb region show up seconds later when respective
cache lines are evicted.

Proposed patch adds one more flag to fb_flags field that indicates
whether hardware driver need special type of mapping and adds one
more field with actual mapping type. bcm2835_fbd.c was used as an
example of the driver that requests VM_MEMATTR_WRITE_COMBINING.

Another possibility - always use VM_MEMATTR_WRITE_COMBINING, but
make sure that all platforms have it defined.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gonzo retitled this revision from to Allow framebuffer driver control memory mapping type for mmap(2) call.
gonzo updated this object.
gonzo edited the test plan for this revision. (Show Details)
gonzo added reviewers: ray, dumbbell, emaste.
ray edited edge metadata.

Cool! Thank you Oleksandr!

This revision is now accepted and ready to land.Sep 29 2016, 6:45 AM
This revision was automatically updated to reflect the committed changes.