# Re: \[PATCHv4 02/10\] fbdev: ssd1307fb: Allocate page aligned video memory.

- From: Maxime Ripard \<hidden\>
- Date: 2015-03-18 19:20:54 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2015/03/4454101
- Thread: https://ratatoskr.run/linux-fbdev/2015/02/4427371/t/2.md

```text
On Mon, Mar 16, 2015 at 06:11:50PM +0100, Thomas Niederprüm wrote:
> Currently the videomemory is allocated by kmalloc, making it a memory
> region that is not necessarily page aligend. This leads to problems
> upon mmap call, where the video memory's address gets aligned to the
> next page boundary. The result is that the userspace program that issued
> the mmap call is not able to access the video memory from the start to
> the next page boundary.
> 
> This patch changes the allocation of the video memory to use
> __get_free_pages() in order to obtain memory that is aligned
> to page boundaries.
> 
> Signed-off-by: Thomas Niederprüm <redacted>

Acked-by: Maxime Ripard <redacted>

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-fbdev/2015/03/4454101/attachment/0) (application/pgp-signature, 819 bytes)
