summaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb/XGI_main_26.c
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2011-12-06 00:10:48 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-08 12:26:08 -0800
commit25aa75f142e0e6945a6d5db3dbcd9d6919525866 (patch)
tree6f0d45dbd136cbf0983dd612b1420afdbbe2de58 /drivers/staging/xgifb/XGI_main_26.c
parent776091018bf722eebc75c8be958bdd59f003e6f7 (diff)
downloadop-kernel-dev-25aa75f142e0e6945a6d5db3dbcd9d6919525866.zip
op-kernel-dev-25aa75f142e0e6945a6d5db3dbcd9d6919525866.tar.gz
staging: xgifb: enable forcecrt2type on XG21
Make "forcecrt2type" to apply also for XG21. The patch enables user to switch LVDS LCD ON/OFF without the need to update the video BIOS. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/xgifb/XGI_main_26.c')
-rw-r--r--drivers/staging/xgifb/XGI_main_26.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 5c76ee7..b07c477 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1744,17 +1744,16 @@ static void XGIfb_detect_VB(struct xgifb_video_info *xgifb_info)
XGIfb_crt1off = 0;
}
- if (XGIfb_crt2type != -1)
- /* TW: Override with option */
- xgifb_info->display2 = XGIfb_crt2type;
- else if (cr32 & XGI_VB_TV)
- xgifb_info->display2 = XGIFB_DISP_TV;
- else if (cr32 & XGI_VB_LCD)
- xgifb_info->display2 = XGIFB_DISP_LCD;
- else if (cr32 & XGI_VB_CRT2)
- xgifb_info->display2 = XGIFB_DISP_CRT;
- else
- xgifb_info->display2 = XGIFB_DISP_NONE;
+ if (!xgifb_info->display2_force) {
+ if (cr32 & XGI_VB_TV)
+ xgifb_info->display2 = XGIFB_DISP_TV;
+ else if (cr32 & XGI_VB_LCD)
+ xgifb_info->display2 = XGIFB_DISP_LCD;
+ else if (cr32 & XGI_VB_CRT2)
+ xgifb_info->display2 = XGIFB_DISP_CRT;
+ else
+ xgifb_info->display2 = XGIFB_DISP_NONE;
+ }
if (XGIfb_tvplug != -1)
/* PR/TW: Override with option */
@@ -1926,6 +1925,11 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
goto error;
}
+ if (XGIfb_crt2type != -1) {
+ xgifb_info->display2 = XGIfb_crt2type;
+ xgifb_info->display2_force = true;
+ }
+
XGIRegInit(&xgifb_info->dev_info, (unsigned long)hw_info->pjIOAddress);
xgifb_reg_set(XGISR, IND_XGI_PASSWORD, XGI_PASSWORD);
@@ -2104,6 +2108,8 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
if (xgifb_info->hasVB != HASVB_NONE)
XGIfb_detect_VB(xgifb_info);
+ else if (xgifb_info->chip != XG21)
+ xgifb_info->display2 = XGIFB_DISP_NONE;
if (xgifb_info->display2 == XGIFB_DISP_LCD) {
if (!enable_dstn) {
OpenPOWER on IntegriCloud