From c3661adef806869a7e0df884fc621c48436961d4 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Mon, 3 Nov 2014 14:35:53 +0530 Subject: gpu: nvgpu: fix reset clock in gm20b To assert reset on GPU, we store "gpu_ref" clock in platform->clk[0] and use it to assert/deassert reset But for gm20b, "gpu_ref" is no longer resettable. To fix this, add two callbacks in gk20a_platform : .reset_assert and .reset_deassert Also, add a pointer "clk_reset" to store the clock which needs to be reset For gk20a specific implementation, we continue to reset platform->clk[0] For gm20b specific implementation, we first request "gpu_gate" clock, store it and use it to assert reset Bug 1513685 Bug 1517584 Change-Id: I15a583a4a07eb663b442084be8b8c7d0c7c7a142 Signed-off-by: Deepak Nibade --- drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index 0cc04595..5f7285bf 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h @@ -155,6 +155,11 @@ struct gk20a_platform { */ void (*dump_platform_dependencies)(struct platform_device *dev); + /* Callbacks to assert/deassert GPU reset */ + int (*reset_assert)(struct platform_device *pdev); + int (*reset_deassert)(struct platform_device *pdev); + struct clk *clk_reset; + bool virtual_dev; #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION u64 virt_handle; -- cgit v1.2.2