Re: [PATCH xserver] xfree86: fix gamma compute when palette_size > 256

2017-10-31 Thread Yu, Qiang
Aaron, Michel, thanks for your comments which make me get more clear about the notation involved in this patch. As my understanding so far: 1. the crtc->gamma_size should be a hardware setting that reflect the hardware capability of max gamma CLUT size 2. the palette_size can be bigger than crt

Re: [PATCH xserver] xkb: Print the xkbcomp path being executed when we fail to compile.

2017-10-31 Thread Peter Hutterer
On Tue, Oct 31, 2017 at 12:22:31PM -0700, Eric Anholt wrote: > I don't know how many times I've had a broken server due to a bad > directory to xkbcomp, and only finding the whole path has shown me > where I went wrong. > --- > xkb/ddxLoad.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletio

Re: [PATCH v4 xserver] test: Add a test for the overflow bug in bigreqs.

2017-10-31 Thread Peter Hutterer
On Mon, Oct 30, 2017 at 03:36:43PM -0700, Eric Anholt wrote: > Peter Hutterer writes: > > > From: Eric Anholt > > > > The failing struct comes from the python test written by Michal Srb > > . > > > > v2: Use a drawable (root window) and gc, so that PolyLines hopefully > > actually tries proc

[PATCH xserver] xkb: Print the xkbcomp path being executed when we fail to compile.

2017-10-31 Thread Eric Anholt
I don't know how many times I've had a broken server due to a bad directory to xkbcomp, and only finding the whole path has shown me where I went wrong. --- xkb/ddxLoad.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index f71815aa814b..bbe

Re: [PATCH xserver] xfree86: fix gamma compute when palette_size > 256

2017-10-31 Thread Aaron Plattner
On 10/30/2017 03:28 AM, Michel Dänzer wrote: On 30/10/17 07:33 AM, Qiang Yu wrote: palette_(red|green|blue)_size > crtc->gamma_size (=256) this may happen when screen has per RGB chanel > 8bit, i.e. 30bit depth screen 10bit per RGB. Is palette_size > gamma_size really useful though? Seems to

Re: [PATCH libICE 11/13] add check for mall

2017-10-31 Thread Emil Velikov
On 31 October 2017 at 15:15, Emil Velikov wrote: > On 18 October 2017 at 17:05, walter harms wrote: >> >> fix a potential null pointer deference error and >> properly dispose the affected message >> >> Signed-off-by: Walter Harms >> --- >> src/process.c | 27 +++ >> 1 f

Re: [PATCH libICE 11/13] add check for mall

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 17:05, walter harms wrote: > > fix a potential null pointer deference error and > properly dispose the affected message > > Signed-off-by: Walter Harms > --- > src/process.c | 27 +++ > 1 file changed, 27 insertions(+) > That patch seems ok, but I'm

Re: [PATCH libICE 13/13] make sure buffer is zero filled and report if, allocation failed

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 17:09, walter harms wrote: > > make sure buffer is zero filled and > report if allocation failed > > Signed-off-by: Walter Harms > > --- > src/listenwk.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/listenwk.c b/src/listenwk.c > index

Re: [PATCH xserver] xfree86: fix gamma compute when palette_size > 256

2017-10-31 Thread Michel Dänzer
On 31/10/17 10:55 AM, Yu, Qiang wrote: > >>> If so, does this what you want: >>> 1. for palette_size <= 256, keep the original way >>> 2. for palette_size > 256, enlarge the crtc gamma_size and copy into it >> >> Not sure what you mean by "copy into it". The driver should simply make >> sure the C

