Hello community, here is the log from the commit of package xorg-x11 checked in at Thu Mar 15 01:51:16 CET 2007. -------- --- xorg-x11/xorg-x11.changes 2007-03-06 00:40:58.000000000 +0100 +++ /mounts/work_src_done/STABLE/xorg-x11/xorg-x11.changes 2007-03-14 17:14:58.000000000 +0100 @@ -1,0 +2,6 @@ +Wed Mar 14 17:14:19 CET 2007 - sndirsch@suse.de + +- xrandr_12_newmode.diff: + * replaces xf86crtc_allowdual.diff in xorg-x11-server package + +------------------------------------------------------------------- New: ---- xrandr_12_newmode.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xorg-x11.spec ++++++ --- /var/tmp/diff_new_pack.kS4196/_old 2007-03-15 01:50:56.000000000 +0100 +++ /var/tmp/diff_new_pack.kS4196/_new 2007-03-15 01:50:56.000000000 +0100 @@ -14,7 +14,7 @@ BuildRequires: fontconfig-devel freetype2-devel libpng-devel pam-devel pkgconfig rsh update-desktop-files xorg-x11-devel xorg-x11-libICE-devel xorg-x11-libSM-devel xorg-x11-libX11-devel xorg-x11-libXau-devel xorg-x11-libXdmcp-devel xorg-x11-libXext-devel xorg-x11-libXfixes-devel xorg-x11-libXmu-devel xorg-x11-libXp-devel xorg-x11-libXpm-devel xorg-x11-libXprintUtil-devel xorg-x11-libXrender-devel xorg-x11-libXt-devel xorg-x11-libXv-devel xorg-x11-libfontenc-devel xorg-x11-libxkbfile-devel xorg-x11-proto-devel xorg-x11-xtrans-devel URL: http://xorg.freedesktop.org/ Version: 7.2 -Release: 54 +Release: 56 License: X11/MIT BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/X11/Utilities @@ -142,6 +142,7 @@ Patch20: xdm.diff Patch21: xvidtune.diff Patch22: beforelight.diff +Patch23: xrandr_12_newmode.diff %description This package contains the X.Org core and sample applications. @@ -205,6 +206,7 @@ popd pushd xrandr-* %patch9 +%patch23 -p1 popd pushd xrx-* %patch10 @@ -447,6 +449,9 @@ /var/lib/xdm/authdir/ %changelog +* Wed Mar 14 2007 - sndirsch@suse.de +- xrandr_12_newmode.diff: + * replaces xf86crtc_allowdual.diff in xorg-x11-server package * Tue Mar 06 2007 - sndirsch@suse.de - /etc/X11/fs/config: /etc/X11/XF86config --> /etc/X11/xorg.conf (Bug #251437) ++++++ xrandr_12_newmode.diff ++++++ diff --git a/xrandr.c b/xrandr.c index 7425263..da4a78b 100644 --- a/xrandr.c +++ b/xrandr.c @@ -111,8 +111,16 @@ usage(void) fprintf(stderr, " --right-of <output>\n"); fprintf(stderr, " --above <output>\n"); fprintf(stderr, " --below <output>\n"); + fprintf(stderr, " --same-as <output>\n"); fprintf(stderr, " --off\n"); fprintf(stderr, " --crtc <crtc>\n"); + fprintf(stderr, " --newmode <name> <clock MHz>\n"); + fprintf(stderr, " <hdisp> <hsync-start> <hsync-end> <htotal>\n"); + fprintf(stderr, " <vdisp> <vsync-start> <vsync-end> <vtotal>\n"); + fprintf(stderr, " [+HSync] [-HSync] [+Vsync] [-VSync]\n"); + fprintf(stderr, " --rmmode <name>\n"); + fprintf(stderr, " --addmode <output> <mode>\n"); + fprintf(stderr, " --delmode <output> <mode>\n"); #endif exit(1); @@ -167,7 +175,7 @@ typedef enum _policy { } policy_t; typedef enum _relation { - left_of, right_of, above, below + left_of, right_of, above, below, same_as, } relation_t; typedef enum _changes { @@ -199,6 +207,7 @@ typedef struct { typedef struct _crtc crtc_t; typedef struct _output output_t; +typedef struct _umode umode_t; struct _crtc { name_t crtc; @@ -228,6 +237,8 @@ struct _output { float refresh; XRRModeInfo *mode_info; + name_t addmode; + relation_t relation; char *relative_to; @@ -237,6 +248,20 @@ struct _output { Bool automatic; }; +typedef enum _umode_action { + umode_create, umode_destroy, umode_add, umode_delete +} umode_action_t; + + +struct _umode { + struct _umode *next; + + umode_action_t action; + XRRModeInfo mode; + name_t output; + name_t name; +}; + static char *connection[3] = { "connected", "disconnected", @@ -258,6 +283,7 @@ static char *connection[3] = { static output_t *outputs = NULL; static output_t **outputs_tail = &outputs; static crtc_t *crtcs; +static umode_t *umodes; static int num_crtcs; static XRRScreenResources *res; static int fb_width = 0, fb_height = 0; @@ -516,6 +542,15 @@ find_mode_by_xid (RRMode mode) return find_mode (&mode_name, 0); } +static XRRModeInfo * +find_mode_by_name (char *name) +{ + name_t mode_name; + init_name (&mode_name); + set_name_string (&mode_name, name); + return find_mode (&mode_name, 0); +} + static XRRModeInfo * find_mode_for_output (output_t *output, name_t *name) @@ -1282,6 +1317,9 @@ set_positions (void) output->x = relation->x; output->y = relation->y + mode_height (relation->mode_info, relation->rotation); break; + case same_as: + output->x = relation->x; + output->y = relation->y; } output->changes |= changes_position; any_set = True; @@ -1401,6 +1439,7 @@ main (int argc, char **argv) policy_t policy = clone; Bool setit_1_2 = False; Bool query_1_2 = False; + Bool modeit = False; Bool query_1 = False; int major, minor; #endif @@ -1600,6 +1639,14 @@ main (int argc, char **argv) output->changes |= changes_relation; continue; } + if (!strcmp ("--same-as", argv[i])) { + if (++i>=argc) usage (); + if (!output) usage(); + output->relation = same_as; + output->relative_to = argv[i]; + output->changes |= changes_relation; + continue; + } if (!strcmp ("--off", argv[i])) { if (!output) usage(); set_name_xid (&output->mode, None); @@ -1663,6 +1710,102 @@ main (int argc, char **argv) query_1 = True; continue; } + if (!strcmp ("--newmode", argv[i])) + { + umode_t *m = malloc (sizeof (umode_t)); + float clock; + + ++i; + if (i + 9 >= argc) usage (); + m->mode.name = argv[i]; + m->mode.nameLength = strlen (argv[i]); + i++; + if (sscanf (argv[i++], "%f", &clock) != 1) + usage (); + m->mode.dotClock = clock * 1e6; + + if (sscanf (argv[i++], "%d", &m->mode.width) != 1) usage(); + if (sscanf (argv[i++], "%d", &m->mode.hSyncStart) != 1) usage(); + if (sscanf (argv[i++], "%d", &m->mode.hSyncEnd) != 1) usage(); + if (sscanf (argv[i++], "%d", &m->mode.hTotal) != 1) usage(); + if (sscanf (argv[i++], "%d", &m->mode.height) != 1) usage(); + if (sscanf (argv[i++], "%d", &m->mode.vSyncStart) != 1) usage(); + if (sscanf (argv[i++], "%d", &m->mode.vSyncEnd) != 1) usage(); + if (sscanf (argv[i++], "%d", &m->mode.vTotal) != 1) usage(); + m->mode.modeFlags = 0; + while (i < argc) { + static const struct { + char *string; + unsigned long flag; + } mode_flags[] = { + "+HSync", RR_HSyncPositive, + "-HSync", RR_HSyncNegative, + "+VSync", RR_VSyncPositive, + "-VSync", RR_VSyncNegative, + "Interlace", RR_Interlace, + "DoubleScan", RR_DoubleScan, + "CSync", RR_CSync, + "+CSync", RR_CSyncPositive, + "-CSync", RR_CSyncNegative, + NULL, 0, + }; + int f; + + for (f = 0; mode_flags[f].string; f++) + if (!strcmp (mode_flags[f].string, argv[i])) + break; + + if (!mode_flags[f].string) + break; + m->mode.modeFlags |= mode_flags[f].flag; + i++; + } + m->next = umodes; + m->action = umode_create; + umodes = m; + modeit = True; + continue; + } + if (!strcmp ("--rmmode", argv[i])) + { + umode_t *m = malloc (sizeof (umode_t)); + + if (++i>=argc) usage (); + set_name (&m->name, argv[i], name_string|name_xid); + m->action = umode_destroy; + m->next = umodes; + umodes = m; + modeit = True; + continue; + } + if (!strcmp ("--addmode", argv[i])) + { + umode_t *m = malloc (sizeof (umode_t)); + + if (++i>=argc) usage (); + set_name (&m->output, argv[i], name_string|name_xid); + if (++i>=argc) usage(); + set_name (&m->name, argv[i], name_string|name_xid); + m->action = umode_add; + m->next = umodes; + umodes = m; + modeit = True; + continue; + } + if (!strcmp ("--delmode", argv[i])) + { + umode_t *m = malloc (sizeof (umode_t)); + + if (++i>=argc) usage (); + set_name (&m->output, argv[i], name_string|name_xid); + if (++i>=argc) usage(); + set_name (&m->name, argv[i], name_string|name_xid); + m->action = umode_delete; + m->next = umodes; + umodes = m; + modeit = True; + continue; + } #endif usage(); } @@ -1698,6 +1841,55 @@ main (int argc, char **argv) if (major > 1 || (major == 1 && minor >= 2)) has_1_2 = True; + if (has_1_2 && modeit) + { + umode_t *m; + + get_screen (); + get_crtcs(); + get_outputs(); + + for (m = umodes; m; m = m->next) + { + XRRModeInfo *e; + output_t *o; + + switch (m->action) { + case umode_create: + XRRCreateMode (dpy, root, &m->mode); + break; + case umode_destroy: + e = find_mode (&m->name, 0); + if (!e) + fatal ("cannot find mode"); + XRRDestroyMode (dpy, e->id); + break; + case umode_add: + o = find_output (&m->output); + if (!o) + fatal ("cannot find output"); + e = find_mode (&m->name, 0); + if (!e) + fatal ("cannot find mode"); + XRRAddOutputMode (dpy, o->output.xid, e->id); + break; + case umode_delete: + o = find_output (&m->output); + if (!o) + fatal ("cannot find output"); + e = find_mode (&m->name, 0); + if (!e) + fatal ("cannot find mode"); + XRRDeleteOutputMode (dpy, o->output.xid, e->id); + break; + } + } + if (!setit_1_2) + { + XSync (dpy, False); + exit (0); + } + } if (setit_1_2) { XRROutputInfo *output_info; @@ -1801,6 +1993,9 @@ main (int argc, char **argv) if (query_1_2 || (query && has_1_2 && !query_1)) { output_t *output; + int m; + +#define ModeShown 0x80000000 get_screen (); get_crtcs (); @@ -1871,7 +2066,7 @@ main (int argc, char **argv) printf ("\tIdentifier: 0x%x\n", output->output.xid); printf ("\tTimestamp: %d\n", output_info->timestamp); printf ("\tSubpixel: %s\n", order[output_info->subpixel_order]); - printf ("\tClones: "); + printf ("\tClones: "); for (j = 0; j < output_info->nclone; j++) { output_t *clone = find_output_by_xid (output_info->clones[j]); @@ -1954,6 +2149,7 @@ main (int argc, char **argv) for (j = 0; j < output_info->nmode; j++) { XRRModeInfo *mode = find_mode_by_xid (output_info->modes[j]); + XRRModeFlags modeFlags = mode->modeFlags & ~ModeShown; printf (" %s (0x%x) %6.1fMHz\n", mode->name, mode->id, @@ -1964,6 +2160,7 @@ main (int argc, char **argv) printf (" v: height %4d start %4d end %4d total %4d clock %6.1fHz\n", mode->height, mode->vSyncStart, mode->vSyncEnd, mode->vTotal, mode_refresh (mode)); + mode->modeFlags |= ModeShown; } } else @@ -1985,6 +2182,7 @@ main (int argc, char **argv) kmode = find_mode_by_xid (output_info->modes[k]); if (strcmp (jmode->name, kmode->name) != 0) continue; mode_shown[k] = True; + kmode->modeFlags |= ModeShown; printf (" %6.1f", mode_refresh (kmode)); if (kmode == output->mode_info) printf ("*"); @@ -2000,6 +2198,23 @@ main (int argc, char **argv) free (mode_shown); } } + for (m = 0; m < res->nmode; m++) + { + XRRModeInfo *mode = &res->modes[m]; + + if (!(mode->modeFlags & ModeShown)) + { + printf (" %s (0x%x) %6.1fMHz\n", + mode->name, mode->id, + (float)mode->dotClock / 1000000.0); + printf (" h: width %4d start %4d end %4d total %4d skew %4d clock %6.1fKHz\n", + mode->width, mode->hSyncStart, mode->hSyncEnd, + mode->hTotal, mode->hSkew, mode_hsync (mode) / 1000); + printf (" v: height %4d start %4d end %4d total %4d clock %6.1fHz\n", + mode->height, mode->vSyncStart, mode->vSyncEnd, mode->vTotal, + mode_refresh (mode)); + } + } exit (0); } #endif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org