[PATCH 04/16] xv: Drop the ddQueryAdaptors() interface.

Keith Packard keithp at keithp.com
Fri Jul 18 11:38:51 PDT 2014


Eric Anholt <eric at anholt.net> writes:

> The core was passing pointers to pxvs's nAdaptors and pAdaptors, and
> the two hardware implementations were copying pxvs's nAdaptors and
> pAdaptors into those pointers.

I have no idea why this might have been done this way...

Reviewed-by: Keith Packard <keithp at keithp.com>

>
> Signed-off-by: Eric Anholt <eric at anholt.net>
> ---
>  Xext/xvdisp.c              |  2 --
>  Xext/xvdix.h               |  1 -
>  hw/kdrive/src/kxv.c        | 18 ++----------------
>  hw/xfree86/common/xf86xv.c | 18 ++----------------
>  4 files changed, 4 insertions(+), 35 deletions(-)
>
> diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
> index f2d49a2..71192b3 100644
> --- a/Xext/xvdisp.c
> +++ b/Xext/xvdisp.c
> @@ -356,8 +356,6 @@ ProcXvQueryAdaptors(ClientPtr client)
>          return Success;
>      }
>  
> -    (*pxvs->ddQueryAdaptors) (pScreen, &pxvs->pAdaptors, &pxvs->nAdaptors);
> -
>      rep = (xvQueryAdaptorsReply) {
>          .type = X_Reply,
>          .sequenceNumber = client->sequence,
> diff --git a/Xext/xvdix.h b/Xext/xvdix.h
> index f62adf8..7afa88a 100644
> --- a/Xext/xvdix.h
> +++ b/Xext/xvdix.h
> @@ -214,7 +214,6 @@ typedef struct {
>      DestroyPixmapProcPtr DestroyPixmap;
>      CloseScreenProcPtr CloseScreen;
>      Bool (*ddCloseScreen) (ScreenPtr);
> -    int (*ddQueryAdaptors) (ScreenPtr, XvAdaptorPtr *, int *);
>      DevUnion devPriv;
>  } XvScreenRec, *XvScreenPtr;
>  
> diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
> index 5aae8f7..0896c81 100644
> --- a/hw/kdrive/src/kxv.c
> +++ b/hw/kdrive/src/kxv.c
> @@ -59,7 +59,6 @@ of the copyright holder.
>  /* XvScreenRec fields */
>  
>  static Bool KdXVCloseScreen(ScreenPtr);
> -static int KdXVQueryAdaptors(ScreenPtr, XvAdaptorPtr *, int *);
>  
>  /* XvAdaptorRec fields */
>  
> @@ -153,11 +152,10 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num)
>  
>      pxvs = GET_XV_SCREEN(pScreen);
>  
> -    /* Anyone initializing the Xv layer must provide these two.
> -       The Xv di layer calls them without even checking if they exist! */
> +    /* Anyone initializing the Xv layer must provide this.
> +       The Xv di layer calls it without even checking if it exists! */
>  
>      pxvs->ddCloseScreen = KdXVCloseScreen;
> -    pxvs->ddQueryAdaptors = KdXVQueryAdaptors;
>  
>      /* The Xv di layer provides us with a private hook so that we don't
>         have to allocate our own screen private.  They also provide
> @@ -1007,18 +1005,6 @@ KdXVCloseScreen(ScreenPtr pScreen)
>      return TRUE;
>  }
>  
> -static int
> -KdXVQueryAdaptors(ScreenPtr pScreen,
> -                  XvAdaptorPtr * p_pAdaptors, int *p_nAdaptors)
> -{
> -    XvScreenPtr pxvs = GET_XV_SCREEN(pScreen);
> -
> -    *p_nAdaptors = pxvs->nAdaptors;
> -    *p_pAdaptors = pxvs->pAdaptors;
> -
> -    return Success;
> -}
> -
>  static Bool
>  KdXVRunning(ScreenPtr pScreen)
>  {
> diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
> index ae20b58..35dd664 100644
> --- a/hw/xfree86/common/xf86xv.c
> +++ b/hw/xfree86/common/xf86xv.c
> @@ -57,7 +57,6 @@
>  /* XvScreenRec fields */
>  
>  static Bool xf86XVCloseScreen(ScreenPtr);
> -static int xf86XVQueryAdaptors(ScreenPtr, XvAdaptorPtr *, int *);
>  
>  /* XvAdaptorRec fields */
>  
> @@ -249,11 +248,10 @@ xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * adaptors, int num)
>  
>      pxvs = GET_XV_SCREEN(pScreen);
>  
> -    /* Anyone initializing the Xv layer must provide these two.
> -       The Xv di layer calls them without even checking if they exist! */
> +    /* Anyone initializing the Xv layer must provide this.
> +       The Xv di layer calls it without even checking if it exists! */
>  
>      pxvs->ddCloseScreen = xf86XVCloseScreen;
> -    pxvs->ddQueryAdaptors = xf86XVQueryAdaptors;
>  
>      /* The Xv di layer provides us with a private hook so that we don't
>         have to allocate our own screen private.  They also provide
> @@ -1185,18 +1183,6 @@ xf86XVCloseScreen(ScreenPtr pScreen)
>      return TRUE;
>  }
>  
> -static int
> -xf86XVQueryAdaptors(ScreenPtr pScreen,
> -                    XvAdaptorPtr * p_pAdaptors, int *p_nAdaptors)
> -{
> -    XvScreenPtr pxvs = GET_XV_SCREEN(pScreen);
> -
> -    *p_nAdaptors = pxvs->nAdaptors;
> -    *p_pAdaptors = pxvs->pAdaptors;
> -
> -    return Success;
> -}
> -
>  /**** ScrnInfoRec fields ****/
>  
>  static Bool
> -- 
> 2.0.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140718/ad14109b/attachment-0001.sig>


More information about the xorg-devel mailing list