Re: [PATCH 20/20] dix: reduce scope of tmp and mult.

2011-04-20 Thread Daniel Stone
Hi, On Wed, Apr 20, 2011 at 04:28:29PM +1000, Peter Hutterer wrote: > index 0741604..4901d6a 100644 > --- a/dix/ptrveloc.c > +++ b/dix/ptrveloc.c > @@ -1122,7 +1122,6 @@ acceleratePointerPredictable( > ValuatorMask* val, > CARD32 evtime) > { > -float tmp, mult; /* no need to init */

Touchscreen support in Kdrive via evdev

2011-04-20 Thread Grigory Batalov
Hello! I'm trying to complete touchscreen support in Kdrive's evdev driver by sending events with absolute coordinates (see the attachment). Also I've introduced minX/maxX/minY/maxY options to evdev driver to scale received coordinates properly. Now I can move cursor (to right position) by touch

Re: [PULL] Various render changes

2011-04-20 Thread Soeren Sandmann
Keith Packard writes: >> Yes, apparently I did, and also a few in the rootless code. I'll send a >> new version pending the outcome of the discussion below. > > Thanks. New version to follow. >> Yes, eventually, I think we should. There are currently a few features >> of the server regions that

Re: [PATCH] xfree86: add nouveau as the first automatic driver for NVIDIA hardware

2011-04-20 Thread Anssi Hannula
On 20.04.2011 06:28, Peter Hutterer wrote: > On Wed, Apr 20, 2011 at 05:38:35AM +0300, Anssi Hannula wrote: >> Add nouveau as the first driver on Linux for NVIDIA hardware when >> driver autoconfiguration is done, as it is more capable than nv. >> >> nv is also kept in the list as it is more widely

Re: [PATCH] xfree86: add nouveau as the first automatic driver for NVIDIA hardware

2011-04-20 Thread Daniel Stone
Hi, On Wed, Apr 20, 2011 at 02:34:52PM +0300, Anssi Hannula wrote: > Heh, I thought of that but decided not to do it as it would be so > different from the rest of the entries. In any case, attached is the > patch using that style. Though I prefer the original one by virtue of fitting in better,

[PATCH] render: Delete GlyphRealize/Unrealize hooks.

2011-04-20 Thread Søren Sandmann
From: Søren Sandmann Pedersen Nothing uses them. --- render/glyph.c | 45 + render/mipict.c |2 -- render/mipict.h |8 render/picturestr.h |9 - 4 files changed, 1 insertions(+), 63 deletions(-) diff --git a

Re: [PATCH] render: Delete GlyphRealize/Unrealize hooks.

2011-04-20 Thread Chris Wilson
On Wed, 20 Apr 2011 09:08:24 -0400, Søren Sandmann wrote: > From: Søren Sandmann Pedersen > > Nothing uses them. UXA uses the unrealize hook to get notifications of when to remove items from the glyph cache. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___

Re: [PATCH] render: remove unused fields from source picture structs

2011-04-20 Thread Adam Jackson
On 4/20/11 2:45 AM, Soeren Sandmann wrote: Adam Jackson writes: Thanks to the magic of unions, this saves 12 or 16 bytes per source-only picture. Ideally we'll get to the point where we simply use pixman for this and stop shadowing state in the server, but pixman lacks API for that at the mom

Re: [PATCH 10/20] dix: don't pass the index for a tracker around, pass the tracker

2011-04-20 Thread Jamey Sharp
There are some extra changes in this patch, which are probably fine, but maybe you meant to separate them? So I'll mention them anyway. :-) On Wed, Apr 20, 2011 at 04:28:19PM +1000, Peter Hutterer wrote: > @@ -611,15 +612,15 @@ QueryTrackers(DeviceVelocityPtr vel, int cur_t){ >* even more

Re: [PATCH 11/20] dix: rename a bunch of variables to be more self-explanatory

2011-04-20 Thread Jamey Sharp
On Wed, Apr 20, 2011 at 04:28:20PM +1000, Peter Hutterer wrote: > } else if (initial_velocity != 0) { > velocity_diff = fabs(initial_velocity - tracker_velocity); > if (velocity_diff <= vel->max_diff || > velocity_diff/(initial_velocity + tracker_velocity) <

Re: [PATCH 08/20] dix: use single return statement in DoGetDirection

2011-04-20 Thread Jamey Sharp
This code mixes spaces and tabs, which you might consider making consistent as long as you're changing almost every line of the function anyway. Also, it isn't obvious to me why you're so excited about using a single return statement in several of these patches. :-) Jamey On Wed, Apr 20, 2011 at

Re: [PATCH 00/20] ptraccel cleanups

2011-04-20 Thread Jamey Sharp
On Wed, Apr 20, 2011 at 04:28:09PM +1000, Peter Hutterer wrote: > For an unrelated problem, I had to look at the ptraccel code today and, > well, it's quite complicated and at times hard to understand. > These patches here attempt to make the code simpler to understand though > except the first one

Re: [PATCH 01/20] dix: fix typo in direction calculation

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index ccd445e..c40fbc0 100644 > --- a/dix/ptrveloc.c > +++ b/dix/ptrveloc.c > @@ -

Re: [PATCH 02/20] dix: only use a single return where only one is needed.

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index c40fbc0..a913666 100644 > --- a/dix/ptrveloc.c > +++ b/dix/ptrveloc.c > @@

Re: [PATCH 03/20] dix: improve readbility of DoGetDirection.

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Use enums for the direction bits, not hardcoded bitfield values that are > added up. > > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 37 + > 1 files changed, 25 insertions(+), 12 deletions(-) > > di

Re: [PATCH 04/20] dix: fix comment, directions flagged are 45°

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > The two directions returned by this calculation are always the two boundary > conditions. Since we don't do quadrants but octants, the flagged ones are > 45°, not 90°. e.g. an angle of 35° flags E and NE. > Yes, so 2 flagged directions cover an angle

Re: [PATCH 05/20] dix: document DoGetDirection's maths

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > This is the best explanation I can come up with, but it seems to hold true > for my example values. > > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 12 ++-- > 1 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/

[PATCH 1/4] savage: Fix logic in waitHSync

2011-04-20 Thread Tormod Volden
From: Tormod Volden Bit-masking the result of a boolean negation seems pointless, so I guess this is what was intended: Only look at bit 0 of the inStatus result. Signed-off-by: Tormod Volden --- Hi, A few savage patches. Review is appreciated. This one is similar to 3f18b334812086e5f487a457

[PATCH 2/4] savage: New SAVAGEDRIResume function

2011-04-20 Thread Tormod Volden
From: Tormod Volden Move DRI stuff from savage_driver.c to savage_dri.c Signed-off-by: Tormod Volden --- This one should not change any behavior, but prepares for the next patch. It is very much modeled after the function structure of the radeon driver, which the savage driver once was based o

[PATCH 3/4] savage: Factor out a SAVAGESetAgpMode and call it on resume

2011-04-20 Thread Tormod Volden
From: Tormod Volden This should fix resume with AGP. After all these years... https://bugzilla.kernel.org/show_bug.cgi?id=4607 Signed-off-by: Tormod Volden --- This was always the killer bug for my laptop. Wish I were 5 years earlier... It turned out the same workaround(?) was used in the rad

[PATCH 4/4] savage: Make SAVAGESelectBuffer() private (static)

2011-04-20 Thread Tormod Volden
From: Tormod Volden Also clean out some unused prototypes from savage_driver.h Signed-off-by: Tormod Volden --- Cheers, Tormod src/savage_dri.c|2 +- src/savage_driver.h | 14 -- 2 files changed, 1 insertions(+), 15 deletions(-) diff --git a/src/savage_dri.c b/src/sava

Re: [PATCH 06/20] dix: document GetDirection

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c |8 +++- > 1 files changed, 7 insertions(+), 1 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index fafbbb0..d37d1d9 100644 > --- a/dix/ptrveloc.c > +++ b/dix/ptrveloc.c

Re: [PATCH 07/20] dix: use single return value in GetDirection

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 17 - > 1 files changed, 8 insertions(+), 9 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index d37d1d9..c23d513 100644 > --- a/dix/ptrveloc.c > +++ b/dix/pt

Re: [PATCH 08/20] dix: use single return statement in DoGetDirection

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 87 ++- > 1 files changed, 47 insertions(+), 40 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index c23d513..12c4067 1006

Re: [PATCH 09/20] dix: CalcTracker only uses the tracker, thus only pass the tracker.

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 10 -- > 1 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index 12c4067..be5f626 100644 > --- a/dix/ptrveloc.c > +++ b/dix/ptrveloc.

Re: [PATCH 10/20] dix: don't pass the index for a tracker around, pass the tracker

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 23 --- > 1 files changed, 12 insertions(+), 11 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index be5f626..6fef0ee 100644 > --- a/dix/ptrveloc.c > +++

Re: [PATCH 11/20] dix: rename a bunch of variables to be more self-explanatory

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > i → used_offset > iveloc → initial_velocity > res → result > vdiff → velocity_diff > vfac → velocity_factor > tmp → tracker_velocity > > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 42 +++--- > 1 fil

[PATCH] Fix __STDC_VERSION__ tests.

2011-04-20 Thread Matthieu Herrb
the existing test: defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L) causes an warning when building X stuff with gcc -Wundef. Other tests for __STDC_VERSION__ in the X sources all use defined(__STDC_VERSION__) && (__STDC_VERSION__ -0 >= 199901L) Signed-off-by: Matthieu Herrb --- Xfuncprot

Re: [PATCH] Fix __STDC_VERSION__ tests.

2011-04-20 Thread Matt Turner
On Wed, Apr 20, 2011 at 5:02 PM, Matthieu Herrb wrote: > Signed-off-by: Matthieu Herrb Reviewed-by: Matt Turner ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xo

Re: [PATCH 12/20] dix: add some more documentation to ptraccel code

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 15 --- > 1 files changed, 12 insertions(+), 3 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index 9e1cf87..ba6b88b 100644 > --- a/dix/ptrveloc.c > +++ b/dix/ptr

Re: [PATCH 08/20] dix: use single return statement in DoGetDirection

2011-04-20 Thread Peter Hutterer
On Wed, Apr 20, 2011 at 11:26:54AM -0700, Jamey Sharp wrote: > This code mixes spaces and tabs, which you might consider making > consistent as long as you're changing almost every line of the function > anyway. I'll fix it up, thanks > Also, it isn't obvious to me why you're so excited about usi

Re: [PATCH 14/20] dix: rename "res" to "result" for improved readability

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 18 +- > 1 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index c1b8b91..970212c 100644 > --- a/dix/ptrveloc.c > +++ b/dix/p

Re: [PATCH 15/20] dix: Don't use short as bool

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index 970212c..27def47 100644 > --- a/dix/ptrveloc.c > +++ b/dix/ptrveloc.c > @@ -

Re: [PATCH 1/4] savage: Fix logic in waitHSync

2011-04-20 Thread Matt Turner
On Wed, Apr 20, 2011 at 4:09 PM, Tormod Volden wrote: > From: Tormod Volden Man, somebody didn't know operator precedence. Probably good that git history doesn't go back that far. :) For the series: Reviewed-by: Matt Turner ___ xorg-devel@lists.x.org

