summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/nvhost.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/nvhost.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/nvhost.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/nvhost.c b/drivers/gpu/nvgpu/common/linux/nvhost.c
index a76953e3..fa169cf0 100644
--- a/drivers/gpu/nvgpu/common/linux/nvhost.c
+++ b/drivers/gpu/nvgpu/common/linux/nvhost.c
@@ -166,6 +166,25 @@ u32 nvgpu_nvhost_syncpt_read_maxval(
166 return nvhost_syncpt_read_maxval(nvhost_dev->host1x_pdev, id); 166 return nvhost_syncpt_read_maxval(nvhost_dev->host1x_pdev, id);
167} 167}
168 168
169void nvgpu_nvhost_syncpt_set_safe_state(
170 struct nvgpu_nvhost_dev *nvhost_dev, u32 id)
171{
172 u32 val;
173
174 /*
175 * Add large number of increments to current value
176 * so that all waiters on this syncpoint are released
177 *
178 * We don't expect any case where more than 0x10000 increments
179 * are pending
180 */
181 val = nvhost_syncpt_read_minval(nvhost_dev->host1x_pdev, id);
182 val += 0x10000;
183
184 nvhost_syncpt_set_minval(nvhost_dev->host1x_pdev, id, val);
185 nvhost_syncpt_set_maxval(nvhost_dev->host1x_pdev, id, val);
186}
187
169int nvgpu_nvhost_create_symlink(struct gk20a *g) 188int nvgpu_nvhost_create_symlink(struct gk20a *g)
170{ 189{
171 struct device *dev = dev_from_gk20a(g); 190 struct device *dev = dev_from_gk20a(g);