pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/modular-xorg-server/patches Modular-xorg-server-1....



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a7b1681a3564
branches:  trunk
changeset: 555941:a7b1681a3564
user:      apb <apb%pkgsrc.org@localhost>
date:      Sat Mar 14 11:00:21 2009 +0000

description:
Modular-xorg-server-1.4.2nb5.
Apply the following patches from NetBSD xsrc/external/mit/xorg-server/dist;
thanks to joerg for providing a list of changes to apply.

2009-02-19 20:02  macallan

        * hw/xfree86/xaa/: xaaFillRect.c (1.2), xaaInitAccel.c (1.2),
        xaalocal.h (1.2):

        Actually use scanline image writes to upload images if available

2009-02-09 09:49  plunky

        * hw/xfree86/os-support/bsd/bsd_mouse.c (1.5):

        add horizontal mouse-wheel functionality to USB and WSMOUSE drivers

2009-02-02 03:06  christos

        * hw/xfree86/os-support/: bsd/bsd_mouse.c (1.4), xf86OSmouse.h
        (1.2):

        add a SetupMouse proc to condition the fd. Convert NetBSD's
        SetupAuto to SetupMouse.

2009-01-19 00:54  christos

        * hw/xfree86/os-support/bsd/bsd_mouse.c (1.3):

        fix ioctl.

2009-01-13 18:43  christos

        * hw/xfree86/os-support/bsd/bsd_mouse.c (1.2):

        Set the mouse event protocol version. (untested, but head will be
        broken unless I add this).

diffstat:

 x11/modular-xorg-server/patches/patch-ag |  127 +++++++++++++++++++++++++++++++
 x11/modular-xorg-server/patches/patch-ai |   39 +++++++++
 x11/modular-xorg-server/patches/patch-aj |  124 ++++++++++++++++++++++++++++++
 x11/modular-xorg-server/patches/patch-ak |   33 ++++++++
 x11/modular-xorg-server/patches/patch-al |   31 +++++++
 5 files changed, 354 insertions(+), 0 deletions(-)

diffs (truncated from 374 to 300 lines):

