summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/cde_gm20b.c
diff options
context:
space:
mode:
authorNitin Kumbhar <nkumbhar@nvidia.com>2018-08-10 01:04:17 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-29 23:34:34 -0400
commit94eebcdd8cacc9a2dc20485e0d3d15fc51507c2c (patch)
treed69221db59a680e1e45f44f397b8106f2db34816 /drivers/gpu/nvgpu/os/linux/cde_gm20b.c
parent18e060227da92e4df8f2e5400fec7f6d7bdaad4a (diff)
gpu: nvgpu: linux: move os ops to a common file
Currently only cde uses nvgpu_os_linux_ops to set up linux specific ops. Move nvgpu_os_linux_ops of a gpu to a common file so that those can be reused for other os ops of that gpu. JIRA NVGPU-603 Change-Id: Icf1ff275d3832229137f730fe8183b8015e82673 Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1797902 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/cde_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/os/linux/cde_gm20b.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/cde_gm20b.c b/drivers/gpu/nvgpu/os/linux/cde_gm20b.c
index 1cd15c54..7f71b740 100644
--- a/drivers/gpu/nvgpu/os/linux/cde_gm20b.c
+++ b/drivers/gpu/nvgpu/os/linux/cde_gm20b.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GM20B CDE 2 * GM20B CDE
3 * 3 *
4 * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"), 7 * copy of this software and associated documentation files (the "Software"),
@@ -35,10 +35,10 @@ enum programs {
35 PROG_PASSTHROUGH = 6, 35 PROG_PASSTHROUGH = 6,
36}; 36};
37 37
38static void gm20b_cde_get_program_numbers(struct gk20a *g, 38void gm20b_cde_get_program_numbers(struct gk20a *g,
39 u32 block_height_log2, 39 u32 block_height_log2,
40 u32 shader_parameter, 40 u32 shader_parameter,
41 int *hprog_out, int *vprog_out) 41 int *hprog_out, int *vprog_out)
42{ 42{
43 int hprog = PROG_HPASS; 43 int hprog = PROG_HPASS;
44 int vprog = (block_height_log2 >= 2) ? 44 int vprog = (block_height_log2 >= 2) ?
@@ -56,9 +56,3 @@ static void gm20b_cde_get_program_numbers(struct gk20a *g,
56 *hprog_out = hprog; 56 *hprog_out = hprog;
57 *vprog_out = vprog; 57 *vprog_out = vprog;
58} 58}
59
60struct nvgpu_os_linux_ops gm20b_cde_ops = {
61 .cde = {
62 .get_program_numbers = gm20b_cde_get_program_numbers,
63 },
64};