Displaying 20 results from an estimated 300 matches similar to: "[PATCH] drm/nouveau: Fixup gk20a instobj hierarchy"
2023 Dec 14
1
[PATCH] drm/nouveau: Fixup gk20a instobj hierarchy
On 08/12/2023 10:46, Thierry Reding wrote:
> From: Thierry Reding <treding at nvidia.com>
>
> Commit 12c9b05da918 ("drm/nouveau/imem: support allocations not
> preserved across suspend") uses container_of() to cast from struct
> nvkm_memory to struct nvkm_instobj, assuming that all instance objects
> are derived from struct nvkm_instobj. For the gk20a family
2015 Nov 11
2
[PATCH] instmem/gk20a: use DMA API CPU mapping
Commit 69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access")
tried to be smart while using the DMA-API by managing the CPU mappings of
buffers allocated with the DMA-API by itself. In doing so, it relied
on dma_to_phys() which is an architecture-private function not
available everywhere. This broke the build on several architectures.
Since there is no reliable and portable
2015 Nov 11
0
[PATCH] instmem/gk20a: use DMA API CPU mapping
On 11/11/2015 06:07 PM, Alexandre Courbot wrote:
> Commit 69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access")
> tried to be smart while using the DMA-API by managing the CPU mappings of
> buffers allocated with the DMA-API by itself. In doing so, it relied
> on dma_to_phys() which is an architecture-private function not
> available everywhere. This broke the
2015 Nov 09
2
[PATCH] instmem/gk20a: fix race conditions
The LRU list used for recycling CPU mappings was handling concurrency
very poorly. For instance, if an instobj was acquired twice before being
released once, it would end up into the LRU list even though there is
still a client accessing it.
This patch fixes this by properly counting how many clients are
currently using a given instobj.
While at it, we also raise errors when inconsistencies are
2015 Oct 26
2
[PATCH] instmem/gk20a: exclusively acquire instobjs
Although I would not have expected this to happen, we seem to run into
race conditions if instobjs are accessed concurrently. Use a global lock
for safety.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drm/nouveau/nvkm/subdev/instmem/gk20a.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
2015 Nov 11
0
[PATCH] instmem/gk20a: fix race conditions
On 11/09/2015 05:37 PM, Alexandre Courbot wrote:
> The LRU list used for recycling CPU mappings was handling concurrency
> very poorly. For instance, if an instobj was acquired twice before being
> released once, it would end up into the LRU list even though there is
> still a client accessing it.
>
> This patch fixes this by properly counting how many clients are
> currently
2015 Nov 04
0
[PATCH] instmem/gk20a: exclusively acquire instobjs
On 10/26/2015 03:54 PM, Alexandre Courbot wrote:
> Although I would not have expected this to happen, we seem to run into
> race conditions if instobjs are accessed concurrently. Use a global lock
> for safety.
I wouldn't expect this to be an issue either.
Before merging such a large hammer of a fix, I'd strongly prefer to see
at least a better justification for why this is
2017 Jan 30
2
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
From: Thierry Reding <treding at nvidia.com>
The gk20a implementation of instance memory uses vmap()/vunmap() to map
memory regions into the kernel's virtual address space. These functions
may sleep, so protecting them by a spin lock is not safe. This triggers
a warning if the DEBUG_ATOMIC_SLEEP Kconfig option is enabled. Fix this
by using a mutex instead.
Signed-off-by: Thierry Reding
2017 Feb 24
1
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
On 02/24/2017 01:20 AM, Thierry Reding wrote:
> * PGP Signed by an unknown key
>
> On Mon, Jan 30, 2017 at 09:03:07PM +0100, Thierry Reding wrote:
>> From: Thierry Reding <treding at nvidia.com>
>>
>> The gk20a implementation of instance memory uses vmap()/vunmap() to map
>> memory regions into the kernel's virtual address space. These functions
>>
2017 Feb 23
0
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
On Mon, Jan 30, 2017 at 09:03:07PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding at nvidia.com>
>
> The gk20a implementation of instance memory uses vmap()/vunmap() to map
> memory regions into the kernel's virtual address space. These functions
> may sleep, so protecting them by a spin lock is not safe. This triggers
> a warning if the
2019 Aug 23
1
[PATCH] drm/nouveau: Fix memory leak in nvkm_ram_get()
When resuming from ACPI S3, memory leak happens in nvkm_ram_get().
This is because *pmemory points to newly allocated memory without
checking and freeing the old memory.
Here is the log showing this issue.
unreferenced object 0xffffa3b608c6d5c0 (size 64):
comm "kworker/u32:30", pid 934, jiffies 4294823520 (age 5000.217s)
hex dump (first 32 bytes):
00 fc 4a c0 ff ff ff ff 00 00
2017 Dec 08
3
[PATCH] drm/nouveau/imem/nv50: fix incorrect use of refcount API
Commit be55287aa5b ("drm/nouveau/imem/nv50: embed nvkm_instobj directly
into nv04_instobj") introduced some new calls to the refcount api to
the nv50 mapping code. In one particular instance, it does the
following:
if (!refcount_inc_not_zero(&iobj->maps)) {
...
refcount_inc(&iobj->maps);
}
i.e., it calls refcount_inc() to increment the
2017 Dec 18
1
[PATCH] drm/nouveau/imem/nv50: fix incorrect use of refcount API
Hey Ard,
It seems that Ben already committed a similar patch to his tree (see [0]). I do
not know whether he is planning to have it part of a pull request of fixes for
4.15.
Best regards,
Pierre
[0]: https://github.com/skeggsb/nouveau/commit/9068f1df2394f0e4ab2b2a28cac06b462fe0a0aa
On 2017-12-18 — 09:27, Ard Biesheuvel wrote:
> On 8 December 2017 at 19:30, Ard Biesheuvel <ard.biesheuvel
2019 Sep 16
0
[PATCH 1/2] drm/nouveau: tegra: Fix NULL pointer dereference
From: Thierry Reding <treding at nvidia.com>
Fill in BAR2 callbacks for instance memory. There's no BAR2 on Tegra
GPUs, but buffers are all in system memory anyway, so just return the
plain address.
Signed-off-by: Thierry Reding <treding at nvidia.com>
---
.../drm/nouveau/nvkm/subdev/instmem/gk20a.c | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git
2019 Sep 16
6
[PATCH 0/2] drm/nouveau: Two more fixes
From: Thierry Reding <treding at nvidia.com>
Hi Ben,
I messed up the ordering of patches in my tree a bit, so these two fixes
got separated from the others. I don't consider these particularily
urgent because the crash that the first one fixes only happens on gp10b
which we don't enable by default yet and the second patch fixes a crash
that only happens on module unload (or driver
2017 Dec 18
0
[PATCH] drm/nouveau/imem/nv50: fix incorrect use of refcount API
On 8 December 2017 at 19:30, Ard Biesheuvel <ard.biesheuvel at linaro.org> wrote:
> Commit be55287aa5b ("drm/nouveau/imem/nv50: embed nvkm_instobj directly
> into nv04_instobj") introduced some new calls to the refcount api to
> the nv50 mapping code. In one particular instance, it does the
> following:
>
> if (!refcount_inc_not_zero(&iobj->maps)) {
2016 Jul 27
1
[PATCH] gr/nv3x: fix instobj write offsets in gr setup
This should fix some unaligned access warnings. This is also likely to
fix non-descript issues on nv30/nv34 as a result of incorrect channel
setup.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96836
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
drm/nouveau/nvkm/engine/gr/nv30.c | 4 ++--
drm/nouveau/nvkm/engine/gr/nv34.c | 4 ++--
2 files changed, 4 insertions(+), 4
2016 Jun 10
0
[PATCH v4 14/44] drm/nouveau: dma-mapping: Use unsigned long for dma_attrs
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski at samsung.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
2016 Jun 30
0
[PATCH v5 14/44] drm/nouveau: dma-mapping: Use unsigned long for dma_attrs
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski at samsung.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
2016 Jul 13
0
[PATCH v6 15/46] drm/nouveau: dma-mapping: Use unsigned long for dma_attrs
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski at samsung.com>
[for drm]
Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git