summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r--drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c
index fbca62b0..a4348f6c 100644
--- a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c
+++ b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c
@@ -24,6 +24,7 @@
24#include <linux/dma-buf.h> 24#include <linux/dma-buf.h>
25#include <linux/nvmap.h> 25#include <linux/nvmap.h>
26#include <linux/tegra_pm_domains.h> 26#include <linux/tegra_pm_domains.h>
27#include <linux/reset.h>
27#include "gk20a/platform_gk20a.h" 28#include "gk20a/platform_gk20a.h"
28#include "gk20a/gk20a.h" 29#include "gk20a/gk20a.h"
29#include "platform_tegra.h" 30#include "platform_tegra.h"
@@ -178,6 +179,32 @@ static int gp10b_tegra_suspend(struct device *dev)
178 return 0; 179 return 0;
179} 180}
180 181
182static int gp10b_tegra_reset_assert(struct platform_device *dev)
183{
184 struct gk20a_platform *platform = gk20a_get_platform(dev);
185 int ret = 0;
186
187 if (!platform->reset_control)
188 return -EINVAL;
189
190 ret = reset_control_assert(platform->reset_control);
191
192 return ret;
193}
194
195static int gp10b_tegra_reset_deassert(struct platform_device *dev)
196{
197 struct gk20a_platform *platform = gk20a_get_platform(dev);
198 int ret = 0;
199
200 if (!platform->reset_control)
201 return -EINVAL;
202
203 ret = reset_control_deassert(platform->reset_control);
204
205 return ret;
206}
207
181struct gk20a_platform t18x_gpu_tegra_platform = { 208struct gk20a_platform t18x_gpu_tegra_platform = {
182 .has_syncpoints = true, 209 .has_syncpoints = true,
183 210
@@ -209,4 +236,9 @@ struct gk20a_platform t18x_gpu_tegra_platform = {
209 236
210 .secure_alloc = gk20a_tegra_secure_alloc, 237 .secure_alloc = gk20a_tegra_secure_alloc,
211 .secure_page_alloc = gk20a_tegra_secure_page_alloc, 238 .secure_page_alloc = gk20a_tegra_secure_page_alloc,
239
240 .reset_assert = gp10b_tegra_reset_assert,
241 .reset_deassert = gp10b_tegra_reset_deassert,
242
243 .force_reset_in_do_idle = true,
212}; 244};