summaryrefslogtreecommitdiff
path: root/src/mga_driver.c
diff options
context:
space:
mode:
authorMathieu Larouche <mathieu.larouche@matrox.com>2017-02-07 11:12:14 -0500
committerAdam Jackson <ajax@redhat.com>2017-02-14 11:23:18 -0500
commite55abc95c2b7f7cb8de73e1e21688fb5b5c08d5c (patch)
tree2f29e579b19aef2c5c281dca2ef56cafa6085b27 /src/mga_driver.c
parent2ccc50072ccb70411e5e32644e74ef7c6b33f628 (diff)
xf86-video-mga: Add support for a new G200eH3 device
- Added support for the new deviceID for G200eH3 - Added PLL algorithm for the G200eH3 - Removed the bandwidth limitation for the G200eH3 Signed-off-by: Mathieu Larouche <mathieu.larouche@matrox.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mga_driver.c')
-rw-r--r--src/mga_driver.c36
1 files changed, 33 insertions, 3 deletions
diff --git a/src/mga_driver.c b/src/mga_driver.c
index 7b46561..79c6da7 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -424,6 +424,21 @@ static const struct mga_device_attributes attribs[] = {
},
16384, 0x4000, /* Memory probe size & offset values */
+ },
+
+ [17] = { 0, 1, 0, 0, 1, 0, 0, new_BARs,
+ (TRANSC_SOLID_FILL | TWO_PASS_COLOR_EXPAND | USE_LINEAR_EXPANSION),
+ {
+ { 50000, 230000 }, /* System VCO frequencies */
+ { 50000, 203400 }, /* Pixel VCO frequencies */
+ { 0, 0 }, /* Video VCO frequencies */
+ 45000, /* Memory clock */
+ 27050, /* PLL reference frequency */
+ 0, /* Supports fast bitblt? */
+ MGA_HOST_PCI /* Host interface */
+ },
+
+ 16384, 0x4000, /* Memory probe size & offset values */
}
};
@@ -458,6 +473,8 @@ static const struct pci_id_match mga_device_match[] = {
MGA_DEVICE_MATCH( PCI_CHIP_MGAG200_EW3_PCI, 16 ),
+ MGA_DEVICE_MATCH( PCI_CHIP_MGAG200_EH3_PCI, 17 ),
+
{ 0, 0, 0 },
};
#endif
@@ -479,6 +496,7 @@ static SymTabRec MGAChipsets[] = {
{ PCI_CHIP_MGAG200_WINBOND_PCI, "mgag200 eW Nuvoton" },
{ PCI_CHIP_MGAG200_EW3_PCI, "mgag200 eW3 Nuvoton" },
{ PCI_CHIP_MGAG200_EH_PCI, "mgag200eH" },
+ { PCI_CHIP_MGAG200_EH3_PCI, "mgag200eH3" },
{ PCI_CHIP_MGAG400, "mgag400" },
{ PCI_CHIP_MGAG550, "mgag550" },
{-1, NULL }
@@ -507,6 +525,8 @@ static PciChipsets MGAPciChipsets[] = {
RES_SHARED_VGA },
{ PCI_CHIP_MGAG200_EH_PCI, PCI_CHIP_MGAG200_EH_PCI,
RES_SHARED_VGA },
+ { PCI_CHIP_MGAG200_EH3_PCI, PCI_CHIP_MGAG200_EH3_PCI,
+ RES_SHARED_VGA },
{ PCI_CHIP_MGAG400, PCI_CHIP_MGAG400, RES_SHARED_VGA },
{ PCI_CHIP_MGAG550, PCI_CHIP_MGAG550, RES_SHARED_VGA },
{ -1, -1, RES_UNDEFINED }
@@ -693,6 +713,7 @@ MGAPciProbe(DriverPtr drv, int entity_num, struct pci_device * dev,
case PCI_CHIP_MGAG200_ER_PCI:
case PCI_CHIP_MGAG200_WINBOND_PCI:
case PCI_CHIP_MGAG200_EH_PCI:
+ case PCI_CHIP_MGAG200_EH3_PCI:
xf86DrvMsg(0, X_ERROR,
"mga: The PCI device 0x%x at %2.2d@%2.2d:%2.2d:%1.1d has a kernel module claiming it.\n",
dev->device_id, dev->bus, dev->domain, dev->dev, dev->func);
@@ -948,6 +969,10 @@ MGAProbe(DriverPtr drv, int flags)
attrib_no = 16;
break;
+ case PCI_CHIP_MGAG200_EH3_PCI:
+ attrib_no = 17;
+ break;
+
default:
return FALSE;
}
@@ -1567,7 +1592,8 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
pMga->is_G200EV = (pMga->Chipset == PCI_CHIP_MGAG200_EV_PCI);
pMga->is_G200WB = (pMga->Chipset == PCI_CHIP_MGAG200_WINBOND_PCI)
|| (pMga->Chipset == PCI_CHIP_MGAG200_EW3_PCI);
- pMga->is_G200EH = (pMga->Chipset == PCI_CHIP_MGAG200_EH_PCI);
+ pMga->is_G200EH = (pMga->Chipset == PCI_CHIP_MGAG200_EH_PCI)
+ || (pMga->Chipset == PCI_CHIP_MGAG200_EH3_PCI);
pMga->is_G200ER = (pMga->Chipset == PCI_CHIP_MGAG200_ER_PCI);
pMga->DualHeadEnabled = FALSE;
@@ -1594,6 +1620,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_CHIP_MGAG200_ER_PCI:
case PCI_CHIP_MGAG200_WINBOND_PCI:
case PCI_CHIP_MGAG200_EH_PCI:
+ case PCI_CHIP_MGAG200_EH3_PCI:
pMga->HWCursor = FALSE;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"HW cursor is not supported with video redirection on"
@@ -2078,6 +2105,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_CHIP_MGAG200_EV_PCI:
case PCI_CHIP_MGAG200_EH_PCI:
case PCI_CHIP_MGAG200_ER_PCI:
+ case PCI_CHIP_MGAG200_EH3_PCI:
case PCI_CHIP_MGAG400:
case PCI_CHIP_MGAG550:
MGAGSetupFuncs(pScrn);
@@ -2192,6 +2220,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_CHIP_MGAG200_EW3_PCI:
case PCI_CHIP_MGAG200_EV_PCI:
case PCI_CHIP_MGAG200_EH_PCI:
+ case PCI_CHIP_MGAG200_EH3_PCI:
case PCI_CHIP_MGAG200_ER_PCI:
pMga->SrcOrg = 0;
pMga->DstOrg = 0;
@@ -2376,7 +2405,8 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_CHIP_MGAG200_WINBOND_PCI:
case PCI_CHIP_MGAG200_EW3_PCI:
case PCI_CHIP_MGAG200_EV_PCI:
- case PCI_CHIP_MGAG200_EH_PCI:
+ case PCI_CHIP_MGAG200_EH_PCI:
+ case PCI_CHIP_MGAG200_EH3_PCI:
case PCI_CHIP_MGAG200_ER_PCI:
case PCI_CHIP_MGAG400:
case PCI_CHIP_MGAG550:
@@ -3878,7 +3908,7 @@ MGAValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
} else if (pMga->is_G200EV
&& (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 327)) {
return MODE_BANDWIDTH;
- } else if (pMga->is_G200EH
+ } else if (pMga->is_G200EH && (pMga->Chipset != PCI_CHIP_MGAG200_EH3_PCI)
&& (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 375)) {
return MODE_BANDWIDTH;
} else if (pMga->is_G200ER