Re: [PATCH] Fix __STDC_VERSION__ tests.

2011-04-20 Thread Alan Coopersmith
On 04/20/11 02:02 PM, Matthieu Herrb wrote: > the existing test: > defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L) causes an > warning when building X stuff with gcc -Wundef. Other tests for > __STDC_VERSION__ in the X sources all use > defined(__STDC_VERSION__) && (__STDC_VERSION__ -0 >= 1

Re: [PATCH 20/20] dix: reduce scope of tmp and mult.

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c |5 - > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index 0741604..4901d6a 100644 > --- a/dix/ptrveloc.c > +++ b/dix/ptrveloc.c > @

Re: [PATCH 19/20] dix: reduce the work done by ApplySoftening

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > We can modify fdx/fdy in-place rather than requiring dx/dy as well. And the > decision to soften can be made in the caller (unless decided by the velocity > state). > > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 31 ---

Re: [PATCH 14/20] dix: rename "res" to "result" for improved readability

2011-04-20 Thread Peter Hutterer
On Thu, Apr 21, 2011 at 12:34:20AM +0200, Simon Thum wrote: > On 04/20/2011 08:28 AM, Peter Hutterer wrote: > > Signed-off-by: Peter Hutterer > > --- > > dix/ptrveloc.c | 18 +- > > 1 files changed, 9 insertions(+), 9 deletions(-) > > > > diff --git a/dix/ptrveloc.c b/dix/ptrve

Re: [PATCH 1/4] savage: Fix logic in waitHSync

2011-04-20 Thread Tormod Volden
On Wed, Apr 20, 2011 at 11:36 PM, Matt Turner wrote: > Man, somebody didn't know operator precedence. Probably good that git > history doesn't go back that far. :) BTW, I just learned about -Wlogical-op (not part of -Wall) which unfortunately does not catch this issue. But it found some similar mi

