Commit 39f10bf1 authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: xgifb: eliminate XGIfb_CRT2_write_enable variable

Replace XGIfb_CRT2_write_enable with IND_XGI_CRT2_WRITE_ENABLE_315.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 76cabaa4
...@@ -171,9 +171,6 @@ static int XGIfb_tvmode; ...@@ -171,9 +171,6 @@ static int XGIfb_tvmode;
static int enable_dstn; static int enable_dstn;
static int XGIfb_ypan = -1; static int XGIfb_ypan = -1;
static int XGIfb_CRT2_write_enable;
/* TW: CRT2 type (for overriding autodetection) */ /* TW: CRT2 type (for overriding autodetection) */
static int XGIfb_crt2type = -1; static int XGIfb_crt2type = -1;
/* PR: Tv plug type (for overriding autodetection) */ /* PR: Tv plug type (for overriding autodetection) */
......
...@@ -967,7 +967,9 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) ...@@ -967,7 +967,9 @@ static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info)
filter = -1; filter = -1;
break; break;
} }
xgifb_reg_or(XGIPART1, XGIfb_CRT2_write_enable, 0x01); xgifb_reg_or(XGIPART1,
IND_XGI_CRT2_WRITE_ENABLE_315,
0x01);
if (xgifb_info->TV_type == TVMODE_NTSC) { if (xgifb_info->TV_type == TVMODE_NTSC) {
...@@ -1335,7 +1337,7 @@ static int XGIfb_pan_var(struct xgifb_video_info *xgifb_info, ...@@ -1335,7 +1337,7 @@ static int XGIfb_pan_var(struct xgifb_video_info *xgifb_info,
xgifb_reg_and_or(XGISR, 0x37, 0xDF, (base >> 21) & 0x04); xgifb_reg_and_or(XGISR, 0x37, 0xDF, (base >> 21) & 0x04);
if (xgifb_info->disp_state & DISPTYPE_DISP2) { if (xgifb_info->disp_state & DISPTYPE_DISP2) {
xgifb_reg_or(XGIPART1, XGIfb_CRT2_write_enable, 0x01); xgifb_reg_or(XGIPART1, IND_XGI_CRT2_WRITE_ENABLE_315, 0x01);
xgifb_reg_set(XGIPART1, 0x06, (base & 0xFF)); xgifb_reg_set(XGIPART1, 0x06, (base & 0xFF));
xgifb_reg_set(XGIPART1, 0x05, ((base >> 8) & 0xFF)); xgifb_reg_set(XGIPART1, 0x05, ((base >> 8) & 0xFF));
xgifb_reg_set(XGIPART1, 0x04, ((base >> 16) & 0xFF)); xgifb_reg_set(XGIPART1, 0x04, ((base >> 16) & 0xFF));
...@@ -2023,23 +2025,18 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -2023,23 +2025,18 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
xgifb_info->chip = XG21; xgifb_info->chip = XG21;
else else
xgifb_info->chip = XG20; xgifb_info->chip = XG20;
XGIfb_CRT2_write_enable = IND_XGI_CRT2_WRITE_ENABLE_315;
break; break;
case PCI_DEVICE_ID_XG_40: case PCI_DEVICE_ID_XG_40:
xgifb_info->chip = XG40; xgifb_info->chip = XG40;
XGIfb_CRT2_write_enable = IND_XGI_CRT2_WRITE_ENABLE_315;
break; break;
case PCI_DEVICE_ID_XG_41: case PCI_DEVICE_ID_XG_41:
xgifb_info->chip = XG41; xgifb_info->chip = XG41;
XGIfb_CRT2_write_enable = IND_XGI_CRT2_WRITE_ENABLE_315;
break; break;
case PCI_DEVICE_ID_XG_42: case PCI_DEVICE_ID_XG_42:
xgifb_info->chip = XG42; xgifb_info->chip = XG42;
XGIfb_CRT2_write_enable = IND_XGI_CRT2_WRITE_ENABLE_315;
break; break;
case PCI_DEVICE_ID_XG_27: case PCI_DEVICE_ID_XG_27:
xgifb_info->chip = XG27; xgifb_info->chip = XG27;
XGIfb_CRT2_write_enable = IND_XGI_CRT2_WRITE_ENABLE_315;
break; break;
default: default:
ret = -ENODEV; ret = -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment