Re: [PATCH:libXxf86vm] Tell the compiler it's unlikely we're talking to an XFree86 3.x server

2015-01-23 Thread Keith Packard
Alan Coopersmith alan.coopersm...@oracle.com writes:

 Hint that the current (XFree86 4.0  later) version of the protocol
 is most common today.

I thought _X_UNLIKELY was to direct optimization? If so, it's hard to
see why we'd worry about that in this extension, unless you think
there's some documentation value here?

-- 
-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

Re: [PATCH] randr: swap num-preferred field on RRGetOutputInfo reply

2015-01-23 Thread Keith Packard
Dave Airlie airl...@gmail.com writes:

 On 21 January 2015 at 19:22, Carlos Sánchez de La Lama
 csanchez...@gmail.com wrote:
 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88614
 Signed-off-by: Carlos Sánchez de La Lama csanchez...@gmail.com

 Reviewed-by: Dave Airlie airl...@redhat.com

Merged.
   3d12941..437d2ec  master - master

-- 
-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

Re: [PATCH] glamor: use screen blockhandler rather than dix one (v3)

2015-01-23 Thread Keith Packard
Dave Airlie airl...@gmail.com writes:

 From: Dave Airlie airl...@redhat.com

 This adds glamor into the block handler call chain
 in the correct place.

 This should fix interactions between glamor and drivers
 requiring damage from glamor.

 v2: okay don't consolidate, just leave things wierd for now
 remove blcokhandler in screen close.

 v3: block handler wrapping the right way.

 Signed-off-by: Dave Airlie airl...@redhat.com

I've reviewed and merged this one and the modesetting block handler
wrapping fix.
   5af2f5b..3d12941  master - master

-- 
-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

Re: [PATCH v2] backtrace.c: Fix word cast to a pointer

2015-01-23 Thread Keith Packard
Vicente Olivert Riera vincent.ri...@imgtec.com writes:

 Making the cast to a pointer-sized integer, and then to a pointer fixes
 the problem.

Reviewed-by: Keith Packard kei...@keithp.com

-- 
-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

Re: [PATCH] Avoid possible null pointer dereference.

2015-01-23 Thread Keith Packard
Alan Coopersmith alan.coopersm...@oracle.com writes:

 On 01/20/15 04:44 PM, Carlos Olmedo Escobar wrote:
 Signed-off-by: Carlos Olmedo Escobar carlos.olmed...@gmail.com

 Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com

Merged.
   437d2ec..f27d743  master - master

-- 
-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

Re: [PATCH v3 3/4] modesetting: Add support for using RandR shadow buffers

2015-01-23 Thread Keith Packard
Jason Ekstrand ja...@jlekstrand.net writes:

 This replaces the stubs for shadow buffer creation/allocation with actual
 functions and adds a shadow_destroy function.  With this, we actually get
 shadow buffers and RandR now works properly.  Most of this is copied from
 the xf86-video-intel driver and modified for modesetting.

 v2 Jason Ekstrand jason.ekstr...@intel.com:
  - Fix build with --disable-glamor
  - Set the pixel data pointer in the pixmap header for dumb shadow bo's
  - Call drmmode_create_bo with the right bpp

 v2 Jason Ekstrand jason.ekstr...@intel.com:
  - Make shadow buffers per-crtc and leave shadow_enable alone

 Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com

Reviewed-by: Keith Packard kei...@keithp.com


-- 
-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

Re: [PATCH] glamor: workaround a libepoxy bug in glObjectLabel

2015-01-23 Thread Keith Packard
Maarten Lankhorst maarten.lankho...@ubuntu.com writes:

 libepoxy doesn't handle this case well, and tries to look for the 
 glObjectLabel symbol in GLES2.
 As a result, using glObjectLabelKHR with opengl, or glObjectLabel with
 GLES will crash.

Let's get libepoxy fixed, instead of kludging around this in the
X server.

-- 
-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

Re: [PATCH] glamor: GL_TEXTURE_MAX_LEVEL is not available on GLES2

2015-01-23 Thread Ian Romanick
On 01/19/2015 03:37 AM, Maarten Lankhorst wrote:
 Remove the calls to GL_TEXTURE_MAX_LEVEL. Setting the filtering is
 a sufficient hint to the driver about texture mipmap allocation.
 
 Signed-off-by: Maarten Lankhorst maarten.lankho...@ubuntu.com

