1
0
OBS User unknown 2007-09-11 16:31:21 +00:00 committed by Git OBS Bridge
parent f15f01098b
commit 13f9462806
5 changed files with 177 additions and 59 deletions

11
p_pci-domain.diff Normal file
View File

@ -0,0 +1,11 @@
--- hw/xfree86/os-support/bus/xf86Pci.h.p_pci-domain.diff 2006-11-13 19:59:23.000000000 +0100
+++ hw/xfree86/os-support/bus/xf86Pci.h 2006-11-14 05:39:22.000000000 +0100
@@ -767,6 +767,8 @@
ADDRESS pciHostAddrToBusAddr(PCITAG tag, PciAddrType type, ADDRESS addr);
PCITAG pciTag(int busnum, int devnum, int funcnum);
PCITAG pciDomTag(int domnum, int busnum, int devnum, int funcnum);
+void pciInfoFromTag(PCITAG tag, int *domainnum,
+ int *busnum, int *devnum, int *funcnum);
int pciGetBaseSize(PCITAG tag, int indx, Bool destructive, Bool *min);
CARD32 pciCheckForBrokenBase(PCITAG tag,int basereg);
pointer xf86MapPciMem(int ScreenNum, int Flags, PCITAG Tag,

View File

@ -1,60 +1,11 @@
--- hw/xfree86/os-support/bus/linuxPci.c
+++ hw/xfree86/os-support/bus/linuxPci.c
@@ -550,7 +550,7 @@ xf86GetPciDomain(PCITAG Tag)
return result;
--- hw/xfree86/os-support/bus/linuxPci.c.orig 2006-11-20 22:04:35.000000000 +0100
+++ hw/xfree86/os-support/bus/linuxPci.c 2006-11-20 22:06:08.000000000 +0100
@@ -547,7 +547,7 @@
pPCI = xf86GetPciHostConfigFromTag(Tag);
if (pPCI && (result = PCI_DOM_FROM_BUS(pPCI->busnum)))
- return result;
+ return result + 1;
if (!pPCI || pPCI->fakeDevice)
- return 1; /* Domain 0 is reserved */
+ return 0;
if ((fd = linuxPciOpenFile(pPCI ? pPCI->tag : 0,FALSE)) < 0)
return 0;
@@ -558,7 +558,7 @@ xf86GetPciDomain(PCITAG Tag)
if ((result = ioctl(fd, PCIIOC_CONTROLLER, 0)) < 0)
return 0;
- return result + 1; /* Domain 0 is reserved */
+ return result;
}
static pointer
@@ -628,7 +628,7 @@ linuxMapPci(int ScreenNum, int Flags, PC
return NULL;
}
-#define MAX_DOMAINS 257
+#define MAX_DOMAINS 256
static pointer DomainMmappedIO[MAX_DOMAINS];
static int
@@ -649,11 +649,10 @@ linuxOpenLegacy(PCITAG Tag, char *name)
domain = xf86GetPciDomain(Tag);
bus = PCI_BUS_NO_DOMAIN(PCI_BUS_FROM_TAG(Tag));
- /* Domain 0 is reserved -- see xf86GetPciDomain() */
- if ((domain <= 0) || (domain >= MAX_DOMAINS))
+ if ((domain < 0) || (domain >= MAX_DOMAINS))
FatalError("linuxOpenLegacy(): domain out of range\n");
- sprintf(path, PREFIX, domain - 1, bus, name);
+ sprintf(path, PREFIX, domain, bus, name);
fd = open(path, O_RDWR);
if (fd >= 0) {
xfree(path);
@@ -685,7 +684,6 @@ _X_EXPORT pointer
xf86MapDomainMemory(int ScreenNum, int Flags, PCITAG Tag,
ADDRESS Base, unsigned long Size)
{
- int domain = xf86GetPciDomain(Tag);
int fd;
pointer addr;
@@ -733,7 +731,7 @@ xf86MapDomainIO(int ScreenNum, int Flags
int domain = xf86GetPciDomain(Tag);
int fd;
- if ((domain <= 0) || (domain >= MAX_DOMAINS))
+ if ((domain < 0) || (domain >= MAX_DOMAINS))
FatalError("xf86MapDomainIO(): domain out of range\n");
if (DomainMmappedIO[domain])
return 1; /* Domain 0 is reserved */

View File

@ -0,0 +1,132 @@
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: composite/compalloc.c
# modified: composite/compint.h
# modified: composite/compwindow.c
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# randr/rrscreen.c.orig
diff --git a/composite/compalloc.c b/composite/compalloc.c
index f555411..006e808 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -461,7 +461,6 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
ScreenPtr pScreen = pWin->drawable.pScreen;
WindowPtr pParent = pWin->parent;
PixmapPtr pPixmap;
- GCPtr pGC;
pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, pWin->drawable.depth);
@@ -471,25 +470,63 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
pPixmap->screen_x = x;
pPixmap->screen_y = y;
- pGC = GetScratchGC (pWin->drawable.depth, pScreen);
-
- /*
- * Copy bits from the parent into the new pixmap so that it will
- * have "reasonable" contents in case for background None areas.
- */
- if (pGC)
+ if (pParent->drawable.depth == pWin->drawable.depth)
{
- XID val = IncludeInferiors;
+ GCPtr pGC = GetScratchGC (pWin->drawable.depth, pScreen);
- ValidateGC(&pPixmap->drawable, pGC);
- dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL);
- (*pGC->ops->CopyArea) (&pParent->drawable,
- &pPixmap->drawable,
- pGC,
- x - pParent->drawable.x,
- y - pParent->drawable.y,
- w, h, 0, 0);
- FreeScratchGC (pGC);
+ /*
+ * Copy bits from the parent into the new pixmap so that it will
+ * have "reasonable" contents in case for background None areas.
+ */
+ if (pGC)
+ {
+ XID val = IncludeInferiors;
+
+ ValidateGC(&pPixmap->drawable, pGC);
+ dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL);
+ (*pGC->ops->CopyArea) (&pParent->drawable,
+ &pPixmap->drawable,
+ pGC,
+ x - pParent->drawable.x,
+ y - pParent->drawable.y,
+ w, h, 0, 0);
+ FreeScratchGC (pGC);
+ }
+ }
+ else
+ {
+ PictFormatPtr pSrcFormat = compWindowFormat (pParent);
+ PictFormatPtr pDstFormat = compWindowFormat (pWin);
+ XID inferiors = IncludeInferiors;
+ int error;
+
+ PicturePtr pSrcPicture = CreatePicture (None,
+ &pParent->drawable,
+ pSrcFormat,
+ CPSubwindowMode,
+ &inferiors,
+ serverClient, &error);
+
+ PicturePtr pDstPicture = CreatePicture (None,
+ &pPixmap->drawable,
+ pDstFormat,
+ 0, 0,
+ serverClient, &error);
+
+ if (pSrcPicture && pDstPicture)
+ {
+ CompositePicture (PictOpSrc,
+ pSrcPicture,
+ NULL,
+ pDstPicture,
+ x - pParent->drawable.x,
+ y - pParent->drawable.y,
+ 0, 0, 0, 0, w, h);
+ }
+ if (pSrcPicture)
+ FreePicture (pSrcPicture, 0);
+ if (pDstPicture)
+ FreePicture (pDstPicture, 0);
}
return pPixmap;
}
diff --git a/composite/compint.h b/composite/compint.h
index 38b1777..f69595c 100644
--- a/composite/compint.h
+++ b/composite/compint.h
@@ -237,6 +237,9 @@ compCheckTree (ScreenPtr pScreen);
#define compCheckTree(s)
#endif
+PictFormatPtr
+compWindowFormat (WindowPtr pWin);
+
void
compSetPixmap (WindowPtr pWin, PixmapPtr pPixmap);
diff --git a/composite/compwindow.c b/composite/compwindow.c
index a4c4e6f..bfd2946 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -685,7 +685,7 @@ compGetWindowVisual (WindowPtr pWin)
return 0;
}
-static PictFormatPtr
+PictFormatPtr
compWindowFormat (WindowPtr pWin)
{
ScreenPtr pScreen = pWin->drawable.pScreen;

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Sep 11 18:05:39 CEST 2007 - sndirsch@suse.de
- reverted changes by schwab on Fri Sep 7; these resulted i a black
screen during Xserver start with any driver on non-IA64 platforms
-------------------------------------------------------------------
Mon Sep 10 17:10:44 CEST 2007 - sndirsch@suse.de
- use-composite-for-unequal-depths.patch:
* Use Composite when depths don't match (Bug #309107, X.Org Bug
#7447)
-------------------------------------------------------------------
Fri Sep 7 23:16:06 CEST 2007 - schwab@suse.de

View File

@ -21,7 +21,7 @@ BuildRequires: libjpeg-devel
URL: http://xorg.freedesktop.org/
%define EXPERIMENTAL 0
Version: 7.2
Release: 134
Release: 136
License: X11/MIT
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/X11/Servers/XF86_4
@ -100,6 +100,8 @@ Patch74: randr12-b4193a2eee80895c5641e77488df0e72a73a3d99.diff
Patch75: randr12-b2dcfbca2441ca8c561f86a78a76ab59ecbb40e4.diff
Patch76: randr12-2926cf1da7e4ed63573bfaecdd7e19beb3057d9b.diff
Patch77: fbdevhw.diff
Patch78: use-composite-for-unequal-depths.patch
Patch334: p_pci-domain.diff
Patch357: p_pci-ce-x.diff
%description
@ -187,6 +189,7 @@ popd
%patch28
%patch29
### Bug 197572: X.Org PCI/IA64 patches
%patch334 -p0 -b .p_pci-domain.diff
%patch357 -p0 -b .p_pci-ce-x.diff
%patch30
%patch32 -p1
@ -218,6 +221,7 @@ popd
%patch75 -p1
%patch76 -p1
%patch77
%patch78 -p1
%build
pushd xorg-docs-*
@ -553,6 +557,13 @@ exit 0
%endif
%changelog
* Tue Sep 11 2007 - sndirsch@suse.de
- reverted changes by schwab on Fri Sep 7; these resulted i a black
screen during Xserver start with any driver on non-IA64 platforms
* Mon Sep 10 2007 - sndirsch@suse.de
- use-composite-for-unequal-depths.patch:
* Use Composite when depths don't match (Bug #309107, X.Org Bug
[#7447])
* Fri Sep 07 2007 - schwab@suse.de
- Update off-by-one patch.
- Remove empty patch.