From: Wayne Zou Date: Mon, 7 May 2012 04:47:30 +0000 (+0800) Subject: ENGR00180497 FB: Fix a bug: 'fb_set_par error, -22' when video playback on lvds X-Git-Tag: v3.0.35-fsl~1082 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e580f71fcbf5964069ed6c318fcf653dd60c923d;p=karo-tx-linux.git ENGR00180497 FB: Fix a bug: 'fb_set_par error, -22' when video playback on lvds Change bg_id/fg_id variable to char array variable, and avoid change the constant string in .rodata section. [MX6Q SMD]fb: 'fb_set_par error, -22' prompted when mplay a video to lvds /mnt/nfs/util/mplayer /mnt/nfs/test_stream/video/Mpeg4_SP1_1280x720_30fps.mp4 Before video playback finish, fb error message shows: mxc_sdc_fb mxc_sdc_fb.0: setup error, dispdrv:ldb. detected fb_set_par error, error code: -22 Can't reset original fb_var_screeninfo: Invalid argument Exiting... (End of file) Signed-off-by: Wayne Zou --- diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c index ce994f8f67f1..ade31f037225 100644 --- a/drivers/video/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/mxc/mxc_ipuv3_fb.c @@ -1296,8 +1296,8 @@ mxcfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) /* Check if DP local alpha is enabled and find the graphic fb */ if (mxc_fbi->ipu_ch == MEM_BG_SYNC || mxc_fbi->ipu_ch == MEM_FG_SYNC) { for (i = 0; i < num_registered_fb; i++) { - char *bg_id = "DISP3 BG"; - char *fg_id = "DISP3 FG"; + char bg_id[] = "DISP3 BG"; + char fg_id[] = "DISP3 FG"; char *idstr = registered_fb[i]->fix.id; bg_id[4] += mxc_fbi->ipu_id; fg_id[4] += mxc_fbi->ipu_id;