diff options
author | marha <marha@users.sourceforge.net> | 2014-01-15 21:23:25 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-15 21:23:25 +0100 |
commit | 1b0fcca503ae9cf2d462b60770f96c794dfbb27a (patch) | |
tree | d08c81de02b94da202195d84c99e192bc24ae69e /xorg-server/hw/xfree86/modes | |
parent | aaeb8bf497c82efabc4f9b27c319042c0e72d816 (diff) | |
download | vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.gz vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.bz2 vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.zip |
mesa xkeyboard-config xserver git update 15 jan 2014
xserver commit 2d2d49dab5c5718989de97d7227aac793479745e
xkeyboard-config commit 78af7aa79c6552924295644b911e45d07a0fcdad
mesa commit a05c596a00916ce6a9c9d35ff36cd1e401fddd43
Diffstat (limited to 'xorg-server/hw/xfree86/modes')
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86Crtc.c | 31 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86Modes.c | 6 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86RandR12.c | 14 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86Rotate.c | 9 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86cvt.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86gtf.c | 2 |
6 files changed, 24 insertions, 43 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c index a441fd16a..b2eb72e8e 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.c +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c @@ -379,7 +379,7 @@ xf86CrtcSetModeTransform(xf86CrtcPtr crtc, DisplayModePtr mode, crtc->transformPresent = saved_transform_present; } - free(adjusted_mode->name); + free((void *) adjusted_mode->name); free(adjusted_mode); if (didLock) @@ -564,8 +564,8 @@ static const char *direction[4] = { static Rotation xf86OutputInitialRotation(xf86OutputPtr output) { - char *rotate_name = xf86GetOptValString(output->options, - OPTION_ROTATE); + const char *rotate_name = xf86GetOptValString(output->options, + OPTION_ROTATE); int i; if (!rotate_name) { @@ -926,7 +926,6 @@ xf86PickCrtcs(ScrnInfoPtr scrn, xf86OutputPtr output; xf86CrtcPtr crtc; xf86CrtcPtr *crtcs; - xf86CrtcPtr best_crtc; int best_score; int score; int my_score; @@ -939,7 +938,6 @@ xf86PickCrtcs(ScrnInfoPtr scrn, * Compute score with this output disabled */ best_crtcs[n] = NULL; - best_crtc = NULL; best_score = xf86PickCrtcs(scrn, best_crtcs, modes, n + 1, width, height); if (modes[n] == NULL) return best_score; @@ -993,7 +991,6 @@ xf86PickCrtcs(ScrnInfoPtr scrn, score = my_score + xf86PickCrtcs(scrn, crtcs, modes, n + 1, width, height); if (score > best_score) { - best_crtc = crtc; best_score = score; memcpy(best_crtcs, crtcs, config->num_output * sizeof(xf86CrtcPtr)); } @@ -1087,8 +1084,8 @@ xf86UserConfiguredOutputs(ScrnInfoPtr scrn, DisplayModePtr * modes) for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; - char *position; - char *relative_name; + const char *position; + const char *relative_name; OutputOpts relation; int r; @@ -1145,8 +1142,8 @@ xf86InitialOutputPositions(ScrnInfoPtr scrn, DisplayModePtr * modes) }; xf86OutputPtr output = config->output[o]; xf86OutputPtr relative; - char *relative_name; - char *position; + const char *relative_name; + const char *position; OutputOpts relation; int r; @@ -1306,7 +1303,7 @@ xf86InitialPanning(ScrnInfoPtr scrn) for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; - char *panning = xf86GetOptValString(output->options, OPTION_PANNING); + const char *panning = xf86GetOptValString(output->options, OPTION_PANNING); int width, height, left, top; int track_width, track_height, track_left, track_top; int brdr[4]; @@ -1389,7 +1386,7 @@ xf86SortModes(DisplayModePtr input) for (o = output; o && (n = o->next); o = n) { if (!strcmp(o->name, n->name) && xf86ModesEqual(o, n)) { o->next = n->next; - free(n->name); + free((void *) n->name); free(n); n = o; } @@ -1403,10 +1400,10 @@ xf86SortModes(DisplayModePtr input) return output; } -static char * +static const char * preferredMode(ScrnInfoPtr pScrn, xf86OutputPtr output) { - char *preferred_mode = NULL; + const char *preferred_mode = NULL; /* Check for a configured preference for a particular mode */ preferred_mode = xf86GetOptValString(output->options, @@ -1610,7 +1607,7 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) xf86OutputPtr output = config->output[o]; DisplayModePtr mode; DisplayModePtr config_modes = NULL, output_modes, default_modes = NULL; - char *preferred_mode; + const char *preferred_mode; xf86MonPtr edid_monitor; XF86ConfMonitorPtr conf_monitor; MonRec mon_rec; @@ -1833,10 +1830,6 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) * Copy one of the output mode lists to the ScrnInfo record */ -/* XXX where does this function belong? Here? */ -void - xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr scrn, int *x, int *y); - static DisplayModePtr biggestMode(DisplayModePtr a, DisplayModePtr b) { diff --git a/xorg-server/hw/xfree86/modes/xf86Modes.c b/xorg-server/hw/xfree86/modes/xf86Modes.c index c4a3eb0a3..43b223307 100644 --- a/xorg-server/hw/xfree86/modes/xf86Modes.c +++ b/xorg-server/hw/xfree86/modes/xf86Modes.c @@ -129,11 +129,13 @@ void xf86SetModeDefaultName(DisplayModePtr mode) { Bool interlaced = ! !(mode->Flags & V_INTERLACE); + char *tmp; - free(mode->name); + free((void *) mode->name); - XNFasprintf(&mode->name, "%dx%d%s", mode->HDisplay, mode->VDisplay, + XNFasprintf(&tmp, "%dx%d%s", mode->HDisplay, mode->VDisplay, interlaced ? "i" : ""); + mode->name = tmp; } /* diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c index 76614de78..f7a7d44d9 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.c +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c @@ -454,7 +454,6 @@ xf86RandR12GetInfo(ScreenPtr pScreen, Rotation * rotations) ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); DisplayModePtr mode; - int refresh0 = 60; int maxX = 0, maxY = 0; *rotations = randrp->supported_rotations; @@ -479,8 +478,6 @@ xf86RandR12GetInfo(ScreenPtr pScreen, Rotation * rotations) if (maxY < mode->VDisplay) maxY = mode->VDisplay; } - if (mode == scrp->modes) - refresh0 = refresh; pSize = RRRegisterSize(pScreen, mode->HDisplay, mode->VDisplay, randrp->mmWidth, randrp->mmHeight); @@ -684,7 +681,6 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen, WindowPtr pRoot = pScreen->root; PixmapPtr pScrnPix; Bool ret = FALSE; - Bool panning = FALSE; int c; if (xf86RandR12Key) { @@ -716,7 +712,6 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen, crtc->panningTrackingArea.y2 += height - pScreen->height; xf86RandR13VerifyPanningArea(crtc, width, height); xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY); - panning = TRUE; } } @@ -946,8 +941,6 @@ xf86RandR12SetRotations(ScreenPtr pScreen, Rotation rotations) void xf86RandR12SetTransformSupport(ScreenPtr pScreen, Bool transforms) { - XF86RandRInfoPtr randrp; - #if RANDR_13_INTERFACE ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); int c; @@ -957,7 +950,6 @@ xf86RandR12SetTransformSupport(ScreenPtr pScreen, Bool transforms) if (xf86RandR12Key == NULL) return; - randrp = XF86RANDRINFO(pScreen); #if RANDR_13_INTERFACE for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; @@ -1455,7 +1447,6 @@ xf86RandR12SetInfo12(ScreenPtr pScreen) RRCrtcPtr *crtcs; int ncrtc; int o, c, l; - RRCrtcPtr randr_crtc; int nclone; clones = malloc(config->num_output * sizeof(RROutputPtr)); @@ -1468,11 +1459,6 @@ xf86RandR12SetInfo12(ScreenPtr pScreen) if (output->possible_crtcs & (1 << c)) crtcs[ncrtc++] = config->crtc[c]->randr_crtc; - if (output->crtc) - randr_crtc = output->crtc->randr_crtc; - else - randr_crtc = NULL; - if (!RROutputSetCrtcs(output->randr_output, crtcs, ncrtc)) { free(crtcs); free(clones); diff --git a/xorg-server/hw/xfree86/modes/xf86Rotate.c b/xorg-server/hw/xfree86/modes/xf86Rotate.c index 495af9ba7..0ddd8408e 100644 --- a/xorg-server/hw/xfree86/modes/xf86Rotate.c +++ b/xorg-server/hw/xfree86/modes/xf86Rotate.c @@ -229,13 +229,12 @@ xf86RotateRedisplay(ScreenPtr pScreen) static void xf86RotateBlockHandler(ScreenPtr pScreen, - pointer pTimeout, pointer pReadmask) + void *pTimeout, void *pReadmask) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); - Bool rotation_active; - rotation_active = xf86RotateRedisplay(pScreen); + xf86RotateRedisplay(pScreen); pScreen->BlockHandler = xf86_config->BlockHandler; (*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask); /* cannot avoid re-wrapping until all wrapping is audited */ @@ -247,7 +246,6 @@ void xf86RotateDestroy(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; - ScreenPtr pScreen = xf86ScrnToScreen(pScrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int c; @@ -267,9 +265,6 @@ xf86RotateDestroy(xf86CrtcPtr crtc) * Clean up damage structures when no crtcs are rotated */ if (xf86_config->rotation_damage) { - DrawablePtr screenDrawable = NULL; - if (pScreen && pScreen->root) - screenDrawable = &pScreen->root->drawable; /* Free damage structure */ if (xf86_config->rotation_damage_registered) { xf86_config->rotation_damage_registered = FALSE; diff --git a/xorg-server/hw/xfree86/modes/xf86cvt.c b/xorg-server/hw/xfree86/modes/xf86cvt.c index de0784493..8b7bb8b03 100644 --- a/xorg-server/hw/xfree86/modes/xf86cvt.c +++ b/xorg-server/hw/xfree86/modes/xf86cvt.c @@ -89,6 +89,7 @@ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, int HDisplayRnd, HMargin; int VDisplayRnd, VMargin, VSync; float Interlace; /* Please rename this */ + char *tmp; /* CVT default is 60.0Hz */ if (!VRefresh) @@ -177,6 +178,7 @@ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, /* 10. Find number of lines in back porch */ VBackPorch = VSyncAndBackPorch - VSync; + (void) VBackPorch; /* 11. Find total number of lines in vertical field */ Mode->VTotal = VDisplayRnd + 2 * VMargin + VSyncAndBackPorch + Interlace @@ -282,7 +284,8 @@ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, if (Interlaced) Mode->VTotal *= 2; - XNFasprintf(&Mode->name, "%dx%d", HDisplay, VDisplay); + XNFasprintf(&tmp, "%dx%d", HDisplay, VDisplay); + Mode->name = tmp; if (Reduced) Mode->Flags |= V_PHSYNC | V_NVSYNC; diff --git a/xorg-server/hw/xfree86/modes/xf86gtf.c b/xorg-server/hw/xfree86/modes/xf86gtf.c index 23707b481..0a8078415 100644 --- a/xorg-server/hw/xfree86/modes/xf86gtf.c +++ b/xorg-server/hw/xfree86/modes/xf86gtf.c @@ -215,6 +215,7 @@ xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins) */ v_back_porch = vsync_plus_bp - V_SYNC_RQD; + (void) v_back_porch; /* 10. Find the total number of lines in Vertical field period: * @@ -253,6 +254,7 @@ xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins) */ v_frame_rate = interlaced ? v_field_rate / 2.0 : v_field_rate; + (void) v_frame_rate; /* 15. Find number of pixels in left margin: * |