Displaying 10 results from an estimated 10 matches for "nvkm_ltc_flush".
2015 Sep 03
3
[PATCH 0/3] New instmem implementation for Tegra
Due to the lack of implicit synchronization between CPU and GPU on Tegra systems
(like what PCI provides for dGPUs), the instmem implementation of GK20A/GM20B
relied on the slow, legacy PRAMIN so that CPU accesses used the same path as
GPU, making sure we see the same data on both ends.
The recent Nouveau refactoring introduced acquire/release functions on instmem
that help us understand the
2015 Sep 03
2
[PATCH 2/3] ltc/gf100: add flush/invalidate functions
...s changed, 43 insertions(+)
>
> diff --git a/drm/nouveau/include/nvkm/subdev/ltc.h b/drm/nouveau/include/nvkm/subdev/ltc.h
> index 5464fcf482f1..3d4dbbf9aab3 100644
> --- a/drm/nouveau/include/nvkm/subdev/ltc.h
> +++ b/drm/nouveau/include/nvkm/subdev/ltc.h
> @@ -35,5 +35,6 @@ void nvkm_ltc_flush(struct nvkm_ltc *);
>
> int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
> int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
> +int gk20a_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
> int gm107_ltc_new(struct nvkm_device *, int, struct...
2017 Jan 30
2
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...ngs LRU */
unsigned int vaddr_use;
@@ -184,11 +184,10 @@ gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
struct gk20a_instmem *imem = node->base.imem;
struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
const u64 size = nvkm_memory_size(memory);
- unsigned long flags;
nvkm_ltc_flush(ltc);
- spin_lock_irqsave(&imem->lock, flags);
+ mutex_lock(&imem->lock);
if (node->base.vaddr) {
if (!node->use_cpt) {
@@ -216,7 +215,7 @@ gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
out:
node->use_cpt++;
- spin_unlock_irqrestore(&imem->lock,...
2015 Sep 03
2
[PATCH 2/3] ltc/gf100: add flush/invalidate functions
...;> diff --git a/drm/nouveau/include/nvkm/subdev/ltc.h b/drm/nouveau/include/nvkm/subdev/ltc.h
>>> index 5464fcf482f1..3d4dbbf9aab3 100644
>>> --- a/drm/nouveau/include/nvkm/subdev/ltc.h
>>> +++ b/drm/nouveau/include/nvkm/subdev/ltc.h
>>> @@ -35,5 +35,6 @@ void nvkm_ltc_flush(struct nvkm_ltc *);
>>>
>>> int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
>>> int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
>>> +int gk20a_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
>>> int gm107_lt...
2015 Oct 26
2
[PATCH] instmem/gk20a: exclusively acquire instobjs
...@@ gk20a_instobj_acquire(struct nvkm_memory *memory)
struct gk20a_instobj *node = gk20a_instobj(memory);
struct gk20a_instmem *imem = node->imem;
struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
- const u64 size = nvkm_memory_size(memory);
- unsigned long flags;
+ u64 size;
nvkm_ltc_flush(ltc);
- spin_lock_irqsave(&imem->lock, flags);
+ spin_lock_irqsave(&imem->lock, imem->flags);
if (node->vaddr) {
/* remove us from the LRU list since we cannot be unmapped */
@@ -202,6 +202,8 @@ gk20a_instobj_acquire(struct nvkm_memory *memory)
goto out;
}
+ size...
2017 Feb 24
1
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...,10 @@ gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
>> struct gk20a_instmem *imem = node->base.imem;
>> struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
>> const u64 size = nvkm_memory_size(memory);
>> - unsigned long flags;
>>
>> nvkm_ltc_flush(ltc);
>>
>> - spin_lock_irqsave(&imem->lock, flags);
>> + mutex_lock(&imem->lock);
>>
>> if (node->base.vaddr) {
>> if (!node->use_cpt) {
>> @@ -216,7 +215,7 @@ gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
>>
>&g...
2015 Nov 04
0
[PATCH] instmem/gk20a: exclusively acquire instobjs
...mory *memory)
> struct gk20a_instobj *node = gk20a_instobj(memory);
> struct gk20a_instmem *imem = node->imem;
> struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
> - const u64 size = nvkm_memory_size(memory);
> - unsigned long flags;
> + u64 size;
>
> nvkm_ltc_flush(ltc);
>
> - spin_lock_irqsave(&imem->lock, flags);
> + spin_lock_irqsave(&imem->lock, imem->flags);
>
> if (node->vaddr) {
> /* remove us from the LRU list since we cannot be unmapped */
> @@ -202,6 +202,8 @@ gk20a_instobj_acquire(struct nvkm_memory...
2017 Feb 23
0
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...;
> @@ -184,11 +184,10 @@ gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
> struct gk20a_instmem *imem = node->base.imem;
> struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
> const u64 size = nvkm_memory_size(memory);
> - unsigned long flags;
>
> nvkm_ltc_flush(ltc);
>
> - spin_lock_irqsave(&imem->lock, flags);
> + mutex_lock(&imem->lock);
>
> if (node->base.vaddr) {
> if (!node->use_cpt) {
> @@ -216,7 +215,7 @@ gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
>
> out:
> node->use_c...
2015 Nov 11
2
[PATCH] instmem/gk20a: use DMA API CPU mapping
...static void __iomem *
-gk20a_instobj_acquire(struct nvkm_memory *memory)
+gk20a_instobj_acquire_dma(struct nvkm_memory *memory)
{
struct gk20a_instobj *node = gk20a_instobj(memory);
struct gk20a_instmem *imem = node->imem;
struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
+
+ nvkm_ltc_flush(ltc);
+
+ return node->vaddr;
+}
+
+static void __iomem *
+gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
+{
+ struct gk20a_instobj_iommu *node = gk20a_instobj_iommu(memory);
+ struct gk20a_instmem *imem = node->base.imem;
+ struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;...
2015 Nov 11
0
[PATCH] instmem/gk20a: use DMA API CPU mapping
...tobj_acquire(struct nvkm_memory *memory)
> +gk20a_instobj_acquire_dma(struct nvkm_memory *memory)
> {
> struct gk20a_instobj *node = gk20a_instobj(memory);
> struct gk20a_instmem *imem = node->imem;
> struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
> +
> + nvkm_ltc_flush(ltc);
> +
> + return node->vaddr;
> +}
> +
> +static void __iomem *
> +gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
> +{
> + struct gk20a_instobj_iommu *node = gk20a_instobj_iommu(memory);
> + struct gk20a_instmem *imem = node->base.imem;
> + struct nv...