Re: Why we didn't use embedded gem object for virtio gpu when making ttm bo a gem bo subclass?

2021-08-15 Thread Gerd Hoffmann
On Sun, Aug 15, 2021 at 09:51:02PM -0700, lepton wrote:
> Hi Gerd,
> 
> Thanks for your reply. I was aware of that change, but need a fix for
> 5.4 kernel as a temp solution for now.
> If the reason is just that you will move away from ttm soon,then I
> guess a CL like http://crrev.com/c/3092457 should
> work for 5.4, just hope I don't miss anything else.

Looks sane on a quick glance.

take care,
  Gerd



Re: Why we didn't use embedded gem object for virtio gpu when making ttm bo a gem bo subclass?

2021-08-15 Thread lepton
Hi Gerd,

Thanks for your reply. I was aware of that change, but need a fix for
5.4 kernel as a temp solution for now.
If the reason is just that you will move away from ttm soon,then I
guess a CL like http://crrev.com/c/3092457 should
work for 5.4, just hope I don't miss anything else.

Thanks!

On Sun, Aug 15, 2021 at 9:46 PM Gerd Hoffmann  wrote:
>
> On Fri, Aug 13, 2021 at 12:42:51PM -0700, lepton wrote:
> > Hi Gerd,
> >
> > We found a bug in 5.4 kernel and virtgpu_gem_prime_mmap doesn't work
> > because it references vma_node in gem_base object while ttm code
> > initialized vma_node in tbo.base object. I am wondering, in your
> > original serial:
> > https://patchwork.kernel.org/project/dri-devel/cover/20190805124310.3275-1-kra...@redhat.com/
> > (drm/ttm: make ttm bo a gem bo subclass), why you changed to use
> > embedded gem object for most gpu drivers but skipping virtio gpu? Is
> > there some specific reason?
>
> commit c66df701e783bc666593e6e665f13670760883ee
> Author: Gerd Hoffmann 
> Date:   Thu Aug 29 12:32:57 2019 +0200
>
> drm/virtio: switch from ttm to gem shmem helpers
>
> HTH,
>   Gerd
>


Re: Why we didn't use embedded gem object for virtio gpu when making ttm bo a gem bo subclass?

2021-08-15 Thread Gerd Hoffmann
On Fri, Aug 13, 2021 at 12:42:51PM -0700, lepton wrote:
> Hi Gerd,
> 
> We found a bug in 5.4 kernel and virtgpu_gem_prime_mmap doesn't work
> because it references vma_node in gem_base object while ttm code
> initialized vma_node in tbo.base object. I am wondering, in your
> original serial:
> https://patchwork.kernel.org/project/dri-devel/cover/20190805124310.3275-1-kra...@redhat.com/
> (drm/ttm: make ttm bo a gem bo subclass), why you changed to use
> embedded gem object for most gpu drivers but skipping virtio gpu? Is
> there some specific reason?

commit c66df701e783bc666593e6e665f13670760883ee
Author: Gerd Hoffmann 
Date:   Thu Aug 29 12:32:57 2019 +0200

drm/virtio: switch from ttm to gem shmem helpers

HTH,
  Gerd



Why we didn't use embedded gem object for virtio gpu when making ttm bo a gem bo subclass?

2021-08-14 Thread lepton
Hi Gerd,

We found a bug in 5.4 kernel and virtgpu_gem_prime_mmap doesn't work
because it references vma_node in gem_base object while ttm code
initialized vma_node in tbo.base object. I am wondering, in your
original serial:
https://patchwork.kernel.org/project/dri-devel/cover/20190805124310.3275-1-kra...@redhat.com/
(drm/ttm: make ttm bo a gem bo subclass), why you changed to use
embedded gem object for most gpu drivers but skipping virtio gpu? Is
there some specific reason?

I am thinking about CL like this (http://crrev.com/c/3092457) to fix
it and not sure if I missed something.

Thanks for your help!