[PATCH] savage: Fix &/&& typo in "magical" register setup

2011-04-20 Thread Tormod Volden
From: Tormod Volden Found with CFLAGS=-Wlogical-op Signed-off-by: Tormod Volden --- I hope I don't break the magic. BTW, LCD_ACTIVE is 0x02. src/savage_driver.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/savage_driver.c b/src/savage_driver.c index 2edd844

Re: [PATCH 18/20] dix: split softening and constant deceleration into two functions

2011-04-20 Thread Simon Thum
On 04/20/2011 08:28 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > dix/ptrveloc.c | 15 ++- > 1 files changed, 10 insertions(+), 5 deletions(-) > > diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c > index 8320834..f4fcd39 100644 > --- a/dix/ptrveloc.c > +++ b/dix/ptr

Re: [PATCH 04/20] dix: fix comment, directions flagged are 45°

2011-04-20 Thread Peter Hutterer
On Wed, Apr 20, 2011 at 11:02:49PM +0200, Simon Thum wrote: > On 04/20/2011 08:28 AM, Peter Hutterer wrote: > > The two directions returned by this calculation are always the two boundary > > conditions. Since we don't do quadrants but octants, the flagged ones are > > 45°, not 90°. e.g. an angle o

Re: [PATCH 10/20] dix: don't pass the index for a tracker around, pass the tracker

