Re: no more indexes - clean up API

2012-05-15 Thread Adam Jackson

On 5/14/12 12:40 PM, Dave Airlie wrote:


The screen/scrninfo APIs are very into passing index values, that
are then immediately used to lookup a global array, this is not
an API, its whatever the opposite is.

This set of patches changes all the API passing of screen indices
(apart from the logging functions). It seriously breaks the driver
API/ABI, and I've got a demo of some compat for it I've sent out before.

I'll try and co-ordinate with Keith, Alex/Chris/Ben so that main 3
drivers are compatible when we push the server with all these in it.

I was holding back on this to try and get some bit by bit review, but
it might be easier for someone to just block off an hour and go mad,
so here goes.


Followup comments given as replies.  For the rest of the series:

Reviewed-by: Adam Jackson a...@redhat.com

There's a lot of cleanup material if anyone really wanted to go after it 
after this, 4/19 for example I think we could drop FreeScreen from the 
ScrnInfoRec entirely with only modest driver fixups.


- ajax

___
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: no more indexes - clean up API

2012-05-15 Thread Alan Coopersmith
On 05/15/12 02:10 PM, Adam Jackson wrote:
 There's a lot of cleanup material if anyone really wanted to go after it after
 this, 4/19 for example I think we could drop FreeScreen from the ScrnInfoRec
 entirely with only modest driver fixups.

Not for Dave's series, but I've always dreamed of having the Block/Wakeup
and related API's in WaitForSomething redefined to not be so tightly tied
to select() and its long bit-per-possible-fd bitmasks, so we could maybe
even move to poll() or something even more fancy someday.

-- 
-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: no more indexes - clean up API

2012-05-15 Thread Adam Jackson

On 5/15/12 5:33 PM, Alan Coopersmith wrote:

On 05/15/12 02:10 PM, Adam Jackson wrote:

There's a lot of cleanup material if anyone really wanted to go after it after
this, 4/19 for example I think we could drop FreeScreen from the ScrnInfoRec
entirely with only modest driver fixups.


Not for Dave's series, but I've always dreamed of having the Block/Wakeup
and related API's in WaitForSomething redefined to not be so tightly tied
to select() and its long bit-per-possible-fd bitmasks, so we could maybe
even move to poll() or something even more fancy someday.


Yes yes yes yes yes.

Yes.

There's a few drivers with block/wake handlers but they're basically not 
using the file descriptor mask (from a quick scan).  The biggest 
consumer of that is actually the non-SIGIO input path.  xfree86's 
GeneralHandler API is what that ought to look like, at DIX level.


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


no more indexes - clean up API

2012-05-14 Thread Dave Airlie
The screen/scrninfo APIs are very into passing index values, that
are then immediately used to lookup a global array, this is not
an API, its whatever the opposite is.

This set of patches changes all the API passing of screen indices
(apart from the logging functions). It seriously breaks the driver
API/ABI, and I've got a demo of some compat for it I've sent out before.

I'll try and co-ordinate with Keith, Alex/Chris/Ben so that main 3
drivers are compatible when we push the server with all these in it.

I was holding back on this to try and get some bit by bit review, but
it might be easier for someone to just block off an hour and go mad,
so here goes.

Dave.

___
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: no more indexes - clean up API

2012-05-14 Thread Alan Coopersmith
On 05/14/12 09:40 AM, Dave Airlie wrote:
 The screen/scrninfo APIs are very into passing index values, that
 are then immediately used to lookup a global array, this is not
 an API, its whatever the opposite is.
 
 This set of patches changes all the API passing of screen indices
 (apart from the logging functions). It seriously breaks the driver
 API/ABI, and I've got a demo of some compat for it I've sent out before.
 
 I'll try and co-ordinate with Keith, Alex/Chris/Ben so that main 3
 drivers are compatible when we push the server with all these in it.

And presumably with Aaron to get the ABI version bumped appropriately.

 I was holding back on this to try and get some bit by bit review, but
 it might be easier for someone to just block off an hour and go mad,
 so here goes.

I mostly just looked at what you had, didn't double check you caught all the
places that needed updating (that's what git grep  compilers are for).   Thanks
for taking care to update the docs to match.

For 1-12,14,16-17,19:
Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com

Comments sent separately on the rest.

-- 
-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: no more indexes - clean up API

2012-05-14 Thread Aaron Plattner
On 05/14/2012 02:25 PM, Alan Coopersmith wrote:
 On 05/14/12 09:40 AM, Dave Airlie wrote:
 The screen/scrninfo APIs are very into passing index values, that
 are then immediately used to lookup a global array, this is not
 an API, its whatever the opposite is.

 This set of patches changes all the API passing of screen indices
 (apart from the logging functions). It seriously breaks the driver
 API/ABI, and I've got a demo of some compat for it I've sent out before.

 I'll try and co-ordinate with Keith, Alex/Chris/Ben so that main 3
 drivers are compatible when we push the server with all these in it.
 
 And presumably with Aaron to get the ABI version bumped appropriately.

Yeah.  I don't care who bumps it, but I attached a patch to do it which should 
get tacked onto your pull request somewhere.  I don't *think* the extension ABI 
needs to be bumped.  I'll let Peter comment on whether the input ABI needs to 
be bumped too.

(sorry, I tried to paste it after a scissors line but I can't get my mailer to 
not expand tabs)

 I was holding back on this to try and get some bit by bit review, but
 it might be easier for someone to just block off an hour and go mad,
 so here goes.
 
 I mostly just looked at what you had, didn't double check you caught all the
 places that needed updating (that's what git grep  compilers are for).   
 Thanks
 for taking care to update the docs to match.
 
 For 1-12,14,16-17,19:
 Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com

I just skimmed the changes but they all seem sane to me, so
Acked-by: Aaron Plattner aplatt...@nvidia.com

-- Aaron

 Comments sent separately on the rest.
From 5df195019cc6e220c6bf706731a44418017e9f8f Mon Sep 17 00:00:00 2001
From: Aaron Plattner aplatt...@nvidia.com
Date: Mon, 14 May 2012 15:16:11 -0700
Subject: [PATCH] xfree86: Bump video ABI to 13.0
X-NVConfidentiality: public

The ABI was broken by changes to convert from screen index numbers to ScreenPtr
/ ScrnInfoPtr in various structures and function signatures.

Signed-off-by: Aaron Plattner aplatt...@nvidia.com
---
 hw/xfree86/common/xf86Module.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 31f5c6a..bf56acd 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -82,7 +82,7 @@ typedef enum {
  * mask is 0x.
  */
 #define ABI_ANSIC_VERSION	SET_ABI_VERSION(0, 4)
-#define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(12, 0)
+#define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(13, 0)
 #define ABI_XINPUT_VERSION	SET_ABI_VERSION(17, 0)
 #define ABI_EXTENSION_VERSION	SET_ABI_VERSION(6, 0)
 #define ABI_FONT_VERSION	SET_ABI_VERSION(0, 6)
-- 
1.7.9.5

___
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