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

2017-10-30 Thread Yu, Qiang
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 depth 30 when it knows the kernel driver can

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

2017-10-30 Thread Eric Anholt
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 processing things.

[PATCH] Xspice: initialize variable before use

2017-10-30 Thread Timo Juhani Lindfors
This fixes the runtime error: Traceback (most recent call last): File "/usr/bin/Xspice", line 277, in if not temp_dir: NameError: name 'temp_dir' is not defined Signed-off-by: Timo Juhani Lindfors --- scripts/Xspice | 2 ++ 1 file changed, 2 insertions(+) diff

Re: [PATCH xserver 1/4] modesetting: Fix potential buffer overflow

2017-10-30 Thread Adam Jackson
On Mon, 2017-10-30 at 09:51 +, Eric Engestrom wrote: > On Friday, 2017-10-27 16:11:53 +0200, Daniel Martin wrote: > > If one misconfigures a ZaphodHeads value (more than 20 characters > > without a delimiter), we get an overflow of our buffer. > > Use xstrtokenize() instead of writing/fixing

Re: [PATCH libXau 0/3] remove redundant null check on calling free()

2017-10-30 Thread Emil Velikov
On 28 October 2017 at 20:18, Daniel Martin wrote: > All 3 patches are > Reviewed-by: Daniel Martin > Thanks guys. Pushed the series to master. -Emil ___ xorg-devel@lists.x.org: X.Org development

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

2017-10-30 Thread Michel Dänzer
On 30/10/17 01:26 PM, Yu, Qiang wrote: > >>> Or maybe it's better to enlarge the crtc gamma size according to randr crtc >>> and let kernel driver to do the resize fit. >> >> Yes, that needs to happen anyway to make the display hardware actually >> take advantage of 30 bits per pixel, doesn't it?

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

2017-10-30 Thread Yu, Qiang
>> Or maybe it's better to enlarge the crtc gamma size according to randr crtc >> and let kernel driver to do the resize fit. > > Yes, that needs to happen anyway to make the display hardware actually > take advantage of 30 bits per pixel, doesn't it? But for randr crtc gamma size < 256, I see

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

2017-10-30 Thread Michel Dänzer
On 30/10/17 11:58 AM, Yu, Qiang wrote: > If config like this: > Section "Screen" >Identifier "Screen0" >Device "Card0" >DefaultDepth30 >DefaultFbBpp32 > EndSection > > The randr crtc gamma size will be 1024 and this palette_size is also 1024.

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

2017-10-30 Thread Yu, Qiang
If config like this: Section "Screen" Identifier "Screen0" Device "Card0" DefaultDepth30 DefaultFbBpp32 EndSection The randr crtc gamma size will be 1024 and this palette_size is also 1024. This makes amdgpu-pro 30bit support has wrong gamma

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

2017-10-30 Thread Michel Dänzer
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 me like gamma_size should always be >=

Re: [PATCH xserver 1/4] modesetting: Fix potential buffer overflow

2017-10-30 Thread Eric Engestrom
On Friday, 2017-10-27 16:11:53 +0200, Daniel Martin wrote: > If one misconfigures a ZaphodHeads value (more than 20 characters > without a delimiter), we get an overflow of our buffer. > Use xstrtokenize() instead of writing/fixing our own tokenizer. > > Signed-off-by: Daniel Martin

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

2017-10-30 Thread walter harms
Am 30.10.2017 07:33, schrieb Qiang Yu: > 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. > > Signed-off-by: Qiang Yu > --- > hw/xfree86/modes/xf86RandR12.c | 96 >

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

2017-10-30 Thread Qiang Yu
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. Signed-off-by: Qiang Yu --- hw/xfree86/modes/xf86RandR12.c | 96 ++ 1 file changed, 69