Re: [PATCH libICE 12/13] add check for malloc

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 17:07, walter harms wrote: > > > fix a potential null pointer deference error and > > IceAllocScratch() do not report size when allocation failes > > Signed-off-by: Walter Harms > > --- > src/misc.c | 19 +++ > 1 file changed, 15 insertions(+), 4 deletions(-

Re: [PATCH libICE 08/13] add check for malloc

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 17:02, walter harms wrote: > > add check for malloc > > fix a potential null pointer deference error and > release already allocated memory > > Signed-off-by: Walter Harms > > --- > src/setauth.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/src/se

Re: [PATCH libICE 09/13] add check for malloc

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 17:03, walter harms wrote: > > > fix a potential null pointer deference error > > Signed-off-by: Walter Harms > > --- > src/replywait.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/replywait.c b/src/replywait.c > index b25c351..91a8dd6 1006

Re: [PATCH libICE 10/13] add check for malloc

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 17:04, walter harms wrote: > From ea066aa04dd118187ca0289053bc4ca5caa0a4a8 Mon Sep 17 00:00:00 2001 > > > fix a potential null pointer deference error > convert malloc() to calloc() to have valid > null pointers on error. so we can release > already allocated memory > I'd rew

Re: [PATCH libICE 07/13] add check for malloc

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 17:01, walter harms wrote: > > add check for malloc and a bit untangling > Signed-off-by: Walter Harms > > --- > src/watch.c | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/src/watch.c b/src/watch.c > index abbc265..c60d0c1 100644 >

Re: [PATCH libICE 06/13] check malloc return

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 16:58, walter harms wrote: > > > check malloc return > failed mallocs will cause segfaults, so add check > also free already allocated memory > > Signed-off-by: Walter Harms > --- > src/connect.c | 19 +++ > 1 file changed, 15 insertions(+), 4 deletions(

Re: [PATCH libICE 05/13] add errormessage and remove unneeded indention

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 16:57, walter harms wrote: > > > add errormessage and remove unneeded indention > Please keep those separate patches. > Signed-off-by: Walter Harms > > --- > src/listen.c | 51 +-- > 1 file changed, 25 insertions(+), 26 delet

Re: [PATCH libICE 04/13] check the return of malloc()

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 16:54, walter harms wrote: > > check the return of malloc() > > Signed-off-by: Walter Harms > --- > src/protosetup.c | 21 +++-- > 1 file changed, 15 insertions(+), 6 deletions(-) > > diff --git a/src/protosetup.c b/src/protosetup.c > index b6aece8..dbc136e

Re: [PATCH libICE 03/13] save one indentlevel in IceProtocolSetup

2017-10-31 Thread Emil Velikov
On 18 October 2017 at 16:53, walter harms wrote: > > > save one indentlevel in IceProtocolSetup by early check and > remove a lost free() check > Signed-off-by: Walter Harms > Thanks for the poke Walter. Patches 1 + 2 were applied back in Sept and having similar patches got me confused a bit ;-)

Re: [PATCH xserver] xfree86: fix gamma compute when palette_size > 256

2017-10-31 Thread Yu, Qiang
>> If so, does this what you want: >> 1. for palette_size <= 256, keep the original way >> 2. for palette_size > 256, enlarge the crtc gamma_size and copy into it > > Not sure what you mean by "copy into it". The driver should simply make > sure the CRTC gamma CLUT is large enough, in which case t

Re: [PATCH xserver] xfree86: fix gamma compute when palette_size > 256

2017-10-31 Thread Michel Dänzer
On 31/10/17 01:02 AM, Yu, Qiang wrote: > > But I see driver like amdgpu with old KMS driver only has 256 entries and > the > gamma set syscall won't work correctly for size>256. That needs to be fixed then, and the userspace driver should probably only allow setting dep

Re: [PATCH] modesetting: fail PreInit() if the device has zero connectors

2017-10-31 Thread Tobias Jakobi
Hi again, I took a closer look at the problem, but I can't really figure out what is going wrong. So, the assert that is triggered is always the following one: > Xorg: > /var/tmp/portage/x11-base/xorg-server-1.19.5/work/xorg-server-1.19.5/dix/privates.c:385: > dixRegisterPrivateKey: Assertion `