}
static void dump_vframe_status(const char *name)
{
- int ret = 0;
+ int ret = -1;
struct vframe_states states;
struct vframe_provider_s *vfp;
u32 ls, le, rs, re;
- if (platform_type == 1) {
+ /*if (platform_type == 1) {*/
if (process_3d_type & MODE_3D_ENABLE) {
zoom_get_vert_pos(cur_dispbuf,
cur_frame_par->vpp_3d_mode, &ls,
ls = rs = zoom_start_y_lines;
le = re = zoom_end_y_lines;
}
- } else {
+ /*} else {
if (process_3d_type & MODE_3D_ENABLE) {
zoom_get_vert_pos(cur_dispbuf,
cur_frame_par->vpp_3d_mode, &ls,
le = re = zoom_end_y_lines;
}
}
+*/
if ((cur_dispbuf) && (cur_dispbuf->type & VIDTYPE_MVC)) {
if (is_need_framepacking_output()) {
0x80 << v);
/* chroma formatter */
/* TODO: afbc setting only cover 420 for now */
+/*
#ifdef TV_REVERSE
if (reverse) {
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
VFORMATTER_EN);
} else
#endif
+*/
{
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
if (is_meson_txlx_package_962X()
(!(READ_VCBUS_REG(AFBC_ENABLE) & 0x100));
/*video on && afbc is off && is compress frame.*/
if (frame_par_ready_to_set || afbc_need_reset) {
- viu_set_dcu(cur_frame_par, cur_dispbuf);
- if (cur_dispbuf2)
- vd2_set_dcu(cur_frame_par,
- cur_dispbuf2);
+ if (cur_frame_par) {
+ viu_set_dcu(cur_frame_par, cur_dispbuf);
+ if (cur_dispbuf2)
+ vd2_set_dcu(cur_frame_par,
+ cur_dispbuf2);
+ }
} else if (cur_dispbuf2) {
u32 new_el_w =
(cur_dispbuf2->type
#endif
if (platform_type == 1) {
- if (cur_frame_par->hscale_skip_count) {
+ if (cur_frame_par && cur_frame_par->hscale_skip_count) {
VSYNC_WR_MPEG_REG_BITS(VIU_VD1_FMT_CTRL +
cur_dev->viu_off, 1, 20, 1);
/* HFORMATTER_EN */
}
if ((process_3d_type & MODE_3D_OUT_TB)
|| (process_3d_type & MODE_3D_OUT_LR)) {
- if (cur_frame_par->vpp_2pic_mode &
- VPP_PIC1_FIRST) {
+ if (cur_frame_par &&
+ (cur_frame_par->vpp_2pic_mode &
+ VPP_PIC1_FIRST)) {
VSYNC_WR_MPEG_REG(VD1_IF0_LUMA_PSEL +
cur_dev->viu_off, 0x4000000);
VSYNC_WR_MPEG_REG(VD1_IF0_CHROMA_PSEL +
}
if (platform_type == 1) {
if (force_3d_scaler == 3 &&
+ cur_frame_par &&
cur_frame_par->vpp_3d_scale) {
VSYNC_WR_MPEG_REG_BITS(
VPP_VSC_PHASE_CTRL, 3,
VPP_PHASECTL_DOUBLELINE_BIT, 2);
} else if (force_3d_scaler == 1 &&
+ cur_frame_par &&
cur_frame_par->vpp_3d_scale) {
VSYNC_WR_MPEG_REG_BITS(
VPP_VSC_PHASE_CTRL, 1,
VPP_PHASECTL_DOUBLELINE_BIT,
VPP_PHASECTL_DOUBLELINE_WID);
} else if (force_3d_scaler == 2 &&
+ cur_frame_par &&
cur_frame_par->vpp_3d_scale) {
VSYNC_WR_MPEG_REG_BITS(
VPP_VSC_PHASE_CTRL, 2,
*********************************************************/
int _video_set_disable(u32 val)
{
- if ((val < VIDEO_DISABLE_NONE) || (val > VIDEO_DISABLE_FORNEXT))
+ if (val > VIDEO_DISABLE_FORNEXT)
return -EINVAL;
disable_video = val;
ret = _video_set_disable(val);
else
ret = -EFAULT;
+ break;
}
case AMSTREAM_IOC_GET_VIDEO_DISCONTINUE_REPORT:
params = kstrdup(para, GFP_KERNEL);
params_base = params;
token = params;
- len = strlen(token);
- do {
- token = strsep(¶ms, " ");
- while (token && (isspace(*token)
- || !isgraph(*token)) && len) {
- token++;
- len--;
- }
- if (len == 0)
- break;
- ret = kstrtoint(token, 0, &res);
- if (ret < 0)
- break;
+ if (token) {
len = strlen(token);
- *out++ = res;
- count++;
- } while ((token) && (count < para_num) && (len > 0));
+ do {
+ token = strsep(¶ms, " ");
+ if (!token)
+ break;
+ while (token && (isspace(*token)
+ || !isgraph(*token)) && len) {
+ token++;
+ len--;
+ }
+ if (len == 0)
+ break;
+ ret = kstrtoint(token, 0, &res);
+ if (ret < 0)
+ break;
+ len = strlen(token);
+ *out++ = res;
+ count++;
+ } while ((count < para_num) && (len > 0));
+ }
kfree(params_base);
return count;
{
#ifdef TV_3D_FUNCTION_OPEN
u32 enable;
- size_t r;
+ int r;
r = kstrtouint(buf, 0, &enable);
if (r < 0)
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
r = kstrtoint(buf, 0, &blackout);
if (r < 0)
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
r = kstrtoint(buf, 0, &video_seek_flag);
if (r < 0)
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
int val;
r = kstrtoint(buf, 0, &val);
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
int val;
r = kstrtoint(buf, 0, &val);
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
int val;
r = kstrtoint(buf, 0, &val);
struct class_attribute *attr, const char *buf,
size_t count)
{
- size_t r;
+ int r;
int val;
r = kstrtoint(buf, 0, &val);
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
int val;
r = kstrtoint(buf, 0, &val);
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
s32 mab = 0;
s16 mc = 0, md = 0;
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
unsigned int data = 0x0;
r = kstrtoint(buf, 0, &test_screen);
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
u32 yuv_eight;
/* unsigned data = 0x0; */
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
u32 factor;
r = kstrtoint(buf, 0, &factor);
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
int val;
if (debug_flag & DEBUG_FLAG_BLACKOUT)
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
r = kstrtoint(buf, 0, &video_global_output);
if (r < 0)
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
r = kstrtoint(buf, 0, &freerun_mode);
if (r < 0)
#ifdef TV_3D_FUNCTION_OPEN
u32 type;
- size_t r;
+ int r;
r = kstrtoint(buf, 0, &type);
if (r < 0)
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
- int value = -1, seted = 1;
+ int r;
+ int value = -1;
/*
* r = sscanf(buf, "%d", &value);
return -EINVAL;
debugflags = value;
- seted = 1;
- if (seted) {
- pr_info("debugflags changed to %d(%x)\n", debugflags,
- debugflags);
- return count;
- } else
- return -EINVAL;
+ pr_info("debugflags changed to %d(%x)\n", debugflags,
+ debugflags);
+ return count;
+
}
static ssize_t trickmode_duration_show(struct class *cla,
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
u32 s_value;
r = kstrtoint(buf, 0, &s_value);
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
r = kstrtoint(buf, 0, &vsync_pts_inc_upint);
if (r < 0)
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
r = kstrtoint(buf, 0, &slowsync_repeat_enable);
if (r < 0)
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
r = kstrtoint(buf, 0, &vsync_slow_factor);
if (r < 0)
void set_video_angle(u32 s_value)
{
- if ((s_value >= 0 && s_value <= 3) && (video_angle != s_value)) {
+ if ((s_value <= 3) && (video_angle != s_value)) {
video_angle = s_value;
video_prot.angle_changed = 1;
video_prot.video_started = 1;
struct class_attribute *attr, const char *buf,
size_t count)
{
- size_t r;
+ int r;
u32 s_value;
r = kstrtoint(buf, 0, &s_value);
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
int value;
r = kstrtoint(buf, 0, &value);
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
int value;
r = kstrtoint(buf, 0, &value);
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
int val;
if (debug_flag & DEBUG_FLAG_BLACKOUT)
struct class_attribute *attr,
const char *buf, size_t count)
{
- size_t r;
+ int r;
int val;
r = kstrtoint(buf, 0, &val);