2011-04-20 Thread Peter Hutterer
On Wed, Apr 20, 2011 at 11:07:50AM -0700, Jamey Sharp wrote: > There are some extra changes in this patch, which are probably fine, but > maybe you meant to separate them? So I'll mention them anyway. :-) > > On Wed, Apr 20, 2011 at 04:28:19PM +1000, Peter Hutterer wrote: > > @@ -611,15 +612,15 @@

Re: [PATCH 11/20] dix: rename a bunch of variables to be more self-explanatory

2011-04-20 Thread Peter Hutterer
On Wed, Apr 20, 2011 at 11:20:37AM -0700, Jamey Sharp wrote: > On Wed, Apr 20, 2011 at 04:28:20PM +1000, Peter Hutterer wrote: > > } else if (initial_velocity != 0) { > > velocity_diff = fabs(initial_velocity - tracker_velocity); > > if (velocity_diff <= vel->max_diff || > >

Re: [PATCH 1/4] savage: Fix logic in waitHSync

2011-04-20 Thread Alex Deucher
On Wed, Apr 20, 2011 at 6:08 PM, Tormod Volden wrote: > On Wed, Apr 20, 2011 at 11:36 PM, Matt Turner wrote: >> Man, somebody didn't know operator precedence. Probably good that git >> history doesn't go back that far. :) > > BTW, I just learned about -Wlogical-op (not part of -Wall) which > unfor

[PATCH] dix: improve control flow in QueryTrackers

2011-04-20 Thread Peter Hutterer
If the velocity is 0, skip the remainder. If we're not in range, skip the remainder. No functional change. Signed-off-by: Peter Hutterer --- This incorporates the control flow change that sneaked into 11/20 and Jamey's suggestion for the DebugAccelF move. dix/ptrveloc.c | 23 +---

Re: [PATCH] dix: improve control flow in QueryTrackers

2011-04-20 Thread Jamey Sharp
Yup! Reviewed-by: Jamey Sharp On Thu, Apr 21, 2011 at 03:04:46PM +1000, Peter Hutterer wrote: > If the velocity is 0, skip the remainder. > If we're not in range, skip the remainder. > > No functional change. > > Signed-off-by: Peter Hutterer > --- > This incorporates the control flow change

Re: Touchscreen support in Kdrive via evdev

2011-04-20 Thread Peter Hutterer
On Wed, Apr 20, 2011 at 01:08:27PM +0400, Grigory Batalov wrote: > Hello! > > I'm trying to complete touchscreen support in Kdrive's evdev driver > by sending events with absolute coordinates (see the attachment). > > Also I've introduced minX/maxX/minY/maxY options to evdev driver > to scale rec

[PULL updated again] input code cleanup

2011-04-20 Thread Peter Hutterer
Updated from the previous one with the ptraccel cleanup patches. The following changes since commit b3d2164a0361f636bfe77b51456bee9213af4f13: dri2: Pass out_count by value to update_dri2_drawable_buffers() (2011-04-14 15:21:57 +0300) are available in the git repository at: git://people.free

Re: [PATCH] render: Delete GlyphRealize/Unrealize hooks.

2011-04-20 Thread Michel Dänzer
On Mit, 2011-04-20 at 15:13 +0100, Chris Wilson wrote: > On Wed, 20 Apr 2011 09:08:24 -0400, Søren Sandmann wrote: > > From: Søren Sandmann Pedersen > > > > Nothing uses them. > > UXA uses the unrealize hook to get notifications of when to remove items > from the glyph cache. I have patches q