xserver-xorg-video-nv: Changes to 'upstream-unstable'
configure.ac | 2 -
man/nv.man | 5 +++
src/g80_display.c | 17 ++++++++++++
src/g80_display.h | 1
src/g80_driver.c | 10 ++++++-
src/g80_output.c | 3 +-
src/g80_sor.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
src/g80_type.h | 1
src/nv_driver.c | 8 +++++
9 files changed, 117 insertions(+), 5 deletions(-)
New commits:
commit 493822998184a1d79d6774686983cbd41930f253
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Tue Jul 10 09:58:46 2007 -0700
Bump to 2.1.2.
diff --git a/configure.ac b/configure.ac
index ec55eb7..50dbeec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-nv],
- 2.1.1,
+ 2.1.2,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-nv)
commit d0d4e37accc697108e03c2ee7fdc0edf1f309620
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Tue Jul 10 09:48:19 2007 -0700
More GeForce 8 series mobile chips.
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 28c46d1..47d0fbb 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -345,10 +345,17 @@ static SymTabRec NVKnownChipsets[] =
{ 0x10DE0400, "GeForce 8600 GTS" },
{ 0x10DE0402, "GeForce 8600 GT" },
{ 0x10DE0407, "GeForce 8600M GT" },
+ { 0x10DE040B, "Quadro NVS 320M" },
{ 0x10DE0421, "GeForce 8500 GT" },
{ 0x10DE0422, "GeForce 8400 GS" },
{ 0x10DE0423, "GeForce 8300 GS" },
+ { 0x10DE0425, "GeForce 8600M GS" },
+ { 0x10DE0426, "GeForce 8400M GT" },
+ { 0x10DE0427, "GeForce 8400M GS" },
{ 0x10DE0428, "GeForce 8400M G" },
+ { 0x10DE0429, "Quadro NVS 140M" },
+ { 0x10DE042A, "Quadro NVS 130M" },
+ { 0x10DE042B, "Quadro NVS 135M" },
{-1, NULL}
};
commit e77a2d9b62bc65062e7e2167642be5ab75ac4864
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Tue Jul 10 00:41:21 2007 -0700
G80: Add a dithering property and corresponding config file option.
diff --git a/man/nv.man b/man/nv.man
index e9bcec9..54b637f 100644
--- a/man/nv.man
+++ b/man/nv.man
@@ -157,6 +157,11 @@ If you choose to use EXA, you might also consider setting
.B Option \*qMigrationHeuristic\*q \*qgreedy\*q
to improve performance.
Default: XAA.
+.TP
+.BI "Option \*qFPDither\*q \*q" boolean \*q
+Enable or disable flat panel dithering by default.
+Dithering can also be enabled or disabled using the RandR 1.2 \*qdither\*q output property.
+Default: off.
.\" ******************** end G80 section ********************
.
.SH "SEE ALSO"
diff --git a/src/g80_display.c b/src/g80_display.c
index d10f2d6..04ae3ec 100644
--- a/src/g80_display.c
+++ b/src/g80_display.c
@@ -41,6 +41,7 @@ typedef struct G80CrtcPrivRec {
int pclk; /* Target pixel clock in kHz */
Bool cursorVisible;
Bool skipModeFixup;
+ Bool dither;
} G80CrtcPrivRec, *G80CrtcPrivPtr;
static void G80CrtcShowHideCursor(xf86CrtcPtr crtc, Bool show, Bool update);
@@ -362,6 +363,7 @@ G80CrtcModeSet(xf86CrtcPtr crtc, DisplayModePtr mode,
case 16: C(0x00000870 + headOff, 0xE800); break;
case 24: C(0x00000870 + headOff, 0xCF00); break;
}
+ G80CrtcSetDither(crtc, pPriv->dither, FALSE);
if((adjusted_mode->Flags & V_DBLSCAN) || (adjusted_mode->Flags & V_INTERLACE) ||
adjusted_mode->CrtcHDisplay != HDisplay || adjusted_mode->CrtcVDisplay != VDisplay) {
C(0x000008A4 + headOff, 9);
@@ -478,6 +480,19 @@ G80CrtcSkipModeFixup(xf86CrtcPtr crtc)
pPriv->skipModeFixup = TRUE;
}
+void
+G80CrtcSetDither(xf86CrtcPtr crtc, Bool dither, Bool update)
+{
+ ScrnInfoPtr pScrn = crtc->scrn;
+ G80CrtcPrivPtr pPriv = crtc->driver_private;
+ const int headOff = 0x400 * G80CrtcGetHead(crtc);
+
+ pPriv->dither = dither;
+
+ C(0x000008A0 + headOff, dither ? 0x11 : 0);
+ if(update) C(0x00000080, 0);
+}
+
static void
G80CrtcCommit(xf86CrtcPtr crtc)
{
@@ -524,6 +539,7 @@ static const xf86CrtcFuncsRec g80_crtc_funcs = {
void
G80DispCreateCrtcs(ScrnInfoPtr pScrn)
{
+ G80Ptr pNv = G80PTR(pScrn);
Head head;
xf86CrtcPtr crtc;
G80CrtcPrivPtr g80_crtc;
@@ -535,6 +551,7 @@ G80DispCreateCrtcs(ScrnInfoPtr pScrn)
g80_crtc = xnfcalloc(sizeof(*g80_crtc), 1);
g80_crtc->head = head;
+ g80_crtc->dither = pNv->Dither;
crtc->driver_private = g80_crtc;
}
}
diff --git a/src/g80_display.h b/src/g80_display.h
index d6f24f4..4ab1d55 100644
--- a/src/g80_display.h
+++ b/src/g80_display.h
@@ -12,5 +12,6 @@ void G80CrtcEnableCursor(xf86CrtcPtr, Bool update);
void G80CrtcDisableCursor(xf86CrtcPtr, Bool update);
void G80CrtcSetCursorPosition(xf86CrtcPtr, int x, int y);
void G80CrtcSkipModeFixup(xf86CrtcPtr);
+void G80CrtcSetDither(xf86CrtcPtr, Bool dither, Bool update);
void G80DispCreateCrtcs(ScrnInfoPtr pScrn);
diff --git a/src/g80_driver.c b/src/g80_driver.c
index 7801602..8a494b9 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -105,12 +105,14 @@ typedef enum {
OPTION_HW_CURSOR,
OPTION_NOACCEL,
OPTION_ACCEL_METHOD,
+ OPTION_FP_DITHER,
} G80Opts;
static const OptionInfoRec G80Options[] = {
{ OPTION_HW_CURSOR, "HWCursor", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_ACCEL_METHOD, "AccelMethod", OPTV_STRING, {0}, FALSE },
+ { OPTION_FP_DITHER, "FPDither", OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@@ -313,6 +315,8 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
goto fail;
}
+ pNv->Dither = xf86ReturnOptValBool(pNv->Options, OPTION_FP_DITHER, FALSE);
+
/* Set the bits per RGB for 8bpp mode */
if(pScrn->depth == 8)
pScrn->rgbBits = 8;
diff --git a/src/g80_sor.c b/src/g80_sor.c
index 5ff7318..c4c640c 100644
--- a/src/g80_sor.c
+++ b/src/g80_sor.c
@@ -27,6 +27,7 @@
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#include <X11/Xatom.h>
#include "g80_type.h"
#include "g80_display.h"
@@ -200,6 +201,67 @@ G80SorGetLVDSModes(xf86OutputPtr output)
return xf86DuplicateMode(pPriv->nativeMode);
}
+#ifdef RANDR_12_INTERFACE
+#define MAKE_ATOM(a) MakeAtom((a), sizeof(a) - 1, TRUE);
+
+struct property {
+ Atom atom;
+ INT32 range[2];
+};
+
+static struct {
+ struct property dither;
+} properties;
+
+static void
+G80SorCreateResources(xf86OutputPtr output)
+{
+ ScrnInfoPtr pScrn = output->scrn;
+ G80Ptr pNv = G80PTR(pScrn);
+ int data, err;
+
+ properties.dither.atom = MAKE_ATOM("dither");
+ properties.dither.range[0] = 0;
+ properties.dither.range[1] = 1;
+ err = RRConfigureOutputProperty(output->randr_output,
+ properties.dither.atom, FALSE, TRUE, FALSE,
+ 2, properties.dither.range);
+ if(err)
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to configure dithering property for %s: error %d\n",
+ output->name, err);
+
+ // Set the default value
+ data = pNv->Dither;
+ err = RRChangeOutputProperty(output->randr_output, properties.dither.atom,
+ XA_INTEGER, 32, PropModeReplace, 1, &data,
+ FALSE, FALSE);
+ if(err)
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to set dithering property for %s: error %d\n",
+ output->name, err);
+}
+
+static Bool
+G80SorSetProperty(xf86OutputPtr output, Atom prop, RRPropertyValuePtr val)
+{
+ if(prop == properties.dither.atom) {
+ INT32 i;
+
+ if(val->type != XA_INTEGER || val->format != 32 || val->size != 1)
+ return FALSE;
+
+ i = *(INT32*)val->data;
+ if(i < properties.dither.range[0] || i > properties.dither.range[1])
+ return FALSE;
+
+ G80CrtcSetDither(output->crtc, i, TRUE);
+ }
+
+ return TRUE;
+}
+#endif // RANDR_12_INTERFACE
+
static const xf86OutputFuncsRec G80SorTMDSOutputFuncs = {
.dpms = G80SorDPMSSet,
.save = NULL,
@@ -211,6 +273,10 @@ static const xf86OutputFuncsRec G80SorTMDSOutputFuncs = {
.mode_set = G80SorModeSet,
.detect = G80SorDetect,
.get_modes = G80OutputGetDDCModes,
+#ifdef RANDR_12_INTERFACE
+ .create_resources = G80SorCreateResources,
+ .set_property = G80SorSetProperty,
+#endif
.destroy = G80SorDestroy,
};
@@ -225,6 +291,10 @@ static const xf86OutputFuncsRec G80SorLVDSOutputFuncs = {
.mode_set = G80SorModeSet,
.detect = G80SorLVDSDetect,
.get_modes = G80SorGetLVDSModes,
+#ifdef RANDR_12_INTERFACE
+ .create_resources = G80SorCreateResources,
+ .set_property = G80SorSetProperty,
+#endif
.destroy = G80SorDestroy,
};
diff --git a/src/g80_type.h b/src/g80_type.h
index 819a9f6..0830ecc 100644
--- a/src/g80_type.h
+++ b/src/g80_type.h
@@ -59,6 +59,7 @@ typedef struct G80Rec {
Bool HWCursor;
Bool NoAccel;
AccelMethod AccelMethod;
+ Bool Dither;
/* XAA */
XAAInfoRecPtr xaa;
commit c1503c864d495f8a3e5380fed5cb8ca5e21a3750
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Sun Jul 8 01:28:42 2007 -0700
GeForce 8600M GT.
diff --git a/src/nv_driver.c b/src/nv_driver.c
index f0f119f..28c46d1 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -344,6 +344,7 @@ static SymTabRec NVKnownChipsets[] =
{ 0x10DE019E, "Quadro FX 4600" },
{ 0x10DE0400, "GeForce 8600 GTS" },
{ 0x10DE0402, "GeForce 8600 GT" },
+ { 0x10DE0407, "GeForce 8600M GT" },
{ 0x10DE0421, "GeForce 8500 GT" },
{ 0x10DE0422, "GeForce 8400 GS" },
{ 0x10DE0423, "GeForce 8300 GS" },
commit 42dffde988176a3f85b0586ecb8d672b74050760
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Sun Jul 8 00:53:00 2007 -0700
Work around more MacBook wackiness.
Turn off more corrupt the framebuffer mode. Don't mess with the pixel clock for
LVDS as long as we're trusting the VBIOS-programmed timings.
diff --git a/src/g80_driver.c b/src/g80_driver.c
index 0f97a2d..7801602 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -829,6 +829,7 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
AvailFBArea.y2 = pNv->offscreenHeight;
xf86InitFBManager(pScreen, &AvailFBArea);
+ pNv->reg[0x00001708/4] = 0;
for(i = 0; i < 8; i++)
pNv->reg[0x00001900/4 + i] = 0;
diff --git a/src/g80_output.c b/src/g80_output.c
index 11bdb25..448864f 100644
--- a/src/g80_output.c
+++ b/src/g80_output.c
@@ -158,7 +158,8 @@ void
G80OutputSetPClk(xf86OutputPtr output, int pclk)
{
G80OutputPrivPtr pPriv = output->driver_private;
- pPriv->set_pclk(output, pclk);
+ if(pPriv->set_pclk)
+ pPriv->set_pclk(output, pclk);
}
int
diff --git a/src/g80_sor.c b/src/g80_sor.c
index 2ab9f2e..5ff7318 100644
--- a/src/g80_sor.c
+++ b/src/g80_sor.c
@@ -38,7 +38,7 @@ G80SorSetPClk(xf86OutputPtr output, int pclk)
G80Ptr pNv = G80PTR(output->scrn);
G80OutputPrivPtr pPriv = output->driver_private;
const int orOff = 0x800 * pPriv->or;
- const int limit = pPriv->panelType == LVDS ? 112000 : 165000;
+ const int limit = 165000;
pNv->reg[(0x00614300+orOff)/4] = (pclk > limit) ? 0x101 : 0;
}
@@ -284,7 +284,8 @@ G80CreateSor(ScrnInfoPtr pScrn, ORNum or, PanelType panelType)
pPriv->or = or;
pPriv->panelType = panelType;
pPriv->cached_status = XF86OutputStatusUnknown;
- pPriv->set_pclk = G80SorSetPClk;
+ if(panelType == TMDS)
+ pPriv->set_pclk = G80SorSetPClk;
output->driver_private = pPriv;
output->interlaceAllowed = TRUE;
output->doubleScanAllowed = TRUE;
commit bc439899f323410b0549068cd88348e7fb62866b
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Tue Jul 3 14:03:59 2007 -0700
Put the GPU into don't corrupt the framebuffer mode to work around MacBook wackiness.
diff --git a/src/g80_driver.c b/src/g80_driver.c
index e703ea8..0f97a2d 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -769,7 +769,7 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
ScrnInfoPtr pScrn;
G80Ptr pNv;
CARD32 pitch;
- int visualMask;
+ int visualMask, i;
BoxRec AvailFBArea;
/* First get the ScrnInfoRec */
@@ -829,6 +829,9 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
AvailFBArea.y2 = pNv->offscreenHeight;
xf86InitFBManager(pScreen, &AvailFBArea);
+ for(i = 0; i < 8; i++)
+ pNv->reg[0x00001900/4 + i] = 0;
+
if(!pNv->NoAccel) {
G80InitHW(pScrn);
switch(pNv->AccelMethod) {
Reply to: