Re: [PATCH 1/3] glamor: Always destroy EGL image associated with destroyed pixmap

2014-12-09 Thread Zhigang Gong
Hi Keith, I still remember the back_pixmap issue which make the APIs and the code path of screen closing very weird. Now things become much clearer as the back_pixmap is not a special pixmap now. Thanks! One minor comment as embedded below > > -void > -glamor_destroy_textured_pixmap(PixmapPtr

Re: [PATCH 2/3] glamor: Remove redundant reference to screen pixmap EGL image

2014-12-09 Thread Zhigang Gong
Right, since the egl image has been moved to the normal pixmap_priv structure, we no longer need to do this type of redundant things. The patch LGTM, thanks. Revewied-by: Zhigang Gong Thanks, Zhigang Gong. On Mon, Dec 08, 2014 at 01:38:44PM -0800, Keith Packard wrote: > There's no reason to sto

Re: [PATCH 3/3] glamor: Free existing EGL image when assigning new one

2014-12-09 Thread Zhigang Gong
This patch LGTM, thanks. Reviewed-by: Zhigang Gong On Mon, Dec 08, 2014 at 01:38:45PM -0800, Keith Packard wrote: > When reallocating the framebuffer on screen resize, the old EGL image > was getting leaked. Check for an existing EGL image and free it in > this case. > > Signed-off-by: Keith Pa

pasto in XkbGetKeyBehaviors(3) manual

2014-12-09 Thread Ingo Schwarze
Hello, here is a simple patch against the master branch of git://anongit.freedesktop.org/git/xorg/lib/libX11 to fix a pasto in the XkbGetKeyBehaviors(3) manual, found while testing the mandoc database facilities (mdocml.bsd.lv) on OpenBSD. Matthieu Herrb suggested i should send the patch here.

Re: pasto in XkbGetKeyBehaviors(3) manual

2014-12-09 Thread Thomas Klausner
LGTM Revewied-by: Thomas Klausner On Tue, Dec 09, 2014 at 10:44:13AM +0100, Ingo Schwarze wrote: > Hello, > > here is a simple patch against the master branch of > git://anongit.freedesktop.org/git/xorg/lib/libX11 > to fix a pasto in the XkbGetKeyBehaviors(3) manual, found while > testing the

[ANNOUNCE] X.Org Security Advisory: Protocol handling issues in X servers

2014-12-09 Thread Alan Coopersmith
X.Org Security Advisory: Dec. 9, 2014 Protocol handling issues in X Window System servers === Description: Ilja van Sprundel, a security researcher with IOActive, has discovered a large number of issues in the way the X server code bas

[PULL: xserver] Fixes for X.Org Security Advisory: Dec. 9, 2014

2014-12-09 Thread Alan Coopersmith
Keith: kindly pull the following into the xserver master branch. As you know, these are the fixes for today's security advisory which have been reviewed on the xorg-security mailing list. Julien: once Keith is done, please backport as appropriate into the xorg-server-1.16 branch. Known issues for

Fwd: [from tech.openbsd.org] DisplayLink compatibility and performance issues

2014-12-09 Thread Sławomir Gonet
Hello everyone, I just wanted to crosspost this from OpenBSD tech@ list as I am afraid there's no one able to solve my problem – hope you will be more lucky :) I know this is very OpenBSD-specific, but maybe you will be able to introduce me somehow. Cheers, Slawek Sławomir Gonet writes: > Hi

Re: [PATCH 3/3] glamor: Free existing EGL image when assigning new one

2014-12-09 Thread Keith Packard
Zhigang Gong writes: > This patch LGTM, thanks. Thanks for all of your review! I've updated the first patch to add a check for valid pixmap_priv in glamor_egl_destroy_pixmap_image and have gone ahead and merged these three. 3e7218a..8aa23f2 master -> master -- keith.pack...@intel.com si

[PATCH 2/5] glx: Can't mix declarations and code in X.org sources

2014-12-09 Thread Keith Packard
We're using compiler compatibility settings which generate warnings when a variable is declared after the first statement. Signed-off-by: Keith Packard --- glx/clientinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glx/clientinfo.c b/glx/clientinfo.c index c5fef30..74

[PATCH 0/5] Warning fixes for CVE patches

2014-12-09 Thread Keith Packard
The huge list of CVE patches (Thanks Alan and others) are most welcome, but the compiler found a few things to complain about, and the resulting warnings actually pointed out a couple of real bugs. Keith Packard (5): dbe: Call to DDX SwapBuffers requires address of int, not unsigned int glx: C

[PATCH 1/5] dbe: Call to DDX SwapBuffers requires address of int, not unsigned int

2014-12-09 Thread Keith Packard
When the local types used to walk the DBE request were changed, this changed the type of the parameter passed to the DDX SwapBuffers API, but there wasn't a matching change in the API definition. At this point, with the API frozen, I just stuck a new variable in with the correct type. Because we'v

[PATCH 4/5] dix: GetHosts bounds check using wrong pointer value

2014-12-09 Thread Keith Packard
GetHosts saves the pointer to allocated memory in *data, and then wants to bounds-check writes to that region, but was mistakenly using a bare 'data' instead of '*data'. Also, data is declared as void **, so we need a cast to turn it into a byte pointer so we can actually do pointer comparisons. S

[PATCH 3/5] Missing parens in REQUEST_FIXED_SIZE macro

2014-12-09 Thread Keith Packard
The 'n' parameter must be surrounded by parens in both places to prevent precedence from mis-computing things. Signed-off-by: Keith Packard --- include/dix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dix.h b/include/dix.h index 21176a8..921156b 100644 --- a/incl

[PATCH 5/5] doc: filter out doc generation spam

2014-12-09 Thread Keith Packard
We really don't care to see doc generation warnings about overflow Signed-off-by: Keith Packard --- devbook.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devbook.am b/devbook.am index 400b2ca..9e861af 100644 --- a/devbook.am +++ b/devbook.am @@ -46,9 +46,9 @@ XMLTO_F

Re: [PATCH 5/5] doc: filter out doc generation spam

2014-12-09 Thread Julien Cristau
On Tue, Dec 9, 2014 at 09:31:01 -0800, Keith Packard wrote: > We really don't care to see doc generation warnings about overflow > > Signed-off-by: Keith Packard > --- > devbook.am | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/devbook.am b/devbook.am > index 400

Re: [PATCH 5/5] doc: filter out doc generation spam

2014-12-09 Thread Keith Packard
Julien Cristau writes: > That means we now ignore the return value from xmlto, and only look at > that of grep. I'm not sure that's what we want. Good point. Any suggestions? The spam is pretty annoying... -- keith.pack...@intel.com signature.asc Description: PGP signature _

Re: [PATCH 0/5] Warning fixes for CVE patches

2014-12-09 Thread Alan Coopersmith
On 12/ 9/14 09:30 AM, Keith Packard wrote: The huge list of CVE patches (Thanks Alan and others) are most welcome, but the compiler found a few things to complain about, and the resulting warnings actually pointed out a couple of real bugs. Keith Packard (5): dbe: Call to DDX SwapBuffers requ

[PATCH] Solaris: delete undocumented, unuseful -protect0 flag

2014-12-09 Thread Alan Coopersmith
Solaris already makes the page at address 0 inaccessible by default to catch NULL pointer bugs, we don't need a double secret undocumented flag to try to make our own hacky attempt at it. As a bonus, deleting this code removes gcc warning of: sun_init.c: In function 'xf86OpenConsole': sun_init.c:

Re: [PATCH] Solaris: delete undocumented, unuseful -protect0 flag

2014-12-09 Thread Mark Kettenis
> From: Alan Coopersmith > Date: Tue, 9 Dec 2014 10:15:08 -0800 > > Solaris already makes the page at address 0 inaccessible by default to > catch NULL pointer bugs, we don't need a double secret undocumented flag > to try to make our own hacky attempt at it. > > As a bonus, deleting this code

Re: [PATCH 5/5] doc: filter out doc generation spam

2014-12-09 Thread Keith Packard
Julien Cristau writes: > That means we now ignore the return value from xmlto, and only look at > that of grep. I'm not sure that's what we want. How about this instead? This captures the xmlto exit status and routes it around the error message filtering. diff --git a/devbook.am b/devbook.am i

[PULL v2 xserver] Fixes for X.Org Security Advisory: Dec. 9, 2014

2014-12-09 Thread Alan Coopersmith
Changes since v1: added 4 more patches from Keith to the end to fix issues found by compiler warnings - these were not squashed in to the prior patches so that distros who applied the earlier patches can just add these on top. The following changes since commit 3e7218a6c23354d66f508b18164cac98a3

Re: [PATCH 4/5] dix: GetHosts bounds check using wrong pointer value

2014-12-09 Thread Mark Kettenis
> From: Keith Packard > Date: Tue, 9 Dec 2014 09:31:00 -0800 > > GetHosts saves the pointer to allocated memory in *data, and then > wants to bounds-check writes to that region, but was mistakenly using > a bare 'data' instead of '*data'. Also, data is declared as void **, > so we need a cast to

Re: [PULL v2 xserver] Fixes for X.Org Security Advisory: Dec. 9, 2014

2014-12-09 Thread Keith Packard
Alan Coopersmith writes: > Adam Jackson (12): >glx: Be more paranoid about variable-length requests [CVE-2014-8093 > 1/6] >glx: Be more strict about rejecting invalid image sizes [CVE-2014-8093 > 2/6] >glx: Additional paranoia in __glXGetAnswerBuffer / > __GLX_GET_ANSWE

Re: [PATCH 1/5] dbe: Call to DDX SwapBuffers requires address of int, not unsigned int

2014-12-09 Thread Mark Kettenis
> From: Keith Packard > Date: Tue, 9 Dec 2014 09:30:57 -0800 > > When the local types used to walk the DBE request were changed, this > changed the type of the parameter passed to the DDX SwapBuffers API, > but there wasn't a matching change in the API definition. > > At this point, with the AP

Re: FOSDEM15: Graphics DevRoom: call for speakers.

2014-12-09 Thread Luc Verhaegen
On Thu, Oct 02, 2014 at 07:44:57PM +0200, Luc Verhaegen wrote: > Hi, > > At FOSDEM on the 31st of january and the 1st of February 2015, there > will be another graphics DevRoom. URL: https://fosdem.org/2015/ > Slots will be handed out on a first come, first serve basis. The best > slots will go

Re: [PATCH] glx: Add implementation of __GLXContext->loseCurrent for direct ctxts

2014-12-09 Thread Keith Packard
Adam Jackson writes: > From: Neil Roberts > > This adds a dummy implementation for the loseCurrent function in > __GLXContext for direct contexts which just returns GL_TRUE. Without > this then the X server can crash if receives a MakeCurrent message for > a direct context because it will attemp

Re: [PATCH 5/5] doc: filter out doc generation spam

2014-12-09 Thread Peter Hutterer
On Tue, Dec 09, 2014 at 11:12:47AM -0800, Keith Packard wrote: > Julien Cristau writes: > > > That means we now ignore the return value from xmlto, and only look at > > that of grep. I'm not sure that's what we want. > > How about this instead? This captures the xmlto exit status and routes > i

Re: pasto in XkbGetKeyBehaviors(3) manual

2014-12-09 Thread Peter Hutterer
On Tue, Dec 09, 2014 at 02:33:09PM +0100, Thomas Klausner wrote: > LGTM > Revewied-by: Thomas Klausner aand it's pushed. your winning number is 446f5f7, thank you for playing. Cheers, Peter > > On Tue, Dec 09, 2014 at 10:44:13AM +0100, Ingo Schwarze wrote: > > Hello, > > > > here is a

Re: [PATCH 5/5] doc: filter out doc generation spam

2014-12-09 Thread Keith Packard
Peter Hutterer writes: > I wonder if we've reached the point where having a small shell script to build > this with the reduced output is easier than stuffing this into makefile > rules... Could be. This just seemed like the path of least resistance at this point... -- keith.pack...@intel.com

[PATCH 3/8] modesetting: Create helper for glamor_egl_create_textured_screen call.

2014-12-09 Thread Kenneth Graunke
This will need to change when we add GBM support; by pulling it into a helper function, we should only have to edit one place. Signed-off-by: Kenneth Graunke --- hw/xfree86/drivers/modesetting/driver.c | 14 ++--- hw/xfree86/drivers/modesetting/drmmode_display.c | 37 +++

[PATCH 5/8] modesetting: Drop dumb_bo::map_count field and dead unmap code.

2014-12-09 Thread Kenneth Graunke
The drm kernel API for dumb BOs apparently doesn't include an unmap ioctl, so we can't do much here. It looks like this code was copied from libkms, which was also unfinished. We may as well delete the dead variable that simply gets incremented and never read. Signed-off-by: Kenneth Graunke ---

[PATCH 4/8] modesetting: Move dumb_bo into its own source files.

2014-12-09 Thread Kenneth Graunke
Eventually, drmmode_display will be able to use GBM for handling buffers, and won't need dumb_bo. Keeping the display related logic and buffer object abstraction in separate files seems a bit tidier. Signed-off-by: Kenneth Graunke --- hw/xfree86/drivers/modesetting/Makefile.am | 2 + hw

[PATCH 8/8] modesetting: Use GBM for buffer allocations if Glamor supports it.

2014-12-09 Thread Kenneth Graunke
For performance, Glamor wants to render to tiled buffers, not linear ones. Using GBM allows us to pick the 3D driver's preferred tiling modes. Signed-off-by: Kenneth Graunke --- hw/xfree86/drivers/modesetting/driver.c | 20 +++-- hw/xfree86/drivers/modesetting/drmmode_display.c | 5

[PATCH 1/8] modesetting: Stop using glamor_egl_create_textured_screen_ext().

2014-12-09 Thread Kenneth Graunke
The _ext variant takes an additional pointer argument, which it now ignores, thanks to Keith's recent patches. Signed-off-by: Kenneth Graunke --- hw/xfree86/drivers/modesetting/driver.c | 11 +-- hw/xfree86/drivers/modesetting/drmmode_display.c | 11 +-- 2 files changed,

[PATCH 7/8] glamor: Add an accessor for the GBM device.

2014-12-09 Thread Kenneth Graunke
From: Dave Airlie (Originally written by Dave Airlie; split into a separate patch by Kenneth Graunke.) Signed-off-by: Dave Airlie Signed-off-by: Kenneth Graunke --- glamor/glamor.h | 2 ++ glamor/glamor_egl.c | 12 2 files changed, 14 insertions(+) diff --git a/glamor/glamo

[PATCH 6/8] modesetting: Create a drmmode_bo wrapper; use it for front_bo.

2014-12-09 Thread Kenneth Graunke
This code is going to be extended to support GBM BOs soon. This small abstraction removes a lot of direct dumb_bo access, so we can add that support in one place, rather than putting conditionals at every pitch/handle/etc access. Signed-off-by: Kenneth Graunke --- hw/xfree86/drivers/modesetting

[PATCH 2/8] modesetting: Move ModifyPixmapHeader calls out of if/else branches.

2014-12-09 Thread Kenneth Graunke
Both branches called ModifyPixmapHeader with essentially the same parameters. By using new_pixels in the shadowfb case, we can make them completely the same, and move them out a level, for simplicity. Signed-off-by: Kenneth Graunke --- hw/xfree86/drivers/modesetting/drmmode_display.c | 16 +

[PATCH 0/8] xf86-video-modesetting on GBM

2014-12-09 Thread Kenneth Graunke
Hello, This patch series makes xf86-video-modesetting use GBM for its front buffer allocation rather than dumb BOs (when using Glamor). On Intel hardware, this means Glamor gets a tiled buffer for rendering, rather than a linear one. These patches are available in the 'gbm-v3' branch of my tree:

Re: [PATCH 8/8] modesetting: Use GBM for buffer allocations if Glamor supports it.

2014-12-09 Thread Dave Airlie
On 10 December 2014 at 10:55, Kenneth Graunke wrote: > For performance, Glamor wants to render to tiled buffers, not linear > ones. Using GBM allows us to pick the 3D driver's preferred tiling > modes. I think this would be a lot cleaner as +#ifdef GLAMOR_HAS_GBM +struct gbm_device *gbm; +#

Re: [PATCH 8/8] modesetting: Use GBM for buffer allocations if Glamor supports it.

2014-12-09 Thread Michel Dänzer
On 10.12.2014 09:55, Kenneth Graunke wrote: > For performance, Glamor wants to render to tiled buffers, not linear > ones. Using GBM allows us to pick the 3D driver's preferred tiling > modes. IMO that's just a bonus of this change. :) The main point is that dumb BOs are not suitable for hardware

