[v2,5/6] drm/fb-helper: Schedule deferred-I/O worker after writing to framebuffer

Marek Szyprowski m.szyprowski at samsung.com
Mon Dec 5 06:10:42 PST 2022


On 17.11.2022 18:21, Marek Szyprowski wrote:
> On 17.11.2022 17:07, Thomas Zimmermann wrote:
>> Am 17.11.22 um 13:57 schrieb Marek Szyprowski:
>>> On 15.11.2022 12:58, Thomas Zimmermann wrote:
>>>> Schedule the deferred-I/O worker instead of the damage worker after
>>>> writing to the fbdev framebuffer. The deferred-I/O worker then 
>>>> performs
>>>> the dirty-fb update. The fbdev emulation will initialize deferred I/O
>>>> for all drivers that require damage updates. It is therefore a valid
>>>> assumption that the deferred-I/O worker is present.
>>>>
>>>> It would be possible to perform the damage handling directly from 
>>>> within
>>>> the write operation. But doing this could increase the overhead of the
>>>> write or interfere with a concurrently scheduled deferred-I/O worker.
>>>> Instead, scheduling the deferred-I/O worker with its regular delay of
>>>> 50 ms removes load off the write operation and allows the deferred-I/O
>>>> worker to handle multiple write operations that arrived during the 
>>>> delay
>>>> time window.
>>>>
>>>> v2:
>>>>     * keep drm_fb_helper_damage() (Daniel)
>>>>     * use fb_deferred_io_schedule_flush() (Daniel)
>>>>     * clarify comments (Daniel)
>>>>
>>>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>>>> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
>>>
>>> This patch, merged into today's linux-next as commit 7f5cc4a3e5e4
>>> ("drm/fb-helper: Schedule deferred-I/O worker after writing to
>>> framebuffer"), triggers a following warning on Raspberry Pi 3 & 4 as
>>> well as all Amlogic Meson G12A/B based boards:
>>>
>>> ------------[ cut here ]------------
>>> WARNING: CPU: 0 PID: 220 at drivers/video/fbdev/core/fb_defio.c:340
>>
>> Thank you so much for reporting. That line should never be executed 
>> with vc4 et al.
>>
>> If you have the time, could you please try the attached patch and 
>> report the results. Thanks a lot.
>
> This fixes the issue observed on my Raspberry Pi 3/4 and Amlogic Meson 
> based boards. Feel free to add:
>
> Tested-by: Marek Szyprowski <m.szyprowski at samsung.com>

Gentle ping. This issue is not fixed in linux-next.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland




More information about the linux-amlogic mailing list