]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: gk20a: Export VA config
authorArto Merilainen <amerilainen@nvidia.com>
Sun, 16 Feb 2014 11:21:06 +0000 (13:21 +0200)
committerHiroshi Doyu <hdoyu@nvidia.com>
Tue, 18 Feb 2014 12:07:40 +0000 (04:07 -0800)
This patch modifies GPU capability IOCTL so that it exports
1) big page size.
2) compression page size

Bug 1456570

Change-Id: I11ec56968fa78bafd9714cdc755b9c060956d96e
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/368134
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
Tested-by: Hiroshi Doyu <hdoyu@nvidia.com>
drivers/video/tegra/host/gk20a/gk20a.c
drivers/video/tegra/host/gk20a/mm_gk20a.c
drivers/video/tegra/host/gk20a/mm_gk20a.h
include/linux/nvhost_gpu_ioctl.h

index 50e169b58137b6d779b23e0db46d98797d67ee0f..7bbba4d1eb9f32377c9744663ef7f7fcfd0eff21 100644 (file)
@@ -1440,6 +1440,9 @@ int gk20a_init_gpu_characteristics(struct gk20a *g)
 
        gpu->bus_type = NVHOST_GPU_BUS_TYPE_AXI; /* always AXI for now */
 
+       gpu->big_page_size = g->mm.big_page_size;
+       gpu->compression_page_size = g->mm.compression_page_size;
+
        return 0;
 }
 
index 4a9cd5b64141c6be8092c7549469896e9e41e5a7..1ef51b52a17849ec287e2f2705e5ea43655b1fc0 100644 (file)
@@ -169,6 +169,7 @@ int gk20a_init_mm_setup_sw(struct gk20a *g)
        mutex_init(&mm->tlb_lock);
        mutex_init(&mm->l2_op_lock);
        mm->big_page_size = gmmu_page_sizes[gmmu_page_size_big];
+       mm->compression_page_size = gmmu_page_sizes[gmmu_page_size_big];
        mm->pde_stride    = mm->big_page_size << 10;
        mm->pde_stride_shift = ilog2(mm->pde_stride);
        BUG_ON(mm->pde_stride_shift > 31); /* we have assumptions about this */
index 62960c089cd2c6fb1cf9d06fd42f6d93fd359f08..584edb03f3cebdcc8fcd8d3682bde49fe3c616b0 100644 (file)
@@ -252,6 +252,7 @@ void gk20a_mm_l2_invalidate(struct gk20a *g);
 struct mm_gk20a {
        struct gk20a *g;
 
+       u32 compression_page_size;
        u32 big_page_size;
        u32 pde_stride;
        u32 pde_stride_shift;
index 8da7e7e9f416e9c4609c347ed4aec23b29e50a39..2093475502e6eb7835df0d1ba8cebc1427524768 100644 (file)
@@ -109,6 +109,9 @@ struct nvhost_gpu_characteristics {
        __u32 num_tpc_per_gpc;
        __u32 bus_type;
 
+       __u32 big_page_size;
+       __u32 compression_page_size;
+
        /* Notes:
           - This struct can be safely appended with new fields. However, always
             keep the structure size multiple of 8 and make sure that the binary