[PATCH] vgaarb: Don't wrap Block/WakeupHandler

Mark Kettenis mark.kettenis at xs4all.nl
Fri Mar 4 15:38:24 PST 2011


> From: Adam Jackson <ajax at redhat.com>
> Date: Fri,  4 Mar 2011 16:15:28 -0500
> 
> These aren't hardware access, unless they are, in which case the rest of
> the wrapping will catch us.

Sorry, but I don't think that is true.  The xf86-video-glint driver
has a BlockHandler that can call Permedia2vLoadCursorCallback() which
does hardware access withour further wrapping as far as I can tell.

> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  hw/xfree86/common/xf86VGAarbiter.c     |   25 -------------------------
>  hw/xfree86/common/xf86VGAarbiterPriv.h |    4 ----
>  2 files changed, 0 insertions(+), 29 deletions(-)
> 
> diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c
> index 215e845..f091aa4 100644
> --- a/hw/xfree86/common/xf86VGAarbiter.c
> +++ b/hw/xfree86/common/xf86VGAarbiter.c
> @@ -188,8 +188,6 @@ xf86VGAarbiterWrapFunctions(void)
>  
>          WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen);
>          WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen);
> -        WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler);
> -        WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler);
>          WRAP_SCREEN(CreateGC, VGAarbiterCreateGC);
>          WRAP_SCREEN(GetImage, VGAarbiterGetImage);
>          WRAP_SCREEN(GetSpans, VGAarbiterGetSpans);
> @@ -261,29 +259,6 @@ VGAarbiterCloseScreen (int i, ScreenPtr pScreen)
>  }
>  
>  static void
> -VGAarbiterBlockHandler(int i,
> -                       pointer blockData, pointer pTimeout, pointer pReadmask)
> -{
> -    ScreenPtr pScreen = screenInfo.screens[i];
> -    SCREEN_PROLOG(BlockHandler);
> -    VGAGet(pScreen);
> -    pScreen->BlockHandler(i, blockData, pTimeout, pReadmask);
> -    VGAPut();
> -    SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler);
> -}
> -
> -static void
> -VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer pReadmask)
> -{
> -    ScreenPtr pScreen = screenInfo.screens[i];
> -    SCREEN_PROLOG(WakeupHandler);
> -    VGAGet(pScreen);
> -    pScreen->WakeupHandler(i, blockData, result, pReadmask);
> -    VGAPut();
> -    SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler);
> -}
> -
> -static void
>  VGAarbiterGetImage (
>      DrawablePtr pDrawable,
>      int sx, int sy, int w, int h,
> diff --git a/hw/xfree86/common/xf86VGAarbiterPriv.h b/hw/xfree86/common/xf86VGAarbiterPriv.h
> index 848e45d..5a80043 100644
> --- a/hw/xfree86/common/xf86VGAarbiterPriv.h
> +++ b/hw/xfree86/common/xf86VGAarbiterPriv.h
> @@ -107,8 +107,6 @@ VGAPut(void) {
>  typedef struct _VGAarbiterScreen {
>      CreateGCProcPtr             CreateGC;
>      CloseScreenProcPtr          CloseScreen;
> -    ScreenBlockHandlerProcPtr   BlockHandler;
> -    ScreenWakeupHandlerProcPtr  WakeupHandler;
>      GetImageProcPtr             GetImage;
>      GetSpansProcPtr             GetSpans;
>      SourceValidateProcPtr       SourceValidate;
> @@ -141,8 +139,6 @@ typedef struct _VGAarbiterGC {
>  } VGAarbiterGCRec, *VGAarbiterGCPtr;
>  
>  /* Screen funcs */
> -static void VGAarbiterBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask);
> -static void VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer pReadmask);
>  static Bool VGAarbiterCloseScreen (int i, ScreenPtr pScreen);
>  static void VGAarbiterGetImage (DrawablePtr pDrawable, int sx, int sy, int w,
>      int h, unsigned int format, unsigned long planemask, char *pdstLine);
> -- 
> 1.7.3.5
> 
> _______________________________________________
> 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
> 


More information about the xorg-devel mailing list