"Fossies" - the Fresh Open Source Software Archive

Member "buildroot-2021.05/package/x11r7/xdriver_xf86-video-fbturbo/0002-Use-own-thunk-functions-instead-of-fbdevHW-Weak.patch" (6 Jun 2021, 4974 Bytes) of package /linux/privat/buildroot-2021.05.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 From 2186a4e5ed6b8b8f24ebd4d2045df10d1f895999 Mon Sep 17 00:00:00 2001
    2 From: Adam Jackson <ajax@redhat.com>
    3 Date: Wed, 21 May 2014 09:49:56 -0400
    4 Subject: [PATCH] Use own thunk functions instead of fbdevHW*Weak
    5 
    6 I plan to remove the Weak functions from a future server.
    7 
    8 Signed-off-by: Adam Jackson <ajax@redhat.com>
    9 [Upstream https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev/-/commit/2673e727063fe28310836f1e6e9eda552930218a
   10  ported to xf86-video-fbturbo]
   11 Signed-off-by: Peter Seiderer <ps.report@gmx.net>
   12 ---
   13  src/fbdev.c | 86 +++++++++++++++++++++++++++++++++++++++++++----------
   14  1 file changed, 71 insertions(+), 15 deletions(-)
   15 
   16 diff --git a/src/fbdev.c b/src/fbdev.c
   17 index 90d9f39..81bd1fb 100644
   18 --- a/src/fbdev.c
   19 +++ b/src/fbdev.c
   20 @@ -269,6 +269,35 @@ FBDevIdentify(int flags)
   21     xf86PrintChipsets(FBDEV_NAME, "driver for framebuffer", FBDevChipsets);
   22  }
   23  
   24 +static Bool
   25 +fbdevSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
   26 +{
   27 +    return fbdevHWSwitchMode(pScrn, mode);
   28 +}
   29 +
   30 +static void
   31 +fbdevAdjustFrame(ScrnInfoPtr pScrn, int x, int y)
   32 +{
   33 +    fbdevHWAdjustFrame(pScrn, x, y);
   34 +}
   35 +
   36 +static Bool
   37 +fbdevEnterVT(ScrnInfoPtr pScrn)
   38 +{
   39 +    return fbdevHWEnterVT(pScrn);
   40 +}
   41 +
   42 +static void
   43 +fbdevLeaveVT(ScrnInfoPtr pScrn)
   44 +{
   45 +    fbdevHWLeaveVT(pScrn);
   46 +}
   47 +
   48 +static ModeStatus
   49 +fbdevValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags)
   50 +{
   51 +    return fbdevHWValidMode(pScrn, mode, verbose, flags);
   52 +}
   53  
   54  #ifdef XSERVER_LIBPCIACCESS
   55  static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
   56 @@ -294,11 +323,11 @@ static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
   57         pScrn->Probe         = FBDevProbe;
   58         pScrn->PreInit       = FBDevPreInit;
   59         pScrn->ScreenInit    = FBDevScreenInit;
   60 -       pScrn->SwitchMode    = fbdevHWSwitchModeWeak();
   61 -       pScrn->AdjustFrame   = fbdevHWAdjustFrameWeak();
   62 -       pScrn->EnterVT       = fbdevHWEnterVTWeak();
   63 -       pScrn->LeaveVT       = fbdevHWLeaveVTWeak();
   64 -       pScrn->ValidMode     = fbdevHWValidModeWeak();
   65 +       pScrn->SwitchMode    = fbdevSwitchMode;
   66 +       pScrn->AdjustFrame   = fbdevAdjustFrame;
   67 +       pScrn->EnterVT       = fbdevEnterVT;
   68 +       pScrn->LeaveVT       = fbdevLeaveVT;
   69 +       pScrn->ValidMode     = fbdevValidMode;
   70  
   71         xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
   72                "claimed PCI slot %d@%d:%d:%d\n", 
   73 @@ -411,11 +440,11 @@ FBDevProbe(DriverPtr drv, int flags)
   74             pScrn->Probe         = FBDevProbe;
   75             pScrn->PreInit       = FBDevPreInit;
   76             pScrn->ScreenInit    = FBDevScreenInit;
   77 -           pScrn->SwitchMode    = fbdevHWSwitchModeWeak();
   78 -           pScrn->AdjustFrame   = fbdevHWAdjustFrameWeak();
   79 -           pScrn->EnterVT       = fbdevHWEnterVTWeak();
   80 -           pScrn->LeaveVT       = fbdevHWLeaveVTWeak();
   81 -           pScrn->ValidMode     = fbdevHWValidModeWeak();
   82 +           pScrn->SwitchMode    = fbdevSwitchMode;
   83 +           pScrn->AdjustFrame   = fbdevAdjustFrame;
   84 +           pScrn->EnterVT       = fbdevEnterVT;
   85 +           pScrn->LeaveVT       = fbdevLeaveVT;
   86 +           pScrn->ValidMode     = fbdevValidMode;
   87             
   88             xf86DrvMsg(pScrn->scrnIndex, X_INFO,
   89                    "using %s\n", dev ? dev : "default device");
   90 @@ -656,6 +685,17 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
   91     return TRUE;
   92  }
   93  
   94 +static void
   95 +fbdevUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
   96 +{
   97 +    shadowUpdateRotatePacked(pScreen, pBuf);
   98 +}
   99 +
  100 +static void
  101 +fbdevUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
  102 +{
  103 +    shadowUpdatePacked(pScreen, pBuf);
  104 +}
  105  
  106  static Bool
  107  FBDevCreateScreenResources(ScreenPtr pScreen)
  108 @@ -675,7 +715,7 @@ FBDevCreateScreenResources(ScreenPtr pScreen)
  109      pPixmap = pScreen->GetScreenPixmap(pScreen);
  110  
  111      if (!shadowAdd(pScreen, pPixmap, fPtr->rotate ?
  112 -          shadowUpdateRotatePackedWeak() : shadowUpdatePackedWeak(),
  113 +          fbdevUpdateRotatePacked : fbdevUpdatePacked,
  114            FBDevWindowLinear, fPtr->rotate, NULL)) {
  115     return FALSE;
  116      }
  117 @@ -699,6 +739,23 @@ FBDevShadowInit(ScreenPtr pScreen)
  118      return TRUE;
  119  }
  120  
  121 +static void
  122 +fbdevLoadPalette(ScrnInfoPtr pScrn, int num, int *i, LOCO *col, VisualPtr pVis)
  123 +{
  124 +    fbdevHWLoadPalette(pScrn, num, i, col, pVis);
  125 +}
  126 +
  127 +static void
  128 +fbdevDPMSSet(ScrnInfoPtr pScrn, int mode, int flags)
  129 +{
  130 +    fbdevHWDPMSSet(pScrn, mode, flags);
  131 +}
  132 +
  133 +static Bool
  134 +fbdevSaveScreen(ScreenPtr pScreen, int mode)
  135 +{
  136 +    return fbdevHWSaveScreen(pScreen, mode);
  137 +}
  138  
  139  static Bool
  140  FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
  141 @@ -1025,13 +1082,12 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
  142         return FALSE;
  143     }
  144     flags = CMAP_PALETTED_TRUECOLOR;
  145 -   if(!xf86HandleColormaps(pScreen, 256, 8, fbdevHWLoadPaletteWeak(), 
  146 -               NULL, flags))
  147 +   if(!xf86HandleColormaps(pScreen, 256, 8, fbdevLoadPalette, NULL, flags))
  148         return FALSE;
  149  
  150 -   xf86DPMSInit(pScreen, fbdevHWDPMSSetWeak(), 0);
  151 +   xf86DPMSInit(pScreen, fbdevDPMSSet, 0);
  152  
  153 -   pScreen->SaveScreen = fbdevHWSaveScreenWeak();
  154 +   pScreen->SaveScreen = fbdevSaveScreen;
  155  
  156     /* Wrap the current CloseScreen function */
  157     fPtr->CloseScreen = pScreen->CloseScreen;
  158 -- 
  159 2.31.1
  160