mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: gp10b: Add new supported kind
Bug 1567274 Change-Id: I38c3ffd6129893b02f6bef878a579925cf2bfa1e Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/606931 GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Deepak Nibade
parent
a83e5281af
commit
1f11c7ffe7
@@ -13,6 +13,7 @@ obj-$(CONFIG_GK20A) += \
|
||||
mc_gp10b.o \
|
||||
ltc_gp10b.o \
|
||||
mm_gp10b.o \
|
||||
fb_gp10b.o \
|
||||
hal_gp10b.o
|
||||
|
||||
obj-$(CONFIG_TEGRA_GK20A) += platform_gp10b_tegra.o
|
||||
|
||||
96
drivers/gpu/nvgpu/gp10b/fb_gp10b.c
Normal file
96
drivers/gpu/nvgpu/gp10b/fb_gp10b.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* GP10B FB
|
||||
*
|
||||
* Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "gk20a/gk20a.h"
|
||||
#include "gm20b/fb_gm20b.h"
|
||||
#include "gk20a/kind_gk20a.h"
|
||||
|
||||
#include "hw_gmmu_gp10b.h"
|
||||
|
||||
static void gp10b_init_uncompressed_kind_map(void)
|
||||
{
|
||||
gm20b_init_uncompressed_kind_map();
|
||||
|
||||
gk20a_uc_kind_map[gmmu_pte_kind_z16_2cz_v()] =
|
||||
gk20a_uc_kind_map[gmmu_pte_kind_z16_ms2_2cz_v()] =
|
||||
gk20a_uc_kind_map[gmmu_pte_kind_z16_ms4_2cz_v()] =
|
||||
gk20a_uc_kind_map[gmmu_pte_kind_z16_ms8_2cz_v()] =
|
||||
gk20a_uc_kind_map[gmmu_pte_kind_z16_ms16_2cz_v()] =
|
||||
gmmu_pte_kind_z16_v();
|
||||
|
||||
gk20a_uc_kind_map[gmmu_pte_kind_c32_ms4_4cbra_v()] =
|
||||
gk20a_uc_kind_map[gmmu_pte_kind_c64_ms4_4cbra_v()] =
|
||||
gmmu_pte_kind_generic_16bx2_v();
|
||||
}
|
||||
|
||||
static bool gp10b_kind_supported(u8 k)
|
||||
{
|
||||
return (k >= gmmu_pte_kind_z16_2cz_v() &&
|
||||
k <= gmmu_pte_kind_z16_ms8_2cz_v())
|
||||
|| k == gmmu_pte_kind_z16_ms16_2cz_v()
|
||||
|| k == gmmu_pte_kind_c32_ms4_4cbra_v()
|
||||
|| k == gmmu_pte_kind_c64_ms4_4cbra_v();
|
||||
}
|
||||
|
||||
static bool gp10b_kind_z(u8 k)
|
||||
{
|
||||
return (k >= gmmu_pte_kind_z16_2cz_v() &&
|
||||
k <= gmmu_pte_kind_z16_ms8_2cz_v()) ||
|
||||
k == gmmu_pte_kind_z16_ms16_2cz_v();
|
||||
}
|
||||
|
||||
static bool gp10b_kind_compressible(u8 k)
|
||||
{
|
||||
return (k >= gmmu_pte_kind_z16_2cz_v() &&
|
||||
k <= gmmu_pte_kind_z16_ms8_2cz_v()) ||
|
||||
k == gmmu_pte_kind_z16_ms16_2cz_v() ||
|
||||
(k >= gmmu_pte_kind_z16_4cz_v() &&
|
||||
k <= gmmu_pte_kind_z16_ms16_4cz_v());
|
||||
}
|
||||
|
||||
static bool gp10b_kind_zbc(u8 k)
|
||||
{
|
||||
return (k >= gmmu_pte_kind_z16_2cz_v() &&
|
||||
k <= gmmu_pte_kind_z16_ms8_2cz_v()) ||
|
||||
k == gmmu_pte_kind_z16_ms16_2cz_v();
|
||||
}
|
||||
|
||||
static void gp10b_init_kind_attr(void)
|
||||
{
|
||||
u16 k;
|
||||
|
||||
gm20b_init_kind_attr();
|
||||
|
||||
for (k = 0; k < 256; k++) {
|
||||
if (gp10b_kind_supported((u8)k))
|
||||
gk20a_kind_attr[k] |= GK20A_KIND_ATTR_SUPPORTED;
|
||||
if (gp10b_kind_compressible((u8)k))
|
||||
gk20a_kind_attr[k] |= GK20A_KIND_ATTR_COMPRESSIBLE;
|
||||
if (gp10b_kind_z((u8)k))
|
||||
gk20a_kind_attr[k] |= GK20A_KIND_ATTR_Z;
|
||||
if (gp10b_kind_zbc((u8)k))
|
||||
gk20a_kind_attr[k] |= GK20A_KIND_ATTR_ZBC;
|
||||
}
|
||||
}
|
||||
|
||||
void gp10b_init_fb(struct gpu_ops *gops)
|
||||
{
|
||||
gm20b_init_fb(gops);
|
||||
|
||||
gp10b_init_uncompressed_kind_map();
|
||||
gp10b_init_kind_attr();
|
||||
}
|
||||
21
drivers/gpu/nvgpu/gp10b/fb_gp10b.h
Normal file
21
drivers/gpu/nvgpu/gp10b/fb_gp10b.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* GP10B FB
|
||||
*
|
||||
* Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#ifndef _NVGPU_GP10B_FB
|
||||
#define _NVGPU_GP10B_FB
|
||||
struct gpu_ops;
|
||||
|
||||
void gp10b_init_fb(struct gpu_ops *gops);
|
||||
#endif
|
||||
@@ -24,9 +24,9 @@
|
||||
#include "gp10b/mc_gp10b.h"
|
||||
#include "gp10b/ltc_gp10b.h"
|
||||
#include "gp10b/mm_gp10b.h"
|
||||
#include "gp10b/fb_gp10b.h"
|
||||
|
||||
#include "gm20b/gr_gm20b.h"
|
||||
#include "gm20b/fb_gm20b.h"
|
||||
#include "gm20b/gm20b_gating_reglist.h"
|
||||
#include "gm20b/fifo_gm20b.h"
|
||||
#include "gm20b/gr_ctx_gm20b.h"
|
||||
@@ -91,7 +91,7 @@ int gp10b_init_hal(struct gk20a *g)
|
||||
gp10b_init_mc(gops);
|
||||
gp10b_init_gr(gops);
|
||||
gp10b_init_ltc(gops);
|
||||
gm20b_init_fb(gops);
|
||||
gp10b_init_fb(gops);
|
||||
gm20b_init_fifo(gops);
|
||||
gm20b_init_gr_ctx(gops);
|
||||
gp10b_init_mm(gops);
|
||||
|
||||
@@ -270,6 +270,26 @@ static inline u32 gmmu_pte_kind_z16_ms16_2z_v(void)
|
||||
{
|
||||
return 0x0000000b;
|
||||
}
|
||||
static inline u32 gmmu_pte_kind_z16_2cz_v(void)
|
||||
{
|
||||
return 0x00000036;
|
||||
}
|
||||
static inline u32 gmmu_pte_kind_z16_ms2_2cz_v(void)
|
||||
{
|
||||
return 0x00000037;
|
||||
}
|
||||
static inline u32 gmmu_pte_kind_z16_ms4_2cz_v(void)
|
||||
{
|
||||
return 0x00000038;
|
||||
}
|
||||
static inline u32 gmmu_pte_kind_z16_ms8_2cz_v(void)
|
||||
{
|
||||
return 0x00000039;
|
||||
}
|
||||
static inline u32 gmmu_pte_kind_z16_ms16_2cz_v(void)
|
||||
{
|
||||
return 0x0000005f;
|
||||
}
|
||||
static inline u32 gmmu_pte_kind_z16_4cz_v(void)
|
||||
{
|
||||
return 0x0000000c;
|
||||
@@ -1026,6 +1046,10 @@ static inline u32 gmmu_pte_kind_c32_ms4_2bra_v(void)
|
||||
{
|
||||
return 0x000000e3;
|
||||
}
|
||||
static inline u32 gmmu_pte_kind_c32_ms4_4cbra_v(void)
|
||||
{
|
||||
return 0x0000002c;
|
||||
}
|
||||
static inline u32 gmmu_pte_kind_c32_ms8_ms16_2c_v(void)
|
||||
{
|
||||
return 0x000000e4;
|
||||
@@ -1086,6 +1110,10 @@ static inline u32 gmmu_pte_kind_c64_ms4_2bra_v(void)
|
||||
{
|
||||
return 0x000000f1;
|
||||
}
|
||||
static inline u32 gmmu_pte_kind_c64_ms4_4cbra_v(void)
|
||||
{
|
||||
return 0x0000002d;
|
||||
}
|
||||
static inline u32 gmmu_pte_kind_c64_ms8_ms16_2c_v(void)
|
||||
{
|
||||
return 0x000000f2;
|
||||
|
||||
Reference in New Issue
Block a user