Bug 10616

Summary: Impossible to change sync and vmode with fbset
Product: Busybox Reporter: Frederic Jary <frederic.jary>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.24.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Frederic Jary 2017-12-22 11:33:49 UTC
Use case:
*********
Busybox is running on an embedded platform that does not take care of EDID information. Therefore, the FBIOPUT_VSCREENINFO ioctl shall carry all the needed parameters so that the underlying driver can properly set the graphical mode. fb.modes is parsed externally to set the input parameters of fbset; read_mode_db() is not used.

Call exemple:
fbset -fb /dev/fb0 -g 1920 1080 1920 1080 24 -t 6734 220 44 36 4 16 5 -hsync low -vsync high -laced false

Issue 1:
********
sync and vmode in var_set are initialized to 0xFFFFFFFF (-1 if cast into signed). Each one must be strictly positive to be taken into account (see copy_if_gt0).
Therefore, a sync or a vmode equal to 0 is not reported in the ioctl.

Issue 2:
********
The logical OR on the following lines have no effect and behave in the same way if the parameter is "high" or "low":
			case CMD_HSYNC:
				var_set.sync |= FB_SYNC_HOR_HIGH_ACT;
				break;
			case CMD_VSYNC:
				var_set.sync |= FB_SYNC_VERT_HIGH_ACT;
				break;

Issue 3:
********
The CMD_LACED is defined but not used.