[PATCH] fbcon: use kvmalloc() for scrollback buffer

Bartlomiej Zolnierkiewicz b.zolnierkie at samsung.com
Fri Feb 8 17:02:17 UTC 2019


On 12/21/2018 11:58 AM, Konstantin Khorenko wrote:
> Hi Bartlomiej,
> 
> On 12/20/2018 07:21 PM, Bartlomiej Zolnierkiewicz wrote:
>> On 11/26/2018 11:02 AM, Konstantin Khorenko wrote:
>>> Scrollback frame buffer is rather big - 32K,
>>> so it requires 3rd order page, so let's use kvmalloc() instead of
>>> ordinary kmalloc() for it.
>>
>> Is it actually safe to use non-contiguous memory for softback_buf?
> 
> Well, that's why we need a review. :)

:)

> i've asked myself same question while fixing this,
> i've dig sources a bit and did not find places when softback_buf is provided for DMA,
> all other places seems to work with virtual addresses, so there should be no problem.
> 
> Even more i saw a function which mentions that softback might be non-contigious:
> 
> /* As we might be inside of softback, we may work with non-contiguous buffer,
>     that's why we have to use a separate routine. */
> static void fbcon_invert_region(struct vc_data *vc, u16 * p, int cnt)
> 
> So i think it's safe to use kvmalloc() here.

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


More information about the dri-devel mailing list