Accepting request 114520 from home:vuntz:branches:X11:XOrg

New package, split from xorg-x11-driver-video

OBS-URL: https://build.opensuse.org/request/show/114520
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xf86-video-ati?expand=0&rev=1
This commit is contained in:
Stefan Dirsch 2012-04-19 09:39:24 +00:00 committed by Git OBS Bridge
commit ac37d6ba51
10 changed files with 350 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:844a2649eff6a3e92aff3e1837ea864f1561b4822b3e5d5ccb27b3b7fb8137b4
size 1113119

View File

@ -0,0 +1,56 @@
Index: xorg-x11-driver-video-7.5/xf86-video-ati-6.13.0/src/radeon_driver.c
===================================================================
--- xorg-x11-driver-video-7.5/xf86-video-ati-6.13.0.orig/src/radeon_driver.c
+++ xorg-x11-driver-video-7.5/xf86-video-ati-6.13.0/src/radeon_driver.c
@@ -223,6 +223,7 @@ struct RADEONInt10Save {
uint32_t MEM_CNTL;
uint32_t MEMSIZE;
uint32_t MPP_TB_CONFIG;
+ unsigned char MISC_OUT;
};
static Bool RADEONMapMMIO(ScrnInfoPtr pScrn);
@@ -278,14 +279,17 @@ RADEONPreInt10Save(ScrnInfoPtr pScrn, vo
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
uint32_t CardTmp;
- static struct RADEONInt10Save SaveStruct = { 0, 0, 0 };
+ static struct RADEONInt10Save SaveStruct = { 0, 0, 0, 0 };
if (!IS_AVIVO_VARIANT) {
+ OUTREG(0,RADEON_MEM_CNTL);
/* Save the values and zap MEM_CNTL */
SaveStruct.MEM_CNTL = INREG(RADEON_MEM_CNTL);
SaveStruct.MEMSIZE = INREG(RADEON_CONFIG_MEMSIZE);
SaveStruct.MPP_TB_CONFIG = INREG(RADEON_MPP_TB_CONFIG);
-
+#if !defined(__powerpc__) && !defined(__sparc__)
+ SaveStruct.MISC_OUT = inb(pScrn->domainIOBase + RADEON_GENMO_RD);
+#endif
/*
* Zap MEM_CNTL and set MPP_TB_CONFIG<31:24> to 4
*/
@@ -347,6 +351,14 @@ RADEONPostInt10Check(ScrnInfoPtr pScrn,
CardTmp |= (pSave->MPP_TB_CONFIG & 0xff000000u);
OUTREG(RADEON_MPP_TB_CONFIG, CardTmp);
}
+#if !defined(__powerpc__) && !defined(__sparc__)
+ if (CardTmp != pSave->MISC_OUT) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Restoring MiscOut (%x), setting to %x\n",
+ CardTmp, pSave->MEM_CNTL);
+ outb(pScrn->domainIOBase + RADEON_GENMO_WT, pSave->MISC_OUT);
+ }
+#endif
}
/* Allocate our private RADEONInfoRec */
@@ -3014,7 +3026,7 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, in
goto fail1;
}
-#if !defined(__alpha__)
+#if !defined(__alpha__) && !defined (__ia64__)
if (
#ifndef XSERVER_LIBPCIACCESS
xf86GetPciDomain(info->PciTag) ||

View File

@ -0,0 +1,26 @@
Index: xf86-video-ati-6.13.0/src/radeon_driver.c
===================================================================
--- xf86-video-ati-6.13.0.orig/src/radeon_driver.c
+++ xf86-video-ati-6.13.0/src/radeon_driver.c
@@ -3221,6 +3221,21 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, in
if (!RADEONPreInitControllers(pScrn))
goto fail;
+ /* Unless we're able to shrink/enlarge FB on the fly (GEM etc.), allocate
+ * large enough (TM) virtual size */
+ if (!pScrn->display->virtualX || !pScrn->display->virtualY) {
+ /* Have at least enough space for double buffering and z Buffer + some textures */
+ if (2 * 1920*1920 * (pScrn->bitsPerPixel/8) <= pScrn->videoRam / 4 * 1024) {
+ /* Fits on 128MB and up */
+ pScrn->display->virtualX = 2 * 1920;
+ pScrn->display->virtualY = 1920;
+ } else if (2 * 1680*1280 * (pScrn->bitsPerPixel/8) <= pScrn->videoRam / 4 * 1024) {
+ /* Fits on 64MB and up */
+ pScrn->display->virtualX = 2 * 1680;
+ pScrn->display->virtualY = 1280;
+ }
+ }
+
if (!xf86InitialConfiguration (pScrn, FALSE))
{
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");

View File

@ -0,0 +1,11 @@
--- xf86-video-ati-6.13.0/src/radeon_driver.c.orig 2010-03-15 17:27:28.000000000 +0100
+++ xf86-video-ati-6.13.0/src/radeon_driver.c 2010-04-10 11:04:12.000000000 +0200
@@ -2358,7 +2358,7 @@ static Bool RADEONPreInitDRI(ScrnInfoPtr
}
}
- if (!xf86ReturnOptValBool(info->Options, OPTION_DRI, TRUE)) {
+ if (!xf86ReturnOptValBool(info->Options, OPTION_DRI, FALSE)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Direct rendering forced off\n");
return FALSE;

View File

@ -0,0 +1,106 @@
Index: xorg-x11-driver-video-7.5/xf86-video-ati-6.13.0/src/radeon_driver.c
===================================================================
--- xorg-x11-driver-video-7.5/xf86-video-ati-6.13.0.orig/src/radeon_driver.c
+++ xorg-x11-driver-video-7.5/xf86-video-ati-6.13.0/src/radeon_driver.c
@@ -224,6 +224,7 @@ struct RADEONInt10Save {
uint32_t MEMSIZE;
uint32_t MPP_TB_CONFIG;
unsigned char MISC_OUT;
+ unsigned char ATTR[0x10];
};
static Bool RADEONMapMMIO(ScrnInfoPtr pScrn);
@@ -273,13 +274,67 @@ RADEONEntPtr RADEONEntPriv(ScrnInfoPtr p
return pPriv->ptr;
}
+#if !defined(__powerpc__) && !defined(__sparc__)
+/*
+ *
+ */
+void
+RADEONPreInt10SaveVGA(ScrnInfoPtr pScrn, struct RADEONInt10Save *pSave)
+{
+ IOADDRESS Base = pScrn->domainIOBase;
+ unsigned int Stat1Reg;
+ int i;
+
+ pSave->MISC_OUT = inb(pScrn->domainIOBase + RADEON_GENMO_RD);
+ Stat1Reg = (pSave->MISC_OUT & 0x1) ? 0x3DA : 0x3BA;
+ {
+ for (i = 0; i < 0x10; i++) {
+ inb(Base + Stat1Reg);
+ outb(Base + RADEON_ATTRX, i);
+ pSave->ATTR[i] = inb(Base + RADEON_ATTRDR);
+ }
+ }
+}
+
+/*
+ *
+ */
+void
+RADEONPostInt10CheckVGA(ScrnInfoPtr pScrn, struct RADEONInt10Save *pSave)
+{
+ IOADDRESS Base = pScrn->domainIOBase;
+ unsigned int Stat1Reg = (pSave->MISC_OUT & 0x1) ? 0x3DA : 0x3BA;
+ unsigned char CardTmp = inb(pScrn->domainIOBase + RADEON_GENMO_RD);
+ int i;
+
+ if (CardTmp != pSave->MISC_OUT) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Restoring MiscOut (%x), setting to %x\n",
+ CardTmp, pSave->MEM_CNTL);
+ outb(pScrn->domainIOBase + RADEON_GENMO_WT, pSave->MISC_OUT);
+ }
+
+ for (i = 0; i < 0x10; i++) {
+ inb(Base + Stat1Reg);
+ outb(Base + RADEON_ATTRX, i);
+ CardTmp = inb(Base + RADEON_ATTRDR);
+ if ( CardTmp != pSave->ATTR[i] ) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Restoring AttrReg[0x%i]: 0x%x to 0x%x\n",
+ i, CardTmp, pSave->ATTR[i]);
+ outb(Base + RADEON_ATTRDW, pSave->ATTR[i]);
+ }
+ }
+}
+#endif
+
static void
RADEONPreInt10Save(ScrnInfoPtr pScrn, void **pPtr)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
uint32_t CardTmp;
- static struct RADEONInt10Save SaveStruct = { 0, 0, 0, 0 };
+ static struct RADEONInt10Save SaveStruct = { 0, 0, 0, 0, {0} };
if (!IS_AVIVO_VARIANT) {
OUTREG(0,RADEON_MEM_CNTL);
@@ -287,8 +342,9 @@ RADEONPreInt10Save(ScrnInfoPtr pScrn, vo
SaveStruct.MEM_CNTL = INREG(RADEON_MEM_CNTL);
SaveStruct.MEMSIZE = INREG(RADEON_CONFIG_MEMSIZE);
SaveStruct.MPP_TB_CONFIG = INREG(RADEON_MPP_TB_CONFIG);
+
#if !defined(__powerpc__) && !defined(__sparc__)
- SaveStruct.MISC_OUT = inb(pScrn->domainIOBase + RADEON_GENMO_RD);
+ RADEONPreInt10SaveVGA(pScrn, &SaveStruct);
#endif
/*
* Zap MEM_CNTL and set MPP_TB_CONFIG<31:24> to 4
@@ -352,12 +408,7 @@ RADEONPostInt10Check(ScrnInfoPtr pScrn,
OUTREG(RADEON_MPP_TB_CONFIG, CardTmp);
}
#if !defined(__powerpc__) && !defined(__sparc__)
- if (CardTmp != pSave->MISC_OUT) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Restoring MiscOut (%x), setting to %x\n",
- CardTmp, pSave->MEM_CNTL);
- outb(pScrn->domainIOBase + RADEON_GENMO_WT, pSave->MISC_OUT);
- }
+ RADEONPostInt10CheckVGA(pScrn, pSave);
#endif
}

6
xf86-video-ati.changes Normal file
View File

@ -0,0 +1,6 @@
-------------------------------------------------------------------
Wed Apr 18 15:51:24 UTC 2012 - vuntz@opensuse.org
- Split xf86-video-ati from xorg-x11-driver-video.
Initial version: 6.14.3.

28
xf86-video-ati.diff Normal file
View File

@ -0,0 +1,28 @@
---
src/AtomBios/includes/CD_Structs.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: src/AtomBios/includes/CD_Structs.h
===================================================================
--- src/AtomBios/includes/CD_Structs.h.orig
+++ src/AtomBios/includes/CD_Structs.h
@@ -419,6 +419,10 @@ typedef struct _DEVICE_DATA {
#endif
+#if (PARSER_TYPE==DRIVER_TYPE_PARSER)
+#pragma pack(pop)
+#endif
+
struct _PARSER_TEMP_DATA;
typedef UINT32 WORKSPACE_POINTER;
@@ -479,8 +483,4 @@ typedef struct _INDIRECT_IO_PARSER_COMMA
UINT8 csize;
} INDIRECT_IO_PARSER_COMMANDS;
-#if (PARSER_TYPE==DRIVER_TYPE_PARSER)
-#pragma pack(pop)
-#endif
-
#endif

90
xf86-video-ati.spec Normal file
View File

@ -0,0 +1,90 @@
#
# spec file for package xf86-video-ati
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: xf86-video-ati
Version: 6.14.3
Release: 0
License: MIT
Summary: ATI video driver for the Xorg X server
Url: http://xorg.freedesktop.org/
Group: System/X11/Servers/XF86_4
Source0: http://xorg.freedesktop.org/releases/individual/driver/%{name}-%{version}.tar.bz2
Patch0: xf86-video-ati.diff
Patch1: xf86-video-ati-bug474071-fix2.diff
Patch2: xf86-video-ati-ia64_screen_blank.diff
Patch3: xf86-video-ati-bug519261-increase-virtual.diff
Patch4: xf86-video-ati-disable-dri-bug437651-ia64only.diff
BuildRequires: Mesa-devel
BuildRequires: pkg-config
BuildRequires: pkgconfig(libdrm) >= 2.2
BuildRequires: pkgconfig(libdrm_radeon)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(fontsproto)
BuildRequires: pkgconfig(pciaccess) >= 0.8.0
BuildRequires: pkgconfig(randrproto)
BuildRequires: pkgconfig(renderproto)
BuildRequires: pkgconfig(videoproto)
BuildRequires: pkgconfig(xextproto)
BuildRequires: pkgconfig(xf86driproto)
BuildRequires: pkgconfig(xorg-macros) >= 1.8
BuildRequires: pkgconfig(xorg-server) >= 1.3
BuildRequires: pkgconfig(xproto)
Requires: VIDEO_ABI_VERSION = 10
Supplements: xorg-x11-server
# This was part of the xorg-x11-driver-video package up to version 7.6
Conflicts: xorg-x11-driver-video <= 7.6
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
ati is an Xorg driver for ATI video cards.
It autodetects whether your hardware has a Radeon, Rage 128, or Mach64
or earlier class of chipset, and loads the radeon, r128, or mach64
driver as appropriate.
%prep
%setup -q
%patch0
%patch1 -p2
%patch2 -p2
%patch3 -p1
%ifarch ia64
%patch4 -p1
%endif
%build
%configure
make %{?_smp_mflags}
%install
%make_install
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%files
%defattr(-,root,root)
%doc ChangeLog COPYING README
%dir %{_libdir}/xorg/modules/drivers
%dir %{_libdir}/xorg/modules/multimedia
%{_libdir}/xorg/modules/drivers/ati_drv.so
%{_libdir}/xorg/modules/drivers/radeon_drv.so
%{_libdir}/xorg/modules/multimedia/theatre200_drv.so
%{_libdir}/xorg/modules/multimedia/theatre_detect_drv.so
%{_libdir}/xorg/modules/multimedia/theatre_drv.so
%{_datadir}/man/man4/ati.4%{?ext_man}
%{_datadir}/man/man4/radeon.4%{?ext_man}
%changelog