From 7ed71374e90f8e5c8554cb7d2f14aa8e9a807862 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 24 Jun 2014 18:11:25 +0530 Subject: gpu: nvgpu: do not abort probe if secure page alloc fails Do not abort GPU probe if secure page alloc fails. We can just note that this allocation failed (using bool secure_alloc_ready) and prevent further secure memory allocation if this flag is not set. Bug 1525465 Change-Id: Ie4eb6393951690174013d2de3db507876d7b657f Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/427730 GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 4c6566a6..790b366c 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -1351,6 +1351,9 @@ int gk20a_secure_page_alloc(struct platform_device *pdev) tegra_periph_reset_deassert(platform->clk[0]); } + if (!err) + platform->secure_alloc_ready = true; + return err; } @@ -1453,10 +1456,9 @@ static int gk20a_probe(struct platform_device *dev) } err = gk20a_secure_page_alloc(dev); - if (err) { - dev_err(&dev->dev, "failed to allocate secure buffer\n"); - return err; - } + if (err) + dev_err(&dev->dev, + "failed to allocate secure buffer %d\n", err); gk20a_debug_init(dev); -- cgit v1.2.2