lkml.org 
[lkml]   [2018]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/8] drm/virtio: move virtio_gpu_object_{attach, detach} calls.
On Thu, Oct 18, 2018 at 11:41:52AM +1000, Dave Airlie wrote:
> On Mon, 1 Oct 2018 at 20:33, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > Remove the virtio_gpu_object_{attach,detach} calls from move_notify()
> > callback. Add them to the ttm_tt_{populate,unpopulate} callbacks, which
> > is the correct place to handle this.
> >
> > The new ttm_tt_{populate,unpopulate} callbacks call the
> > ttm_pool_populate()/unpopulate() functions (which are the default
> > implementation in case the callbacks not present) for the actual ttm
> > work. Additionally virtio_gpu_object_{attach,detach} is called to
> > update the state on the host.
>
> This to me feels more like a bind/unbind operation rather than a
> populate/unpopulate operation,
>
> bind is " Bind the backend pages into the aperture in the location"
>
> whereas populate is
>
> allocate pages for a ttm.

I ran into that trap too ;)

My first attempt was to map this to bind/unbind. But this is not
correct and therefore didn't work very well.

virtio_gpu_object_attach() will send a scatter list of the pages
allocated for the object to the host (so the host knows where to
copy from/to when processing the transfer_from/to calls). So IMO
it should be done on population not when binding.

cheers,
Gerd

\
 
 \ /
  Last update: 2018-10-18 08:11    [W:0.058 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site