[RFC v2 1/8] drm/fb-helper: Add fb_deferred_io support

Dave Airlie airlied at gmail.com
Wed Apr 20 22:29:15 UTC 2016


On 19 April 2016 at 01:15, Noralf Trønnes <noralf at tronnes.org> wrote:
>
> Den 13.04.2016 13:09, skrev Daniel Vetter:
>>
>> On Fri, Apr 08, 2016 at 07:05:03PM +0200, Noralf Trønnes wrote:
>>>
>>> This adds deferred io support if CONFIG_FB_DEFERRED_IO is enabled.
>>> Accumulated fbdev framebuffer changes are signaled using the callback
>>> (struct drm_framebuffer_funcs *)->dirty()
>>>
>>> The drm_fb_helper_sys_*() functions will accumulate changes and
>>> schedule fb_info.deferred_work _if_ fb_info.fbdefio is set.
>>> This worker is used by the deferred io mmap code to signal that it
>>> has been collecting page faults. The page faults and/or other changes
>>> are then merged into a drm_clip_rect and passed to the framebuffer
>>> dirty() function.
>>>
>>> The driver is responsible for setting up the fb_info.fbdefio structure
>>> and calling fb_deferred_io_init() using the provided callback:
>>> (struct fb_info *)->fbdefio->deferred_io = drm_fb_helper_deferred_io;
>>>
>>> Signed-off-by: Noralf Trønnes <noralf at tronnes.org>
>>
>> For this one it'd be awesome to throw patches for qxl/udl on top to remove
>> their own hand-rolled implementations. Just to maximize the testing
>> coverage of this new code. Should be doable to set up a qxl virtual
>> machine quickly, but even without that we should be able to pull it in
>> (since it's mostly just about removing code from these two drivers).
>
>
> There are three fb_deferred_io users in drivers/gpu/drm: qxl, udl and
> vmwgfx.

So I'm a bit confused. For me fb defio is a thing which userspace users,
without an ioctl.

So we keep track in the kernel of dirty pages in the fb and then flush those
pages. Now the thing is that last time I tried this it interacted badly with
gem/ttm as defio wanted to do something to the same pages etc.

So I disabled it in udl for that reasons.

if we are talking about just having some damage tracking and not doing
the page level tracking then ignore me.

Dave.


More information about the dri-devel mailing list