Fwd: Addition to https://www.kernel.org/doc/Documentation/fb/deferred_io.txt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--------- Forwarded message ----------
From: Conor O <falling174fps@xxxxxxxxx>
Date: Tue, Mar 11, 2014 at 4:36 PM
Subject: Addition to https://www.kernel.org/doc/Documentation/fb/deferred_io.txt
To: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>


Dear Geert,

Having run into this problem myself
(http://stackoverflow.com/questions/22285151/kernel-panic-using-deferred-io-on-kmalloced-buffer)
I'd like to suggest an addendum to the deferred_io.txt document to
note the difference in treatment between a framebuffer allocated with
vmalloc and one allocated with, say, kmalloc. I've pasted in the diff
below.

Thanks,

Conor O'Rourke.

$ diff deferred_io.txt deferred_io_changes.txt
75a76,89
>
> 5. Bear in mind the following:
>
>   - deferred_io changes info->fp_ops->fb_mmap to its own function that
>     sets up fault handlers etc. In the fault handler it checks bounds
>     against info->fix.smem_len
>
>   - when it gets the page written, it checks the address in info->screen_base
>     to see if that address is one from vmalloc. If so it uses that address
>     as the one to get the page number. If not, the assumption is that the
>     address of interest is the physical framebuffer address stored in
>     info->fix.smem_start. You can get an physical address from, say, a
>     kmalloced pointer by using virt_to_phys().
>
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux