MODULE_PARM_DESC(mali_max_job_runtime, "Maximum allowed job runtime in msecs.\nJobs will be killed after this no matter what");
extern int mali_l2_max_reads;
-module_param(mali_l2_max_reads, int, S_IRUSR | S_IRGRP | S_IROTH);
+module_param(mali_l2_max_reads, int, S_IRUSR | S_IWUSR | S_IWGRP | S_IRGRP | S_IROTH); /* rw-rw-r-- */
MODULE_PARM_DESC(mali_l2_max_reads, "Maximum reads for Mali L2 cache");
extern unsigned int mali_dedicated_mem_start;
//#include "mali_pp_scheduler.h"
#include "meson_main.h"
+extern int mali_l2_max_reads;
+
#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8
static ssize_t domain_stat_read(struct class *class,
struct class_attribute *attr, char *buf)
return count;
}
+static ssize_t l2_max_reads_read(struct class *class,
+ struct class_attribute *attr, char *buf)
+{
+ return sprintf(buf, "%d\n", mali_l2_max_reads);
+}
+
+static ssize_t l2_max_reads_write(struct class *class,
+ struct class_attribute *attr, const char *buf, size_t count)
+{
+ int ret;
+ unsigned int val;
+
+ ret = kstrtouint(buf, 10, &val);
+ if (0 != ret)
+ {
+ return -EINVAL;
+ }
+ mali_l2_max_reads = val;
+
+ return 0;
+}
+
+
static struct class_attribute mali_class_attrs[] = {
__ATTR(domain_stat, 0644, domain_stat_read, NULL),
__ATTR(mpgpucmd, 0644, NULL, mpgpu_write),
__ATTR(max_pp, 0644, max_pp_read, max_pp_write),
__ATTR(cur_freq, 0644, freq_read, freq_write),
__ATTR(cur_pp, 0644, current_pp_read, current_pp_write),
+ __ATTR(l2_max_reads, 0644, l2_max_reads_read,l2_max_reads_write),
};
static struct class mpgpu_class = {