search for: nouveau_bo_allocated

Displaying 14 results from an estimated 14 matches for "nouveau_bo_allocated".

2019 Sep 10
1
[Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node
On Sat, Sep 07, 2019 at 09:58:46PM -0400, Ilia Mirkin wrote: > On Wed, Aug 21, 2019 at 7:55 AM Thierry Reding <thierry.reding at gmail.com> wrote: > > > > 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, > > > >
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/nouveau_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1
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 > >
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
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 b/drivers/gpu/drm/nouveau/nouveau_bo.c index c40f127de3d0..abd80b1a6de3 100644 ---
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. */ > if
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
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; } } @...
2024 May 09
0
[PATCH v4] drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations
On Thu, May 9, 2024 at 3:44?PM Mohamed Ahmed < mohamedahmedegypt2001 at gmail.com> wrote: > Allows PTE kind and tile mode on BO create with VM_BIND, > and adds a GETPARAM to indicate this change. This is needed to support > modifiers in NVK and ensure correctness when dealing with the nouveau > GL driver. > > The userspace modifiers implementation this is for can be found
2024 May 08
0
[PATCH v3] drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations
On Wed, May 8, 2024 at 6:06?PM Mohamed Ahmed < mohamedahmedegypt2001 at gmail.com> wrote: > Allows PTE kind and tile mode on BO create with VM_BIND, > and adds a GETPARAM to indicate this change. This is needed to support > modifiers in NVK and ensure correctness when dealing with the nouveau > GL driver. > > The userspace modifiers implementation this is for can be found
2019 Sep 08
0
[Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node
On Wed, Aug 21, 2019 at 7:55 AM Thierry Reding <thierry.reding at gmail.com> wrote: > > 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
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 &&amp...