unsigned long normal_rate;
unsigned long video_1080p_rate;
unsigned long video_4k_rate;
- unsigned long performace_rate;
+ unsigned long performance_rate;
unsigned long dualview_rate;
unsigned long idle_rate;
unsigned long suspend_rate;
ddrfreq_mode(false, &ddr.video_1080p_rate, "video_1080p");
} else if (ddr.video_4k_rate && (s & SYS_STATUS_VIDEO_4K)) {
ddrfreq_mode(false, &ddr.video_4k_rate, "video_4k");
- } else if (ddr.video_4k_rate && (s & SYS_STATUS_PERFORMANCE)) {
- ddrfreq_mode(false, &ddr.video_4k_rate, "video_4k");
+ } else if (ddr.performance_rate && (s & SYS_STATUS_PERFORMANCE)) {
+ ddrfreq_mode(false, &ddr.performance_rate, "performance_rate");
} else if (ddr.idle_rate
&& !(s & SYS_STATUS_GPU)
&& !(s & SYS_STATUS_RGA)
{
struct video_info *video_info;
+ if (!match_video_info)
+ return NULL;
+
list_for_each_entry(video_info, &ddr.video_info_list, node) {
if ((video_info->width == match_video_info->width)
&& (video_info->height == match_video_info->height)
return;
}
+/***format: width=val,height=val,ishevc=val,videoFramerate=val,streamBitrate=val***/
+static long get_video_param(char **str)
+{
+ char *p;
+
+ strsep(str,"=");
+ p=strsep(str,",");
+ if (p)
+ return simple_strtol(p,NULL,10);
+
+ return 0;
+}
+
static ssize_t video_state_write(struct file *file, const char __user *buffer,
size_t count, loff_t *ppos)
{
}
strsep(&cookie_pot,",");
- strsep(&cookie_pot,"=");
- p=strsep(&cookie_pot,",");
- video_info->width = simple_strtol(p,NULL,10);
-
- strsep(&cookie_pot,"=");
- p=strsep(&cookie_pot,",");
- video_info->height = simple_strtol(p,NULL,10);
-
- strsep(&cookie_pot,"=");
- p=strsep(&cookie_pot,",");
- video_info->ishevc = simple_strtol(p,NULL,10);
-
- strsep(&cookie_pot,"=");
- p=strsep(&cookie_pot,",");
- video_info->videoFramerate = simple_strtol(p,NULL,10);
- strsep(&cookie_pot,"=");
- p=strsep(&cookie_pot,",");
- video_info->streamBitrate = simple_strtol(p,NULL,10);
+ video_info->width = get_video_param(&cookie_pot);
+ video_info->height = get_video_param(&cookie_pot);
+ video_info->ishevc = get_video_param(&cookie_pot);
+ video_info->videoFramerate = get_video_param(&cookie_pot);
+ video_info->streamBitrate = get_video_param(&cookie_pot);
+ video_info->streamBitrate = get_video_param(&cookie_pot);
dprintk(DEBUG_VIDEO_STATE, "%s: video_state=%c,width=%d,height=%d,ishevc=%d,videoFramerate=%d,streamBitrate=%d\n",
__func__, state,video_info->width,video_info->height,
if (status & SYS_STATUS_VIDEO_4K)
ddr.video_4k_rate = rate;
if (status & SYS_STATUS_PERFORMANCE)
- ddr.performace_rate= rate;
+ ddr.performance_rate= rate;
if ((status & SYS_STATUS_LCDC0)&&(status & SYS_STATUS_LCDC1))
ddr.dualview_rate = rate;
if (status & SYS_STATUS_IDLE)