[PATCH xorg-gtest] xserver: usecs are usecs, not millis

2012-12-17 Thread Peter Hutterer
oops.

Signed-off-by: Peter Hutterer 
---
 src/xserver.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xserver.cpp b/src/xserver.cpp
index 2aff401..def6a89 100644
--- a/src/xserver.cpp
+++ b/src/xserver.cpp
@@ -108,7 +108,7 @@ bool xorg::testing::XServer::WaitForEvent(::Display 
*display, time_t timeout)
 
 struct timeval timeval = {
 static_cast(timeout / 1000),
-static_cast(timeout % 1000),
+static_cast(timeout % 1000) * 1000,
 };
 
 int ret;
-- 
1.8.0.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


[PATCH] dix: only show the cursor if a window defines one (#58398)

2012-12-17 Thread Peter Hutterer
e02f864fdf "Suppress cursor display until the first XDefineCursor() request"
disabled cursor display a priori unless -retro is given.

On a plain server, caling XFixesHideCursor() and XFixesShowCursor() would
show the default root cursor, despite no client actually defining a cursor.

Change the logic, disable CursorVisible by default and only enable it from
the window's CWCursor logic. If no window ever defines a cursor, said cursor
stays invisible.

X.Org Bug 58398 

Signed-off-by: Peter Hutterer 
---
 dix/window.c|  4 
 include/input.h |  5 +
 xfixes/cursor.c | 10 ++
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/dix/window.c b/dix/window.c
index 99b3e0a..5dee6ef 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -1431,6 +1431,8 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID 
*vlist, ClientPtr client)
 }
 }
 
+CursorVisible = TRUE;
+
 if (pWin->realized)
 WindowHasNewCursor(pWin);
 
@@ -3430,6 +3432,8 @@ ChangeWindowDeviceCursor(WindowPtr pWin, DeviceIntPtr 
pDev, CursorPtr pCursor)
 }
 
  out:
+CursorVisible = TRUE;
+
 if (pWin->realized)
 WindowHasNewCursor(pWin);
 
diff --git a/include/input.h b/include/input.h
index 2387dbf..fb5432a 100644
--- a/include/input.h
+++ b/include/input.h
@@ -635,6 +635,11 @@ extern _X_HIDDEN void valuator_set_mode(DeviceIntPtr dev, 
int axis, int mode);
xfixes/cursor.c uses it to determine if the cursor is enabled */
 extern Bool EnableCursor;
 
+/* Set to FALSE by default - ChangeWindowAttributes sets it to TRUE on
+ * CWCursor, xfixes/cursor.c uses it to determine if the cursor is enabled
+ */
+extern Bool CursorVisible;
+
 extern _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators);
 extern _X_EXPORT void valuator_mask_free(ValuatorMask **mask);
 extern _X_EXPORT void valuator_mask_set_range(ValuatorMask *mask,
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index ffee4d6..f24d410 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -142,8 +142,7 @@ typedef struct _CursorScreen {
 #define Unwrap(as,s,elt,backup)(((backup) = (s)->elt), (s)->elt = 
(as)->elt)
 
 /* The cursor doesn't show up until the first XDefineCursor() */
-static Bool CursorVisible = FALSE;
-
+Bool CursorVisible = FALSE;
 Bool EnableCursor = TRUE;
 
 static Bool
@@ -155,12 +154,7 @@ CursorDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, 
CursorPtr pCursor)
 
 Unwrap(cs, pScreen, DisplayCursor, backupProc);
 
