mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: Per-SoC compressible page size
Define smallest compressible page size per SoC, and use that for determining if a compressible kind should be downgraded to uncompressed. Bug 1605769 Change-Id: I7c9991ba0ae82fe533641f045e506c0b01a10d8b Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/724492
This commit is contained in:
committed by
Dan Willemsen
parent
9f4405aeb5
commit
9974201d61
@@ -55,11 +55,17 @@ static int gk20a_fb_compression_page_size(struct gk20a *g)
|
||||
return SZ_128K;
|
||||
}
|
||||
|
||||
static int gk20a_fb_compressible_page_size(struct gk20a *g)
|
||||
{
|
||||
return SZ_64K;
|
||||
}
|
||||
|
||||
void gk20a_init_fb(struct gpu_ops *gops)
|
||||
{
|
||||
gops->fb.reset = fb_gk20a_reset;
|
||||
gops->fb.set_mmu_page_size = gk20a_fb_set_mmu_page_size;
|
||||
gops->fb.compression_page_size = gk20a_fb_compression_page_size;
|
||||
gops->fb.compressible_page_size = gk20a_fb_compressible_page_size;
|
||||
gk20a_init_uncompressed_kind_map();
|
||||
gk20a_init_kind_attr();
|
||||
}
|
||||
|
||||
@@ -182,6 +182,7 @@ struct gpu_ops {
|
||||
void (*init_kind_attr)(struct gk20a *g);
|
||||
void (*set_mmu_page_size)(struct gk20a *g);
|
||||
int (*compression_page_size)(struct gk20a *g);
|
||||
int (*compressible_page_size)(struct gk20a *g);
|
||||
void (*dump_vpr_wpr_info)(struct gk20a *g);
|
||||
} fb;
|
||||
struct {
|
||||
|
||||
@@ -1001,8 +1001,8 @@ static int setup_buffer_kind_and_compression(struct vm_gk20a *vm,
|
||||
}
|
||||
}
|
||||
/* comptags only supported for suitable kinds, 128KB pagesize */
|
||||
if (unlikely(kind_compressible &&
|
||||
(vm->gmmu_page_sizes[pgsz_idx] != vm->big_page_size))) {
|
||||
if (kind_compressible &&
|
||||
vm->gmmu_page_sizes[pgsz_idx] < g->ops.fb.compressible_page_size(g)) {
|
||||
/*
|
||||
gk20a_warn(d, "comptags specified"
|
||||
" but pagesize being used doesn't support it");*/
|
||||
|
||||
@@ -95,6 +95,11 @@ static int gm20b_fb_compression_page_size(struct gk20a *g)
|
||||
return SZ_128K;
|
||||
}
|
||||
|
||||
static int gm20b_fb_compressible_page_size(struct gk20a *g)
|
||||
{
|
||||
return SZ_64K;
|
||||
}
|
||||
|
||||
static void gm20b_fb_dump_vpr_wpr_info(struct gk20a *g)
|
||||
{
|
||||
u32 val;
|
||||
@@ -129,6 +134,7 @@ void gm20b_init_fb(struct gpu_ops *gops)
|
||||
gops->fb.init_fs_state = fb_gm20b_init_fs_state;
|
||||
gops->fb.set_mmu_page_size = gm20b_fb_set_mmu_page_size;
|
||||
gops->fb.compression_page_size = gm20b_fb_compression_page_size;
|
||||
gops->fb.compressible_page_size = gm20b_fb_compressible_page_size;
|
||||
gops->fb.dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info;
|
||||
gm20b_init_uncompressed_kind_map();
|
||||
gm20b_init_kind_attr();
|
||||
|
||||
Reference in New Issue
Block a user