Displaying 12 results from an estimated 12 matches for "gk20a_instobj_priv".
2015 Feb 11
0
[PATCH v2 6/6] instmem/gk20a: add IOMMU support
...l mapping.
+ */
+
#include <subdev/fb.h>
#include <core/mm.h>
#include <core/device.h>
#ifdef __KERNEL__
#include <linux/dma-attrs.h>
+#include <linux/iommu.h>
+#include <nouveau_platform.h>
#endif
#include "priv.h"
@@ -36,18 +56,51 @@ struct gk20a_instobj_priv {
struct nvkm_mem *mem;
/* Pointed by mem */
struct nvkm_mem _mem;
+};
+
+/*
+ * Used for objects allocated using the DMA API
+ */
+struct gk20a_instobj_dma {
+ struct gk20a_instobj_priv base;
+
void *cpuaddr;
dma_addr_t handle;
struct dma_attrs attrs;
struct nvkm_mm_node r;
};
+/*...
2015 Feb 17
1
[PATCH v3 4/6] instmem/gk20a: use DMA attributes
...tmem/gk20a.c
> +++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
> @@ -24,6 +24,10 @@
> #include <core/mm.h>
> #include <core/device.h>
>
> +#ifdef __KERNEL__
> +#include <linux/dma-attrs.h>
> +#endif
> +
> #include "priv.h"
>
> struct gk20a_instobj_priv {
> @@ -34,6 +38,7 @@ struct gk20a_instobj_priv {
> struct nvkm_mem _mem;
> void *cpuaddr;
> dma_addr_t handle;
> + struct dma_attrs attrs;
> struct nvkm_mm_node r;
> };
>
> @@ -91,8 +96,8 @@ gk20a_instobj_dtor(struct nvkm_object *ob...
2015 Feb 20
6
[PATCH v4 0/6] nouveau/gk20a: RAM device removal & IOMMU support
Changes since v3:
- Use a single dma_attr for all DMA-API allocations in instmem instead of one
per allocation
- Use device.info.ram_size instead of pfb->ram to check whether VRAM is present
outside of nvkm
Changes since v2:
- Cleaner changes for ltc
- Fixed typos in gk20a instmem IOMMU comments
Changes since v1:
- Add missing else condition in ltc
- Remove extra flags that slipped into
2015 Feb 11
9
[PATCH v2 0/6] nouveau/gk20a: RAM device removal & IOMMU support
Changes since v1:
- Add missing else condition in ltc
- Remove extra flags that slipped into nouveau_display.c and nv84_fence.c.
Original cover letter:
Patches 1-3 make the presence of a RAM device optional, and remove GK20A's dummy
RAM driver we were using so far. On chips using shared memory, such a device
can confuse the driver into moving objects where there is no need to, and can
trick
2015 Jan 23
8
[PATCH 0/6] nouveau/gk20a: RAM device removal & IOMMU support
A series I have waited too long to submit, and the recent refactoring made
me pay the price of my perfectionism, so here are the features that are at least
completed
Patches 1-3 make the presence of a RAM device optional, and remove GK20A's dummy
RAM driver we were using so far. On chips using shared memory, such a device
can confuse the driver into moving objects where there is no need to,
2015 Feb 17
8
[PATCH v3 0/6] nouveau/gk20a: RAM device removal & IOMMU support
Thanks Ilia for the v2 review! Here is the v3 of this IOMMU support for GK20A
series.
Changes since v2:
- Cleaner changes for ltc
- Fixed typos in gk20a instmem IOMMU comments
Changes since v1:
- Add missing else condition in ltc
- Remove extra flags that slipped into nouveau_display.c and nv84_fence.c.
Original cover letter:
Patches 1-3 make the presence of a RAM device optional, and remove
2015 Feb 11
0
[PATCH v2 2/6] instmem/gk20a: move memory allocation to instmem
...HETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <subdev/fb.h>
+#include <core/mm.h>
+#include <core/device.h>
+
+#include "priv.h"
+
+struct gk20a_instobj_priv {
+ struct nvkm_instobj base;
+ /* Must be second member here - see nouveau_gpuobj_map_vm() */
+ struct nvkm_mem *mem;
+ /* Pointed by mem */
+ struct nvkm_mem _mem;
+ void *cpuaddr;
+ dma_addr_t handle;
+ struct nvkm_mm_node r;
+};
+
+struct gk20a_instmem_priv {
+ struct nvkm_instmem base;
+ spinl...
2015 Jan 23
0
[PATCH 4/6] instmem/gk20a: use DMA attributes
...176f50..4c8af6e 100644
--- a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -24,6 +24,10 @@
#include <core/mm.h>
#include <core/device.h>
+#ifdef __KERNEL__
+#include <linux/dma-attrs.h>
+#endif
+
#include "priv.h"
struct gk20a_instobj_priv {
@@ -34,6 +38,7 @@ struct gk20a_instobj_priv {
struct nvkm_mem _mem;
void *cpuaddr;
dma_addr_t handle;
+ struct dma_attrs attrs;
struct nvkm_mm_node r;
};
@@ -91,8 +96,8 @@ gk20a_instobj_dtor(struct nvkm_object *object)
if (unlikely(!node->handle))
return;
- dma_free_coherent(...
2015 Feb 17
0
[PATCH v3 4/6] instmem/gk20a: use DMA attributes
...6..4c8af6e3677c 100644
--- a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -24,6 +24,10 @@
#include <core/mm.h>
#include <core/device.h>
+#ifdef __KERNEL__
+#include <linux/dma-attrs.h>
+#endif
+
#include "priv.h"
struct gk20a_instobj_priv {
@@ -34,6 +38,7 @@ struct gk20a_instobj_priv {
struct nvkm_mem _mem;
void *cpuaddr;
dma_addr_t handle;
+ struct dma_attrs attrs;
struct nvkm_mm_node r;
};
@@ -91,8 +96,8 @@ gk20a_instobj_dtor(struct nvkm_object *object)
if (unlikely(!node->handle))
return;
- dma_free_coherent(...
2015 Apr 17
4
[PATCH 2/6] instmem/gk20a: refer to IOMMU physical translation bit
...struct nvkm_mm *mm;
> struct iommu_domain *domain;
> unsigned long iommu_pgshift;
> + unsigned long iommu_phys_addr_bit;
>
> /* Only used by DMA API */
> struct dma_attrs attrs;
> @@ -169,8 +170,8 @@ gk20a_instobj_dtor_iommu(struct gk20a_instobj_priv *_node)
> r = list_first_entry(&_node->mem->regions, struct nvkm_mm_node,
> rl_entry);
>
> - /* clear bit 34 to unmap pages */
> - r->offset &= ~BIT(34 - priv->iommu_pgshift);
> + /* clear IOMMU translation...
2015 Mar 10
1
[PATCH] instmem/gk20a: fix crash during error path
...ion(+), 1 deletion(-)
diff --git a/drm/nouveau/nvkm/subdev/instmem/gk20a.c b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index fcba72eb74a3..dd0994d9ebfc 100644
--- a/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -148,7 +148,7 @@ gk20a_instobj_dtor_dma(struct gk20a_instobj_priv *_node)
struct gk20a_instmem_priv *priv = (void *)nvkm_instmem(node);
struct device *dev = nv_device_base(nv_device(priv));
- if (unlikely(!node->handle))
+ if (unlikely(!node->cpuaddr))
return;
dma_free_attrs(dev, _node->mem->size << PAGE_SHIFT, node->cpuaddr,
--...
2015 Apr 16
15
[PATCH 0/6] map big page by platform IOMMU
Hi,
Generally the the imported buffers which has memory type TTM_PL_TT are
mapped as small pages probably due to lack of big page allocation. But the
platform device which also use memory type TTM_PL_TT, like GK20A, can
*allocate* big page though the IOMMU hardware inside the SoC. This is a try
to map the imported buffers as big pages in GMMU by the platform IOMMU. With
some preparation work to