static void waitNextVerticalSync(int ctrl, int delay)
{
unsigned int status;
- if (!ctrl){
+ if (!ctrl) {
/* primary controller */
/* Do not wait when the Primary PLL is off or display control is already off.
while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
}
- }else{
+ }else {
/* Do not wait when the Primary PLL is off or display control is already off.
This will prevent the software to wait forever. */
void ddk750_setLogicalDispOut(disp_output_t output)
{
unsigned int reg;
- if (output & PNL_2_USAGE){
+ if (output & PNL_2_USAGE) {
/* set panel path controller select */
reg = PEEK32(PANEL_DISPLAY_CTRL);
reg = FIELD_VALUE(reg, PANEL_DISPLAY_CTRL, SELECT, (output & PNL_2_MASK)>>PNL_2_OFFSET);
POKE32(PANEL_DISPLAY_CTRL, reg);
}
- if (output & CRT_2_USAGE){
+ if (output & CRT_2_USAGE) {
/* set crt path controller select */
reg = PEEK32(CRT_DISPLAY_CTRL);
reg = FIELD_VALUE(reg, CRT_DISPLAY_CTRL, SELECT, (output & CRT_2_MASK)>>CRT_2_OFFSET);
}
- if (output & PRI_TP_USAGE){
+ if (output & PRI_TP_USAGE) {
/* set primary timing and plane en_bit */
setDisplayControl(0, (output&PRI_TP_MASK)>>PRI_TP_OFFSET);
}
- if (output & SEC_TP_USAGE){
+ if (output & SEC_TP_USAGE) {
/* set secondary timing and plane en_bit*/
setDisplayControl(1, (output&SEC_TP_MASK)>>SEC_TP_OFFSET);
}
- if (output & PNL_SEQ_USAGE){
+ if (output & PNL_SEQ_USAGE) {
/* set panel sequence */
swPanelPowerSequence((output&PNL_SEQ_MASK)>>PNL_SEQ_OFFSET, 4);
}
FIELD_SET(0, CRT_DISPLAY_CTRL, PLANE, ENABLE);
- if (getChipType() == SM750LE){
+ if (getChipType() == SM750LE) {
displayControlAdjust_SM750LE(pModeParam, ulTmpValue);
- }else{
+ }else {
ulReg = PEEK32(CRT_DISPLAY_CTRL)
& FIELD_CLEAR(CRT_DISPLAY_CTRL, VSYNC_PHASE)
& FIELD_CLEAR(CRT_DISPLAY_CTRL, HSYNC_PHASE)
}
#endif
}
- else{
+ else {
ret = -1;
}
return ret;
pll.clockType = clock;
uiActualPixelClk = calcPllValue(parm->pixel_clock, &pll);
- if (getChipType() == SM750LE){
+ if (getChipType() == SM750LE) {
/* set graphic mode via IO method */
outb_p(0x88, 0x3d4);
outb_p(0x06, 0x3d5);
void ddk750_setDPMS(DPMS_t state)
{
unsigned int value;
- if (getChipType() == SM750LE){
+ if (getChipType() == SM750LE) {
value = PEEK32(CRT_DISPLAY_CTRL);
POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state));
- }else{
+ }else {
value = PEEK32(SYSTEM_CTRL);
value= FIELD_VALUE(value, SYSTEM_CTRL, DPMS, state);
POKE32(SYSTEM_CTRL, value);
Note that input pitch is BYTE value, but the 2D Pitch register uses
pixel values. Need Byte to pixel conversion.
*/
- if (Bpp == 3){
+ if (Bpp == 3) {
sx *= 3;
dx *= 3;
width *= 3;
FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, (dPitch/Bpp)) |
FIELD_VALUE(0, DE_WINDOW_WIDTH, SOURCE, (sPitch/Bpp))); /* dpr3c */
- if (accel->de_wait() != 0){
+ if (accel->de_wait() != 0) {
return -1;
}
Note that input pitch is BYTE value, but the 2D Pitch register uses
pixel values. Need Byte to pixel conversion.
*/
- if (bytePerPixel == 3){
+ if (bytePerPixel == 3) {
dx *= 3;
width *= 3;
startBit *= 3;
if (opr & (0x80 >> j))
{ /* use fg color,id = 2 */
data |= 2 << (j*2);
- }else{
+ }else {
/* use bg color,id = 1 */
data |= 1 << (j*2);
}
}
#else
- for (j=0;j<8;j++){
- if (mask & (0x80>>j)){
+ for (j=0;j<8;j++) {
+ if (mask & (0x80>>j)) {
if (rop == ROP_XOR)
opr = mask ^ color;
else
/* need a return */
pstart += offset;
pbuffer = pstart;
- }else{
+ }else {
pbuffer += sizeof(u16);
}
if (opr & (0x80 >> j))
{ /* use fg color,id = 2 */
data |= 2 << (j*2);
- }else{
+ }else {
/* use bg color,id = 1 */
data |= 1 << (j*2);
}
}
#else
- for (j=0;j<8;j++){
+ for (j=0;j<8;j++) {
if (mask & (1<<j))
data |= ((color & (1<<j))?1:2)<<(j*2);
}
/* need a return */
pstart += offset;
pbuffer = pstart;
- }else{
+ }else {
pbuffer += sizeof(u16);
}