[PATCH v2] modesetting: Use GBM for buffer allocations if Glamor supports it.

2014-12-09 Thread Kenneth Graunke
For performance, Glamor wants to render to tiled buffers, not linear ones. Using GBM allows us to pick the 3D driver's preferred tiling modes. v2: Declare drmmode->gbm as void * if !GLAMOR_HAS_GBM (suggested by Dave Airlie). Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand --- hw/

[PATCH] glamor: Reinstate glamor_(egl_)destroy_textured_pixmap

2014-12-09 Thread Michel Dänzer
From: Michel Dänzer They are part of the ABI. Signed-off-by: Michel Dänzer --- glamor/glamor.c | 10 -- glamor/glamor.h | 1 + glamor/glamor_egl.c | 6 ++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/glamor/glamor.c b/glamor/glamor.c index 6cf9bdf..b32c

Re: [PATCH v2] modesetting: Use GBM for buffer allocations if Glamor supports it.

2014-12-09 Thread Alexander E. Patrakov
10.12.2014 07:34, Kenneth Graunke wrote: + +#ifdef GLAMOR_HAS_GBM +struct gbm_device *gbm; +#else +void *gbm; +#endif + Yeah, I know, bikeshedding, but... apparently we can get rid of this #ifdef completely using a forward declaration. Untested: struct gbm_device; /* even without GL