summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/gp10b_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gp10b_sysfs.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/gp10b_sysfs.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gp10b_sysfs.c b/drivers/gpu/nvgpu/gp10b/gp10b_sysfs.c
index 5a242bb5..1c90d2f9 100644
--- a/drivers/gpu/nvgpu/gp10b/gp10b_sysfs.c
+++ b/drivers/gpu/nvgpu/gp10b/gp10b_sysfs.c
@@ -23,36 +23,6 @@
23 23
24#define ROOTRW (S_IRWXU|S_IRGRP|S_IROTH) 24#define ROOTRW (S_IRWXU|S_IRGRP|S_IROTH)
25 25
26static ssize_t ecc_enable_store(struct device *dev,
27 struct device_attribute *attr, const char *buf, size_t count)
28{
29 struct gk20a *g = get_gk20a(dev);
30 u32 ecc_mask;
31 u32 err = 0;
32
33 err = sscanf(buf, "%d", &ecc_mask);
34 if (err == 1) {
35 err = g->ops.pmu.send_lrf_tex_ltc_dram_overide_en_dis_cmd
36 (g, ecc_mask);
37 if (err)
38 nvgpu_err(g, "ECC override did not happen");
39 } else
40 return -EINVAL;
41 return count;
42}
43
44static ssize_t ecc_enable_read(struct device *dev,
45 struct device_attribute *attr, char *buf)
46{
47 struct gk20a *g = get_gk20a(dev);
48
49 return sprintf(buf, "ecc override =0x%x\n",
50 g->ops.gr.get_lrf_tex_ltc_dram_override(g));
51}
52
53static DEVICE_ATTR(ecc_enable, ROOTRW, ecc_enable_read, ecc_enable_store);
54
55
56static ssize_t czf_bypass_store(struct device *dev, 26static ssize_t czf_bypass_store(struct device *dev,
57 struct device_attribute *attr, const char *buf, size_t count) 27 struct device_attribute *attr, const char *buf, size_t count)
58{ 28{
@@ -87,7 +57,6 @@ void gp10b_create_sysfs(struct device *dev)
87 57
88 g->gr.czf_bypass = gr_gpc0_prop_debug1_czf_bypass_init_v(); 58 g->gr.czf_bypass = gr_gpc0_prop_debug1_czf_bypass_init_v();
89 59
90 error |= device_create_file(dev, &dev_attr_ecc_enable);
91 error |= device_create_file(dev, &dev_attr_czf_bypass); 60 error |= device_create_file(dev, &dev_attr_czf_bypass);
92 if (error) 61 if (error)
93 nvgpu_err(g, "Failed to create sysfs attributes!"); 62 nvgpu_err(g, "Failed to create sysfs attributes!");
@@ -95,6 +64,5 @@ void gp10b_create_sysfs(struct device *dev)
95 64
96void gp10b_remove_sysfs(struct device *dev) 65void gp10b_remove_sysfs(struct device *dev)
97{ 66{
98 device_remove_file(dev, &dev_attr_ecc_enable);
99 device_remove_file(dev, &dev_attr_czf_bypass); 67 device_remove_file(dev, &dev_attr_czf_bypass);
100} 68}