I agree with Eric that this is better than using MAX_LEVEL
conditionally.  Assuming that textures created in glamor don't change
size (or other things that affect allocation), at some point it will be
worth implementing support for glTexStorage2D.  All Mesa drivers support
GL_ARB_texture_storage, and it's part of OpenGL ES 3.0.  It looks like
Mesa doesn't enable GL_EXT_texture_storage on OpenGL ES 2.0, but that
should be trivial to add.

Reviewed-by: Ian Romanick ian.d.roman...@intel.com

 ---
  glamor/glamor_fbo.c| 1 -
  glamor/glamor_font.c   | 1 -
  glamor/glamor_pixmap.c | 1 -
  3 files changed, 3 deletions(-)
 
 diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
 index d2aabb2..26f7972 100644
 --- a/glamor/glamor_fbo.c
 +++ b/glamor/glamor_fbo.c
 @@ -348,7 +348,6 @@ _glamor_create_tex(glamor_screen_private *glamor_priv,
  glamor_make_current(glamor_priv);
  glGenTextures(1, tex);
  glBindTexture(GL_TEXTURE_2D, tex);
 -glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
  glTexImage2D(GL_TEXTURE_2D, 0, format, w, h, 0,
 diff --git a/glamor/glamor_font.c b/glamor/glamor_font.c
 index 0ca91fa..cc0fecf 100644
 --- a/glamor/glamor_font.c
 +++ b/glamor/glamor_font.c
 @@ -97,7 +97,6 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
  glActiveTexture(GL_TEXTURE0);
  glBindTexture(GL_TEXTURE_2D, glamor_font-texture_id);
  
 -glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
  
 diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c
 index 947113e..0d92710 100644
 --- a/glamor/glamor_pixmap.c
 +++ b/glamor/glamor_pixmap.c
 @@ -717,7 +717,6 @@ __glamor_upload_pixmap_to_texture(PixmapPtr pixmap, 
 unsigned int *tex,
  }
  
  glBindTexture(GL_TEXTURE_2D, *tex);
 -glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
  glPixelStorei(GL_UNPACK_ALIGNMENT, 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] os: Fix timer race conditions

2015-01-23 Thread Keith Packard
Nikhil Mahale nmah...@nvidia.com writes:

 On Monday, December 29, 2014 02:35:53 PM Keith Packard wrote:
 * PGP Signed by an unknown key
 
 Nikhil Mahale nmah...@nvidia.com writes:
  ok, here is updated patch.
 
 This patch generated a host of warnings when the type of 'timers'
 changed to a volatile pointer. Here's an additional patch that gets rid
 of the warnings; it should be reviewed (and fixed, as needed), then
 squashed with the original patch.

 oh, Thanks for this catch.

I haven't seen an updated patch that squashes these two together?

-- 
-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

Re: [PATCH v3 0/4] modesetting: Add RandR-based shadow buffer support

2015-01-23 Thread Keith Packard
Jason Ekstrand ja...@jlekstrand.net writes:

 This is my third attempt at properly adding RandR shadow support.  As per
 my discussion with keith on my previous try, I have reworked it to be
 per-crtc and to not touch the old shadow code.  Hopefully, the two will
 nicely live side-by-side for the time being.  Eventually, we may be able to
 use RandR shadow support for everything in the future, but we don't do that
 yet.

 Jason Ekstrand (4):
   modesetting: Refactor drmmode_glamor_new_screen_pixmap
   modesetting: Add drmmode_bo_has_bo and drmmode_bo_map helper function
   modesetting: Add support for using RandR shadow buffers
   modesetting: Return the crtc for a drawable even if it's rotated

Merged (with review as needed):
   bb23fbf..fef2f63  master - master

-- 
-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

Re: [PATCH:libXxf86vm] Tell the compiler it's unlikely we're talking to an XFree86 3.x server

2015-01-23 Thread Alan Coopersmith

On 01/23/15 10:32 AM, Keith Packard wrote:

Alan Coopersmith alan.coopersm...@oracle.com writes:


Hint that the current (XFree86 4.0  later) version of the protocol
is most common today.


I thought _X_UNLIKELY was to direct optimization? If so, it's hard to
see why we'd worry about that in this extension, unless you think
there's some documentation value here?


Right - if I hadn't been fixing this code already, I probably wouldn't
have bothered, and the reality is it will mostly be useful as a hint
to future developers, but it should help the compilers branch prediction
and code path analysis a little.

--
-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] xf86-input-libinput: Reapply configuration at DEVICE_ON

2015-01-23 Thread Friedrich Schöller
The driver ignored my xorg configuration. Maybe I am doing something wrong, but 
I tried to track down the error and came up with this solution.

The device is closed after DEVICE_INIT so we need to apply configuration 
options at DEVICE_ON.

Signed-off-by: Friedrich Schöller c...@schoeller.se
---
 src/libinput.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libinput.c b/src/libinput.c
index 52b385e..d78c769 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -326,6 +326,8 @@ xf86libinput_on(DeviceIntPtr dev)
driver_context.device_enabled_count++;
dev-public.on = TRUE;
 
+   LibinputApplyConfig(dev);
+
return Success;
 }
 
