Displaying 14 results from an estimated 14 matches for "out_prevalid".
2023 Apr 05
0
[PATCH] drm/nouveau: Add a jump label in nouveau_gem_ioctl_pushbuf()
Date: Wed, 5 Apr 2023 18:38:54 +0200
The label ?out_prevalid? was used to jump to another pointer check
despite of the detail in the implementation of the function
?nouveau_gem_ioctl_pushbuf? that it was determined already in one case
that the corresponding variable contained an error pointer
because of a failed call of the function ?u_memcpya?.
Thus use an...
2019 Aug 21
2
[PATCH 2/3] drm/nouveau: slowpath for pushbuf ioctl
...cations that are required */
if (do_reloc) {
- ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo);
+ if (!reloc) {
+ validate_fini(&op, chan, NULL, bo);
+ reloc = u_memcpya(req->relocs, req->nr_relocs, sizeof(*reloc));
+ if (IS_ERR(reloc)) {
+ ret = PTR_ERR(reloc);
+ goto out_prevalid;
+ }
+
+ goto revalidate;
+ }
+
+ ret = nouveau_gem_pushbuf_reloc_apply(cli, req, reloc, bo);
if (ret) {
NV_PRINTK(err, cli, "reloc apply: %d\n", ret);
goto out;
@@ -849,6 +852,22 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
validate_fini(&op, ch...
2019 Oct 21
1
[PATCH 2/3] drm/nouveau: slowpath for pushbuf ioctl
...cations that are required */
if (do_reloc) {
- ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo);
+ if (!reloc) {
+ validate_fini(&op, chan, NULL, bo);
+ reloc = u_memcpya(req->relocs, req->nr_relocs, sizeof(*reloc));
+ if (IS_ERR(reloc)) {
+ ret = PTR_ERR(reloc);
+ goto out_prevalid;
+ }
+
+ goto revalidate;
+ }
+
+ ret = nouveau_gem_pushbuf_reloc_apply(cli, req, reloc, bo);
if (ret) {
NV_PRINTK(err, cli, "reloc apply: %d\n", ret);
goto out;
@@ -851,6 +854,22 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
validate_fini(&op, ch...
2019 Nov 04
2
[PATCH 2/3] drm/nouveau: slowpath for pushbuf ioctl
...cations that are required */
if (do_reloc) {
- ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo);
+ if (!reloc) {
+ validate_fini(&op, chan, NULL, bo);
+ reloc = u_memcpya(req->relocs, req->nr_relocs, sizeof(*reloc));
+ if (IS_ERR(reloc)) {
+ ret = PTR_ERR(reloc);
+ goto out_prevalid;
+ }
+
+ goto revalidate;
+ }
+
+ ret = nouveau_gem_pushbuf_reloc_apply(cli, req, reloc, bo);
if (ret) {
NV_PRINTK(err, cli, "reloc apply: %d\n", ret);
goto out;
@@ -851,6 +854,22 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
validate_fini(&op, ch...
2020 Aug 28
8
[PATCH 0/6] drm/nouveau: Support sync FDs and sync objects
From: Thierry Reding <treding at nvidia.com>
Hi,
This series implements a new IOCTL to submit push buffers that can
optionally return a sync FD or sync object to userspace. This is useful
in cases where userspace wants to synchronize operations between the GPU
and another driver (such as KMS for display). Among other things this
allows extensions such as eglDupNativeFenceFDANDROID to be
2019 Aug 20
0
[PATCH 2/3] drm/nouveau: slowpath for pushbuf ioctl
...cations that are required */
if (do_reloc) {
- ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo);
+ if (!reloc) {
+ validate_fini(&op, chan, NULL, bo);
+ reloc = u_memcpya(req->relocs, req->nr_relocs, sizeof(*reloc));
+ if (IS_ERR(reloc)) {
+ ret = PTR_ERR(reloc);
+ goto out_prevalid;
+ }
+
+ goto revalidate;
+ }
+
+ ret = nouveau_gem_pushbuf_reloc_apply(cli, req, reloc, bo);
if (ret) {
NV_PRINTK(err, cli, "reloc apply: %d\n", ret);
goto out;
@@ -849,6 +852,22 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
validate_fini(&op, ch...
2019 Sep 03
0
[PATCH 2/3] drm/nouveau: slowpath for pushbuf ioctl
...do_reloc) {
> - ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo);
> + if (!reloc) {
> + validate_fini(&op, chan, NULL, bo);
> + reloc = u_memcpya(req->relocs, req->nr_relocs, sizeof(*reloc));
> + if (IS_ERR(reloc)) {
> + ret = PTR_ERR(reloc);
> + goto out_prevalid;
> + }
> +
> + goto revalidate;
> + }
> +
> + ret = nouveau_gem_pushbuf_reloc_apply(cli, req, reloc, bo);
> if (ret) {
> NV_PRINTK(err, cli, "reloc apply: %d\n", ret);
> goto out;
> @@ -849,6 +852,22 @@ nouveau_gem_ioctl_pushbuf(struct drm_de...
2019 Nov 05
0
[PATCH 2/3] drm/nouveau: slowpath for pushbuf ioctl
...do_reloc) {
> - ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo);
> + if (!reloc) {
> + validate_fini(&op, chan, NULL, bo);
> + reloc = u_memcpya(req->relocs, req->nr_relocs, sizeof(*reloc));
> + if (IS_ERR(reloc)) {
> + ret = PTR_ERR(reloc);
> + goto out_prevalid;
> + }
> +
> + goto revalidate;
> + }
> +
> + ret = nouveau_gem_pushbuf_reloc_apply(cli, req, reloc, bo);
> if (ret) {
> NV_PRINTK(err, cli, "reloc apply: %d\n", ret);
> goto out;
> @@ -851,6 +854,22 @@ nouveau_gem_ioctl_pushbuf(struct drm_de...
2013 Sep 02
2
[PATCH] drm/nouveau: fix command submission to use vmalloc for big allocations
...veau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
bo = u_memcpya(req->buffers, req->nr_buffers, sizeof(*bo));
if (IS_ERR(bo)) {
- kfree(push);
+ u_free(push);
return nouveau_abi16_put(abi16, PTR_ERR(bo));
}
@@ -854,8 +870,8 @@ out:
nouveau_fence_unref(&fence);
out_prevalid:
- kfree(bo);
- kfree(push);
+ u_free(bo);
+ u_free(push);
out_next:
if (chan->dma.ib_max) {
--
1.8.3.4
2020 Nov 20
1
[PATCH] drm/nouveau: fix relocations applying logic and a double-free
...,6 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
nouveau_bo_wr32(nvbo, r->reloc_bo_offset >> 2, data);
}
- u_free(reloc);
return ret;
}
@@ -872,9 +873,10 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
break;
}
}
- u_free(reloc);
}
out_prevalid:
+ if (!IS_ERR(reloc))
+ u_free(reloc);
u_free(bo);
u_free(push);
base-commit: 3494d58865ad4a47611dbb427b214cc5227fa5eb
--
2.29.2
2013 Sep 04
0
[PATCH] drm/nouveau: fix command submission to use vmalloc for big allocations
...nr_buffers, sizeof(*bo));
> if (IS_ERR(bo)) {
> - kfree(push);
> + u_free(push);
> return nouveau_abi16_put(abi16, PTR_ERR(bo));
> }
>
> @@ -854,8 +870,8 @@ out:
> nouveau_fence_unref(&fence);
>
> out_prevalid:
> - kfree(bo);
> - kfree(push);
> + u_free(bo);
> + u_free(push);
>
> out_next:
> if (chan->dma.ib_max) {
> --
> 1.8.3.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.free...
2018 Aug 30
3
[PATCH 0/2] drm/nouveau: Use more standard logging styles
Reduces object size ~4kb
Joe Perches (2):
drm/nouveau: Add new logging function nv_cli_printk
drm/nouveau: Convert NV_PRINTK macros and uses to new nv_cli_<level> macros
drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_chan.c | 12 +++----
drivers/gpu/drm/nouveau/nouveau_drm.c | 21 +++++++++++
drivers/gpu/drm/nouveau/nouveau_drv.h | 44
2013 Nov 12
6
[PATCH 1/7] drm/nouveau: fix m2mf copy to tiled gart
From: Maarten Lankhorst <maarten.lankhorst at canonical.com>
Commit de7b7d59d54852c introduced tiled GART, but a linear copy is
still performed. This may result in errors on eviction, fix it by
checking tiling from memtype.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
Cc: stable at vger.kernel.org #3.10+
---
drivers/gpu/drm/nouveau/nouveau_bo.c | 33
2018 Jan 11
3
[PATCH 0/3] drm/nouveau: Add support for fence FDs
From: Thierry Reding <treding at nvidia.com>
This small series of patches implements support for waiting on and
emitting fence FDs on kickoff. This enables explicit fencing and can be
used for example to synchronize buffer accesses between the display
engine and the GPU on Tegra.
The first patch lays the groundwork by splitting up nouveau_fence_sync()
to allow reuse. Patch 2 is where the