diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index b7872e73..12c36d33 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1316,6 +1316,21 @@ static int gk20a_pm_init(struct platform_device *dev) | |||
1316 | return err; | 1316 | return err; |
1317 | } | 1317 | } |
1318 | 1318 | ||
1319 | int gk20a_secure_page_alloc(struct platform_device *pdev) | ||
1320 | { | ||
1321 | struct gk20a_platform *platform = platform_get_drvdata(pdev); | ||
1322 | int err = 0; | ||
1323 | |||
1324 | if (platform->secure_page_alloc) { | ||
1325 | tegra_periph_reset_assert(platform->clk[0]); | ||
1326 | udelay(10); | ||
1327 | err = platform->secure_page_alloc(pdev); | ||
1328 | tegra_periph_reset_deassert(platform->clk[0]); | ||
1329 | } | ||
1330 | |||
1331 | return err; | ||
1332 | } | ||
1333 | |||
1319 | static int gk20a_probe(struct platform_device *dev) | 1334 | static int gk20a_probe(struct platform_device *dev) |
1320 | { | 1335 | { |
1321 | struct gk20a *gk20a; | 1336 | struct gk20a *gk20a; |
@@ -1414,6 +1429,12 @@ static int gk20a_probe(struct platform_device *dev) | |||
1414 | } | 1429 | } |
1415 | } | 1430 | } |
1416 | 1431 | ||
1432 | err = gk20a_secure_page_alloc(dev); | ||
1433 | if (err) { | ||
1434 | dev_err(&dev->dev, "failed to allocate secure buffer\n"); | ||
1435 | return err; | ||
1436 | } | ||
1437 | |||
1417 | gk20a_debug_init(dev); | 1438 | gk20a_debug_init(dev); |
1418 | 1439 | ||
1419 | /* Set DMA parameters to allow larger sgt lists */ | 1440 | /* Set DMA parameters to allow larger sgt lists */ |