summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMahantesh Kumbar <mkumbar@nvidia.com>2017-09-20 04:42:01 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-21 20:34:18 -0400
commit8882014731730ef7febb1e2236e82a9d409f77ec (patch)
treecf8f1457f64b5f2e7be024350fafbc2ad3ca7dde
parent5ff6ebd2f49cb2db01e21ed2403231c23a30c3ad (diff)
gpu: nvgpu: Add nvdec falcon support
- Added "nvgpu_flacon nvdec_flcn" member to gk20a - Added base address & flacon id of NVDEC falcon - Included nvdec falcon to access common falcon code - Enabled nvdec falcon support for GP106 - Disabled nvdec falcon support for iGPU - Made call to enable nvdec falcon support if supported Change-Id: Ia928d082275a720e4e8c6852384e489c8ec444f8 Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> (cherry picked from commit 3d80aeff295bad8365af6022555ad151f1a32cf6) Reviewed-on: https://git-master.nvidia.com/r/1564305 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/common/falcon/falcon.c4
-rw-r--r--drivers/gpu/nvgpu/gk20a/flcn_gk20a.c5
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c1
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h1
-rw-r--r--drivers/gpu/nvgpu/gp106/flcn_gp106.c5
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/falcon.h2
6 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/falcon/falcon.c b/drivers/gpu/nvgpu/common/falcon/falcon.c
index e0b5554d..99b2c249 100644
--- a/drivers/gpu/nvgpu/common/falcon/falcon.c
+++ b/drivers/gpu/nvgpu/common/falcon/falcon.c
@@ -321,6 +321,10 @@ void nvgpu_flcn_sw_init(struct gk20a *g, u32 flcn_id)
321 flcn = &g->gpccs_flcn; 321 flcn = &g->gpccs_flcn;
322 flcn->flcn_id = flcn_id; 322 flcn->flcn_id = flcn_id;
323 break; 323 break;
324 case FALCON_ID_NVDEC:
325 flcn = &g->nvdec_flcn;
326 flcn->flcn_id = flcn_id;
327 break;
324 default: 328 default:
325 nvgpu_err(g, "Invalid/Unsupported falcon ID %x", flcn_id); 329 nvgpu_err(g, "Invalid/Unsupported falcon ID %x", flcn_id);
326 break; 330 break;
diff --git a/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c b/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c
index b83d2dc0..8d459903 100644
--- a/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c
@@ -641,6 +641,11 @@ void gk20a_falcon_hal_sw_init(struct nvgpu_falcon *flcn)
641 flcn->is_falcon_supported = true; 641 flcn->is_falcon_supported = true;
642 flcn->is_interrupt_enabled = false; 642 flcn->is_interrupt_enabled = false;
643 break; 643 break;
644 case FALCON_ID_NVDEC:
645 flcn->flcn_base = FALCON_NVDEC_BASE;
646 flcn->is_falcon_supported = false;
647 flcn->is_interrupt_enabled = false;
648 break;
644 default: 649 default:
645 flcn->is_falcon_supported = false; 650 flcn->is_falcon_supported = false;
646 nvgpu_err(g, "Invalid flcn request"); 651 nvgpu_err(g, "Invalid flcn request");
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 02baf683..d203a335 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -164,6 +164,7 @@ int gk20a_finalize_poweron(struct gk20a *g)
164 /* init interface layer support for PMU falcon */ 164 /* init interface layer support for PMU falcon */
165 nvgpu_flcn_sw_init(g, FALCON_ID_PMU); 165 nvgpu_flcn_sw_init(g, FALCON_ID_PMU);
166 nvgpu_flcn_sw_init(g, FALCON_ID_SEC2); 166 nvgpu_flcn_sw_init(g, FALCON_ID_SEC2);
167 nvgpu_flcn_sw_init(g, FALCON_ID_NVDEC);
167 168
168 if (g->ops.bios.init) 169 if (g->ops.bios.init)
169 err = g->ops.bios.init(g); 170 err = g->ops.bios.init(g);
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 1efa920c..3fcad1cf 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1075,6 +1075,7 @@ struct gk20a {
1075 struct nvgpu_falcon sec2_flcn; 1075 struct nvgpu_falcon sec2_flcn;
1076 struct nvgpu_falcon fecs_flcn; 1076 struct nvgpu_falcon fecs_flcn;
1077 struct nvgpu_falcon gpccs_flcn; 1077 struct nvgpu_falcon gpccs_flcn;
1078 struct nvgpu_falcon nvdec_flcn;
1078 struct clk_gk20a clk; 1079 struct clk_gk20a clk;
1079 struct fifo_gk20a fifo; 1080 struct fifo_gk20a fifo;
1080 struct gr_gk20a gr; 1081 struct gr_gk20a gr;
diff --git a/drivers/gpu/nvgpu/gp106/flcn_gp106.c b/drivers/gpu/nvgpu/gp106/flcn_gp106.c
index 889cf324..7949edb7 100644
--- a/drivers/gpu/nvgpu/gp106/flcn_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/flcn_gp106.c
@@ -74,6 +74,11 @@ void gp106_falcon_hal_sw_init(struct nvgpu_falcon *flcn)
74 flcn->is_falcon_supported = true; 74 flcn->is_falcon_supported = true;
75 flcn->is_interrupt_enabled = false; 75 flcn->is_interrupt_enabled = false;
76 break; 76 break;
77 case FALCON_ID_NVDEC:
78 flcn->flcn_base = FALCON_NVDEC_BASE;
79 flcn->is_falcon_supported = true;
80 flcn->is_interrupt_enabled = true;
81 break;
77 default: 82 default:
78 flcn->is_falcon_supported = false; 83 flcn->is_falcon_supported = false;
79 nvgpu_err(g, "Invalid flcn request"); 84 nvgpu_err(g, "Invalid flcn request");
diff --git a/drivers/gpu/nvgpu/include/nvgpu/falcon.h b/drivers/gpu/nvgpu/include/nvgpu/falcon.h
index 72c74784..888d8e70 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/falcon.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/falcon.h
@@ -32,11 +32,13 @@
32#define FALCON_ID_PMU (0) 32#define FALCON_ID_PMU (0)
33#define FALCON_ID_FECS (2) 33#define FALCON_ID_FECS (2)
34#define FALCON_ID_GPCCS (3) 34#define FALCON_ID_GPCCS (3)
35#define FALCON_ID_NVDEC (4)
35#define FALCON_ID_SEC2 (7) 36#define FALCON_ID_SEC2 (7)
36 37
37/* 38/*
38 * Falcon Base address Defines 39 * Falcon Base address Defines
39 */ 40 */
41#define FALCON_NVDEC_BASE 0x00084000
40#define FALCON_PWR_BASE 0x0010a000 42#define FALCON_PWR_BASE 0x0010a000
41#define FALCON_SEC_BASE 0x00087000 43#define FALCON_SEC_BASE 0x00087000
42#define FALCON_FECS_BASE 0x00409000 44#define FALCON_FECS_BASE 0x00409000