diff options
author | Dave Airlie <airlied@redhat.com> | 2012-01-12 09:37:03 +0000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-01-12 09:37:03 +0000 |
commit | 3abf03d64c7cfade7babe9ea7fa28ad1681c2b53 (patch) | |
tree | 996c94af524710845d2869e9ea3b54fcccbea2eb | |
parent | 3af595e107d6dbebb1c04985e400160b1215af4c (diff) |
old WIPdrvmodelv2-prebase
-rw-r--r-- | drv/drv_pixmap.c | 20 | ||||
-rw-r--r-- | drv/impedgc.c | 8 | ||||
-rw-r--r-- | drv/impedpict.c | 7 | ||||
-rw-r--r-- | drv/impedrandr.c | 1 | ||||
-rw-r--r-- | drv/impedscrn.c | 2 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyr.c | 5 | ||||
-rw-r--r-- | hw/xfree86/dri2/drv_dri2.c | 1 | ||||
-rw-r--r-- | hw/xfree86/drvmodes/xf86DrvCrtc.c | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/shared/sigio.c | 12 | ||||
-rw-r--r-- | miext/damage/damage.c | 3 |
10 files changed, 46 insertions, 15 deletions
diff --git a/drv/drv_pixmap.c b/drv/drv_pixmap.c index eb6924c34..8a4fdf0fb 100644 --- a/drv/drv_pixmap.c +++ b/drv/drv_pixmap.c @@ -29,6 +29,9 @@ from The Open Group. #include <dix-config.h> #endif + +#include <fcntl.h> +#include <unistd.h> #include <X11/X.h> #include "servermd.h" #include "drv_types.h" @@ -160,3 +163,20 @@ DrvFreeScratchPixmapHeader(DrvPixmapPtr pPixmap) } } +void dump_pixmap_to_file(DrvPixmapPtr pPixmap, const char *testfile) +{ + int fd; + + if (!pPixmap) + return; + + if (!pPixmap->devPrivate.ptr) + return; + + fd = open(testfile, O_RDWR|O_CREAT, 0600); + if (!fd) + return; + + write(fd, pPixmap->devPrivate.ptr, pPixmap->devKind * pPixmap->height); + close(fd); +} diff --git a/drv/impedgc.c b/drv/impedgc.c index 574e3e0a5..db3f07855 100644 --- a/drv/impedgc.c +++ b/drv/impedgc.c @@ -606,6 +606,9 @@ impedCopyNtoN (DrawablePtr pSrcDrawable, impedGetDrawableDeltas(pSrcDrawable, pSrcPixmap, &src_x_off, &src_y_off); impedGetDrawableDeltas(pDstDrawable, pDstPixmap, &dst_x_off, &dst_y_off); + + fprintf(stderr,"copy: %d/%d %d %d %d %d\n", pSrcDrawable->type, pDstDrawable->type, src_x_off, src_y_off, dst_x_off, dst_y_off); + fprintf(stderr,"dx is %d dy is %d\n", dx, dy); /* copy already takes care of the pixmap clipping */ //dx += pDstPixmap->screen_x - pSrcPixmap->screen_x; //dy += pDstPixmap->screen_y - pSrcPixmap->screen_y; @@ -622,6 +625,7 @@ impedCopyNtoN (DrawablePtr pSrcDrawable, } #endif + fprintf(stderr,"dx is %d dy is %d (%d %d %d %d)\n", dx, dy, pbox[0].x1, pbox[0].x2, pbox[0].y1, pbox[0].y2); for (i = 0; i < imped_src_screen->num_gpu; i++) { copy = imped_src_screen->gpu[i]->GetCopyAreaFunction(imped_src_pixmap->gpu[i], imped_dst_pixmap->gpu[i]); @@ -647,6 +651,10 @@ impedCopyArea (DrawablePtr pSrcDrawable, int xOut, int yOut) { + + fprintf(stderr,"%p -> %p: (%d,%d)(%d,%d)->(%d,%d)\n", + pSrcDrawable, pDstDrawable, xIn, yIn, + widthSrc, heightSrc, xOut, yOut); return miDoCopy(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, diff --git a/drv/impedpict.c b/drv/impedpict.c index 4e4c8ce1d..caa910bb9 100644 --- a/drv/impedpict.c +++ b/drv/impedpict.c @@ -62,6 +62,13 @@ static void SyncDrvPicture(PicturePtr pPicture, DrvPicturePtr pDrvPicture, else RegionNull(pDrvPicture->pCompositeClip); +#if 0 + if (pPicture->clientClipType != CT_NONE) { + pDrvPicture->clientClipType = pPicture->clientClipType; + // pDrvPicture->clientClip = pPicture->clientClip; + } +#endif + } static Bool CreateSourcePict(PicturePtr pPicture, PictureScreenPtr ps, int num_gpu) diff --git a/drv/impedrandr.c b/drv/impedrandr.c index 54bede7c2..2315e710b 100644 --- a/drv/impedrandr.c +++ b/drv/impedrandr.c @@ -459,6 +459,7 @@ Bool impedCheckPixmapBounding(DrvScreenPtr pDrvScreen, // pDrvScreen->virtualY = newsize->y2; ErrorF("adjusted shatter coords to %d,%d\n", newsize->x1, newsize->y1); } else { + ErrorF("adjusted pixmap size to %d,%d\n", new_width, new_height); /* need to stage a pixmap resize */ ret = pDrvScrPriv->drvrrPixmapSetSize(pDrvScreen, new_width, new_height, 0, 0); diff --git a/drv/impedscrn.c b/drv/impedscrn.c index b2dffb813..c82d0d7e7 100644 --- a/drv/impedscrn.c +++ b/drv/impedscrn.c @@ -320,6 +320,7 @@ _impedGetWindowPixmap (WindowPtr pWindow) static void _impedSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap) { + ErrorF("setting %p Window to pixmap %p\n", pWindow, pPixmap); dixSetPrivate(&pWindow->devPrivates, impedGetWinPrivateKey(), pPixmap); } @@ -457,6 +458,7 @@ impedSetupScreen(int index, ScreenPtr pScreen) if (!impedAllocatePrivates(pScreen, NULL)) return FALSE; + pScreen->defColormap = FakeClientID(0); pScreen->ChangeWindowAttributes = impedChangeWindowAttributes; diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 299b6214b..8bcab1d10 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -879,7 +879,10 @@ ephyrCreateResources (DrvScreenPtr pScreen) pScreen, pScreen->myNum, scrpriv->shadow); ephyrRandrCSR(pScreen); - pScreen->screenPixmap->devPrivate.ptr = screen->fb.frameBuffer; + + pScreen->ModifyPixmapHeader(pScreen->screenPixmap, 0, 0, 0, 0, 0, + screen->fb.frameBuffer); + // pScreen->screenPixmap->devPrivate.ptr = screen->fb.frameBuffer; if (scrpriv->shadow) return KdShadowSet (pScreen, scrpriv->randr, diff --git a/hw/xfree86/dri2/drv_dri2.c b/hw/xfree86/dri2/drv_dri2.c index 4d031c3fa..533f0b523 100644 --- a/hw/xfree86/dri2/drv_dri2.c +++ b/hw/xfree86/dri2/drv_dri2.c @@ -103,7 +103,6 @@ DrvDRI2ScreenPtr DrvDRI2GetScreenPrime(DrvScreenPtr pDrvScreen, unsigned int prime_id) { DrvScreenPtr drvscreen = DrvGetScreenPrime(pDrvScreen, prime_id); - return DrvDRI2GetScreen(drvscreen); } diff --git a/hw/xfree86/drvmodes/xf86DrvCrtc.c b/hw/xfree86/drvmodes/xf86DrvCrtc.c index 6a0d711aa..96a4077d9 100644 --- a/hw/xfree86/drvmodes/xf86DrvCrtc.c +++ b/hw/xfree86/drvmodes/xf86DrvCrtc.c @@ -2914,12 +2914,14 @@ xf86DrvOutputSetEDIDProperty (xf86DrvOutputPtr output, void *data, int data_len) if (output->randr_output == NULL) return; +#if 0 if (data_len != 0) { RRChangeOutputProperty(output->randr_output, edid_atom, XA_INTEGER, 8, PropModeReplace, data_len, data, FALSE, TRUE); } else { RRDeleteOutputProperty(output->randr_output, edid_atom); } +#endif } #endif diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c index 780cc1169..7f2de2799 100644 --- a/hw/xfree86/os-support/shared/sigio.c +++ b/hw/xfree86/os-support/shared/sigio.c @@ -159,18 +159,6 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) fd, strerror(errno)); } else { int own_res = -1; -#ifdef F_SETOWN_EX - { - struct f_owner_ex f_ex; - f_ex.type = F_OWNER_TID; - f_ex.pid = gettid(); - own_res = fcntl(fd, F_SETOWN_EX, &f_ex); - if (own_res == -1) { - xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN_EX): %s\n", - fd, strerror(errno)); - } - } -#endif if (own_res == -1) { own_res = fcntl(fd, F_SETOWN, getpid()); if (own_res == -1) { diff --git a/miext/damage/damage.c b/miext/damage/damage.c index d79121165..47a97a104 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -57,7 +57,7 @@ (a)->x2 == (b)->x2 && \ (a)->y2 == (b)->y2) -#define DAMAGE_VALIDATE_ENABLE 0 +#define DAMAGE_VALIDATE_ENABLE 1 #define DAMAGE_DEBUG_ENABLE 0 #if DAMAGE_DEBUG_ENABLE #define DAMAGE_DEBUG(x) ErrorF x @@ -1883,6 +1883,7 @@ DamageRegister (DrawablePtr pDrawable, } #endif + ErrorF("Damage register %p %p\n", pDrawable, pDamage); if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWindow = (WindowPtr) pDrawable; |