From 2a3bb9107fb1c10f714d78ade3ecb116c76acb40 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 26 Mar 2020 20:29:06 -0600 Subject: [PATCH] gpu: nvgpu: rename to top.h is a description of "devices" available on the GPU. As such rename this header to device.h. device.h will ultimately be a unit of actual C code that will rely on the top HAL to fill a device list. JIRA NVGPU-5421 Change-Id: If6e4a537d2209e429a678761a34713723da7a00a Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2319648 Reviewed-by: automaticguardword Reviewed-by: Konsta Holtta Reviewed-by: mobile promotions Tested-by: mobile promotions --- arch/nvgpu-hal-new.yaml | 2 +- drivers/gpu/nvgpu/common/fifo/engines.c | 2 +- drivers/gpu/nvgpu/common/nvlink/nvlink.c | 2 +- drivers/gpu/nvgpu/hal/fifo/engines_gm20b.c | 4 ++-- drivers/gpu/nvgpu/hal/fifo/engines_gp10b_fusa.c | 4 ++-- drivers/gpu/nvgpu/hal/nvlink/nvlink_gv100.c | 1 + drivers/gpu/nvgpu/hal/top/top_gm20b.c | 4 ++-- drivers/gpu/nvgpu/hal/top/top_gm20b_fusa.c | 4 ++-- drivers/gpu/nvgpu/hal/top/top_gp10b.c | 6 +++--- drivers/gpu/nvgpu/hal/top/top_gp10b_fusa.c | 4 ++-- drivers/gpu/nvgpu/include/nvgpu/{top.h => device.h} | 6 +++--- drivers/gpu/nvgpu/include/nvgpu/engines.h | 4 ++-- drivers/gpu/nvgpu/include/nvgpu/tsg.h | 4 ++-- userspace/units/fifo/engine/gm20b/nvgpu-engine-gm20b.c | 2 +- userspace/units/fifo/engine/gp10b/nvgpu-engine-gp10b.c | 2 +- userspace/units/mc/nvgpu-mc.c | 2 +- userspace/units/top/nvgpu-top.c | 2 +- 17 files changed, 28 insertions(+), 27 deletions(-) rename drivers/gpu/nvgpu/include/nvgpu/{top.h => device.h} (98%) diff --git a/arch/nvgpu-hal-new.yaml b/arch/nvgpu-hal-new.yaml index 3c67043d5..cf6beb651 100644 --- a/arch/nvgpu-hal-new.yaml +++ b/arch/nvgpu-hal-new.yaml @@ -778,7 +778,7 @@ func: top_fusa: safe: yes owner: Tejal K - sources: [ include/nvgpu/top.h, + sources: [ include/nvgpu/device.h, include/nvgpu/gops_top.h, hal/top/top_gm20b_fusa.c, hal/top/top_gm20b.h, diff --git a/drivers/gpu/nvgpu/common/fifo/engines.c b/drivers/gpu/nvgpu/common/fifo/engines.c index 4fbf79281..264d98901 100644 --- a/drivers/gpu/nvgpu/common/fifo/engines.c +++ b/drivers/gpu/nvgpu/common/fifo/engines.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/gpu/nvgpu/common/nvlink/nvlink.c b/drivers/gpu/nvgpu/common/nvlink/nvlink.c index 62af785bc..d1b296474 100644 --- a/drivers/gpu/nvgpu/common/nvlink/nvlink.c +++ b/drivers/gpu/nvgpu/common/nvlink/nvlink.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #ifdef CONFIG_NVGPU_NVLINK diff --git a/drivers/gpu/nvgpu/hal/fifo/engines_gm20b.c b/drivers/gpu/nvgpu/hal/fifo/engines_gm20b.c index 229e121be..8d2a5b9ed 100644 --- a/drivers/gpu/nvgpu/hal/fifo/engines_gm20b.c +++ b/drivers/gpu/nvgpu/hal/fifo/engines_gm20b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2020, 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"), @@ -20,7 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ -#include +#include #include #include #include diff --git a/drivers/gpu/nvgpu/hal/fifo/engines_gp10b_fusa.c b/drivers/gpu/nvgpu/hal/fifo/engines_gp10b_fusa.c index 93adc1828..a3d7fab3c 100644 --- a/drivers/gpu/nvgpu/hal/fifo/engines_gp10b_fusa.c +++ b/drivers/gpu/nvgpu/hal/fifo/engines_gp10b_fusa.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2020, 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"), @@ -20,7 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ -#include +#include #include #include #include diff --git a/drivers/gpu/nvgpu/hal/nvlink/nvlink_gv100.c b/drivers/gpu/nvgpu/hal/nvlink/nvlink_gv100.c index 1d08afa83..cfae7b830 100644 --- a/drivers/gpu/nvgpu/hal/nvlink/nvlink_gv100.c +++ b/drivers/gpu/nvgpu/hal/nvlink/nvlink_gv100.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/gpu/nvgpu/hal/top/top_gm20b.c b/drivers/gpu/nvgpu/hal/top/top_gm20b.c index ab9d46c0f..b57c2cf13 100644 --- a/drivers/gpu/nvgpu/hal/top/top_gm20b.c +++ b/drivers/gpu/nvgpu/hal/top/top_gm20b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2020, 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"), @@ -20,7 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ -#include +#include #include #include #include diff --git a/drivers/gpu/nvgpu/hal/top/top_gm20b_fusa.c b/drivers/gpu/nvgpu/hal/top/top_gm20b_fusa.c index d5dc26daf..d18b316ef 100644 --- a/drivers/gpu/nvgpu/hal/top/top_gm20b_fusa.c +++ b/drivers/gpu/nvgpu/hal/top/top_gm20b_fusa.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2020, 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"), @@ -20,7 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ -#include +#include #include #include #include diff --git a/drivers/gpu/nvgpu/hal/top/top_gp10b.c b/drivers/gpu/nvgpu/hal/top/top_gp10b.c index e1a302b9f..43fa7aa08 100644 --- a/drivers/gpu/nvgpu/hal/top/top_gp10b.c +++ b/drivers/gpu/nvgpu/hal/top/top_gp10b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2020, 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"), @@ -20,7 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ -#include +#include #include #include #include @@ -56,4 +56,4 @@ int gp10b_device_info_parse_data(struct gk20a *g, u32 table_entry, u32 *inst_id, nvgpu_log_info(g, "Inst_id: %u", *inst_id); return 0; -} \ No newline at end of file +} diff --git a/drivers/gpu/nvgpu/hal/top/top_gp10b_fusa.c b/drivers/gpu/nvgpu/hal/top/top_gp10b_fusa.c index 84790338f..116431ee0 100644 --- a/drivers/gpu/nvgpu/hal/top/top_gp10b_fusa.c +++ b/drivers/gpu/nvgpu/hal/top/top_gp10b_fusa.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2020, 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"), @@ -20,7 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ -#include +#include #include #include #include diff --git a/drivers/gpu/nvgpu/include/nvgpu/top.h b/drivers/gpu/nvgpu/include/nvgpu/device.h similarity index 98% rename from drivers/gpu/nvgpu/include/nvgpu/top.h rename to drivers/gpu/nvgpu/include/nvgpu/device.h index 092553269..d214b491d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/top.h +++ b/drivers/gpu/nvgpu/include/nvgpu/device.h @@ -20,8 +20,8 @@ * DEALINGS IN THE SOFTWARE. */ -#ifndef NVGPU_TOP_H -#define NVGPU_TOP_H +#ifndef NVGPU_DEVICE_H +#define NVGPU_DEVICE_H /** * @file * @@ -118,4 +118,4 @@ struct nvgpu_device_info { /** @endcond DOXYGEN_SHOULD_SKIP_THIS */ }; -#endif /* NVGPU_TOP_H */ +#endif /* NVGPU_DEVICE_H */ diff --git a/drivers/gpu/nvgpu/include/nvgpu/engines.h b/drivers/gpu/nvgpu/include/nvgpu/engines.h index db7d547c0..b6b80f994 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/engines.h +++ b/drivers/gpu/nvgpu/include/nvgpu/engines.h @@ -46,7 +46,7 @@ struct nvgpu_fifo; /** * Engine enum types used for s/w purpose. These enum values are * different as compared to engine enum types defined by h/w. - * Refer top.h header file. + * Refer device.h header file. */ enum nvgpu_fifo_engine { /** GR engine enum */ @@ -110,7 +110,7 @@ struct nvgpu_engine_info { }; /** * @brief Get s/w defined engine enum type for engine enum type defined by h/w. - * See top.h for engine enum types defined by h/w. + * See device.h for engine enum types defined by h/w. * * @param g [in] The GPU driver struct. * @param engine_type [in] Engine enum type defined by h/w. diff --git a/drivers/gpu/nvgpu/include/nvgpu/tsg.h b/drivers/gpu/nvgpu/include/nvgpu/tsg.h index f5f63bdfc..ed76a6195 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/tsg.h +++ b/drivers/gpu/nvgpu/include/nvgpu/tsg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2020, 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"), @@ -151,7 +151,7 @@ struct nvgpu_tsg { * is one runlist per engine (graphics and grcopy share a runlist). * The runlist_id specifies the h/w runlist to which a runlist in * memory is being submitted. Each runlist serves a specific set of - * engines. Refer top.h. + * engines. Refer to device.h. */ u32 runlist_id; /** tgid (OS specific) of the process that openend the TSG. */ diff --git a/userspace/units/fifo/engine/gm20b/nvgpu-engine-gm20b.c b/userspace/units/fifo/engine/gm20b/nvgpu-engine-gm20b.c index 99b663f65..e1f25b603 100644 --- a/userspace/units/fifo/engine/gm20b/nvgpu-engine-gm20b.c +++ b/userspace/units/fifo/engine/gm20b/nvgpu-engine-gm20b.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/userspace/units/fifo/engine/gp10b/nvgpu-engine-gp10b.c b/userspace/units/fifo/engine/gp10b/nvgpu-engine-gp10b.c index d97b14405..4c89db653 100644 --- a/userspace/units/fifo/engine/gp10b/nvgpu-engine-gp10b.c +++ b/userspace/units/fifo/engine/gp10b/nvgpu-engine-gp10b.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/userspace/units/mc/nvgpu-mc.c b/userspace/units/mc/nvgpu-mc.c index 4f294f788..6527afe9b 100644 --- a/userspace/units/mc/nvgpu-mc.c +++ b/userspace/units/mc/nvgpu-mc.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/userspace/units/top/nvgpu-top.c b/userspace/units/top/nvgpu-top.c index 3c0dbc1aa..60faf4d28 100644 --- a/userspace/units/top/nvgpu-top.c +++ b/userspace/units/top/nvgpu-top.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include