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

Commit ee76875e authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman
Browse files

staging: xgifb: vb_setmode: delete IF_DEF_CRT2Monitor checks



Code checking for IF_DEF_CRT2Monitor is only executed for chips < XG20,
and there IF_DEF_CRT2Monitor is always true, so the flag is redundant.

Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aee0ac92
Loading
Loading
Loading
Loading
+5 −14
Original line number Diff line number Diff line
@@ -1997,16 +1997,11 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
	/* shampoo add */
	/* for driver abnormal */
	if (!(tempbx & (SwitchCRT2 | SetSimuScanMode))) {
		if (pVBInfo->IF_DEF_CRT2Monitor == 1) {
		if (tempbx & SetCRT2ToRAMDAC) {
			tempbx &= (0xFF00 | SetCRT2ToRAMDAC |
				   SwitchCRT2 | SetSimuScanMode);
			tempbx &= (0x00FF | (~SetCRT2ToYPbPr525750));
		}
		} else {
			tempbx &= (~(SetCRT2ToRAMDAC | SetCRT2ToLCD |
				     SetCRT2ToTV));
		}
	}

	if (!(pVBInfo->VBType & VB_NoLCD)) {
@@ -5550,12 +5545,8 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
	struct vb_device_info *pVBInfo = &VBINF;
	pVBInfo->IF_DEF_LVDS = 0;

	if (HwDeviceExtension->jChipType >= XG20) {
		pVBInfo->IF_DEF_CRT2Monitor = 0;
	if (HwDeviceExtension->jChipType >= XG20)
		pVBInfo->VBType = 0; /*set VBType default 0*/
	} else {
		pVBInfo->IF_DEF_CRT2Monitor = 1;
	}

	XGIRegInit(pVBInfo, xgifb_info->vga_base);