diff -r 4a859184d176 -r a7b1681a3564 x11/modular-xorg-server/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/modular-xorg-server/patches/patch-ag  Sat Mar 14 11:00:21 2009 +0000
@@ -0,0 +1,127 @@
+$NetBSD: patch-ag,v 1.5 2009/03/14 11:00:21 apb Exp $
+
+Changes from NetBSD xsrc/external/mit/xorg-server/dist/\
+hw/xfree86/os-support/bsd/bsd_mouse.c
+
+----------------------------
+revision 1.5
+date: 2009/02/09 09:49:39;  author: plunky;  state: Exp;  lines: +16 -0
+add horizontal mouse-wheel functionality to USB and WSMOUSE drivers
+----------------------------
+revision 1.4
+date: 2009/02/02 03:06:37;  author: christos;  state: Exp;  lines: +7 -11
+add a SetupMouse proc to condition the fd. Convert NetBSD's SetupAuto to
+SetupMouse.
+----------------------------
+revision 1.3
+date: 2009/01/19 00:54:29;  author: christos;  state: Exp;  lines: +2 -1
+fix ioctl.
+----------------------------
+revision 1.2
+date: 2009/01/13 18:43:46;  author: christos;  state: Exp;  lines: +25 -0
+Set the mouse event protocol version. (untested, but head will be broken
+unless I add this).
+----------------------------
+
+--- hw/xfree86/os-support/bsd/bsd_mouse.c.orig 2009-03-12 19:22:51.000000000 +0200
++++ hw/xfree86/os-support/bsd/bsd_mouse.c
+@@ -55,12 +55,15 @@
+ 
+ #define HUP_GENERIC_DESKTOP     0x0001
+ #define HUP_BUTTON              0x0009
++#define HUP_CONSUMER          0x000c
+ 
+ #define HUG_X                   0x0030
+ #define HUG_Y                   0x0031
+ #define HUG_Z                   0x0032
+ #define HUG_WHEEL               0x0038
+ 
++#define HUC_AC_PAN            0x0238
++
+ #define HID_USAGE2(p,u) (((p) << 16) | u)
+ 
+ /* The UMS mices have middle button as number 3 */
+@@ -340,6 +343,25 @@
+ }
+ #endif
+ 
++#if defined(__NetBSD__)
++
++static Bool
++SetupMouse(InputInfoPtr pInfo)
++{
++#ifdef WSCONS_SUPPORT
++#ifdef WSMOUSEIO_SETVERSION
++      int version = WSMOUSE_EVENT_VERSION;
++      if (ioctl(pInfo->fd, WSMOUSEIO_SETVERSION, &version) == -1) {
++          xf86Msg(X_WARNING, "%s: cannot set version\n", pInfo->name);
++          return FALSE;
++      }
++#endif
++#endif
++      return TRUE;
++}
++
++#endif
++
+ #if defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
+ 
+ /* Only support wsmouse configuration for now */
+@@ -430,6 +452,11 @@
+           dz = event->value;
+           break;
+ #endif
++#ifdef WSCONS_EVENT_MOUSE_DELTA_W
++      case WSCONS_EVENT_MOUSE_DELTA_W:
++          dw = event->value;
++          break;
++#endif
+       default:
+           xf86Msg(X_WARNING, "%s: bad wsmouse event type=%d\n", pInfo->name,
+                   event->type);
+@@ -491,6 +518,7 @@
+     hid_item_t loc_x;         /* x locator item */
+     hid_item_t loc_y;         /* y locator item */
+     hid_item_t loc_z;         /* z (wheel) locator item */
++    hid_item_t loc_w;         /* w (pan) locator item */
+     hid_item_t loc_btn[MSE_MAXBUTTONS]; /* buttons locator items */
+    unsigned char *buffer;
+ } UsbMseRec, *UsbMsePtr;
+@@ -610,6 +638,7 @@
+     dx = hid_get_data(pBuf, &pUsbMse->loc_x);
+     dy = hid_get_data(pBuf, &pUsbMse->loc_y);
+     dz = hid_get_data(pBuf, &pUsbMse->loc_z);
++    dw = hid_get_data(pBuf, &pUsbMse->loc_w);
+ 
+     buttons = 0;
+     for (n = 0; n < pMse->buttons; n++) {
+@@ -701,6 +730,9 @@
+     if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
+                  hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) {
+     }
++    if (hid_locate(reportDesc, HID_USAGE2(HUP_CONSUMER, HUC_AC_PAN),
++                 hid_input, &pUsbMse->loc_w, pUsbMse->iid) < 0) {
++    }
+ #else
+     if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
+                  hid_input, &pUsbMse->loc_x) < 0) {
+@@ -713,6 +745,9 @@
+     if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
+                  hid_input, &pUsbMse->loc_z) < 0) {
+     }
++    if (hid_locate(reportDesc, HID_USAGE2(HUP_CONSUMER, HUC_AC_PAN),
++                 hid_input, &pUsbMse->loc_w) < 0) {
++    }
+ #endif
+     /* Probe for number of buttons */
+     for (i = 1; i <= MSE_MAXBUTTONS; i++) {
+@@ -783,6 +818,9 @@
+     p->SetupAuto = SetupAuto;
+     p->SetMiscRes = SetMouseRes;
+ #endif
++#if defined(__NetBSD__)
++    p->SetupMouse = SetupMouse;
++#endif
+ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__)
+     p->FindDevice = FindDevice;
+ #endif
diff -r 4a859184d176 -r a7b1681a3564 x11/modular-xorg-server/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/modular-xorg-server/patches/patch-ai  Sat Mar 14 11:00:21 2009 +0000
@@ -0,0 +1,39 @@
+$NetBSD: patch-ai,v 1.3 2009/03/14 11:00:22 apb Exp $
+
+Changes from NetBSD xsrc/external/mit/xorg-server/dist/\
+hw/xfree86/os-support/xf86OSmouse.h
+
+----------------------------
+revision 1.2
+date: 2009/02/02 03:06:37;  author: christos;  state: Exp;  lines: +4 -0
+add a SetupMouse proc to condition the fd. Convert NetBSD's SetupAuto to
+SetupMouse.
+----------------------------
+
+--- hw/xfree86/os-support/xf86OSmouse.h.orig   2008-06-06 12:03:10.000000000 +0200
++++ hw/xfree86/os-support/xf86OSmouse.h
+@@ -82,6 +82,7 @@ typedef Bool (*BuiltinPreInitProc)(Input
+                                  int flags);
+ typedef const char *(*DefaultProtocolProc)(void);
+ typedef const char *(*SetupAutoProc)(InputInfoPtr pInfo, int *protoPara);
++typedef Bool (*SetupMouseProc)(InputInfoPtr pInfo);
+ typedef void (*SetResProc)(InputInfoPtr pInfo, const char* protocol, int rate,
+                          int res);
+ typedef const char *(*FindDeviceProc)(InputInfoPtr pInfo, const char *protocol,
+@@ -99,6 +100,7 @@ typedef struct {
+       BuiltinPreInitProc      PreInit;
+       DefaultProtocolProc     DefaultProtocol;
+       SetupAutoProc           SetupAuto;
++      SetupMouseProc          SetupMouse;
+       SetResProc              SetPS2Res;
+       SetResProc              SetBMRes;
+       SetResProc              SetMiscRes;
+@@ -141,6 +143,8 @@ typedef struct {
+  *
+  * SetBMRes:  Set the resolution and sample rate for MSE_BM protocol types.
+  *
++ * SetupMouse:        Called once after open to condition the file descriptor.
++ *
+  * SetMiscRes:        Set the resolution and sample rate for MSE_MISC protocol types.
+  *
+  * FindDevice:        This function gets called when no Device has been specified
diff -r 4a859184d176 -r a7b1681a3564 x11/modular-xorg-server/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/modular-xorg-server/patches/patch-aj  Sat Mar 14 11:00:21 2009 +0000
@@ -0,0 +1,124 @@
+$NetBSD: patch-aj,v 1.3 2009/03/14 11:00:22 apb Exp $
+
+Changes from NetBSD xsrc/external/mit/xorg-server/dist/\
+hw/xfree86/xaa/xaaFillRect.c
+
+----------------------------
+revision 1.2
+date: 2009/02/19 20:02:02;  author: macallan;  state: Exp;  lines: +104 -0
+Actually use scanline image writes to upload images if available
+----------------------------
+
+--- hw/xfree86/xaa/xaaFillRect.c.orig  2008-06-06 12:03:10.000000000 +0200
++++ hw/xfree86/xaa/xaaFillRect.c
+@@ -779,6 +779,110 @@ XAAFillCacheExpandRects(
+     with reading past the edge of the pattern otherwise */
+ 
+ static void
++WriteColumnScanlines(
++    ScrnInfoPtr pScrn,
++    unsigned char *pSrc,
++    int x, int y, int w, int h,
++    int xoff, int yoff,
++    int pHeight,
++    int srcwidth,
++    int Bpp
++) {
++    XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
++    unsigned char *src;
++    int skipleft, bytes, line, sline;
++    int buffer;
++
++    pSrc += (Bpp * xoff);
++   
++    if((skipleft = (long)pSrc & 0x03L)) {
++        if(Bpp == 3)
++           skipleft = 4 - skipleft;
++        else
++           skipleft /= Bpp;
++
++        x -= skipleft;       
++        w += skipleft;
++        
++        if(Bpp == 3)
++           pSrc -= 3 * skipleft;  
++        else   /* is this Alpha friendly ? */
++           pSrc = (unsigned char*)((long)pSrc & ~0x03L);     
++    }
++
++    src = pSrc + (yoff * srcwidth);
++
++    bytes = w * Bpp;
++
++    (*infoRec->SubsequentScanlineImageWriteRect)(pScrn, x, y, w, h, skipleft);
++
++    buffer = 0;
++    sline = yoff;
++    for (line = 0; line < h; line++) {
++       memcpy(infoRec->ScanlineImageWriteBuffers[buffer], src, bytes);
++       (*infoRec->SubsequentImageWriteScanline)(pScrn, buffer);
++       buffer++;
++       src += srcwidth;
++       sline++;
++       if (sline >= pHeight) {
++           sline = 0;
++         src = pSrc;
++       }
++       if (buffer >= infoRec->NumScanlineImageWriteBuffers)
++           buffer = 0;
++    }
++}
++
++void 
++XAAFillScanlineImageWriteRects(
++    ScrnInfoPtr pScrn,
++    int rop,
++    unsigned int planemask,
++    int nBox,
++    BoxPtr pBox,
++    int xorg, int yorg,
++    PixmapPtr pPix
++){
++    XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
++    int x, phaseY, phaseX, height, width, blit_w;
++    int pHeight = pPix->drawable.height;
++    int pWidth = pPix->drawable.width;
++    int Bpp = pPix->drawable.bitsPerPixel >> 3;
++    int srcwidth = pPix->devKind;
++
++    (*infoRec->SetupForScanlineImageWrite)(pScrn, rop, planemask, -1,
++               pPix->drawable.bitsPerPixel, pPix->drawable.depth);
++
++    while(nBox--) {
++       x = pBox->x1;
++       phaseY = (pBox->y1 - yorg) % pHeight;
++       if(phaseY < 0) phaseY += pHeight;
++       phaseX = (x - xorg) % pWidth;
++       if(phaseX < 0) phaseX += pWidth;
++       height = pBox->y2 - pBox->y1;
++       width = pBox->x2 - x;
++       
++       while(1) {
++           blit_w = pWidth - phaseX;
++           if(blit_w > width) blit_w = width;
++
++           WriteColumnScanlines(pScrn, pPix->devPrivate.ptr, x, pBox->y1, 
++               blit_w, height, phaseX, phaseY, pHeight, srcwidth, Bpp);
++
++           width -= blit_w;
++           if(!width) break;
++           x += blit_w;
++           phaseX = (phaseX + blit_w) % pWidth;
++       }
++       pBox++;
++    }
++
++    if(infoRec->ScanlineImageWriteFlags & SYNC_AFTER_IMAGE_WRITE)
++        (*infoRec->Sync)(pScrn);
++    else SET_SYNC_FLAG(infoRec);
++}
++
++static void
+ WriteColumn(



Home | Main Index | Thread Index | Old Index