Re: [PATCH 1/4] xf86/modes: drop two uses of screenInfo

2012-05-17 Thread Keith Packard
Dave Airlie airl...@gmail.com writes:

 Just use new macros to access scrn-screen.

 Signed-off-by: Dave Airlie airl...@redhat.com

Reviewed-by: Keith Packard kei...@keithp.com

-- 
keith.pack...@intel.com


pgpJObmdpv6FZ.pgp
Description: PGP signature
___
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: [PATCH 1/4] xf86/modes: drop two uses of screenInfo

2012-05-15 Thread Keith Packard
On Mon, 14 May 2012 13:00:20 +0100, Dave Airlie airl...@gmail.com wrote:

 -/* if this is called during ScreenInit() we don't have pScrn-pScreen 
 yet */
 -ScreenPtr pScreen = screenInfo.screens[pScrn-scrnIndex];
 +ScreenPtr pScreen = xf86ScrnToScreen(pScrn);

I assume your fine new macro doesn't have a problem with pScrn-pScreen
not being set yet?

-- 
keith.pack...@intel.com


pgp4mpRqnFksh.pgp
Description: PGP signature
___
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: [PATCH 1/4] xf86/modes: drop two uses of screenInfo

2012-05-15 Thread Dave Airlie
On Tue, May 15, 2012 at 4:16 PM, Keith Packard kei...@keithp.com wrote:
 On Mon, 14 May 2012 13:00:20 +0100, Dave Airlie airl...@gmail.com wrote:

 -    /* if this is called during ScreenInit() we don't have pScrn-pScreen 
 yet */
 -    ScreenPtr pScreen = screenInfo.screens[pScrn-scrnIndex];
 +    ScreenPtr pScreen = xf86ScrnToScreen(pScrn);

 I assume your fine new macro doesn't have a problem with pScrn-pScreen
 not being set yet?

Well currently they just do lookups in the global arrays in a
function, so we don't have to worry,

I'd plan on embedding ScreenRec into ScrnInfoRec at some point in the
distant future,
then the accessor can just be a cast, but it needs a bit more work
that I don't want to get bogged down in now.

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: [PATCH 1/4] xf86/modes: drop two uses of screenInfo

2012-05-15 Thread Keith Packard
On Tue, 15 May 2012 17:56:33 +0100, Dave Airlie airl...@gmail.com wrote:
 On Tue, May 15, 2012 at 4:16 PM, Keith Packard kei...@keithp.com wrote:
  On Mon, 14 May 2012 13:00:20 +0100, Dave Airlie airl...@gmail.com wrote:
 
  -    /* if this is called during ScreenInit() we don't have pScrn-pScreen 
  yet */
  -    ScreenPtr pScreen = screenInfo.screens[pScrn-scrnIndex];
  +    ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
 
  I assume your fine new macro doesn't have a problem with pScrn-pScreen
  not being set yet?
 
 Well currently they just do lookups in the global arrays in a
 function, so we don't have to worry,

Ok, as long as said global arrays are initialized before these
uses. I'll take a look at that code and see if I can follow it.

 I'd plan on embedding ScreenRec into ScrnInfoRec at some point in the
 distant future,

Obviously the right plan. Just making sure the transition continues to
work as well as the current code.

-- 
keith.pack...@intel.com


pgpjrw6oStMOS.pgp
Description: PGP signature
___
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