-- 
2.2.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

videos of X, DRM, Mesa talks from LCA2015

2015-01-23 Thread Alan Coopersmith

The amazing 2015 linux.conf.au video team has already posted all the videos
from the talks at this years conference - you can find them on their YouTube
channel at https://www.youtube.com/user/linuxconfau2015 or via the links on
http://lca2015.linux.org.au/

Talks of particular relevance to Xorg, DRI, and Mesa developers include:

Botching up IOCTLs
Daniel Vetter (Intel)
https://www.youtube.com/watch?v=WnqXHs_tGR4
http://lca2015.linux.org.au/schedule/30266/view_talk
Slides: http://people.freedesktop.org/~danvet/presentations/lca-2015.pdf

Displayport MST: why do my laptop dockoutputs not work?
David Airlie (Red Hat)
https://www.youtube.com/watch?v=6301tGNs9Dc
http://lca2015.linux.org.au/schedule/30303/view_talk
Slides: http://lca2015.linux.org.au/slides/93/lca2015mst.odp

Open-source OpenGL on the Raspberry Pi
Eric Anholt (Broadcom)
https://www.youtube.com/watch?v=EXDeketJNdk
http://lca2015.linux.org.au/schedule/30256/view_talk
Slides: http://lca2015.linux.org.au/slides/125/lca2015-rpi.pdf

Putting the Polish on Glamor
Keith Packard (HP)
https://www.youtube.com/watch?v=dXR-MVQvQZw
http://lca2015.linux.org.au/schedule/30108/view_talk
Slides: http://lca2015.linux.org.au/slides/64/glamor.odp

Reducing GLSL Compiler Memory Usage (or Fitting 5kg of Potatoes in a 2kg Bag)
Ian Romanick (Intel)
https://www.youtube.com/watch?v=K-5DTAD2Isk
http://lca2015.linux.org.au/schedule/30149/view_talk
Slides: http://people.freedesktop.org/~idr/LCA2015/

And semi-related is a talk from former-SFLC-lawyer Karen Sandler on the
troubles open source groups have had with non-profit status that have been
pushing the X.Org Foundation to join a larger group to leverage their
lawyers and accountants in meeting all the needed requirements, resulting
in our current moves to become part of SPI:
https://www.youtube.com/watch?v=Z5uY01QlyK0
http://lca2015.linux.org.au/schedule/30178/view_talk

--
-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: [RFC] [PATCH] Extend block and wakeup handling to cover writes as well

2015-01-23 Thread Pierre Ossman
On Thu, 25 Dec 2014 13:55:13 -0800,
Keith Packard wrote:

 Pierre Ossman oss...@cendio.se writes:
 
  Please see the attached patch and see if this seems like a reasonable
  way to solve this. I thought about changing the BlockHandlerProc
  definition, but it is exposed in application headers so it didn't seem
  safe to touch.
 
 I think we should just change the BlockHandlerProc definition to include
 the write data as well. Either change requires updating every place
 these functions are used anyways.
 

How about these patches then?

Rgds
-- 
Pierre Ossman   Software Development
Cendio AB   https://cendio.com
Teknikringen 8  https://twitter.com/ThinLinc
583 30 Linköpinghttps://facebook.com/ThinLinc
Phone: +46-13-214600https://plus.google.com/+CendioThinLinc

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
From 86180ca65b5149f4aedc816ee611be0ef442997f Mon Sep 17 00:00:00 2001
From: Pierre Ossman oss...@cendio.se
Date: Fri, 23 Jan 2015 11:52:22 +0100
Subject: [PATCH] Allow block handlers to also track write availability

