From 6be055e7be239e270f0d379f4e234a27f9fae011 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Thu, 14 Mar 2019 18:07:10 -0700 Subject: [PATCH] gpu: nvgpu: fb: Move chip specific fb code to hal Move chip specific fb code from common to hal folder. JIRA NVGPU-2034 Change-Id: I1d982a59fa050fb429e0369287e11109232fa4a4 Signed-off-by: Seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/2070184 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/Makefile | 12 ++++++------ drivers/gpu/nvgpu/Makefile.sources | 12 ++++++------ drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c | 4 ++-- drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c | 6 +++--- drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 2 +- drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 4 ++-- drivers/gpu/nvgpu/gv100/hal_gv100.c | 10 +++++----- drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 6 +++--- drivers/gpu/nvgpu/{common => hal}/fb/fb_gm20b.c | 0 drivers/gpu/nvgpu/{common => hal}/fb/fb_gm20b.h | 0 drivers/gpu/nvgpu/{common => hal}/fb/fb_gp106.c | 0 drivers/gpu/nvgpu/{common => hal}/fb/fb_gp106.h | 0 drivers/gpu/nvgpu/{common => hal}/fb/fb_gp10b.c | 0 drivers/gpu/nvgpu/{common => hal}/fb/fb_gp10b.h | 0 drivers/gpu/nvgpu/{common => hal}/fb/fb_gv100.c | 0 drivers/gpu/nvgpu/{common => hal}/fb/fb_gv100.h | 0 drivers/gpu/nvgpu/{common => hal}/fb/fb_gv11b.c | 0 drivers/gpu/nvgpu/{common => hal}/fb/fb_gv11b.h | 0 drivers/gpu/nvgpu/{common => hal}/fb/fb_tu104.c | 4 ++-- drivers/gpu/nvgpu/{common => hal}/fb/fb_tu104.h | 0 drivers/gpu/nvgpu/tu104/hal_tu104.c | 12 ++++++------ userspace/units/mm/gmmu/page_table/page_table.c | 5 +++-- .../units/mm/page_table_faults/page_table_faults.c | 7 ++++--- userspace/units/mm/vm/vm.c | 4 ++-- 24 files changed, 45 insertions(+), 43 deletions(-) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_gm20b.c (100%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_gm20b.h (100%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_gp106.c (100%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_gp106.h (100%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_gp10b.c (100%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_gp10b.h (100%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_gv100.c (100%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_gv100.h (100%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_gv11b.c (100%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_gv11b.h (100%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_tu104.c (99%) rename drivers/gpu/nvgpu/{common => hal}/fb/fb_tu104.h (100%) diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index 48cd4417c..1e5d464cf 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile @@ -35,12 +35,6 @@ obj-$(CONFIG_GK20A) := nvgpu.o nvgpu-y += \ common/ptimer/ptimer.o \ common/ptimer/ptimer_gk20a.o \ - common/fb/fb_gm20b.o \ - common/fb/fb_gp10b.o \ - common/fb/fb_gp106.o \ - common/fb/fb_gv11b.o \ - common/fb/fb_gv100.o \ - common/fb/fb_tu104.o \ common/perf/perf_gm20b.o \ common/perf/perf_gv11b.o \ common/perf/perfbuf.o \ @@ -190,6 +184,12 @@ nvgpu-y += \ hal/ltc/ltc_gp10b.o \ hal/ltc/ltc_gv11b.o \ hal/ltc/ltc_tu104.o \ + hal/fb/fb_gm20b.o \ + hal/fb/fb_gp10b.o \ + hal/fb/fb_gp106.o \ + hal/fb/fb_gv11b.o \ + hal/fb/fb_gv100.o \ + hal/fb/fb_tu104.o \ hal/fuse/fuse_gm20b.o \ hal/fuse/fuse_gp10b.o \ hal/fuse/fuse_gp106.o \ diff --git a/drivers/gpu/nvgpu/Makefile.sources b/drivers/gpu/nvgpu/Makefile.sources index f30690b83..e3d3dd7c1 100644 --- a/drivers/gpu/nvgpu/Makefile.sources +++ b/drivers/gpu/nvgpu/Makefile.sources @@ -77,11 +77,6 @@ srcs += common/sim.c \ common/mm/mm.c \ common/mm/dma.c \ common/mm/vidmem.c \ - common/fb/fb_gm20b.c \ - common/fb/fb_gp10b.c \ - common/fb/fb_gp106.c \ - common/fb/fb_gv100.c \ - common/fb/fb_gv11b.c \ common/init/hal_init.c \ common/xve/xve_gp106.c \ common/therm/therm.c \ @@ -291,7 +286,6 @@ srcs += common/sim.c \ gv100/hal_gv100.c \ gv100/gsp_gv100.c \ gv100/clk_gv100.c \ - common/fb/fb_tu104.c \ common/mc/mc_tu104.c \ tu104/bios_tu104.c \ tu104/ecc_tu104.c \ @@ -355,6 +349,12 @@ srcs += common/sim.c \ hal/ltc/ltc_gp10b.c \ hal/ltc/ltc_gv11b.c \ hal/ltc/ltc_tu104.c \ + hal/fb/fb_gm20b.c \ + hal/fb/fb_gp10b.c \ + hal/fb/fb_gp106.c \ + hal/fb/fb_gv100.c \ + hal/fb/fb_gv11b.c \ + hal/fb/fb_tu104.c \ hal/fuse/fuse_gm20b.c \ hal/fuse/fuse_gp10b.c \ hal/fuse/fuse_gp106.c \ diff --git a/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c index a6e603c7a..00f8234a0 100644 --- a/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/common/vgpu/gp10b/vgpu_hal_gp10b.c @@ -27,9 +27,9 @@ #include "hal/therm/therm_gp10b.h" #include "hal/ltc/ltc_gm20b.h" #include "hal/ltc/ltc_gp10b.h" +#include "hal/fb/fb_gm20b.h" +#include "hal/fb/fb_gp10b.h" -#include "common/fb/fb_gm20b.h" -#include "common/fb/fb_gp10b.h" #include "common/netlist/netlist_gp10b.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gm20b.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gp10b.h" diff --git a/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c index ef7469482..957c8fea0 100644 --- a/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/common/vgpu/gv11b/vgpu_hal_gv11b.c @@ -31,10 +31,10 @@ #include "hal/ltc/ltc_gm20b.h" #include "hal/ltc/ltc_gp10b.h" #include "hal/ltc/ltc_gv11b.h" +#include "hal/fb/fb_gm20b.h" +#include "hal/fb/fb_gp10b.h" +#include "hal/fb/fb_gv11b.h" -#include "common/fb/fb_gm20b.h" -#include "common/fb/fb_gp10b.h" -#include "common/fb/fb_gv11b.h" #include "common/netlist/netlist_gv11b.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gm20b.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gp10b.h" diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 0ebd54b1f..359322ee1 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c @@ -44,6 +44,7 @@ #include "hal/cbc/cbc_gm20b.h" #include "hal/therm/therm_gm20b.h" #include "hal/ltc/ltc_gm20b.h" +#include "hal/fb/fb_gm20b.h" #include "hal/fuse/fuse_gm20b.h" #include "hal/fifo/engines_gm20b.h" #include "hal/gr/zbc/zbc_gm20b.h" @@ -51,7 +52,6 @@ #include "hal/falcon/falcon_gk20a.h" #include "common/ptimer/ptimer_gk20a.h" -#include "common/fb/fb_gm20b.h" #include "common/netlist/netlist_gm20b.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gm20b.h" #include "common/gr/config/gr_config_gm20b.h" diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index e9c5130e8..8fe6208d8 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -50,6 +50,8 @@ #include "hal/therm/therm_gp10b.h" #include "hal/ltc/ltc_gm20b.h" #include "hal/ltc/ltc_gp10b.h" +#include "hal/fb/fb_gm20b.h" +#include "hal/fb/fb_gp10b.h" #include "hal/fuse/fuse_gm20b.h" #include "hal/fuse/fuse_gp10b.h" #include "hal/fifo/engines_gm20b.h" @@ -59,8 +61,6 @@ #include "hal/falcon/falcon_gk20a.h" #include "common/ptimer/ptimer_gk20a.h" -#include "common/fb/fb_gm20b.h" -#include "common/fb/fb_gp10b.h" #include "common/netlist/netlist_gp10b.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gm20b.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gp10b.h" diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index a64fcc367..0d6c913f2 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c @@ -37,6 +37,11 @@ #include "hal/ltc/ltc_gm20b.h" #include "hal/ltc/ltc_gp10b.h" #include "hal/ltc/ltc_gv11b.h" +#include "hal/fb/fb_gm20b.h" +#include "hal/fb/fb_gp10b.h" +#include "hal/fb/fb_gp106.h" +#include "hal/fb/fb_gv11b.h" +#include "hal/fb/fb_gv100.h" #include "hal/fuse/fuse_gm20b.h" #include "hal/fuse/fuse_gp10b.h" #include "hal/fuse/fuse_gp106.h" @@ -48,11 +53,6 @@ #include "hal/falcon/falcon_gk20a.h" #include "common/ptimer/ptimer_gk20a.h" -#include "common/fb/fb_gm20b.h" -#include "common/fb/fb_gp10b.h" -#include "common/fb/fb_gp106.h" -#include "common/fb/fb_gv11b.h" -#include "common/fb/fb_gv100.h" #include "common/xve/xve_gp106.h" #include "common/netlist/netlist_gv100.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gm20b.h" diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 3813a0d1f..a9c6aee2d 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c @@ -40,6 +40,9 @@ #include "hal/ltc/ltc_gm20b.h" #include "hal/ltc/ltc_gp10b.h" #include "hal/ltc/ltc_gv11b.h" +#include "hal/fb/fb_gm20b.h" +#include "hal/fb/fb_gp10b.h" +#include "hal/fb/fb_gv11b.h" #include "hal/fuse/fuse_gm20b.h" #include "hal/fuse/fuse_gp10b.h" #include "hal/fifo/engines_gv11b.h" @@ -51,9 +54,6 @@ #include "hal/falcon/falcon_gk20a.h" #include "common/ptimer/ptimer_gk20a.h" -#include "common/fb/fb_gm20b.h" -#include "common/fb/fb_gp10b.h" -#include "common/fb/fb_gv11b.h" #include "common/netlist/netlist_gv11b.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gm20b.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gp10b.h" diff --git a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c b/drivers/gpu/nvgpu/hal/fb/fb_gm20b.c similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_gm20b.c rename to drivers/gpu/nvgpu/hal/fb/fb_gm20b.c diff --git a/drivers/gpu/nvgpu/common/fb/fb_gm20b.h b/drivers/gpu/nvgpu/hal/fb/fb_gm20b.h similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_gm20b.h rename to drivers/gpu/nvgpu/hal/fb/fb_gm20b.h diff --git a/drivers/gpu/nvgpu/common/fb/fb_gp106.c b/drivers/gpu/nvgpu/hal/fb/fb_gp106.c similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_gp106.c rename to drivers/gpu/nvgpu/hal/fb/fb_gp106.c diff --git a/drivers/gpu/nvgpu/common/fb/fb_gp106.h b/drivers/gpu/nvgpu/hal/fb/fb_gp106.h similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_gp106.h rename to drivers/gpu/nvgpu/hal/fb/fb_gp106.h diff --git a/drivers/gpu/nvgpu/common/fb/fb_gp10b.c b/drivers/gpu/nvgpu/hal/fb/fb_gp10b.c similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_gp10b.c rename to drivers/gpu/nvgpu/hal/fb/fb_gp10b.c diff --git a/drivers/gpu/nvgpu/common/fb/fb_gp10b.h b/drivers/gpu/nvgpu/hal/fb/fb_gp10b.h similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_gp10b.h rename to drivers/gpu/nvgpu/hal/fb/fb_gp10b.h diff --git a/drivers/gpu/nvgpu/common/fb/fb_gv100.c b/drivers/gpu/nvgpu/hal/fb/fb_gv100.c similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_gv100.c rename to drivers/gpu/nvgpu/hal/fb/fb_gv100.c diff --git a/drivers/gpu/nvgpu/common/fb/fb_gv100.h b/drivers/gpu/nvgpu/hal/fb/fb_gv100.h similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_gv100.h rename to drivers/gpu/nvgpu/hal/fb/fb_gv100.h diff --git a/drivers/gpu/nvgpu/common/fb/fb_gv11b.c b/drivers/gpu/nvgpu/hal/fb/fb_gv11b.c similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_gv11b.c rename to drivers/gpu/nvgpu/hal/fb/fb_gv11b.c diff --git a/drivers/gpu/nvgpu/common/fb/fb_gv11b.h b/drivers/gpu/nvgpu/hal/fb/fb_gv11b.h similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_gv11b.h rename to drivers/gpu/nvgpu/hal/fb/fb_gv11b.h diff --git a/drivers/gpu/nvgpu/common/fb/fb_tu104.c b/drivers/gpu/nvgpu/hal/fb/fb_tu104.c similarity index 99% rename from drivers/gpu/nvgpu/common/fb/fb_tu104.c rename to drivers/gpu/nvgpu/hal/fb/fb_tu104.c index ea1aebb2c..b57fe40bd 100644 --- a/drivers/gpu/nvgpu/common/fb/fb_tu104.c +++ b/drivers/gpu/nvgpu/hal/fb/fb_tu104.c @@ -30,8 +30,8 @@ #include #include -#include "common/fb/fb_gv11b.h" -#include "common/fb/fb_gv100.h" +#include "hal/fb/fb_gv11b.h" +#include "hal/fb/fb_gv100.h" #include "common/mc/mc_tu104.h" #include "tu104/func_tu104.h" diff --git a/drivers/gpu/nvgpu/common/fb/fb_tu104.h b/drivers/gpu/nvgpu/hal/fb/fb_tu104.h similarity index 100% rename from drivers/gpu/nvgpu/common/fb/fb_tu104.h rename to drivers/gpu/nvgpu/hal/fb/fb_tu104.h diff --git a/drivers/gpu/nvgpu/tu104/hal_tu104.c b/drivers/gpu/nvgpu/tu104/hal_tu104.c index efab0280f..daabf1573 100644 --- a/drivers/gpu/nvgpu/tu104/hal_tu104.c +++ b/drivers/gpu/nvgpu/tu104/hal_tu104.c @@ -40,6 +40,12 @@ #include "hal/ltc/ltc_gp10b.h" #include "hal/ltc/ltc_gv11b.h" #include "hal/ltc/ltc_tu104.h" +#include "hal/fb/fb_gm20b.h" +#include "hal/fb/fb_gp10b.h" +#include "hal/fb/fb_gp106.h" +#include "hal/fb/fb_gv11b.h" +#include "hal/fb/fb_gv100.h" +#include "hal/fb/fb_tu104.h" #include "hal/fuse/fuse_gm20b.h" #include "hal/fuse/fuse_gp10b.h" #include "hal/fuse/fuse_gp106.h" @@ -52,12 +58,6 @@ #include "hal/falcon/falcon_gk20a.h" #include "common/ptimer/ptimer_gk20a.h" -#include "common/fb/fb_gm20b.h" -#include "common/fb/fb_gp10b.h" -#include "common/fb/fb_gp106.h" -#include "common/fb/fb_gv11b.h" -#include "common/fb/fb_gv100.h" -#include "common/fb/fb_tu104.h" #include "common/xve/xve_gp106.h" #include "common/netlist/netlist_tu104.h" #include "common/gr/ctxsw_prog/ctxsw_prog_gm20b.h" diff --git a/userspace/units/mm/gmmu/page_table/page_table.c b/userspace/units/mm/gmmu/page_table/page_table.c index 66e70f42f..3cb9e1ff8 100644 --- a/userspace/units/mm/gmmu/page_table/page_table.c +++ b/userspace/units/mm/gmmu/page_table/page_table.c @@ -38,10 +38,11 @@ #include #include #include -#include -#include #include +#include +#include + #define TEST_PA_ADDRESS 0xEFAD80000000 #define TEST_GPU_VA 0x102040600000 #define TEST_PA_ADDRESS_64K 0x1FAD80010000 diff --git a/userspace/units/mm/page_table_faults/page_table_faults.c b/userspace/units/mm/page_table_faults/page_table_faults.c index c6c9367d2..687027b15 100644 --- a/userspace/units/mm/page_table_faults/page_table_faults.c +++ b/userspace/units/mm/page_table_faults/page_table_faults.c @@ -39,13 +39,14 @@ #include "gp10b/mm_gp10b.h" #include "gv11b/mm_gv11b.h" #include "gv11b/fifo_gv11b.h" -#include "common/fb/fb_gp10b.h" -#include "common/fb/fb_gm20b.h" -#include "common/fb/fb_gv11b.h" #include "common/fifo/channel_gv11b.h" #include "nvgpu/hw/gv11b/hw_gmmu_gv11b.h" #include "nvgpu/hw/gv11b/hw_fb_gv11b.h" +#include "hal/fb/fb_gp10b.h" +#include "hal/fb/fb_gm20b.h" +#include "hal/fb/fb_gv11b.h" + #define TEST_PA_ADDRESS 0xEFAD80000000 #define TEST_COMP_TAG 0xEF #define TEST_INVALID_ADDRESS 0xAAC0000000 diff --git a/userspace/units/mm/vm/vm.c b/userspace/units/mm/vm/vm.c index 188605b7c..504eb7f99 100644 --- a/userspace/units/mm/vm/vm.c +++ b/userspace/units/mm/vm/vm.c @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include