-/*
- * Have to check ConnectionInfo to distinguish client requests from
- * initial root window setup.  Not a great way to do it, I admit.
- */
-if (ConnectionInfo)
-CursorVisible = EnableCursor;
+CursorVisible = CursorVisible && EnableCursor;
 
 if (cs->pCursorHideCounts != NULL || !CursorVisible) {
 ret = (*pScreen->DisplayCursor) (pDev, pScreen, NullCursor);
-- 
1.8.0.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


[1.13] dri fixes pull

2012-12-17 Thread Dave Airlie
Hi Matt,

Two DRI related issues turned up in RHEL6 development with 1.13.

The following changes since commit 92ecbf5f0f516aacb7f0034e3786c4454a07fe8d:

  No changes from 1.13.0.902 (rc2) (2012-12-13 21:05:24 -0700)

are available in the git repository at:

  git://people.freedesktop.org/~airlied/xserver server-1.13-branch

for you to fetch changes up to 8f696d6abcc36882e4dff09313182a68e76d5875:

  glx/dri2: initialise api to avoid indirect rendering failing
randomly (2012-12-18 09:02:00 +1000)


Dave Airlie (2):
  dri1: fix dri1 startup since 459c6da0f907ba33d733c7e62a116184ba2f14e5
  glx/dri2: initialise api to avoid indirect rendering failing randomly

 glx/glxdri2.c| 2 +-
 hw/xfree86/dri/dri.c | 7 +--
 2 files changed, 6 insertions(+), 3 deletions(-)
___
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


[PULL] grab fixes and use-after free

2012-12-17 Thread Peter Hutterer
The following changes since commit 3420a7778c7d5eaa638327f31dd460554c257bb1:

  xfree86: print message to the log when zapping the server (2012-12-17 
13:49:47 -0800)

are available in the git repository at:

  git://people.freedesktop.org/~whot/xserver for-keith

for you to fetch changes up to f793b5fd3eb16a2ada130367c2ffebeede69a322:

  dix: don't copy the wrong event mask when activating a passive grab 
(2012-12-18 08:53:46 +1000)


Peter Hutterer (3):
  Xi: don't use devices after removing them
  dix: don't allow overriding a grab with a different type of grab (#58255)
  dix: don't copy the wrong event mask when activating a passive grab

 Xi/xichangehierarchy.c | 9 +
 dix/events.c   | 2 +-
 dix/grabs.c| 5 -
 3 files changed, 10 insertions(+), 6 deletions(-)


pgpqhruoZSy5Z.pgp
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

Re: [PATCH:libXau 1/2] Clean up some clang warnings about sign conversion

2012-12-17 Thread Peter Hutterer
On Sun, Dec 16, 2012 at 03:53:45PM -0800, Alan Coopersmith wrote:
> fread & fwrite are defined as taking size_t arguments (an unsigned type),
> so stop casting their arguments to a signed int just to confuse things.
> 
> Fixes warnings:
> 
> AuFileName.c:69:59: warning: implicit conversion loses integer precision: 
> 'unsigned long' to 'int' [-Wshorten-64-to-32]
> size = strlen (name) + strlen(&slashDotXauthority[1]) + 2;
>  ~ ~~~^~~
> 
> AuRead.c:58:44: warning: implicit conversion changes signedness: 'int' to 
> 'size_t' (aka 'unsigned long') [-Wsign-conversion]
> if (fread (data, (int) sizeof (char), (int) len, file) != len) {
> ~ ^
> 
> AuWrite.c:49:46: warning: implicit conversion changes signedness: 'int' to 
> 'size_t' (aka 'unsigned long') [-Wsign-conversion]
> if (fwrite (string, (int) sizeof (char), (int) count, file) != count)
> ~~   ^~~
> 
> Signed-off-by: Alan Coopersmith 

Reviewed-by: Peter Hutterer 
for both

Cheers,
   Peter

> ---
>  AuFileName.c |6 +++---
>  AuRead.c |4 ++--
>  AuWrite.c|4 ++--
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/AuFileName.c b/AuFileName.c
> index bc7b177..473fad1 100644
> --- a/AuFileName.c
> +++ b/AuFileName.c
> @@ -45,12 +45,12 @@ XauFileName (void)
>  {
>  const char *slashDotXauthority = "/.Xauthority";
>  char*name;
> -static int   bsize;
> +static size_tbsize;
>  static int atexit_registered = 0;
>  #ifdef WIN32
>  chardir[128];
>  #endif
> -int  size;
> +size_t  size;
>  
>  if ((name = getenv ("XAUTHORITY")))
>   return name;
> @@ -70,7 +70,7 @@ XauFileName (void)
>  if (size > bsize) {
>   if (buf)
>   free (buf);
> - buf = malloc ((unsigned) size);
> + buf = malloc (size);
>   if (!buf)
>   return NULL;
>  
> diff --git a/AuRead.c b/AuRead.c
> index 3c59632..5d41f03 100644
> --- a/AuRead.c
> +++ b/AuRead.c
> @@ -35,7 +35,7 @@ read_short (unsigned short *shortp, FILE *file)
>  {
>  unsigned char   file_short[2];
>  
> -if (fread ((char *) file_short, (int) sizeof (file_short), 1, file) != 1)
> +if (fread ((char *) file_short, sizeof (file_short), 1, file) != 1)
>   return 0;
>  *shortp = file_short[0] * 256 + file_short[1];
>  return 1;
> @@ -55,7 +55,7 @@ read_counted_string (unsigned short *countp, char 
> **stringp, FILE *file)
>   data = malloc ((unsigned) len);
>   if (!data)
>   return 0;
> - if (fread (data, (int) sizeof (char), (int) len, file) != len) {
> + if (fread (data, sizeof (char), len, file) != len) {
>   bzero (data, len);
>   free (data);
>   return 0;
> diff --git a/AuWrite.c b/AuWrite.c
> index 0924f8d..1eb38a3 100644
> --- a/AuWrite.c
> +++ b/AuWrite.c
> @@ -36,7 +36,7 @@ write_short (unsigned short s, FILE *file)
>  
>  file_short[0] = (s & (unsigned)0xff00) >> 8;
>  file_short[1] = s & 0xff;
> -if (fwrite ((char *) file_short, (int) sizeof (file_short), 1, file) != 
> 1)
> +if (fwrite ((char *) file_short, sizeof (file_short), 1, file) != 1)
>   return 0;
>  return 1;
>  }
> @@ -46,7 +46,7 @@ write_counted_string (unsigned short count, char *string, 
> FILE *file)
>  {
>  if (write_short (count, file) == 0)
>   return 0;
> -if (fwrite (string, (int) sizeof (char), (int) count, file) != count)
> +if (fwrite (string, sizeof (char), count, file) != count)
>   return 0;
>  return 1;
>  }
> -- 
> 1.7.9.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
> 
___
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


[PULL updated] pointer barrier events/releases (XI2.3)

2012-12-17 Thread Peter Hutterer
Changes to original pull:
- added Jasper's rev-by tag to last three commits
- removed the XI grab mask commit, this is unrelated to barriers and I'll
  send it through a different branch

The following changes since commit b51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3:

  Merge remote-tracking branch 'whot/for-keith' (2012-11-30 09:31:46 -0800)

are available in the git repository at:


  git://people.freedesktop.org/~whot/xserver barriers

for you to fetch changes up to 2eefa5d6e870c57ac6a5930883d8cfe3a3882a43:

  Xi: if a MD is removed, send a barrier leave event (if applicable) 
(2012-12-18 08:28:02 +1000)


Jasper St. Pierre (14):
  cursor: Move pointer barrier code over to XI
  barriers: Don't loop over the server to destroy a barrier
  barriers: Switch to an explicit hook for barrier constrainment
  barriers: Switch to finding the nearest barrier client
  barriers: Reindent the constrainment hook
  Add support for XI2.3: Pointer barrier events and releases.
  barriers: Add support for edge cases when releasing barriers
  barriers: Add a couple pixels of elbow room for the hit detection
  barriers: Increment event ID on hit box leave
  barriers: Send a BarrierLeave event when we leave the hitbox
  barriers: Clean up code
  barriers: Send an XI_BarrierLeave event when a barrier is destroyed
  barriers: Replace complex intersection test with simpler math
  barriers: Support line and ray barriers

Peter Hutterer (18):
  include: fix comment
  barriers: Don't allow destroying other client's barriers
  barriers: Don't allow releasing the pointer on other client's barriers
  Pass the event list through to the pointer barrier code to return it
  Xi: fill in barrier root x/y after clamping to RandR outputs
  dix: skip delivery if it's not the right pointer barrier client
  dix: handle barrier events properly when converting to core/XI 1.x
  dix: ignore barrier events in FixUpEventFromWindow
  Xi: deliver barrier events as grabbed events where necessary
  Xi: if the device is currently grabbed, flag the barrier event
  mi: rename mipointer's internal event list
  Require inputproto 2.2.99.1
  tests/xi2: at protocol conversion test for barrier events
  Xi: swap sequence number and evtype in barrier events
  Xi: fix swapping for barrier events
  Xi: fix per-device barrier handling
  Xi: don't store the window pointer in barriers, store the window ID
  Xi: if a MD is removed, send a barrier leave event (if applicable)

 Xi/Makefile.am   |   2 +
 Xi/exevents.c|  47 ++
 Xi/extinit.c |  41 +-
 Xi/xibarriers.c  | 916 +++
 Xi/xibarriers.h  |  48 ++
 Xi/xichangehierarchy.c   |   6 +
 configure.ac |   2 +-
 dix/eventconvert.c   |  43 ++
 dix/events.c |  24 +
 dix/getevents.c  |  15 +-
 include/events.h |   1 +
 include/eventstr.h   |  24 +-
 include/input.h  |   6 +
 include/inputstr.h   |   2 +-
 mi/mieq.c|   4 +
 mi/mipointer.c   |  54 ++-
 mi/mipointer.h   |   3 +-
 test/fixes.c |  26 ++
 test/xi2/protocol-eventconvert.c | 216 +
 xfixes/cursor.c  | 432 +-
 xfixes/xfixes.h  |  17 +-
 21 files changed, 1465 insertions(+), 464 deletions(-)
 create mode 100644 Xi/xibarriers.c
 create mode 100644 Xi/xibarriers.h


pgpwqiLJmLebD.pgp
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

Re: [PATCH] dix: don't copy the wrong event mask when activating a passive grab

2012-12-17 Thread Keith Packard
Peter Hutterer  writes:

> GrabMask is a union of core, XI1 and XI2 masks. If a XI2 grab is activated,
> the value is a random pointer value, using it as mask has unpredictable
> effects.

The comment is a bit misleading -- GrabMask is a union of core and XI1 masks
and a *pointer* to XI2 masks.

I'm assuming there's nothing in any of the XI2 masks which you want to
stuff in grab->eventMask, right?

In any case, 0 is better than garbage.

Reviewed-by: Keith Packard 

-- 
keith.pack...@intel.com


pgp4SieeHJbQx.pgp
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

Re: [PATCH] xfree86: print message to the log when zapping the server

2012-12-17 Thread Keith Packard
Peter Hutterer  writes:

> Signed-off-by: Peter Hutterer 

Merged.
   6d508b8..3420a77  master -> master

-- 
keith.pack...@intel.com


pgpuZgKrWngfN.pgp
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 xts] Remove pad adjustments from Xproto/GetImage/PutImage

2012-12-17 Thread Peter Harris
GetImage adjusts the length field incorrectly, and PutImage does not
adjust the length field at all.

Since the only stored images are those from GetImage, it makes more
sense to remove the pad code entirely than to fix it.

Signed-off-by: Peter Harris 
---

Xtest defaults to using half the width of your monitor for the pPutImage
test. Nobody noticed the bug before now because the noop pad adjustment
case is the common case. 640, 800, 1024, and 1280 are all an even
multiple of 32.

I noticed because my monitor in portrait mode has a width of 1050.

 xts5/src/libproto/RcvRep.c  |   34 +++---
 xts5/src/libproto/SendReq.c |   38 --
 2 files changed, 11 insertions(+), 61 deletions(-)

diff --git a/xts5/src/libproto/RcvRep.c b/xts5/src/libproto/RcvRep.c
index fca2265..c375d5a 100644
--- a/xts5/src/libproto/RcvRep.c
+++ b/xts5/src/libproto/RcvRep.c
@@ -507,26 +507,16 @@ int client;   /* */
case X_GetImage:
{
 /*
- * Images are stored in the test programs in client byte order and
- * unpadded.  This allows images to be independent of the server.
- * However the server will send images in server byte order and 
- * padded.  This routine unpacks from server form into client-normal
- * form.  Note that we're assuming client-normal images are padded to
- * byte boundary; otherwise the translation is more complicated.
- * Similarly, left-pad must be zero.
+ * Images are stored in the test programs in server byte order and
+ * padding.
  */
 
-   int row, col = 1;
-   unsigned char my_sex = *((unsigned char *) &col) ^ 1;
-   unsigned char server_sex =
-   (Xst_clients[client].cl_dpy) -> byte_order;
-   long flip = my_sex ^ server_sex;  /* assume MSBFirst == 1 */
int server_pad = (Xst_clients[client].cl_dpy) -> bitmap_pad;
-   int dst_width /*in bytes*/ =
+   int byte_width /*in bytes*/ =
(Xst_clients[client].cl_imagewidth + 7) >> 3;
-   int src_width /*in bytes*/ = dst_width +
-   ((dst_width % (server_pad>>3)) == 0 ? 0 :
-(server_pad>>3) - dst_width % (server_pad>>3));
+   int src_width /*in bytes*/ = byte_width +
+   ((byte_width % (server_pad>>3)) == 0 ? 0 :
+(server_pad>>3) - byte_width % (server_pad>>3));

char *dst = (char *)rp + sizeof(xReply);
 
@@ -540,17 +530,7 @@ int client;   /* */
break;
 }
 
-   rp->generic.length =
-   (dst_width * Xst_clients[client].cl_imageheight) >> 2;
-
-   for (row = 0; row < Xst_clients[client].cl_imageheight; row++)
-   for(col = 0; col < src_width; col++)
-
-   if (col < dst_width)  {
-   *(dst++) = *((char *)((long)rbp++ ^ flip));
-   }  else  {
-   rbp++;
-   }
+   memcpy(dst, rbp, calculated_length * 4);
}
break;
case X_ListInstalledColormaps:
diff --git a/xts5/src/libproto/SendReq.c b/xts5/src/libproto/SendReq.c
index 0320594..4677a31 100644
--- a/xts5/src/libproto/SendReq.c
+++ b/xts5/src/libproto/SendReq.c
@@ -876,34 +876,12 @@ int pollreq;
case X_PutImage:
{
 /*
- * Images are stored in the test programs in client byte order and
- * unpadded.  This allows images to be independent of the server.
- * However the server will expect images in server byte order and 
- * padded.  This routine sends an altered xPutImageReq which the server
- * will like.  Note that we're assuming client-normal form means that
- * rows are padded to a byte boundary; otherwise the translation is
- * more complex.  Similarly, left-pad must be zero.
+ * Images are stored in the test programs in server byte order and
+ * padding.
  */
 
-   int row, col = 1;
-   unsigned char my_sex = *((unsigned char *) &col) ^ 1;
-   unsigned char server_sex =
-   (Xst_clients[client].cl_dpy) -> byte_order;
-   long flip = my_sex ^ server_sex;  /* assume MSBFirst == 1 */
-   int server_pad = (Xst_clients[client].cl_dpy) -> bitmap_pad;
-   int src_width /*in bytes*/ =
-   (int)(((xPutImageReq *)rp)->width + 7) >> 3;
-   int dst_width /*in bytes*/ = src_width +
-   ((src_width % (server_pad>>3)) == 0 ? 0 :
-(server_pad>>3) - src_width % (server_pad>>3));
char *src = (char *)rp + sizeof(xPutImageReq);
char **dst = (&(Get_Display(client)->bufptr));
-

Re: [PULL] input fixes, mostly unreviewed

2012-12-17 Thread Keith Packard
Peter Hutterer  writes:


> Daniel Martin (1):
>   xfixes: Fix minor number in QueryVersion
>
> Peter Hutterer (12):
>   xkb: always post XTest button up when the physical button released 
> (#28808)
>   xkb: only post a XTest release if the XTest device has the button down
>   Xi: fix typo "mechansims" → "mechanisms"
>   dix: don't call ProcessInputEvents() when accepting/rejecting touches
>   dix: only reject active grabs on ungrab and do it before actually 
> ungrabbing
>   dix: when deactivating pointer-only grabs, don't emulate TouchEnd events
>   Xi: if a TouchEnd appears on a actively grabbing client, always accept
>   dix: add FIXME, TouchRemovePointerGrab does nothing
>   dix: split xi2_mask_isset into a per-device function
>   Xi: fix touch event selction conflicts (#57301)
>   Merge branch 'touch-selection-conflict-fixes' into for-keith
>   Merge branch 'stack-smash-on-touchpoint' into for-keith

Merged.
   d982d87..6d508b8  master -> master

-- 
keith.pack...@intel.com


pgpechXupeR97.pgp
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

Re: [git pull] revert + dri1 fix

2012-12-17 Thread Keith Packard
Dave Airlie  writes:

> 
> Dave Airlie (2):
>   dri1: fix dri1 startup since 459c6da0f907ba33d733c7e62a116184ba2f14e5
>   Revert "xf86: Fix non-PCI configuration-less setups"

Merged.
   da3eaf6..d982d87  master -> master

-- 
keith.pack...@intel.com


pgpK3yIx6782Z.pgp
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

Re: [git pull] revert + dri1 fix

2012-12-17 Thread Keith Packard
Dave Airlie  writes:

> On Fri, Dec 14, 2012 at 8:00 AM, Dave Airlie  wrote:

> yes I just confirmed originally the code only got called once, so not
> happening on server generation is exactly what we want.

Yeah, libdrm doesn't need it called more than once either. Thanks.

-- 
keith.pack...@intel.com


pgp4jLDTHx8Gr.pgp
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

Re: [PATCH] glx/dri2: initialise api to avoid indirect rendering failing randomly

2012-12-17 Thread Keith Packard
Dave Airlie  writes:

> From: Dave Airlie 
>
> Running glxinfo under indirect rendering would randomly fail against the
> intel driver, as it would create a context with no attribs, and then the
> api value would be passed to the driver uninitialised.

Merged.
   b51a1bd..da3eaf6  master -> master

-- 
keith.pack...@intel.com


pgp2sCFCl41nj.pgp
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

Re: [PATCH] glx/dri2: initialise api to avoid indirect rendering failing randomly

2012-12-17 Thread Ian Romanick

On 12/16/2012 09:40 PM, Dave Airlie wrote:

From: Dave Airlie 

Running glxinfo under indirect rendering would randomly fail against the
intel driver, as it would create a context with no attribs, and then the
api value would be passed to the driver uninitialised.


Someone else submitted this patch months ago, and I'd swear it got 
applied then.  I've had bugs #56042 and #57784 on my todo list for 
sometime now...  I suspect this will take care of both. :(



Signed-off-by: Dave Airlie 


Reviewed-by: Ian Romanick 


---
  glx/glxdri2.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index bce1bfa..b26e501 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -514,7 +514,7 @@ create_driver_context(__GLXDRIcontext * context,
  unsigned minor_ver;
  uint32_t flags;
  int reset;
-int api;
+int api = __DRI_API_OPENGL;

  if (num_attribs != 0) {
  if (!dri2_convert_glx_attribs(screen, num_attribs, attribs,



___
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:intel-gpu-tools] tests/gem_seqno_wrap.c: include for definition of kill()

2012-12-17 Thread Daniel Vetter
On Sun, Dec 16, 2012 at 10:38:54AM -0800, Alan Coopersmith wrote:
> Fixes build failure on Solaris:
> gem_seqno_wrap.c: In function ‘run_cmd’:
> gem_seqno_wrap.c:328:3: error: implicit declaration of function ‘kill’ 
> [-Werror=implicit-function-declaration]
> 
> Signed-off-by: Alan Coopersmith 

Applied, thanks.
-Daniel
> ---
>  tests/gem_seqno_wrap.c |1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/gem_seqno_wrap.c b/tests/gem_seqno_wrap.c
> index 2b92cb8..f881245 100644
> --- a/tests/gem_seqno_wrap.c
> +++ b/tests/gem_seqno_wrap.c
> @@ -40,6 +40,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include "i915_drm.h"
>  #include "intel_bufmgr.h"
> -- 
> 1.7.9.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
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