[PATCH xserver 9/9] xfree86: Remove xf86RegisterRootWindowProperty
All consumers have been ported to the root window callback, so this can all be nuked. Signed-off-by: Adam Jackson--- hw/xfree86/common/xf86.h| 7 hw/xfree86/common/xf86Globals.c | 1 - hw/xfree86/common/xf86Helper.c | 75 - hw/xfree86/common/xf86Init.c| 52 +--- hw/xfree86/common/xf86Priv.h| 2 -- hw/xfree86/common/xf86Privstr.h | 10 -- 6 files changed, 1 insertion(+), 146 deletions(-) diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 38b901f..adb5601 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -61,10 +61,6 @@ extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec; #define xf86ScreenKey () -extern _X_EXPORT DevPrivateKeyRec xf86CreateRootWindowKeyRec; - -#define xf86CreateRootWindowKey () - extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ extern _X_EXPORT const unsigned char byte_reversed[256]; extern _X_EXPORT Bool fbSlotClaimed; @@ -351,9 +347,6 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, extern _X_EXPORT Bool xf86IsScreenPrimary(ScrnInfoPtr pScrn); -extern _X_EXPORT int -xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, - int format, unsigned long len, void *value); extern _X_EXPORT Bool xf86IsUnblank(int mode); diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index 86bf15d..07cfabf 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -201,5 +201,4 @@ Bool xf86AllowMouseOpenFail = FALSE; Bool xf86VidModeDisabled = FALSE; Bool xf86VidModeAllowNonLocal = FALSE; #endif -RootWinPropPtr *xf86RegisteredPropertiesTable = NULL; Bool xorgHWAccess = FALSE; diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index a0793b1..e3eeb13 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1817,81 +1817,6 @@ xf86IsScreenPrimary(ScrnInfoPtr pScrn) return FALSE; } -int -xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, - int format, unsigned long len, void *value) -{ -RootWinPropPtr pNewProp = NULL, pRegProp; -Bool existing = FALSE; - -DebugF("xf86RegisterRootWindowProperty(%d, %ld, %ld, %d, %ld, %p)\n", - ScrnIndex, (long)property, (long)type, format, len, value); - -if (ScrnIndex < 0 || ScrnIndex >= xf86NumScreens) { -return BadMatch; -} - -if (xf86RegisteredPropertiesTable && -xf86RegisteredPropertiesTable[ScrnIndex]) { -for (pNewProp = xf86RegisteredPropertiesTable[ScrnIndex]; - pNewProp; pNewProp = pNewProp->next) { -if (strcmp(pNewProp->name, NameForAtom(property)) == 0) -break; -} -} - -if (!pNewProp) { -if ((pNewProp = (RootWinPropPtr) malloc(sizeof(RootWinProp))) == NULL) { -return BadAlloc; -} -/* - * We will put this property at the end of the list so that - * the changes are made in the order they were requested. - */ -pNewProp->next = NULL; -} -else { -free((void *) pNewProp->name); -existing = TRUE; -} - -pNewProp->name = xnfstrdup(NameForAtom(property)); -pNewProp->type = type; -pNewProp->format = format; -pNewProp->size = len; -pNewProp->data = value; - -DebugF("new property filled\n"); - -if (xf86RegisteredPropertiesTable == NULL) { -DebugF("creating xf86RegisteredPropertiesTable[] size %d\n", - xf86NumScreens); -xf86RegisteredPropertiesTable = -xnfcalloc(sizeof(RootWinProp), xf86NumScreens); -} - -DebugF("xf86RegisteredPropertiesTable %p\n", - (void *) xf86RegisteredPropertiesTable); -DebugF("xf86RegisteredPropertiesTable[%d] %p\n", - ScrnIndex, (void *) xf86RegisteredPropertiesTable[ScrnIndex]); - -if (!existing) { -if (xf86RegisteredPropertiesTable[ScrnIndex] == NULL) { -xf86RegisteredPropertiesTable[ScrnIndex] = pNewProp; -} -else { -pRegProp = xf86RegisteredPropertiesTable[ScrnIndex]; -while (pRegProp->next != NULL) { -DebugF("- next %p\n", (void *) pRegProp); -pRegProp = pRegProp->next; -} -pRegProp->next = pNewProp; -} -} -DebugF("xf86RegisterRootWindowProperty succeeded\n"); -return Success; -} - Bool xf86IsUnblank(int mode) { diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 7923561..7a7203e 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -296,50 +296,6 @@ xf86PrivsElevated(void) return privsElevated; } -static Bool -xf86CreateRootWindow(WindowPtr pWin) -{ -int ret = TRUE; -int err = Success; -ScreenPtr pScreen =
[PATCH xserver 5/9] xfree86: Remove some leftovers from DisplayID support
Signed-off-by: Adam Jackson--- hw/xfree86/ddc/ddcProperty.c | 10 ++ hw/xfree86/ddc/edid.h| 1 - 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/hw/xfree86/ddc/ddcProperty.c b/hw/xfree86/ddc/ddcProperty.c index fc63f0e..c51c3e6 100644 --- a/hw/xfree86/ddc/ddcProperty.c +++ b/hw/xfree86/ddc/ddcProperty.c @@ -53,11 +53,7 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) { int scrnIndex = pScrn->scrnIndex; -if (DDC->flags & MONITOR_DISPLAYID) { -/* Don't bother, use RANDR already */ -return; -} -else if (DDC->ver.version == 1) { +if (DDC->ver.version == 1) { int size = 128 + (DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0); @@ -76,9 +72,7 @@ xf86SetDDCproperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) if (!pScrn || !pScrn->monitor || !DDC) return FALSE; -if (DDC->flags & MONITOR_DISPLAYID); -else -xf86EdidMonitorSet(pScrn->scrnIndex, pScrn->monitor, DDC); +xf86EdidMonitorSet(pScrn->scrnIndex, pScrn->monitor, DDC); addRootWindowProperties(pScrn, DDC); diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h index 4c2da51..750e427 100644 --- a/hw/xfree86/ddc/edid.h +++ b/hw/xfree86/ddc/edid.h @@ -537,7 +537,6 @@ struct detailed_monitor_section { #define MONITOR_EDID_COMPLETE_RAWDATA 0x01 /* old, don't use */ #define EDID_COMPLETE_RAWDATA 0x01 -#define MONITOR_DISPLAYID 0x02 /* * For DisplayID devices, only the scrnIndex, flags, and rawData fields -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 4/9] xfree86: Unexport xf86Initialising, remove xf86ServerIsInitialising
Neither of these are used from outside the server. Signed-off-by: Adam Jackson--- hw/xfree86/common/xf86.h | 2 -- hw/xfree86/common/xf86Helper.c | 6 -- hw/xfree86/common/xf86Priv.h | 2 +- hw/xfree86/doc/ddxDesign.xml | 12 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 1cde478..38b901f 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -306,8 +306,6 @@ xf86ServerIsExiting(void); extern _X_EXPORT Bool xf86ServerIsResetting(void); extern _X_EXPORT Bool -xf86ServerIsInitialising(void); -extern _X_EXPORT Bool xf86ServerIsOnlyDetecting(void); extern _X_EXPORT Bool xf86CaughtSignal(void); diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index c42e93e..a0793b1 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1516,12 +1516,6 @@ xf86ServerIsResetting(void) } Bool -xf86ServerIsInitialising(void) -{ -return xf86Initialising; -} - -Bool xf86ServerIsOnlyDetecting(void) { return xf86DoConfigure; diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index 6e374eb..ad3f2b9 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -86,7 +86,7 @@ extern _X_EXPORT serverLayoutRec xf86ConfigLayout; extern _X_EXPORT DriverPtr *xf86DriverList; extern _X_EXPORT int xf86NumDrivers; extern _X_EXPORT Bool xf86Resetting; -extern _X_EXPORT Bool xf86Initialising; +extern Bool xf86Initialising; extern _X_EXPORT int xf86NumScreens; extern _X_EXPORT const char *xf86VisualNames[]; extern _X_EXPORT int xf86Verbose; /* verbosity level */ diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml index aed77a9..3c883dc 100644 --- a/hw/xfree86/doc/ddxDesign.xml +++ b/hw/xfree86/doc/ddxDesign.xml @@ -2054,18 +2054,6 @@ functions is as follows: -Bool xf86ServerIsInitialising(); - - - Returns TRUE if the server is at the beginning of - a generation and is in the process of initialising, and - FALSE otherwise. - - - - - - Bool xf86ServerIsOnlyProbing(); -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 6/9] xfree86: Make xf86SetDDCproperties work more than once per generation
We can call this more than once via xf86OutputSetEDID since hotplug is actually a thing in RANDR 1.2, but xf86RegisterRootWindowProperty merely adds the data to a list to be applied to the root at CreateWindow time, so calls past the first (for a given screen) would have no effect until server regen. Once we've initialised pScrn->pScreen is filled in, so we can just set the property directly. Signed-off-by: Adam Jackson--- hw/xfree86/ddc/ddcProperty.c | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/hw/xfree86/ddc/ddcProperty.c b/hw/xfree86/ddc/ddcProperty.c index c51c3e6..a31e9c7 100644 --- a/hw/xfree86/ddc/ddcProperty.c +++ b/hw/xfree86/ddc/ddcProperty.c @@ -27,6 +27,7 @@ #include "xf86.h" #include "xf86DDC.h" +#include "xf86Priv.h" #include #include "property.h" #include "propertyst.h" @@ -34,17 +35,38 @@ #define EDID1_ATOM_NAME "XFree86_DDC_EDID1_RAWDATA" +static int +edidSize(const xf86MonPtr DDC) +{ +if (DDC->ver.version != 1) +return 0; + + return 128 + + (DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0); +} + static void -edidMakeAtom(int i, const char *name, CARD8 *data, int size) +setRootWindowEDID(ScreenPtr pScreen, xf86MonPtr DDC) +{ +Atom atom = MakeAtom(EDID1_ATOM_NAME, strlen(EDID1_ATOM_NAME), TRUE); + +dixChangeWindowProperty(serverClient, pScreen->root, atom, XA_INTEGER, +8, PropModeReplace, edidSize(DDC), DDC->rawData, +FALSE); +} + +static void +edidMakeAtom(int i, const char *name, xf86MonPtr DDC) { Atom atom; unsigned char *atom_data; +int size = edidSize(DDC); if (!(atom_data = malloc(size * sizeof(CARD8 return; atom = MakeAtom(name, strlen(name), TRUE); -memcpy(atom_data, data, size); +memcpy(atom_data, DDC->rawData, size); xf86RegisterRootWindowProperty(i, atom, XA_INTEGER, 8, size, atom_data); } @@ -54,10 +76,10 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) int scrnIndex = pScrn->scrnIndex; if (DDC->ver.version == 1) { -int size = 128 + -(DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0); - -edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC->rawData, size); +if (xf86Initialising) +edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC); +else +setRootWindowEDID(pScrn->pScreen, DDC); } else { xf86DrvMsg(scrnIndex, X_PROBED, "unexpected EDID version %d.%d\n", -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 1/9] dix: Add RootWindowFinalizeCallback
Signed-off-by: Adam Jackson--- dix/main.c| 3 +++ include/dix.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/dix/main.c b/dix/main.c index 661ab03..77e0f2e 100644 --- a/dix/main.c +++ b/dix/main.c @@ -129,6 +129,8 @@ pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER; #endif +CallbackListPtr RootWindowFinalizeCallback = NULL; + int dix_main(int argc, char *argv[], char *envp[]) { @@ -230,6 +232,7 @@ dix_main(int argc, char *argv[], char *envp[]) FatalError("failed to create default stipple"); if (!CreateRootWindow(pScreen)) FatalError("failed to create root window"); +CallCallbacks(, pScreen); } if (SetDefaultFontPath(defaultFontPath) != Success) { diff --git a/include/dix.h b/include/dix.h index 921156b..9022120 100644 --- a/include/dix.h +++ b/include/dix.h @@ -586,6 +586,8 @@ typedef struct { DeviceIntPtr device; } DeviceEventInfoRec; +extern _X_EXPORT CallbackListPtr RootWindowFinalizeCallback; + extern int XItoCoreType(int xi_type); extern Bool -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/9] xfree86: Create seat atom from the root window callback
Signed-off-by: Adam Jackson--- hw/xfree86/common/xf86Init.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 017dcb6..78f1b87 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -364,6 +364,22 @@ InstallSignalHandlers(void) } } +static void +AddSeatId(CallbackListPtr *pcbl, void *screen, void *data) +{ +ScreenPtr pScreen = screen; +Atom SeatAtom = MakeAtom(SEAT_ATOM_NAME, sizeof(SEAT_ATOM_NAME) - 1, TRUE); +int err; + +err = dixChangeWindowProperty(serverClient, pScreen->root, SeatAtom, + XA_STRING, 8, PropModeReplace, + strlen(data) + 1, data, FALSE); + +if (err != Success) +xf86DrvMsg(pScreen->myNum, X_WARNING, + "Failed to register seat property\n"); +} + /* The memory storing the initial value of the XFree86_has_VT root window * property. This has to remain available until server start-up, so we just * use a global. */ @@ -748,26 +764,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) } } -if (SeatId) { -Atom SeatAtom; - -SeatAtom = -MakeAtom(SEAT_ATOM_NAME, sizeof(SEAT_ATOM_NAME) - 1, TRUE); - -for (i = 0; i < xf86NumScreens; i++) { -int ret; - -ret = xf86RegisterRootWindowProperty(xf86Screens[i]->scrnIndex, - SeatAtom, XA_STRING, 8, - strlen(SeatId) + 1, - SeatId); -if (ret != Success) { -xf86DrvMsg(xf86Screens[i]->scrnIndex, X_WARNING, - "Failed to register seat property\n"); -} -} -} - /* If a screen uses depth 24, show what the pixmap format is */ for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->depth == 24) { @@ -801,6 +797,9 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) xf86EnableIO(); } +if (SeatId) +AddCallback(, AddSeatId, SeatId); + /* * Use the previously collected parts to setup pScreenInfo */ -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 3/9] xfree86: Create VT atoms from the root window callback
Signed-off-by: Adam Jackson--- hw/xfree86/common/xf86Init.c | 67 +--- 1 file changed, 25 insertions(+), 42 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 78f1b87..7923561 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -380,10 +380,28 @@ AddSeatId(CallbackListPtr *pcbl, void *screen, void *data) "Failed to register seat property\n"); } -/* The memory storing the initial value of the XFree86_has_VT root window - * property. This has to remain available until server start-up, so we just - * use a global. */ -static CARD32 HasVTValue = 1; +static void +AddVTAtoms(CallbackListPtr *pcbl, void *screen, void *data) +{ +#define VT_ATOM_NAME "XFree86_VT" +int err, HasVT = 1; +ScreenPtr pScreen = screen; +Atom VTAtom = MakeAtom(VT_ATOM_NAME, sizeof(VT_ATOM_NAME) - 1, TRUE); +Atom HasVTAtom = MakeAtom(HAS_VT_ATOM_NAME, sizeof(HAS_VT_ATOM_NAME) - 1, + TRUE); + +err = dixChangeWindowProperty(serverClient, pScreen->root, VTAtom, + XA_INTEGER, 32, PropModeReplace, 1, + , FALSE); + +err |= dixChangeWindowProperty(serverClient, pScreen->root, HasVTAtom, + XA_INTEGER, 32, PropModeReplace, 1, + , FALSE); + +if (err != Success) +xf86DrvMsg(pScreen->myNum, X_WARNING, + "Failed to register VT properties\n"); +} /* * InitOutput -- @@ -726,44 +744,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) } formatsDone = TRUE; -if (xf86Info.vtno >= 0) { -#define VT_ATOM_NAME "XFree86_VT" -Atom VTAtom = -1; -Atom HasVTAtom = -1; -CARD32 *VT = NULL; -CARD32 *HasVT = -int ret; - -/* This memory needs to stay available until the screen has been - initialized, and we can create the property for real. - */ -if ((VT = malloc(sizeof(CARD32))) == NULL) { -FatalError -("Unable to make VT property - out of memory. Exiting...\n"); -} -*VT = xf86Info.vtno; - -VTAtom = MakeAtom(VT_ATOM_NAME, sizeof(VT_ATOM_NAME) - 1, TRUE); -HasVTAtom = MakeAtom(HAS_VT_ATOM_NAME, - sizeof(HAS_VT_ATOM_NAME) - 1, TRUE); - -for (i = 0, ret = Success; i < xf86NumScreens && ret == Success; - i++) { -ret = -xf86RegisterRootWindowProperty(xf86Screens[i]->scrnIndex, - VTAtom, XA_INTEGER, 32, 1, - VT); -if (ret == Success) -ret = xf86RegisterRootWindowProperty(xf86Screens[i] - ->scrnIndex, - HasVTAtom, XA_INTEGER, - 32, 1, HasVT); -if (ret != Success) -xf86DrvMsg(xf86Screens[i]->scrnIndex, X_WARNING, - "Failed to register VT properties\n"); -} -} - /* If a screen uses depth 24, show what the pixmap format is */ for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->depth == 24) { @@ -797,6 +777,9 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) xf86EnableIO(); } +if (xf86Info.vtno >= 0) +AddCallback(, AddVTAtoms, NULL); + if (SeatId) AddCallback(, AddSeatId, SeatId); -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 8/9] xfree86: Create EDID atom from the root window callback
Signed-off-by: Adam Jackson--- hw/xfree86/ddc/ddcProperty.c | 31 +-- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/hw/xfree86/ddc/ddcProperty.c b/hw/xfree86/ddc/ddcProperty.c index 66e7ba8..1b3f36a 100644 --- a/hw/xfree86/ddc/ddcProperty.c +++ b/hw/xfree86/ddc/ddcProperty.c @@ -56,29 +56,13 @@ setRootWindowEDID(ScreenPtr pScreen, xf86MonPtr DDC) } static void -edidMakeAtom(int i, const char *name, xf86MonPtr DDC) +addEDIDProp(CallbackListPtr *pcbl, void *screen, void *scrn) { -Atom atom; -unsigned char *atom_data; -int size = edidSize(DDC); +ScreenPtr pScreen = screen; +ScrnInfoPtr pScrn = scrn; -if (!(atom_data = malloc(size * sizeof(CARD8 -return; - -atom = MakeAtom(name, strlen(name), TRUE); -memcpy(atom_data, DDC->rawData, size); -xf86RegisterRootWindowProperty(i, atom, XA_INTEGER, 8, size, atom_data); -} - -static void -addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) -{ -int scrnIndex = pScrn->scrnIndex; - -if (xf86Initialising) -edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC); -else -setRootWindowEDID(pScrn->pScreen, DDC); +if (xf86ScreenToScrn(pScreen) == pScrn) +setRootWindowEDID(pScreen, pScrn->monitor->DDC); } Bool @@ -89,7 +73,10 @@ xf86SetDDCproperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) xf86EdidMonitorSet(pScrn->scrnIndex, pScrn->monitor, DDC); -addRootWindowProperties(pScrn, DDC); +if (xf86Initialising) +AddCallback(, addEDIDProp, pScrn); +else +setRootWindowEDID(pScrn->pScreen, DDC); return TRUE; } -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 7/9] xfree86: Remove a never-hit diagnostic message
Practically speaking, the EDID major version is never not 1. Signed-off-by: Adam Jackson--- hw/xfree86/ddc/ddcProperty.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/hw/xfree86/ddc/ddcProperty.c b/hw/xfree86/ddc/ddcProperty.c index a31e9c7..66e7ba8 100644 --- a/hw/xfree86/ddc/ddcProperty.c +++ b/hw/xfree86/ddc/ddcProperty.c @@ -75,17 +75,10 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) { int scrnIndex = pScrn->scrnIndex; -if (DDC->ver.version == 1) { -if (xf86Initialising) -edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC); -else -setRootWindowEDID(pScrn->pScreen, DDC); -} -else { -xf86DrvMsg(scrnIndex, X_PROBED, "unexpected EDID version %d.%d\n", - DDC->ver.version, DDC->ver.revision); -return; -} +if (xf86Initialising) +edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC); +else +setRootWindowEDID(pScrn->pScreen, DDC); } Bool -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 0/9] Rewrite root window property setup
Leo's patch to fix the EDID atom leak is probably correct, in the sense that it fixes the leak, but xf86RegisterRootWindowProperty is fairly ugly to begin with so I'd rather see it eliminated. This series adds a generic callback for screen finalization and ports xfree86 to it. Since dixChangeWindowProperty will copy the property data for us this should fix the leak as well, since we're not making a copy for xf86CreateRootWindow anymore. While I was at it I cleaned up some pointless API, and fixed a bug that prevented the EDID property being updated on hotplug events. Disclaimer: just compiled, not actually tested yet. dix/main.c | 3 + hw/xfree86/common/xf86.h| 9 --- hw/xfree86/common/xf86Globals.c | 1 - hw/xfree86/common/xf86Helper.c | 81 hw/xfree86/common/xf86Init.c| 158 hw/xfree86/common/xf86Priv.h| 4 +- hw/xfree86/common/xf86Privstr.h | 10 --- hw/xfree86/ddc/ddcProperty.c| 56 +++--- hw/xfree86/ddc/edid.h | 1 - hw/xfree86/doc/ddxDesign.xml| 12 --- include/dix.h | 2 + 11 files changed, 77 insertions(+), 260 deletions(-) - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver v2] Fix uninitialized variable warnings reported by clang
On Wed, 2016-01-06 at 07:00 +0100, Thomas Klausner wrote: > Hello Adam! > > > If it's not too much trouble, please use git-send-email --in-reply-to > > for followup patches like this. > > Thanks, I didn't know about this. I'll use it in the future. And > thanks for the macro fix, it looks good to me. remote: I: patch #69491 updated using rev 63f83d1b7f496d05b409352749cdb6674d71cf80. remote: I: 1 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver ba71b69..63f83d1 master -> master - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: xserver: Branch 'master'
On 01/ 5/16 10:35 PM, Michel Dänzer wrote: On 06.01.2016 04:51, Adam Jackson wrote: commit edcb6426f20c3be5dd5f50b76a686754aef2f64e Author: Alan CoopersmithDate: Fri Jan 1 18:11:14 2016 -0800 Use unique logfile names when starting server with -displayfd This change broke make check for me, specifically the signal-logging test: (EE) Fatal server error: (EE) Cannot remove old log file "/tmp/Xorg-logging-test.log": No such file or directory Sorry - I forgot to run make check when testing this. Thanks to ajax for the quick fix. -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] os: Failure to remove a non-existent log file is not an error
Signed-off-by: Adam Jackson--- os/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/log.c b/os/log.c index 6168d59..91e55a5 100644 --- a/os/log.c +++ b/os/log.c @@ -218,7 +218,7 @@ LogFilePrep(const char *fname, const char *backup, const char *idstring) } } else { -if (remove(logFileName) != 0) { +if (remove(logFileName) != 0 && errno != ENOENT) { FatalError("Cannot remove old log file \"%s\": %s\n", logFileName, strerror(errno)); } -- 2.5.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] os: Failure to remove a non-existent log file is not an error
On 01/ 6/16 07:03 AM, Adam Jackson wrote: Signed-off-by: Adam Jackson--- os/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/log.c b/os/log.c index 6168d59..91e55a5 100644 --- a/os/log.c +++ b/os/log.c @@ -218,7 +218,7 @@ LogFilePrep(const char *fname, const char *backup, const char *idstring) } } else { -if (remove(logFileName) != 0) { +if (remove(logFileName) != 0 && errno != ENOENT) { FatalError("Cannot remove old log file \"%s\": %s\n", logFileName, strerror(errno)); } Reviewed-by: Alan Coopersmith -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] os: Failure to remove a non-existent log file is not an error
On Wed, 2016-01-06 at 08:11 -0800, Alan Coopersmith wrote: > Reviewed-by: Alan Coopersmithremote: I: patch #69572 updated using rev 6dcb73375e0ce389315d55587623eb84e9d13543. remote: I: 1 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver 862cbf4..6dcb733 master -> master - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] Substitution of VIA_VM800 label with VIA_P4M800PRO label
Replaces VIA_VM800 label with VIA_P4M800PRO label inside via_driver.c due to the fact that there is no such product as VM800 chipset from VIA Technologies. Of course, references to VIA_VM800 label in other files were also replaced as well. The VM800 chipset the source code refers to really is P4M800 Pro chipset. Also, the source code refers to a product called VN800 chipset, and this is similar (related) to P4M800 Pro chipset. The compiled device driver was tested on the following computer. - Epic 1314 laptop (MSI VR321 laptop equivalent, VN896 chipset) with Lubuntu 12.04 i386 --- src/via_bandwidth.c |6 ++--- src/via_display.c|2 +- src/via_driver.c |6 ++--- src/via_i2c.c|2 +- src/via_id.c | 70 ++ src/via_outputs.c|4 +-- src/via_regs.h |3 +-- src/via_ums.c|2 +- src/via_xv.c |4 +-- src/via_xv_overlay.c |4 +-- 10 files changed, 52 insertions(+), 51 deletions(-) diff --git a/src/via_bandwidth.c b/src/via_bandwidth.c index c33bce5..38c1891 100644 --- a/src/via_bandwidth.c +++ b/src/via_bandwidth.c @@ -204,8 +204,8 @@ ViaSetPrimaryFIFO(ScrnInfoPtr pScrn, DisplayModePtr mode) else ViaSeqMask(hwp, 0x22, 0x1F, 0x1F); /* 31 */ break; -/* P4M800Pro/VN800/CN700 */ -case VIA_VM800: +/* P4M800 Pro/VN800/CN700 */ +case VIA_P4M800PRO: hwp->writeSeq(hwp, 0x17, 0x2F); ViaSeqMask(hwp, 0x16, 0x14, 0xBF); /* 80/4= 20 = 0x14 */ ViaSeqMask(hwp, 0x18, 0x08, 0xBF); @@ -375,7 +375,7 @@ ViaSetSecondaryFIFO(ScrnInfoPtr pScrn, DisplayModePtr mode) else ViaCrtcMask(hwp, 0x94, 0x20, 0x7F); /* 128/4 */ break; -case VIA_VM800: +case VIA_P4M800PRO: ViaCrtcMask(hwp, 0x68, 0xA0, 0xF0); ViaCrtcMask(hwp, 0x94, 0x00, 0x80); ViaCrtcMask(hwp, 0x95, 0x00, 0x80); diff --git a/src/via_display.c b/src/via_display.c index ea2920b..4c588c8 100644 --- a/src/via_display.c +++ b/src/via_display.c @@ -1798,7 +1798,7 @@ UMSCrtcInit(ScrnInfoPtr pScrn) case VIA_KM400: case VIA_K8M800: case VIA_PM800: -case VIA_VM800: +case VIA_P4M800PRO: max_pitch = 3344; max_height = 2508; break; diff --git a/src/via_driver.c b/src/via_driver.c index 649bf99..a0e2f5d 100644 --- a/src/via_driver.c +++ b/src/via_driver.c @@ -131,7 +131,7 @@ static SymTabRec VIAChipsets[] = { {VIA_KM400,"KM400/KN400"}, {VIA_K8M800, "K8M800/K8N800"}, {VIA_PM800,"PM800/PM880/CN400"}, -{VIA_VM800,"VM800/P4M800Pro/VN800/CN700"}, +{VIA_P4M800PRO,"P4M800 Pro/VN800/CN700"}, {VIA_CX700,"CX700/VX700"}, {VIA_K8M890, "K8M890/K8N890"}, {VIA_P4M890, "P4M890"}, @@ -148,7 +148,7 @@ static PciChipsets VIAPciChipsets[] = { {VIA_KM400,PCI_CHIP_VT3205,VIA_RES_SHARED}, {VIA_K8M800, PCI_CHIP_VT3204,VIA_RES_SHARED}, {VIA_PM800,PCI_CHIP_VT3259,VIA_RES_SHARED}, -{VIA_VM800,PCI_CHIP_VT3314,VIA_RES_SHARED}, +{VIA_P4M800PRO,PCI_CHIP_VT3314,VIA_RES_SHARED}, {VIA_CX700,PCI_CHIP_VT3324,VIA_RES_SHARED}, {VIA_K8M890, PCI_CHIP_VT3336,VIA_RES_SHARED}, {VIA_P4M890, PCI_CHIP_VT3327,VIA_RES_SHARED}, @@ -707,7 +707,7 @@ VIASetupDefaultOptions(ScrnInfoPtr pScrn) /* FIXME The video playing (XV) is not working correctly after turn on new mode switch */ pVia->VideoEngine = VIDEO_ENGINE_CME; break; -case VIA_VM800: +case VIA_P4M800PRO: /* New mode switch resolve bug with gamma set #282 */ /* and with Xv after hibernate #240*/ break; diff --git a/src/via_i2c.c b/src/via_i2c.c index 6c11cfd..bde073c 100644 --- a/src/via_i2c.c +++ b/src/via_i2c.c @@ -347,7 +347,7 @@ ViaI2CBus3Init(ScrnInfoPtr pScrn) pI2CBus->DriverPrivate.ptr = hwp; switch (pVia->Chipset) { -case VIA_VM800: +case VIA_P4M800PRO: DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "using alternative PutBits/GetBits functions for I2C Bus 3\n")); pI2CBus->I2CPutBits = ViaI2C3SimplePutBits; pI2CBus->I2CGetBits = ViaI2C3SimpleGetBits; diff --git a/src/via_id.c b/src/via_id.c index 0090ad6..90ddc28 100644 --- a/src/via_id.c +++ b/src/via_id.c @@ -1,4 +1,6 @@ /* + * Copyright 2005-2015 The Openchrome Project + * [http://www.freedesktop.org/wiki/Openchrome] * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net] * * Permission is hereby granted, free of charge, to any person obtaining a @@ -136,40 +138,40 @@ static struct ViaCardIdStruct ViaCardId[] = { {"Chaintech MPM800-3",VIA_PM800, 0x270F, 0x7671, VIA_DEVICE_CRT}, {"KamLAB KINO-LUKE-533-R20", VIA_PM800,
Re: [PATCH xserver] os: Failure to remove a non-existent log file is not an error
On 07.01.2016 00:03, Adam Jackson wrote: > Signed-off-by: Adam Jackson> --- > os/log.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/os/log.c b/os/log.c > index 6168d59..91e55a5 100644 > --- a/os/log.c > +++ b/os/log.c > @@ -218,7 +218,7 @@ LogFilePrep(const char *fname, const char *backup, const > char *idstring) > } > } > else { > -if (remove(logFileName) != 0) { > +if (remove(logFileName) != 0 && errno != ENOENT) { > FatalError("Cannot remove old log file \"%s\": %s\n", > logFileName, strerror(errno)); > } > This fixes make check for me, thanks Adam! -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] glamor: Disable debugging messages other than GL API errors
From: Michel DänzerAccording to Nicolai Hähnle, the relevant specification says "All messages are initially enabled unless their assigned severity is DEBUG_SEVERITY_LOW", so we need to explicitly disable the messages we don't want to get. Failing that, we were accidentally logging e.g. shader stats intended for shader-db. Signed-off-by: Michel Dänzer --- glamor/glamor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/glamor/glamor.c b/glamor/glamor.c index 116d10c..81aba2d 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -393,6 +393,9 @@ glamor_setup_debug_output(ScreenPtr screen) return; glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); +/* Disable debugging messages other than GL API errors */ +glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, + GL_FALSE); glDebugMessageControl(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_ERROR, GL_DONT_CARE, -- 2.6.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xdm] Missed on arc4random() conversion.
On 01/ 5/16 11:14 PM, Matthieu Herrb wrote: On Tue, Jan 05, 2016 at 02:49:44PM -0800, Alan Coopersmith wrote: On 01/ 5/16 12:34 PM, Matthieu Herrb wrote: Signed-off-by: Matthieu Herrb--- xdm/genauth.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git xdm/genauth.c xdm/genauth.c index 5db7315..f50be3b 100644 --- xdm/genauth.c +++ xdm/genauth.c @@ -408,15 +408,20 @@ GenerateAuthData (char *auth, int len) static intxdmcpAuthInited; long ldata[2]; -# ifdef ITIMER_REAL +# ifndef HAVE_ARC4RANDOM +# ifdef ITIMER_REAL struct timeval now; X_GETTIMEOFDAY (); ldata[0] = now.tv_usec; ldata[1] = now.tv_sec; -# else +# else ldata[0] = time ((long *) 0); ldata[1] = getpid (); +# endif +# else +ldata[0] = arc4random(); +ldata[1] = arc4random(); # endif longtochars (ldata[0], data+0); Does it matter that arc4random is only providing 32-bits of data into a long? Hmm good question. Since those 2 values are then poured into a char[8] array by longtochar(), it shouldn't matter. longtochars seems to to be effectively only using the 32 low bits of its long parameter. Okay - it would probably be clearer long term to use a uint32_t or CARD32 instead of a long, but this works for now, so: Reviewed-by: Alan Coopersmith -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH libXaw3d 1/2] darwin: Remove incorrect export of vendorShellClassRec and vendorShellWidgetClass
Signed-off-by: Jeremy Huddleston Sequoia--- src/Vendor.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Vendor.c b/src/Vendor.c index 8899cd1..6b34b31 100644 --- a/src/Vendor.c +++ b/src/Vendor.c @@ -110,12 +110,21 @@ static void XawVendorShellClassPartInit(WidgetClass); void XawVendorShellExtResize(Widget); #endif -#if defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) /* to fix the EditRes problem because of wrong linker semantics */ extern WidgetClass vendorShellWidgetClass; /* from Xt/Vendor.c */ extern VendorShellClassRec _XawVendorShellClassRec; void _XawFixupVendorShell(void); +#if defined(__APPLE__) +__attribute__((constructor)) +static void __VendorShellHack(void) +{ +vendorShellWidgetClass = (WidgetClass)(&_XawVendorShellClassRec); +_XawFixupVendorShell(); +} +#endif + #if defined(__UNIXOS2__) unsigned long _DLL_InitTerm(unsigned long mod,unsigned long flag) { @@ -229,9 +238,10 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { } }; +#if !defined(__APPLE__) externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = (WidgetClass) (); - +#endif #ifdef XAW_INTERNATIONALIZATION /*** @@ -475,7 +485,7 @@ XawVendorShellClassPartInit(WidgetClass class) } #endif -#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) /* stupid OSF/1 shared libraries have the wrong semantics */ /* symbols do not get resolved external to the shared library */ void -- 2.6.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 0/9] Rewrite root window property setup
Adam Jacksonwrites: > Leo's patch to fix the EDID atom leak is probably correct, in the sense that > it fixes the leak, but xf86RegisterRootWindowProperty is fairly ugly to > begin with so I'd rather see it eliminated. This series adds a generic > callback for screen finalization and ports xfree86 to it. Since > dixChangeWindowProperty will copy the property data for us this should fix > the leak as well, since we're not making a copy for xf86CreateRootWindow > anymore. > > While I was at it I cleaned up some pointless API, and fixed a bug that > prevented the EDID property being updated on hotplug events. I'd say we nuke the EDID property entirely and just dump all of this code. But, if you want to keep it all, then this looks like the right plan... -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xkbcomp] When a file contains several maps, look for a default map
From: Ran BenitaRather than always taking the first one in the file. This is exactly the intended use of the 'default' flag. Note that pretty much the same code is duplicated in xkbcomp.c when compiling a single file from the command line, but there it is implemented correctly (look for XkbLC_Default). https://bugs.freedesktop.org/show_bug.cgi?id=69950 Signed-off-by: Ran Benita Tested-by: Benno Schulenberg Acked-by: Sergey Udaltsov --- misc.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/misc.c b/misc.c index 4990a74..848ed8c 100644 --- a/misc.c +++ b/misc.c @@ -82,41 +82,62 @@ ProcessIncludeFile(IncludeStmt * stmt, setScanState(oldFile, oldLine); ERROR1("Error interpreting include file \"%s\"\n", stmt->file); ACTION("Exiting\n"); fclose(file); return False; } fclose(file); XkbAddFileToCache(stmt->file, file_type, stmt->path, rtrn); } + +/* + * A single file may contain several maps. Here's how we choose the map: + * - If a specific map was requested, look for it exclusively. + * - Otherwise, if the file only contains a single map, return it. + * - Otherwise, if the file has maps tagged as default, return the + * first one. + * - If all fails, return the first map in the file. + */ mapToUse = rtrn; if (stmt->map != NULL) { while ((mapToUse) && ((!uStringEqual(mapToUse->name, stmt->map)) || (mapToUse->type != file_type))) { mapToUse = (XkbFile *) mapToUse->common.next; } if (!mapToUse) { ERROR3("No %s named \"%s\" in the include file \"%s\"\n", XkbConfigText(file_type, XkbMessage), stmt->map, stmt->file); ACTION("Exiting\n"); return False; } } -else if ((rtrn->common.next != NULL) && (warningLevel > 5)) +else if (rtrn->common.next != NULL) { -WARN1("No map in include statement, but \"%s\" contains several\n", - stmt->file); -ACTION1("Using first defined map, \"%s\"\n", rtrn->name); +while ((mapToUse) && !(mapToUse->flags & XkbLC_Default)) +{ +mapToUse = (XkbFile *) mapToUse->common.next; +} +if (!mapToUse) +{ +if (warningLevel > 5) +{ +WARN1("No map in include statement, but \"%s\" contains several without a default map\n", + stmt->file); +ACTION1("Using first defined map, \"%s\"\n", rtrn->name); +} +mapToUse = rtrn; +} } + setScanState(oldFile, oldLine); if (mapToUse->type != file_type) { ERROR2("Include file wrong type (expected %s, got %s)\n", XkbConfigText(file_type, XkbMessage), XkbConfigText(mapToUse->type, XkbMessage)); ACTION1("Include file \"%s\" ignored\n", stmt->file); return False; } -- 1.8.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel