search for: nouveau_bo_alloc

Displaying 12 results from an estimated 12 matches for "nouveau_bo_alloc".

2019 Sep 10
1
[Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node
...jects with a > non-page-aligned size. Previously nouveau_gem_new would just call > nouveau_bo_init which would call nouveau_bo_fixup_align before > initializing the GEM object. With this change, it is done after. What > do you think -- OK to just move that bit of logic into the new > nouveau_bo_alloc() (and make size/align be pointers so that they can > be fixed up?) Hi Ilia, sorry, got side-tracked earlier and forgot to send this out. I'll turn this into a proper patch, but if you manage to find the time to test this while I work out the userspace issues that are preventing me from te...
2019 Oct 21
3
[PATCH] drm/nouveau: Fix memory leak in nouveau_bo_alloc
In the implementation of nouveau_bo_alloc() if it fails to determine the target page size via pi, then the allocated memory for nvbo should be released. Fixes: 019cbd4a4feb ("drm/nouveau: Initialize GEM object before TTM object") Signed-off-by: Navid Emamdoost <navid.emamdoost at gmail.com> --- drivers/gpu/drm/nouveau/nou...
2019 Nov 26
1
[PATCH] drm/nouveau: Fix memory leak in nouveau_bo_alloc
ping... On Thu, Nov 21, 2019 at 12:09 PM Navid Emamdoost <navid.emamdoost at gmail.com> wrote: > > On Mon, Oct 21, 2019 at 4:14 PM Navid Emamdoost > <navid.emamdoost at gmail.com> wrote: > > > > In the implementation of nouveau_bo_alloc() if it fails to determine the > > target page size via pi, then the allocated memory for nvbo should be > > released. > > > > Fixes: 019cbd4a4feb ("drm/nouveau: Initialize GEM object before TTM object") > > Signed-off-by: Navid Emamdoost <navid.emamdoost...
2019 Aug 21
2
[Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node
On Wed, Aug 21, 2019 at 04:33:58PM +1000, Ben Skeggs wrote: > On Wed, 14 Aug 2019 at 20:14, Gerd Hoffmann <kraxel at redhat.com> wrote: > > > > Hi, > > > > > > Changing the order doesn't look hard. Patch attached (untested, have no > > > > test hardware). But maybe I missed some detail ... > > > > > > I came up with
2019 Sep 16
4
[PATCH 0/4] drm/nouveau: Miscellaneous fixes
From: Thierry Reding <treding at nvidia.com> Hi Ben, these are fixes for a couple of issues that I've been running into when testing on various Tegra boards. The first two patches fix up issues in the fix that I had sent out earlier to fix the regression introduced in drm-misc-next. The first one is critical because it avoids a BUG_ON as reported by Ilia, while the second is less
2019 Nov 21
0
[PATCH] drm/nouveau: Fix memory leak in nouveau_bo_alloc
On Mon, Oct 21, 2019 at 4:14 PM Navid Emamdoost <navid.emamdoost at gmail.com> wrote: > > In the implementation of nouveau_bo_alloc() if it fails to determine the > target page size via pi, then the allocated memory for nvbo should be > released. > > Fixes: 019cbd4a4feb ("drm/nouveau: Initialize GEM object before TTM object") > Signed-off-by: Navid Emamdoost <navid.emamdoost at gmail.com> Would y...
2020 Jul 15
0
[PATCH] drm/nouveau: add the missed kfree() for nouveau_bo_alloc()
nouveau_bo_alloc() misses to call kfree() in an error path. Add the missed function call to fix it. Signed-off-by: Jing Xiangfeng <jingxiangfeng at huawei.com> --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c...
2019 Oct 22
0
[PATCH] drm/nouveau: Fix memory leak in nouveau_bo_alloc
> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > @@ -276,8 +276,10 @@ nouveau_bo_alloc(struct nouveau_cli *cli, u64 *size, int *align, u32 flags, > break; > } > > - if (WARN_ON(pi < 0)) > + if (WARN_ON(pi < 0)) { > + kfree(nvbo); > return ERR_PTR(-EINVAL); > + } > > /* Disable compression if suitable settings couldn't be found. */ &...
2020 Jul 15
0
[PATCH] drm/nouveau: add the missed kfree() for nouveau_bo_alloc()
> ? to fix it. I suggest to replace this wording by the tag ?Fixes?. ? > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > @@ -276,8 +276,10 @@ nouveau_bo_alloc(struct nouveau_cli *cli, u64 *size, int *align, u32 flags, > break; > } > > - if (WARN_ON(pi < 0)) > + if (WARN_ON(pi < 0)) { > + kfree(nvbo); > return ERR_PTR(-EINVAL); > + } I propose to move such common exception handling to the end of this function imple...
2009 Dec 24
1
[PATCH] nouveau: when nouveau_bo_map fails you expect it to not be mapped
...uint32_t flags) { struct nouveau_bo_priv *nvbo = nouveau_bo(bo); - int ret; + int ret = 0; - if (!nvbo || bo->map) + if (!nvbo) return -EINVAL; + /* People should not double map, let's make sure they will notice. */ + if (bo->map) { + ret = -EINVAL; + goto out; + } + if (!nouveau_bo_allocated(nvbo)) { if (nvbo->flags & (NOUVEAU_BO_VRAM | NOUVEAU_BO_GART)) { ret = nouveau_bo_kalloc(nvbo, NULL); if (ret) - return ret; + goto out; } if (!nouveau_bo_allocated(nvbo)) { ret = nouveau_bo_ualloc(nvbo); if (ret) - return ret; + goto out; } }...
2019 Sep 08
0
[Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node
...tries to allocate GEM objects with a non-page-aligned size. Previously nouveau_gem_new would just call nouveau_bo_init which would call nouveau_bo_fixup_align before initializing the GEM object. With this change, it is done after. What do you think -- OK to just move that bit of logic into the new nouveau_bo_alloc() (and make size/align be pointers so that they can be fixed up?) Cheers, -ilia
2010 Jan 17
0
[PATCH] libdrm/nouveau: Support nested bo mapping
...bo.c +++ b/nouveau/nouveau_bo.c @@ -417,9 +417,12 @@ nouveau_bo_map_range(struct nouveau_bo *bo, uint32_t delta, uint32_t size, struct nouveau_bo_priv *nvbo = nouveau_bo(bo); int ret; - if (!nvbo || bo->map) + if (!nvbo) return -EINVAL; + if(nvbo->map_count++) + return 0; + if (!nouveau_bo_allocated(nvbo)) { if (nvbo->flags & (NOUVEAU_BO_VRAM | NOUVEAU_BO_GART)) { ret = nouveau_bo_kalloc(nvbo, NULL); @@ -470,6 +473,9 @@ nouveau_bo_unmap(struct nouveau_bo *bo) { struct nouveau_bo_priv *nvbo = nouveau_bo(bo); + if(--nvbo->map_count) + return 0; + if (bo->map &...