Signed-off-by: Pierre Ossman oss...@cendio.se
---
 Xdefs.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Xdefs.h b/Xdefs.h
index e25a208..b283352 100644
--- a/Xdefs.h
+++ b/Xdefs.h
@@ -103,6 +103,7 @@ typedef struct timeval **OSTimePtr;
 
 typedef void (* BlockHandlerProcPtr)(void * /* blockData */,
  OSTimePtr /* pTimeout */,
- void * /* pReadmask */);
+ void * /* pReadmask */,
+ void * /* pWritemask */);
 
 #endif
-- 
1.9.3

From 1e19405c27d4e4cf697fdcf736942f7a91bd1139 Mon Sep 17 00:00:00 2001
From: Pierre Ossman oss...@cendio.se
Date: Fri, 19 Dec 2014 13:03:51 +0100
Subject: [PATCH] Extend block and wakeup handling to cover writes as well

Although not as common as waiting on data to read, some modules also
need to be able to gracefully wait for the ability to write data to
some socket they own. This allows them to do that without a lot of
ugly trickery.

Signed-off-by: Pierre Ossman oss...@cendio.se
---
 Xext/sleepuntil.c   | 12 
 Xext/sync.c | 12 
 composite/compalloc.c   |  5 +++--
 config/udev.c   |  5 +++--
 dix/dixfonts.c  |  4 ++--
 dix/dixutils.c  | 20 
 exa/exa.c   |  8 
 hw/vfb/InitOutput.c |  6 --
 hw/xfree86/common/xf86Events.c  |  2 +-
 hw/xfree86/common/xf86Priv.h|  2 +-
 hw/xfree86/common/xf86VGAarbiter.c  |  8 
 hw/xfree86/common/xf86VGAarbiterPriv.h  |  5 +++--
 hw/xfree86/dri/dri.c| 18 --
 hw/xfree86/dri/dri.h| 11 +++
 hw/xfree86/drivers/modesetting/driver.c |  5 +++--
 hw/xfree86/drivers/modesetting/vblank.c |  4 ++--
 hw/xfree86/modes/xf86Rotate.c   |  4 ++--
 hw/xnest/Handlers.c |  6 --
 hw/xnest/Handlers.h |  5 +++--
 include/dix.h   |  9 ++---
 include/dixfont.h   |  3 ++-
 include/scrnintstr.h|  6 --
 mi/misprite.c   |  7 ---
 miext/shadow/shadow.c   |  4 ++--
 os/WaitFor.c| 25 -
 os/xdmcp.c  | 10 ++
 render/animcur.c|  4 ++--
 27 files changed, 128 insertions(+), 82 deletions(-)

diff --git a/Xext/sleepuntil.c b/Xext/sleepuntil.c
index 993c028..93e5cc8 100644
--- a/Xext/sleepuntil.c
+++ b/Xext/sleepuntil.c
@@ -65,11 +65,13 @@ static int SertafiedDelete(void *  /* value */ ,
 );
 static void SertafiedBlockHandler(void */* data */ ,
   OSTimePtr /* wt */ ,
-  void */* LastSelectMask */
+  void */* LastReadMask */ ,
+  void */* LastWriteMask */
 );
 static void SertafiedWakeupHandler(void *   /* data */ ,
int  /* i */ ,
-   void *   /* LastSelectMask */
+   void */* LastReadMask */ ,
+   void */* LastWriteMask */
 );
 
 int
@@ -154,7 +156,8 @@ SertafiedDelete(void *value, XID id)
 }
 
 static void
-SertafiedBlockHandler(void *data, OSTimePtr wt, void *LastSelectMask)
+SertafiedBlockHandler(void *data, OSTimePtr wt,
+  void *LastReadMask, void *LastWriteMask)
 {
 SertafiedPtr pReq, pNext;
 unsigned long delay;
@@ -186,7 +189,8 @@ SertafiedBlockHandler(void *data, OSTimePtr wt, void *LastSelectMask)
 }
 
 static void
-SertafiedWakeupHandler(void *data, int i, void *LastSelectMask)