[PATCH xf86-video-nv] Replace xf86CrtcSetMode() calls with xf86CrtcSet().
Cyril Brulebois
kibi at debian.org
Sun Dec 12 10:42:04 PST 2010
In server's 8b35118c, xf86CrtcSetModeTransform() was replaced with
xf86CrtcSet() taking fewer arguments (thanks to a structure), and
xf86CrtcSetMode() was removed entirely. Convert the xf86CrtcSetMode()
calls into corresponding xf86CrtcSet() calls.
This fixes the following warnings, and probable run-time crashes due
to missing symbols:
| CC g80_driver.lo
| g80_driver.c: In function ‘G80ResizeScreen’:
| g80_driver.c:118: warning: implicit declaration of function ‘xf86CrtcSetMode’
| CC g80_sor.lo
| g80_sor.c: In function ‘G80SorSetProperty’:
| g80_sor.c:386: warning: implicit declaration of function ‘xf86CrtcSetMode’
Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
Not that I really care about -nv anyway, it happened to red-light my
tinderbox. Also, this means one is going to need a version of the server
with the appropriate symbol… Not sure it warrants bumping the needed
version in configure.ac…
src/g80_driver.c | 11 +++++++++--
src/g80_sor.c | 15 +++++++++------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/g80_driver.c b/src/g80_driver.c
index 551abe3..5eab9e5 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -114,8 +114,15 @@ G80ResizeScreen(ScrnInfoPtr pScrn, int width, int height)
/* Re-set the modes so the new pitch is taken into account */
for(i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i];
- if(crtc->enabled)
- xf86CrtcSetMode(crtc, &crtc->mode, crtc->rotation, crtc->x, crtc->y);
+ if(crtc->enabled) {
+ xf86CrtcSetRec set;
+ set.mode = &crtc->mode;
+ set.rotation = crtc->rotation;
+ set.transform = NULL;
+ set.x = crtc->x;
+ set.y = crtc->y;
+ xf86CrtcSet(crtc, &set);
+ }
}
}
diff --git a/src/g80_sor.c b/src/g80_sor.c
index 0c3279f..ceff03e 100644
--- a/src/g80_sor.c
+++ b/src/g80_sor.c
@@ -382,18 +382,21 @@ G80SorSetProperty(xf86OutputPtr output, Atom prop, RRPropertyValuePtr val)
pPriv->scale = scale;
if(output->crtc) {
xf86CrtcPtr crtc = output->crtc;
-
- if(!xf86CrtcSetMode(crtc, &crtc->desiredMode, crtc->desiredRotation,
- crtc->desiredX, crtc->desiredY)) {
+ xf86CrtcSetRec set;
+ set.mode = &crtc->desiredMode;
+ set.rotation = crtc->desiredRotation;
+ set.transform = NULL;
+ set.x = crtc->desiredX;
+ set.y = crtc->desiredY;
+
+ if(!xf86CrtcSet(crtc, &set)) {
xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
"Failed to set scaling to %s for output %s\n",
modes[i].name, output->name);
// Restore old scale and try again.
pPriv->scale = oldScale;
- if(!xf86CrtcSetMode(crtc, &crtc->desiredMode,
- crtc->desiredRotation, crtc->desiredX,
- crtc->desiredY)) {
+ if(!xf86CrtcSet(crtc, &set)) {
xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
"Failed to restore old scaling for output %s\n",
output->name);
--
1.7.2.3
More information about the xorg-devel
mailing list