summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Mansi <gabriel.mansi@gmail.com>2007-06-12 16:32:20 +0000
committerGabriel Mansi <gabriel.mansi@gmail.com>2007-06-12 16:32:20 +0000
commitae77f88780ca6de6b4787c592ca1997370d3a000 (patch)
tree32ab2fda78982861c8dec227d866096581bc9eb2
parentb9d6ce63864fcbfa6f31b4b5507b01e4fc30565f (diff)
Added missing includes. Check for null data block in vbe. Renamed VT3157 to VT3324
-rw-r--r--ChangeLog18
-rw-r--r--unichrome/via.h5
-rw-r--r--unichrome/via_dri.c2
-rw-r--r--unichrome/via_driver.c2
-rw-r--r--unichrome/via_id.c2
-rw-r--r--unichrome/via_id.h2
-rw-r--r--unichrome/via_swov.c16
-rw-r--r--unichrome/via_vbe.c15
-rw-r--r--unichrome/via_video.c2
9 files changed, 43 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 5195e7b..10d8792 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2007-06-12 Gabriel Mansi <gabriel-dot-mansi-at-gmail-dot-com>
+
+ Renamed VT3157 to VT3324.
+ Added check for null data block in vbe.
+ Remove version check for older version of Xorg.
+
+ * unichrome/via.h:
+ * unichrome/via_dri.c: (VIADRIRingBufferInit):
+ * unichrome/via_driver.c:
+ * unichrome/via_id.c:
+ * unichrome/via_id.h:
+ * unichrome/via_swov.c: (viaCalculateVideoColor),
+ (viaSetColorSpace), (ViaInitVideoStatusFlag), (ViaSetVidCtl),
+ (SetFIFO_V3), (SetFIFO_V3_64or32or32), (SetFIFO_V3_64or32or16),
+ (Upd_Video):
+ * unichrome/via_vbe.c: (ViaVbeSetMode):
+ * unichrome/via_video.c: (DecideOverlaySupport):
+
2007-05-18 Xavier Bachelot <xavier-at-bachelot-dot-org>
* libxvmc/Makefile.am:
diff --git a/unichrome/via.h b/unichrome/via.h
index fb6bfc5..028fccb 100644
--- a/unichrome/via.h
+++ b/unichrome/via.h
@@ -27,17 +27,12 @@
#include "xorgVersion.h"
-/* use xf86_ansic for < xorg 7.1 */
-#if ( XORG_VERSION_MAJOR > 6 && XORG_VERSION_MINOR > 0 )
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <stdlib.h>
-#else
-#include "xf86_ansic.h"
-#endif
/* Video Engines */
#define VIDEO_ENGINE_UNK 0 /* Unknown video engine */
diff --git a/unichrome/via_dri.c b/unichrome/via_dri.c
index 5b09544..30da5e8 100644
--- a/unichrome/via_dri.c
+++ b/unichrome/via_dri.c
@@ -185,7 +185,7 @@ VIADRIRingBufferInit(ScrnInfoPtr pScrn)
switch (pVia->ChipId) {
case PCI_CHIP_VT3314:
case PCI_CHIP_VT3259:
- case PCI_CHIP_VT3157:
+ case PCI_CHIP_VT3324:
pVIADRI->reg_pause_addr = 0x40c;
break;
default:
diff --git a/unichrome/via_driver.c b/unichrome/via_driver.c
index 8505dc0..26b2093 100644
--- a/unichrome/via_driver.c
+++ b/unichrome/via_driver.c
@@ -123,7 +123,7 @@ static PciChipsets VIAPciChipsets[] = {
{VIA_VM800, PCI_CHIP_VT3314, RES_SHARED_VGA},
{VIA_K8M890, PCI_CHIP_VT3336, RES_SHARED_VGA},
{VIA_P4M900, PCI_CHIP_VT3364, RES_SHARED_VGA},
- {VIA_CX700, PCI_CHIP_VT3157, RES_SHARED_VGA},
+ {VIA_CX700, PCI_CHIP_VT3324, RES_SHARED_VGA},
{VIA_P4M890, PCI_CHIP_VT3327, RES_SHARED_VGA},
{-1, -1, RES_UNDEFINED}
};
diff --git a/unichrome/via_id.c b/unichrome/via_id.c
index 9fa3a1d..cb8b0be 100644
--- a/unichrome/via_id.c
+++ b/unichrome/via_id.c
@@ -198,7 +198,7 @@ static struct ViaCardIdStruct ViaCardId[] = {
{"Fujitsu/Siemens Amilo Pro V3515", VIA_P4M900, 0x1734, 0x10CB, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
{"Fujitsu/Siemens Amilo Li1705", VIA_P4M900, 0x1734, 0x10F7, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
/* CX700 */
- {"VIA VT3157 (CX700)", VIA_CX700, 0x1106, 0x3157, VIA_DEVICE_CRT},
+ {"VIA VT3324 (CX700)", VIA_CX700, 0x1106, 0x3157, VIA_DEVICE_CRT},
/* P4M890 */
{"ASUS P5V-VM ULTRA", VIA_P4M890, 0x1043, 0x81B5, VIA_DEVICE_CRT},
{"Asustek P5V-VM DH", VIA_P4M890, 0x1043, 0x81CE, VIA_DEVICE_CRT},
diff --git a/unichrome/via_id.h b/unichrome/via_id.h
index 600ba68..514174b 100644
--- a/unichrome/via_id.h
+++ b/unichrome/via_id.h
@@ -62,7 +62,7 @@ enum VIACHIPTAGS {
#define PCI_CHIP_VT3314 0x3344 /* VM800 */
#define PCI_CHIP_VT3336 0x3230 /* K8M890 */
#define PCI_CHIP_VT3364 0x3371 /* P4M900 */
-#define PCI_CHIP_VT3157 0x3157 /* CX700 */
+#define PCI_CHIP_VT3324 0x3157 /* CX700 */
#define PCI_CHIP_VT3327 0x3343 /* P4M890 */
/*
diff --git a/unichrome/via_swov.c b/unichrome/via_swov.c
index 74c0ade..4106c02 100644
--- a/unichrome/via_swov.c
+++ b/unichrome/via_swov.c
@@ -770,7 +770,7 @@ viaCalculateVideoColor(VIAPtr pVia, int hue, int saturation, int brightness,
case PCI_CHIP_VT3314:
case PCI_CHIP_VT3336:
case PCI_CHIP_VT3364:
- case PCI_CHIP_VT3157:
+ case PCI_CHIP_VT3324:
case PCI_CHIP_VT3327:
model = 0;
break;
@@ -907,7 +907,7 @@ viaSetColorSpace(VIAPtr pVia, int hue, int saturation, int brightness,
break;
case PCI_CHIP_VT3327:
case PCI_CHIP_VT3336:
- case PCI_CHIP_VT3157:
+ case PCI_CHIP_VT3324:
case PCI_CHIP_VT3364:
case PCI_CHIP_CLE3122:
VIDOutD(V1_ColorSpaceReg_2, col2);
@@ -935,7 +935,7 @@ ViaInitVideoStatusFlag(VIAPtr pVia)
return VIDEO_HQV_INUSE | SW_USE_HQV | VIDEO_3_INUSE;
case PCI_CHIP_VT3327:
case PCI_CHIP_VT3336:
- case PCI_CHIP_VT3157:
+ case PCI_CHIP_VT3324:
case PCI_CHIP_VT3364:
return VIDEO_HQV_INUSE | SW_USE_HQV | VIDEO_1_INUSE | \
VIDEO_ACTIVE | VIDEO_SHOW;
@@ -972,7 +972,7 @@ ViaSetVidCtl(VIAPtr pVia, unsigned int videoFlag)
return V3_ENABLE | V3_EXPIRE_NUM_3205;
case PCI_CHIP_VT3327:
case PCI_CHIP_VT3336:
- case PCI_CHIP_VT3157:
+ case PCI_CHIP_VT3324:
case PCI_CHIP_VT3364:
return V3_ENABLE | VIDEO_EXPIRE_NUM_VT3336;
case PCI_CHIP_CLE3122:
@@ -1250,7 +1250,7 @@ SetFIFO_V1(VIAPtr pVia, CARD8 depth, CARD8 prethreshold, CARD8 threshold)
static void
SetFIFO_V3(VIAPtr pVia, CARD8 depth, CARD8 prethreshold, CARD8 threshold)
{
- if ((pVia->ChipId == PCI_CHIP_VT3314) || (pVia->ChipId == PCI_CHIP_VT3157) || (pVia->ChipId == PCI_CHIP_VT3327)) {
+ if ((pVia->ChipId == PCI_CHIP_VT3314) || (pVia->ChipId == PCI_CHIP_VT3324) || (pVia->ChipId == PCI_CHIP_VT3327)) {
SaveVideoRegister(pVia, ALPHA_V3_FIFO_CONTROL,
(VIDInD(ALPHA_V3_FIFO_CONTROL) & ALPHA_FIFO_MASK) |
((depth - 1) & 0xff) | ((threshold & 0xff) << 8));
@@ -1310,7 +1310,7 @@ SetFIFO_V3_64or32or32(VIAPtr pVia)
switch (pVia->ChipId) {
case PCI_CHIP_VT3327:
case PCI_CHIP_VT3336:
- case PCI_CHIP_VT3157:
+ case PCI_CHIP_VT3324:
case PCI_CHIP_VT3364:
SetFIFO_V3(pVia, 225, 200, 250);
break;
@@ -1341,7 +1341,7 @@ SetFIFO_V3_64or32or16(VIAPtr pVia)
switch (pVia->ChipId) {
case PCI_CHIP_VT3327:
case PCI_CHIP_VT3336:
- case PCI_CHIP_VT3157:
+ case PCI_CHIP_VT3324:
case PCI_CHIP_VT3364:
SetFIFO_V3(pVia, 225, 200, 250);
break;
@@ -1929,7 +1929,7 @@ Upd_Video(ScrnInfoPtr pScrn, unsigned long videoFlag,
miniCtl |= V1_Y_INTERPOLY | V1_YCBCR_INTERPOLY;
if (srcWidth >= 800 &&
(pVia->ChipId == PCI_CHIP_VT3327 || pVia->ChipId == PCI_CHIP_VT3336 ||
- pVia->ChipId == PCI_CHIP_VT3157 || pVia->ChipId == PCI_CHIP_VT3364 ||
+ pVia->ChipId == PCI_CHIP_VT3324 || pVia->ChipId == PCI_CHIP_VT3364 ||
pVia->ChipId == PCI_CHIP_VT3205)) {
miniCtl &= ~V1_Y_INTERPOLY;
}
diff --git a/unichrome/via_vbe.c b/unichrome/via_vbe.c
index a286a7a..f50186d 100644
--- a/unichrome/via_vbe.c
+++ b/unichrome/via_vbe.c
@@ -120,7 +120,7 @@ ViaVbeSetMode(ScrnInfoPtr pScrn, DisplayModePtr pMode)
VIAPtr pVia;
VbeModeInfoData *data;
int mode;
- int refresh;
+ int refreshRate;
pVia = VIAPTR(pScrn);
@@ -133,12 +133,21 @@ ViaVbeSetMode(ScrnInfoPtr pScrn, DisplayModePtr pMode)
/* enable linear addressing */
mode |= 1 << 14;
+ if (data->block) {
+ refreshRate = data->block->RefreshRate ;
+ } else {
+ refreshRate = 6000 ;
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Unable to determine the refresh rate, using %.2f. "
+ "Please check your configuration.\n", refreshRate/100. ) ;
+ }
+
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Trying VBE Mode %dx%d (0x%x) Refresh %.2f:\n",
(int) data->data->XResolution,
(int) data->data->YResolution,
- mode & ~(1 << 11), (float) data->block->RefreshRate/100.);
+ mode & ~(1 << 11), (float) refreshRate/100.);
- ViaVbeSetRefresh(pScrn, data->block->RefreshRate/100);
+ ViaVbeSetRefresh(pScrn, refreshRate/100);
if (VBESetVBEMode(pVia->pVbe, mode, data->block) == FALSE) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VBESetVBEMode failed");
diff --git a/unichrome/via_video.c b/unichrome/via_video.c
index 588acc5..3a09ba1 100644
--- a/unichrome/via_video.c
+++ b/unichrome/via_video.c
@@ -282,7 +282,7 @@ DecideOverlaySupport(ScrnInfoPtr pScrn)
pVia->ChipId != PCI_CHIP_VT3327 &&
pVia->ChipId != PCI_CHIP_VT3336 &&
pVia->ChipId != PCI_CHIP_VT3364 &&
- pVia->ChipId != PCI_CHIP_VT3157) {
+ pVia->ChipId != PCI_CHIP_VT3324) {
CARD32 bandwidth = (mode->HDisplay >> 4) * (mode->VDisplay >> 5) *
pScrn->bitsPerPixel * mode->VRefresh;