raof at ubuntu.com
2017-Mar-29 00:27 UTC
[Nouveau] [PATCH 1/6] drm/nouveau: Fail fb creation from imported dma-bufs.
From: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com> Any use of the framebuffer will migrate it to VRAM, which is not sensible for an imported dma-buf. Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com> CC: nouveau at lists.freedesktop.org --- drivers/gpu/drm/nouveau/nouveau_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 72fdba1a1c5d..e8e6bc7b6d51 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -286,6 +286,10 @@ nouveau_user_framebuffer_create(struct drm_device *dev, return ERR_PTR(-ENOENT); nvbo = nouveau_gem_object(gem); + /* Handle is an imported dma-buf, so cannot be migrated to VRAM */ + if (gem->import_attach) + return ERR_PTR(-EINVAL); + ret = nouveau_framebuffer_new(dev, mode_cmd, nvbo, &fb); if (ret == 0) return &fb->base; -- 2.11.0
Maarten Lankhorst
2017-Mar-29 08:47 UTC
[Nouveau] [PATCH 1/6] drm/nouveau: Fail fb creation from imported dma-bufs.
Op 29-03-17 om 02:27 schreef raof at ubuntu.com:> From: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com> > > Any use of the framebuffer will migrate it to VRAM, which is not sensible for > an imported dma-buf. > > Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com> > CC: nouveau at lists.freedesktop.org > --- > drivers/gpu/drm/nouveau/nouveau_display.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c > index 72fdba1a1c5d..e8e6bc7b6d51 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_display.c > +++ b/drivers/gpu/drm/nouveau/nouveau_display.c > @@ -286,6 +286,10 @@ nouveau_user_framebuffer_create(struct drm_device *dev, > return ERR_PTR(-ENOENT); > nvbo = nouveau_gem_object(gem); > > + /* Handle is an imported dma-buf, so cannot be migrated to VRAM */ > + if (gem->import_attach) > + return ERR_PTR(-EINVAL); > + > ret = nouveau_framebuffer_new(dev, mode_cmd, nvbo, &fb); > if (ret == 0) > return &fb->base;I don't know if there's really a hard requirement for nouveau to scan out from GART on nv50+, but it might be a bigger problem on earlier platforms. Acked-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Maybe Matching Threads
- [PATCH 2/6] drm/nouveau: Pin bos from imported dma-bufs to GTT.
- [PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
- [PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
- [PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
- [PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer