From a9644aa4435a72e5c7e768f85ffb98802940cab4 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 16 Jan 2018 03:33:34 -0800 Subject: gpu: nvgpu: cause early VPR resize for gv11b Patch 7240b3c2 enabled secure allocation for gv11b But since we allocate secure buffers in poweron path, and secure allocation needs GPU to be in off state, this results in deadlock in poweron path To solve this, we already cause early VPR resize for older chips by calling gk20a_tegra_secure_page_alloc() from late_probe Implement same for gv11b. Add late_probe callback and add a call to gk20a_tegra_secure_page_alloc() Bug 2038249 Change-Id: I8c17b069962b26edbd0639a7c0d6c2fdaa352935 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1648831 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Seshendra Gadagottu Tested-by: Seshendra Gadagottu Reviewed-by: Alex Waterman Reviewed-by: Terje Bergstrom Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Seema Khowala --- drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c index 3bd01b2b..16593f6b 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c @@ -1,7 +1,7 @@ /* * GV11B Tegra Platform Interface * - * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -97,6 +97,13 @@ static int gv11b_tegra_probe(struct device *dev) return 0; } +static int gv11b_tegra_late_probe(struct device *dev) +{ + /* Cause early VPR resize */ + gk20a_tegra_secure_page_alloc(dev); + return 0; +} + static int gv11b_tegra_remove(struct device *dev) { gp10b_tegra_remove(dev); @@ -198,6 +205,7 @@ struct gk20a_platform gv11b_tegra_platform = { .ch_wdt_timeout_ms = 5000, .probe = gv11b_tegra_probe, + .late_probe = gv11b_tegra_late_probe, .remove = gv11b_tegra_remove, .enable_slcg = false, -- cgit v1.2.2