From 94eebcdd8cacc9a2dc20485e0d3d15fc51507c2c Mon Sep 17 00:00:00 2001 From: Nitin Kumbhar Date: Fri, 10 Aug 2018 10:34:17 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1797902 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/cde_gm20b.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'drivers/gpu/nvgpu/os/linux/cde_gm20b.c') 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 @@ /* * GM20B CDE * - * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -35,10 +35,10 @@ enum programs { PROG_PASSTHROUGH = 6, }; -static void gm20b_cde_get_program_numbers(struct gk20a *g, - u32 block_height_log2, - u32 shader_parameter, - int *hprog_out, int *vprog_out) +void gm20b_cde_get_program_numbers(struct gk20a *g, + u32 block_height_log2, + u32 shader_parameter, + int *hprog_out, int *vprog_out) { int hprog = PROG_HPASS; int vprog = (block_height_log2 >= 2) ? @@ -56,9 +56,3 @@ static void gm20b_cde_get_program_numbers(struct gk20a *g, *hprog_out = hprog; *vprog_out = vprog; } - -struct nvgpu_os_linux_ops gm20b_cde_ops = { - .cde = { - .get_program_numbers = gm20b_cde_get_program_numbers, - }, -}; -- cgit v1.2.2