[Spice-devel,xf86-video-qxl] src/qxl_driver: use the new dixScreenSpecificPrivatesSize

Submitted by Alon Levy on Aug. 23, 2012, 3:28 p.m.

Details

Message ID 1345735683-5475-1-git-send-email-alevy@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Alon Levy Aug. 23, 2012, 3:28 p.m.
xserver introduces a new screen specific privates infrastructure, moving
the PRIVATE_PIXBUF over there, breaking qxl that was using the wrong
dixPrivatesSize to access it - there is a new array of screen specific/not
flags, and PRIVATE_PIXBUF is screen specific.

xorg-xserver commit: 9d457f9c55f12106ba44c1c9db59d14f978f0ae8

This fix breaks backward compat. The next release will only work with
xorg-xserver >= 1.12.99.901

RHBZ: 844463
---
 src/qxl_driver.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index d6edb3a..7116d8c 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -1529,8 +1529,9 @@  qxl_screen_init(SCREEN_INIT_ARGS_DECL)
     DamageSetup(pScreen);
 
     /* We need to set totalPixmapSize after setup_uxa and Damage,
-       as the privatessize is not computed correctly until then */
-    pScreen->totalPixmapSize = BitmapBytePad((sizeof(PixmapRec) + dixPrivatesSize(PRIVATE_PIXMAP) ) * 8);
+       as the privatssize is not computed correctly until then */
+    pScreen->totalPixmapSize = BitmapBytePad((sizeof(PixmapRec) +
+			    dixScreenSpecificPrivatesSize(pScreen, PRIVATE_PIXMAP) ) * 8);
 
     miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
     if (!miCreateDefColormap(pScreen))

Comments

Hey Alon (and all),

Could this patch be done instead with an #ifdef on XORG_VERSION_CURRENT?

It'd be nice if the tip of spice could continue to be useful with older
Xorgs (said a guy who's focused on RHEL development... :-/).

If that would be okay, I can spin up a patch for it.

Cheers,

Jeremy

> This fix breaks backward compat. The next release will only work with
> xorg-xserver >= 1.12.99.901
> 
> RHBZ: 844463
> ---
>  src/qxl_driver.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qxl_driver.c b/src/qxl_driver.c
> index d6edb3a..7116d8c 100644
> --- a/src/qxl_driver.c
> +++ b/src/qxl_driver.c
> @@ -1529,8 +1529,9 @@ qxl_screen_init(SCREEN_INIT_ARGS_DECL)
>      DamageSetup(pScreen);
>  
>      /* We need to set totalPixmapSize after setup_uxa and Damage,
> -       as the privatessize is not computed correctly until then */
> -    pScreen->totalPixmapSize = BitmapBytePad((sizeof(PixmapRec) + dixPrivatesSize(PRIVATE_PIXMAP) ) * 8);
> +       as the privatssize is not computed correctly until then */
> +    pScreen->totalPixmapSize = BitmapBytePad((sizeof(PixmapRec) +
> +			    dixScreenSpecificPrivatesSize(pScreen, PRIVATE_PIXMAP) ) * 8);
>  
>      miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
>      if (!miCreateDefColormap(pScreen))
Jeremy White <jwhite@codeweavers.com> writes:

> Hey Alon (and all),
>
> Could this patch be done instead with an #ifdef on XORG_VERSION_CURRENT?
>
> It'd be nice if the tip of spice could continue to be useful with older
> Xorgs (said a guy who's focused on RHEL development... :-/).
>
> If that would be okay, I can spin up a patch for it.

Yeah, that would be useful.


Soren
> Jeremy White <jwhite@codeweavers.com> writes:
> 
> > Hey Alon (and all),
> >
> > Could this patch be done instead with an #ifdef on
> > XORG_VERSION_CURRENT?
> >
> > It'd be nice if the tip of spice could continue to be useful with
> > older
> > Xorgs (said a guy who's focused on RHEL development... :-/).
> >
> > If that would be okay, I can spin up a patch for it.

Yes, please do, bad call.

> 
> Yeah, that would be useful.
> 
> 
> Soren
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>