Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9317351 authored by Miguel Gómez's avatar Miguel Gómez Committed by Greg Kroah-Hartman
Browse files

Staging: xgifb: Rework conditions in XGI_GetVBInfo().



Rework some conditions to reduce indentation and fix style warnings.

Signed-off-by: default avatarMiguel Gómez <magomez@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7eec23a7
Loading
Loading
Loading
Loading
+142 −145
Original line number Diff line number Diff line
@@ -2611,7 +2611,9 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
	pVBInfo->ModeType = modeflag & ModeTypeMask;
	tempbx = 0;

	if (pVBInfo->VBType & 0xFFFF) {
	if (!(pVBInfo->VBType & 0xFFFF))
		return;

	/* Check Display Device */
	temp = xgifb_reg_get(pVBInfo->P3d4, 0x30);
	tempbx = tempbx | temp;
@@ -2629,22 +2631,18 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,

	if (pVBInfo->IF_DEF_LCDA == 1) {

			if ((HwDeviceExtension->jChipType >= XG20) ||
			    (HwDeviceExtension->jChipType >= XG40)) {
				if (pVBInfo->IF_DEF_LVDS == 0) {
		if (((HwDeviceExtension->jChipType >= XG20) ||
		     (HwDeviceExtension->jChipType >= XG40)) &&
		    (pVBInfo->IF_DEF_LVDS == 0)) {
			if (pVBInfo->VBType &
			    (VB_SIS302B |
			     VB_SIS301LV |
			     VB_SIS302LV |
			     VB_XGI301C)) {
				if (temp & EnableDualEdge) {
							tempbx |=
							    SetCRT2ToDualEdge;

					tempbx |= SetCRT2ToDualEdge;
					if (temp & SetToLCDA)
								tempbx |=
								  XGI_SetCRT2ToLCDA;
						}
						tempbx |= XGI_SetCRT2ToLCDA;
				}
			}
		}
@@ -2791,7 +2789,6 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
			pVBInfo->SetFlag |= ReserveTVOption;
		}
	}
	}

	pVBInfo->VBInfo = tempbx;
}