search for: nvkm_ltc

Displaying 20 results from an estimated 30 matches for "nvkm_ltc".

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, s...
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 gm...
2017 Jul 29
0
[PATCH] nouveau: Fix declarations with incorrect variables.
...u32 pitch, u32 flags, struct nvkm_fb_tile *); diff --git a/drm/nouveau/nvkm/subdev/ltc/priv.h b/drm/nouveau/nvkm/subdev/ltc/priv.h index 8b95f96e..4af4aebe 100644 --- a/drm/nouveau/nvkm/subdev/ltc/priv.h +++ b/drm/nouveau/nvkm/subdev/ltc/priv.h @@ -35,7 +35,7 @@ void gf100_ltc_flush(struct nvkm_ltc *); extern const struct nvkm_bitfield gf100_ltc_lts_intr_name[]; void gm107_ltc_intr(struct nvkm_ltc *); -void gm107_ltc_intr_lts(struct nvkm_ltc *, int ltc, int lts); +void gm107_ltc_intr_lts(struct nvkm_ltc *ltc, int c, int s); void gm107_ltc_cbc_clear(struct nvkm_ltc *, u32, u32); void gm1...
2019 Sep 16
0
[PATCH 04/11] drm/nouveau: gp10b: Add custom L2 cache implementation
...drm/nouveau/include/nvkm/subdev/ltc.h > > index 644d527c3b96..d76f60d7d29a 100644 > > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h > > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h > > @@ -40,4 +40,5 @@ int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); > > int gm200_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); > > int gp100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); > > int gp102_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); > > +int gp10b_ltc_new(struct nvkm_device *, int, stru...
2019 Sep 16
1
[PATCH 04/11] drm/nouveau: gp10b: Add custom L2 cache implementation
...nvkm/subdev/ltc.h > > > index 644d527c3b96..d76f60d7d29a 100644 > > > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h > > > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h > > > @@ -40,4 +40,5 @@ int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); > > > int gm200_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); > > > int gp100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); > > > int gp102_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); > > > +int gp10b_ltc_new(struct nvkm...
2017 Jan 30
2
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...m_instmem base; /* protects vaddr_* and gk20a_instobj::vaddr* */ - spinlock_t lock; + struct mutex lock; /* CPU mappings 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 @@...
2015 Oct 26
2
[PATCH] instmem/gk20a: exclusively acquire instobjs
...k20a_instobj::vaddr* */ spinlock_t lock; + unsigned long flags; /* CPU mappings LRU */ unsigned int vaddr_use; @@ -188,12 +189,11 @@ 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 f...
2019 Sep 16
15
[PATCH 00/11] drm/nouveau: Enable GP10B by default
From: Thierry Reding <treding at nvidia.com> Hi, the GPU on Jetson TX2 (GP10B) does not work properly on all devices. Why exactly is not clear, but there are slight differences between the SKUs that were tested. It turns out that the biggest issue is that on some devices (e.g. the one that I have), pulsing the GPU reset twice as is done in the current code (once as part of the power-ungate
2015 Nov 11
2
[PATCH] instmem/gk20a: use DMA API CPU mapping
...u, + struct gk20a_instobj_iommu, vaddr_node)); } } 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...
2017 Feb 24
1
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...gt;> - spinlock_t lock; >> + struct mutex lock; >> >> /* CPU mappings 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); >> >>...
2019 Nov 02
13
[PATCH v2 0/9] drm/nouveau: Various fixes for GP10B
From: Thierry Reding <treding at nvidia.com> Hi Ben, here's a revised subset of the patches I had sent out a couple of weeks ago. I've reworked the BAR2 accesses in the way that you had suggested, which at least for GP10B turned out to be fairly trivial to do. I have not looked in detail at this for GV11B yet, but a cursory look showed that BAR2 is accessed in more places, so the
2019 Dec 09
11
[PATCH v3 0/9] drm/nouveau: Various fixes for GP10B
From: Thierry Reding <treding at nvidia.com> Hi Ben, here's a revised subset of the patches I had sent out a couple of weeks ago. I've reworked the BAR2 accesses in the way that you had suggested, which at least for GP10B turned out to be fairly trivial to do. I have not looked in detail at this for GV11B yet, but a cursory look showed that BAR2 is accessed in more places, so the
2015 Nov 11
0
[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);...
2015 Nov 04
0
[PATCH] instmem/gk20a: exclusively acquire instobjs
...k; > + unsigned long flags; > > /* CPU mappings LRU */ > unsigned int vaddr_use; > @@ -188,12 +189,11 @@ 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); &gt...
2016 Mar 01
0
[PATCH] ltc/gf100: use more reasonable timeout value
...hanged, 2 insertions(+), 6 deletions(-) diff --git a/drm/nouveau/nvkm/subdev/ltc/gf100.c b/drm/nouveau/nvkm/subdev/ltc/gf100.c index fb0de83da13c..c9eb677967a8 100644 --- a/drm/nouveau/nvkm/subdev/ltc/gf100.c +++ b/drm/nouveau/nvkm/subdev/ltc/gf100.c @@ -129,9 +129,7 @@ gf100_ltc_invalidate(struct nvkm_ltc *ltc) s64 taken; nvkm_wr32(device, 0x70004, 0x00000001); - taken = nvkm_wait_msec(device, 2, 0x70004, 0x00000003, 0x00000000); - if (taken < 0) - nvkm_warn(&ltc->subdev, "LTC invalidate timeout\n"); + taken = nvkm_wait_msec(device, 2000, 0x70004, 0x00000003, 0x00000000);...
2017 Feb 23
0
[PATCH] drm/nouveau: gk20a: Turn instmem lock into mutex
...and gk20a_instobj::vaddr* */ > - spinlock_t lock; > + struct mutex lock; > > /* CPU mappings 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) { &g...
2016 Feb 19
0
[PATCH v2 1/4] subdev/iccsense: add new subdev for power sensors
...AR, NVKM_SUBDEV_PMU, NVKM_SUBDEV_VOLT, + NVKM_SUBDEV_ICCSENSE, NVKM_SUBDEV_THERM, NVKM_SUBDEV_CLK, @@ -109,6 +110,7 @@ struct nvkm_device { struct nvkm_gpio *gpio; struct nvkm_i2c *i2c; struct nvkm_subdev *ibus; + struct nvkm_iccsense *iccsense; struct nvkm_instmem *imem; struct nvkm_ltc *ltc; struct nvkm_mc *mc; @@ -164,46 +166,47 @@ struct nvkm_device_quirk { struct nvkm_device_chip { const char *name; - int (*bar )(struct nvkm_device *, int idx, struct nvkm_bar **); - int (*bios )(struct nvkm_device *, int idx, struct nvkm_bios **); - int (*bus )(struct nvkm_devic...
2016 Feb 20
0
[PATCH v4 1/6] subdev/iccsense: add new subdev for power sensors
...AR, NVKM_SUBDEV_PMU, NVKM_SUBDEV_VOLT, + NVKM_SUBDEV_ICCSENSE, NVKM_SUBDEV_THERM, NVKM_SUBDEV_CLK, @@ -109,6 +110,7 @@ struct nvkm_device { struct nvkm_gpio *gpio; struct nvkm_i2c *i2c; struct nvkm_subdev *ibus; + struct nvkm_iccsense *iccsense; struct nvkm_instmem *imem; struct nvkm_ltc *ltc; struct nvkm_mc *mc; @@ -164,46 +166,47 @@ struct nvkm_device_quirk { struct nvkm_device_chip { const char *name; - int (*bar )(struct nvkm_device *, int idx, struct nvkm_bar **); - int (*bios )(struct nvkm_device *, int idx, struct nvkm_bios **); - int (*bus )(struct nvkm_devic...
2016 Jan 15
0
[PATCH] ltc/gm107: wait on relevant bit in gm107_ltc_cbc_wait
...e changed, 2 insertions(+), 4 deletions(-) diff --git a/drm/nouveau/nvkm/subdev/ltc/gm107.c b/drm/nouveau/nvkm/subdev/ltc/gm107.c index 2af1f9e100fc..47c4e715370f 100644 --- a/drm/nouveau/nvkm/subdev/ltc/gm107.c +++ b/drm/nouveau/nvkm/subdev/ltc/gm107.c @@ -43,10 +43,8 @@ gm107_ltc_cbc_wait(struct nvkm_ltc *ltc) for (c = 0; c < ltc->ltc_nr; c++) { for (s = 0; s < ltc->lts_nr; s++) { const u32 addr = 0x14046c + (c * 0x2000) + (s * 0x200); - nvkm_msec(device, 2000, - if (!nvkm_rd32(device, addr)) - break; - ); + nvkm_wait_msec(device, 2000, addr, + 0x00000004...