xserver-xorg-video-ati: Changes to 'debian-experimental'
ChangeLog | 515 ++
configure.ac | 177
debian/changelog | 58
debian/control | 29
debian/xserver-xorg-video-radeon.install | 1
man/radeon.man | 531 --
src/AtomBios/CD_Operations.c | 983 ----
src/AtomBios/Decoder.c | 258 -
src/AtomBios/hwserv_drv.c | 354 -
src/AtomBios/includes/CD_Common_Types.h | 172
src/AtomBios/includes/CD_Definitions.h | 50
src/AtomBios/includes/CD_Opcodes.h | 181
src/AtomBios/includes/CD_Structs.h | 486 --
src/AtomBios/includes/CD_binding.h | 46
src/AtomBios/includes/CD_hw_services.h | 318 -
src/AtomBios/includes/Decoder.h | 107
src/AtomBios/includes/ObjectID.h | 643 ---
src/AtomBios/includes/atombios.h | 6137 -----------------------------
src/AtomBios/includes/regsdef.h | 25
src/Makefile.am | 94
src/ati_pciids_gen.h | 86
src/atombios_crtc.c | 1541 -------
src/atombios_output.c | 2775 -------------
src/cayman_accel.c | 3
src/cayman_shader.c | 40
src/compat-api.h | 94
src/drmmode_display.c | 283 +
src/drmmode_display.h | 7
src/evergreen_accel.c | 213 -
src/evergreen_exa.c | 279 -
src/evergreen_shader.c | 40
src/evergreen_state.h | 3
src/evergreen_textured_videofuncs.c | 86
src/generic_bus.h | 36
src/legacy_crtc.c | 1898 ---------
src/legacy_output.c | 2102 ----------
src/pcidb/ati_pciids.csv | 86
src/pcidb/parse_pci_ids.pl | 4
src/r600_exa.c | 914 +---
src/r600_shader.c | 34
src/r600_state.h | 134
src/r600_textured_videofuncs.c | 131
src/r6xx_accel.c | 785 +--
src/radeon.h | 1251 ------
src/radeon_accel.c | 2026 +++------
src/radeon_accelfuncs.c | 1385 ------
src/radeon_atombios.c | 3019 --------------
src/radeon_atombios.h | 292 -
src/radeon_atomwrapper.c | 102
src/radeon_atomwrapper.h | 31
src/radeon_bios.c | 2052 ---------
src/radeon_bo_helper.c | 177
src/radeon_bo_helper.h | 31
src/radeon_chipinfo_gen.h | 86
src/radeon_chipset_gen.h | 88
src/radeon_commonfuncs.c | 1040 -----
src/radeon_crtc.c | 1119 -----
src/radeon_cursor.c | 449 --
src/radeon_dri.c | 2347 -----------
src/radeon_dri.h | 91
src/radeon_dri2.c | 450 +-
src/radeon_dri2.h | 46
src/radeon_driver.c | 6402 -------------------------------
src/radeon_drm.h | 23
src/radeon_dummy_bufmgr.h | 62
src/radeon_exa.c | 465 --
src/radeon_exa_funcs.c | 510 --
src/radeon_exa_render.c | 912 +---
src/radeon_exa_shared.c | 75
src/radeon_exa_shared.h | 3
src/radeon_glamor.c | 350 +
src/radeon_glamor.h | 98
src/radeon_glamor_wrappers.c | 1870 +++++++++
src/radeon_glamor_wrappers.h | 179
src/radeon_kms.c | 552 +-
src/radeon_legacy_memory.c | 143
src/radeon_macros.h | 209 -
src/radeon_mm_i2c.c | 642 ---
src/radeon_modes.c | 542 --
src/radeon_output.c | 3135 ---------------
src/radeon_pci_chipset_gen.h | 88
src/radeon_pci_device_match_gen.h | 86
src/radeon_pm.c | 886 ----
src/radeon_probe.c | 68
src/radeon_probe.h | 670 ---
src/radeon_render.c | 1060 -----
src/radeon_textured_video.c | 407 +
src/radeon_textured_videofuncs.c | 1870 +++------
src/radeon_tv.c | 1283 ------
src/radeon_tv.h | 62
src/radeon_vbo.c | 3
src/radeon_vbo.h | 10
src/radeon_version.h | 1
src/radeon_video.c | 3826 ------------------
src/radeon_video.h | 85
src/radeon_vip.c | 362 -
src/radeon_xvmc.c | 5
src/theatre.c | 2211 ----------
src/theatre.h | 71
src/theatre200.c | 2275 -----------
src/theatre200.h | 140
src/theatre200_module.c | 33
src/theatre_detect.c | 130
src/theatre_detect.h | 46
src/theatre_detect_module.c | 37
src/theatre_module.c | 33
src/theatre_reg.h | 876 ----
107 files changed, 8711 insertions(+), 62906 deletions(-)
New commits:
commit a2f2796b1c1c231c869296107f22f4a61339dfb5
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Mon Jul 16 15:12:29 2012 +0200
Require libdrm 2.6.36
diff --git a/debian/changelog b/debian/changelog
index 2218e01..cd3cc18 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ xserver-xorg-video-ati (1:6.99.99-1) UNRELEASED; urgency=low
* KMS-only release, only works with linux-any now.
* Bump to build against xserver 1.13rc1
+ * Require libdrm 2.6.36
-- Maarten Lankhorst <maarten.lankhorst@canonical.com> Mon, 16 Jul 2012 14:29:26 +0200
diff --git a/debian/control b/debian/control
index e82806f..fb51a82 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,7 @@ Build-Depends:
x11proto-fonts-dev,
x11proto-randr-dev (>= 1.2),
x11proto-render-dev,
- libdrm-dev (>= 2.4.33) [!hurd-i386],
+ libdrm-dev (>= 2.4.36) [!hurd-i386],
x11proto-dri2-dev,
x11proto-xf86dri-dev,
libudev-dev [linux-any],
commit e836ee5471aadb5166cc8c0f8d0073c29298dc91
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Mon Jul 16 15:10:11 2012 +0200
Fix things that are no longer built
diff --git a/debian/xserver-xorg-video-radeon.install b/debian/xserver-xorg-video-radeon.install
index 6b0d0fb..a10d00d 100644
--- a/debian/xserver-xorg-video-radeon.install
+++ b/debian/xserver-xorg-video-radeon.install
@@ -1,3 +1,2 @@
usr/lib/xorg/modules/drivers/radeon_drv.so
-usr/lib/xorg/modules/multimedia/*.so
usr/share/man/man4/radeon.4
commit 9ad5d4e3b410cc9664d24685bc4b5a68f9cc5929
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Mon Jul 16 15:06:26 2012 +0200
KMS-only release, only works with linux-any now.
diff --git a/debian/changelog b/debian/changelog
index 91e3226..2218e01 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
-xserver-xorg-video-ati (1:6.14.6-1) UNRELEASED; urgency=low
+xserver-xorg-video-ati (1:6.99.99-1) UNRELEASED; urgency=low
- * New upstream release, last one with UMS support.
+ * KMS-only release, only works with linux-any now.
* Bump to build against xserver 1.13rc1
-- Maarten Lankhorst <maarten.lankhorst@canonical.com> Mon, 16 Jul 2012 14:29:26 +0200
commit 6dddee56c0ebe9e2042e738cadf5991b2be75cb6
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Mon Jul 16 15:04:21 2012 +0200
New upstream release, last one with UMS support.
diff --git a/debian/changelog b/debian/changelog
index 1af49cb..91e3226 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
-xserver-xorg-video-ati (1:6.14.4-6) UNRELEASED; urgency=low
+xserver-xorg-video-ati (1:6.14.6-1) UNRELEASED; urgency=low
+ * New upstream release, last one with UMS support.
* Bump to build against xserver 1.13rc1
-- Maarten Lankhorst <maarten.lankhorst@canonical.com> Mon, 16 Jul 2012 14:29:26 +0200
commit 73017fe11c9397e52c64f47b76f18bdf582df481
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Mon Jul 16 14:32:02 2012 +0200
Bump to build against xserver 1.13rc1
diff --git a/debian/changelog b/debian/changelog
index 0d27730..1af49cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-ati (1:6.14.4-6) UNRELEASED; urgency=low
+
+ * Bump to build against xserver 1.13rc1
+
+ -- Maarten Lankhorst <maarten.lankhorst@canonical.com> Mon, 16 Jul 2012 14:29:26 +0200
+
xserver-xorg-video-ati (1:6.14.4-5) unstable; urgency=low
* Update radeon's long description to list the chips mentioned in the
diff --git a/debian/control b/debian/control
index da9d1cb..e82806f 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends:
dh-autoreconf,
quilt,
pkg-config,
- xserver-xorg-dev (>= 2:1.11.99.901),
+ xserver-xorg-dev (>= 2:1.12.99.901),
x11proto-gl-dev,
x11proto-xext-dev,
x11proto-core-dev,
commit 6ef1ad6a46348d3aecd8d1f5e94431ca2298853c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date: Fri Jul 13 11:15:25 2012 +0200
Deal more gracefully with DRI2 being unavailable at build or run time.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index e16d551..92241c7 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -29,13 +29,16 @@
#include "config.h"
#endif
+#include "radeon.h"
+#include "radeon_dri2.h"
+
+#ifdef DRI2
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
-#include "radeon.h"
-#include "radeon_dri2.h"
#include "radeon_version.h"
#if HAVE_LIST_H
@@ -1398,6 +1401,9 @@ radeon_dri2_screen_init(ScreenPtr pScreen)
Bool scheduling_works = TRUE;
#endif
+ if (!info->dri2.available)
+ return FALSE;
+
info->dri2.device_name = drmGetDeviceNameFromFd(info->dri2.drm_fd);
if ( (info->ChipFamily >= CHIP_FAMILY_TAHITI) ) {
@@ -1502,3 +1508,5 @@ void radeon_dri2_close_screen(ScreenPtr pScreen)
drmFree(info->dri2.device_name);
}
+#endif /* DRI2 */
+
diff --git a/src/radeon_dri2.h b/src/radeon_dri2.h
index 0dd2a33..aaad0ca 100644
--- a/src/radeon_dri2.h
+++ b/src/radeon_dri2.h
@@ -27,13 +27,18 @@
#ifndef RADEON_DRI2_H
#define RADEON_DRI2_H
+#include <xorg-server.h>
+
struct radeon_dri2 {
drmVersionPtr pKernelDRMVersion;
int drm_fd;
+ Bool available;
Bool enabled;
char *device_name;
};
+#ifdef DRI2
+
#include "dri2.h"
Bool radeon_dri2_screen_init(ScreenPtr pScreen);
void radeon_dri2_close_screen(ScreenPtr pScreen);
@@ -46,4 +51,42 @@ void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec,
void radeon_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec,
unsigned int tv_usec, void *event_data);
+#else
+
+static inline Bool radeon_dri2_screen_init(ScreenPtr pScreen) { return FALSE; }
+static inline void radeon_dri2_close_screen(ScreenPtr pScreen) {}
+
+static inline void
+radeon_dri2_dummy_event_handler(unsigned int frame, unsigned int tv_sec,
+ unsigned int tv_usec, void *event_data,
+ const char *name)
+{
+ static Bool warned;
+
+ if (!warned) {
+ ErrorF("%s called but DRI2 disabled at build time\n", name);
+ warned = TRUE;
+ }
+
+ free(event_data);
+}
+
+static inline void
+radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec,
+ unsigned int tv_usec, void *event_data)
+{
+ radeon_dri2_dummy_event_handler(frame, tv_sec, tv_usec, event_data,
+ __func__);
+}
+
+static inline void
+radeon_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec,
+ unsigned int tv_usec, void *event_data)
+{
+ radeon_dri2_dummy_event_handler(frame, tv_sec, tv_usec, event_data,
+ __func__);
+}
+
#endif
+
+#endif /* RADEON_DRI2_H */
diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index 714dde9..12dfd38 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -83,6 +83,9 @@ radeon_glamor_pre_init(ScrnInfoPtr scrn)
CARD32 version;
const char *s;
+ if (!info->dri2.available)
+ return FALSE;
+
s = xf86GetOptValString(info->Options, OPTION_ACCELMETHOD);
if (s == NULL)
return FALSE;
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 5cc362f..a4f46d7 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -425,6 +425,10 @@ shadowfb:
return TRUE;
}
+#ifdef DRI2
+ info->dri2.available = !!xf86LoadSubModule(pScrn, "dri2");
+#endif
+
if (radeon_glamor_pre_init(pScrn))
return TRUE;
@@ -740,6 +744,7 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
goto fail;
}
+ info->dri2.available = FALSE;
info->dri2.enabled = FALSE;
info->dri2.pKernelDRMVersion = drmGetVersion(info->dri2.drm_fd);
if (info->dri2.pKernelDRMVersion == NULL) {
commit ef8a404391036d8aa814dbda2407c789b8a64b92
Author: Michel Dänzer <michel.daenzer@amd.com>
Date: Thu Jul 5 20:14:48 2012 +0200
Initial SI support.
Defaults to shadowfb. 3D acceleration is available with glamor. 2D
acceleration is disabled until the radeonsi driver can handle glamor's
shaders.
v2: add chip flags (Alex Deucher)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
diff --git a/man/radeon.man b/man/radeon.man
index be50314..de1f6ec 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -180,6 +180,12 @@ Radeon HD 6430/6450/6470/6490
Radeon HD 6950/6970/6990
.TP 12
.B ARUBA
+.TP 12
+.B TAHITI
+.TP 12
+.B PITCAIRN
+.TP 12
+.B VERDE
.PD
.SH CONFIGURATION DETAILS
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
diff --git a/src/Makefile.am b/src/Makefile.am
index da94927..3ee292a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -68,6 +68,7 @@ if GLAMOR
AM_CFLAGS += @LIBGLAMOR_CFLAGS@
radeon_drv_la_LIBADD += @LIBGLAMOR_LIBS@
radeon_drv_la_SOURCES += \
+ radeon_glamor_wrappers.c \
radeon_glamor.c
endif
@@ -96,6 +97,7 @@ EXTRA_DIST = \
radeon_exa_funcs.c \
radeon_exa_shared.h \
radeon_glamor.h \
+ radeon_glamor_wrappers.h \
radeon.h \
radeon_probe.h \
radeon_reg.h \
diff --git a/src/ati_pciids_gen.h b/src/ati_pciids_gen.h
index b08ad88..5509120 100644
--- a/src/ati_pciids_gen.h
+++ b/src/ati_pciids_gen.h
@@ -617,3 +617,42 @@
#define PCI_CHIP_ARUBA_99A0 0x99A0
#define PCI_CHIP_ARUBA_99A2 0x99A2
#define PCI_CHIP_ARUBA_99A4 0x99A4
+#define PCI_CHIP_TAHITI_6780 0x6780
+#define PCI_CHIP_TAHITI_6784 0x6784
+#define PCI_CHIP_TAHITI_6788 0x6788
+#define PCI_CHIP_TAHITI_678A 0x678A
+#define PCI_CHIP_TAHITI_6790 0x6790
+#define PCI_CHIP_TAHITI_6798 0x6798
+#define PCI_CHIP_TAHITI_6799 0x6799
+#define PCI_CHIP_TAHITI_679A 0x679A
+#define PCI_CHIP_TAHITI_679E 0x679E
+#define PCI_CHIP_TAHITI_679F 0x679F
+#define PCI_CHIP_PITCAIRN_6800 0x6800
+#define PCI_CHIP_PITCAIRN_6801 0x6801
+#define PCI_CHIP_PITCAIRN_6802 0x6802
+#define PCI_CHIP_PITCAIRN_6808 0x6808
+#define PCI_CHIP_PITCAIRN_6809 0x6809
+#define PCI_CHIP_PITCAIRN_6810 0x6810
+#define PCI_CHIP_PITCAIRN_6818 0x6818
+#define PCI_CHIP_PITCAIRN_6819 0x6819
+#define PCI_CHIP_PITCAIRN_684C 0x684C
+#define PCI_CHIP_VERDE_6820 0x6820
+#define PCI_CHIP_VERDE_6821 0x6821
+#define PCI_CHIP_VERDE_6823 0x6823
+#define PCI_CHIP_VERDE_6824 0x6824
+#define PCI_CHIP_VERDE_6825 0x6825
+#define PCI_CHIP_VERDE_6826 0x6826
+#define PCI_CHIP_VERDE_6827 0x6827
+#define PCI_CHIP_VERDE_6828 0x6828
+#define PCI_CHIP_VERDE_6829 0x6829
+#define PCI_CHIP_VERDE_682B 0x682B
+#define PCI_CHIP_VERDE_682D 0x682D
+#define PCI_CHIP_VERDE_682F 0x682F
+#define PCI_CHIP_VERDE_6830 0x6830
+#define PCI_CHIP_VERDE_6831 0x6831
+#define PCI_CHIP_VERDE_6837 0x6837
+#define PCI_CHIP_VERDE_6838 0x6838
+#define PCI_CHIP_VERDE_6839 0x6839
+#define PCI_CHIP_VERDE_683B 0x683B
+#define PCI_CHIP_VERDE_683D 0x683D
+#define PCI_CHIP_VERDE_683F 0x683F
diff --git a/src/pcidb/ati_pciids.csv b/src/pcidb/ati_pciids.csv
index 501a0f6..29ff26b 100644
--- a/src/pcidb/ati_pciids.csv
+++ b/src/pcidb/ati_pciids.csv
@@ -618,3 +618,42 @@
"0x99A0","ARUBA_99A0","ARUBA",1,,,,,"ARUBA"
"0x99A2","ARUBA_99A2","ARUBA",1,,,,,"ARUBA"
"0x99A4","ARUBA_99A4","ARUBA",,,,,,"ARUBA"
+"0x6780","TAHITI_6780","TAHITI",,,,,,"TAHITI"
+"0x6784","TAHITI_6784","TAHITI",,,,,,"TAHITI"
+"0x6788","TAHITI_6788","TAHITI",,,,,,"TAHITI"
+"0x678A","TAHITI_678A","TAHITI",,,,,,"TAHITI"
+"0x6790","TAHITI_6790","TAHITI",,,,,,"TAHITI"
+"0x6798","TAHITI_6798","TAHITI",,,,,,"TAHITI"
+"0x6799","TAHITI_6799","TAHITI",,,,,,"TAHITI"
+"0x679A","TAHITI_679A","TAHITI",,,,,,"TAHITI"
+"0x679E","TAHITI_679E","TAHITI",,,,,,"TAHITI"
+"0x679F","TAHITI_679F","TAHITI",,,,,,"TAHITI"
+"0x6800","PITCAIRN_6800","PITCAIRN",1,,,,,"PITCAIRN"
+"0x6801","PITCAIRN_6801","PITCAIRN",1,,,,,"PITCAIRN"
+"0x6802","PITCAIRN_6802","PITCAIRN",1,,,,,"PITCAIRN"
+"0x6808","PITCAIRN_6808","PITCAIRN",,,,,,"PITCAIRN"
+"0x6809","PITCAIRN_6809","PITCAIRN",,,,,,"PITCAIRN"
+"0x6810","PITCAIRN_6810","PITCAIRN",,,,,,"PITCAIRN"
+"0x6818","PITCAIRN_6818","PITCAIRN",,,,,,"PITCAIRN"
+"0x6819","PITCAIRN_6819","PITCAIRN",,,,,,"PITCAIRN"
+"0x684C","PITCAIRN_684C","PITCAIRN",,,,,,"PITCAIRN"
+"0x6820","VERDE_6820","VERDE",1,,,,,"VERDE"
+"0x6821","VERDE_6821","VERDE",1,,,,,"VERDE"
+"0x6823","VERDE_6823","VERDE",1,,,,,"VERDE"
+"0x6824","VERDE_6824","VERDE",1,,,,,"VERDE"
+"0x6825","VERDE_6825","VERDE",1,,,,,"VERDE"
+"0x6826","VERDE_6826","VERDE",1,,,,,"VERDE"
+"0x6827","VERDE_6827","VERDE",1,,,,,"VERDE"
+"0x6828","VERDE_6828","VERDE",,,,,,"VERDE"
+"0x6829","VERDE_6829","VERDE",,,,,,"VERDE"
+"0x682B","VERDE_682B","VERDE",1,,,,,"VERDE"
+"0x682D","VERDE_682D","VERDE",1,,,,,"VERDE"
+"0x682F","VERDE_682F","VERDE",1,,,,,"VERDE"
+"0x6830","VERDE_6830","VERDE",1,,,,,"VERDE"
+"0x6831","VERDE_6831","VERDE",1,,,,,"VERDE"
+"0x6837","VERDE_6837","VERDE",,,,,,"VERDE"
+"0x6838","VERDE_6838","VERDE",,,,,,"VERDE"
+"0x6839","VERDE_6839","VERDE",,,,,,"VERDE"
+"0x683B","VERDE_683B","VERDE",,,,,,"VERDE"
+"0x683D","VERDE_683D","VERDE",,,,,,"VERDE"
+"0x683F","VERDE_683F","VERDE",,,,,,"VERDE"
diff --git a/src/radeon_chipinfo_gen.h b/src/radeon_chipinfo_gen.h
index c64c921..295a824 100644
--- a/src/radeon_chipinfo_gen.h
+++ b/src/radeon_chipinfo_gen.h
@@ -537,4 +537,43 @@ static RADEONCardInfo RADEONCards[] = {
{ 0x99A0, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
{ 0x99A2, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
{ 0x99A4, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
+ { 0x6780, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 },
+ { 0x6784, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 },
+ { 0x6788, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 },
+ { 0x678A, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 },
+ { 0x6790, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 },
+ { 0x6798, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 },
+ { 0x6799, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 },
+ { 0x679A, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 },
+ { 0x679E, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 },
+ { 0x679F, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 },
+ { 0x6800, CHIP_FAMILY_PITCAIRN, 1, 0, 0, 0, 0 },
+ { 0x6801, CHIP_FAMILY_PITCAIRN, 1, 0, 0, 0, 0 },
+ { 0x6802, CHIP_FAMILY_PITCAIRN, 1, 0, 0, 0, 0 },
+ { 0x6808, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 },
+ { 0x6809, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 },
+ { 0x6810, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 },
+ { 0x6818, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 },
+ { 0x6819, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 },
+ { 0x684C, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 },
+ { 0x6820, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x6821, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x6823, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x6824, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x6825, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x6826, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x6827, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x6828, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 },
+ { 0x6829, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 },
+ { 0x682B, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x682D, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x682F, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x6830, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x6831, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 },
+ { 0x6837, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 },
+ { 0x6838, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 },
+ { 0x6839, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 },
+ { 0x683B, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 },
+ { 0x683D, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 },
+ { 0x683F, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 },
};
diff --git a/src/radeon_chipset_gen.h b/src/radeon_chipset_gen.h
index 31b31ab..8e887ac 100644
--- a/src/radeon_chipset_gen.h
+++ b/src/radeon_chipset_gen.h
@@ -537,5 +537,44 @@ SymTabRec RADEONChipsets[] = {
{ PCI_CHIP_ARUBA_99A0, "ARUBA" },
{ PCI_CHIP_ARUBA_99A2, "ARUBA" },
{ PCI_CHIP_ARUBA_99A4, "ARUBA" },
+ { PCI_CHIP_TAHITI_6780, "TAHITI" },
+ { PCI_CHIP_TAHITI_6784, "TAHITI" },
+ { PCI_CHIP_TAHITI_6788, "TAHITI" },
+ { PCI_CHIP_TAHITI_678A, "TAHITI" },
+ { PCI_CHIP_TAHITI_6790, "TAHITI" },
+ { PCI_CHIP_TAHITI_6798, "TAHITI" },
+ { PCI_CHIP_TAHITI_6799, "TAHITI" },
+ { PCI_CHIP_TAHITI_679A, "TAHITI" },
+ { PCI_CHIP_TAHITI_679E, "TAHITI" },
+ { PCI_CHIP_TAHITI_679F, "TAHITI" },
+ { PCI_CHIP_PITCAIRN_6800, "PITCAIRN" },
+ { PCI_CHIP_PITCAIRN_6801, "PITCAIRN" },
+ { PCI_CHIP_PITCAIRN_6802, "PITCAIRN" },
+ { PCI_CHIP_PITCAIRN_6808, "PITCAIRN" },
+ { PCI_CHIP_PITCAIRN_6809, "PITCAIRN" },
+ { PCI_CHIP_PITCAIRN_6810, "PITCAIRN" },
+ { PCI_CHIP_PITCAIRN_6818, "PITCAIRN" },
+ { PCI_CHIP_PITCAIRN_6819, "PITCAIRN" },
+ { PCI_CHIP_PITCAIRN_684C, "PITCAIRN" },
+ { PCI_CHIP_VERDE_6820, "VERDE" },
+ { PCI_CHIP_VERDE_6821, "VERDE" },
+ { PCI_CHIP_VERDE_6823, "VERDE" },
+ { PCI_CHIP_VERDE_6824, "VERDE" },
+ { PCI_CHIP_VERDE_6825, "VERDE" },
+ { PCI_CHIP_VERDE_6826, "VERDE" },
+ { PCI_CHIP_VERDE_6827, "VERDE" },
+ { PCI_CHIP_VERDE_6828, "VERDE" },
+ { PCI_CHIP_VERDE_6829, "VERDE" },
+ { PCI_CHIP_VERDE_682B, "VERDE" },
+ { PCI_CHIP_VERDE_682D, "VERDE" },
+ { PCI_CHIP_VERDE_682F, "VERDE" },
+ { PCI_CHIP_VERDE_6830, "VERDE" },
+ { PCI_CHIP_VERDE_6831, "VERDE" },
+ { PCI_CHIP_VERDE_6837, "VERDE" },
+ { PCI_CHIP_VERDE_6838, "VERDE" },
+ { PCI_CHIP_VERDE_6839, "VERDE" },
+ { PCI_CHIP_VERDE_683B, "VERDE" },
+ { PCI_CHIP_VERDE_683D, "VERDE" },
+ { PCI_CHIP_VERDE_683F, "VERDE" },
{ -1, NULL }
};
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 12b198c..e16d551 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -1400,7 +1400,9 @@ radeon_dri2_screen_init(ScreenPtr pScreen)
info->dri2.device_name = drmGetDeviceNameFromFd(info->dri2.drm_fd);
- if ( (info->ChipFamily >= CHIP_FAMILY_R600) ) {
+ if ( (info->ChipFamily >= CHIP_FAMILY_TAHITI) ) {
+ dri2_info.driverName = SI_DRIVER_NAME;
+ } else if ( (info->ChipFamily >= CHIP_FAMILY_R600) ) {
dri2_info.driverName = R600_DRIVER_NAME;
} else if ( (info->ChipFamily >= CHIP_FAMILY_R300) ) {
dri2_info.driverName = R300_DRIVER_NAME;
diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index 232332e..714dde9 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -135,18 +135,85 @@ radeon_glamor_create_textured_pixmap(PixmapPtr pixmap)
return FALSE;
}
+Bool radeon_glamor_pixmap_is_offscreen(PixmapPtr pixmap)
+{
+ struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap);
+ return priv && priv->bo;
+}
+
+Bool radeon_glamor_prepare_access(PixmapPtr pixmap, glamor_access_t access)
+{
+ ScrnInfoPtr scrn = xf86ScreenToScrn(pixmap->drawable.pScreen);
+ RADEONInfoPtr info = RADEONPTR(scrn);
+ struct radeon_bo *bo;
+ int ret;
+
+ if (access == GLAMOR_GPU_ACCESS_RW || access == GLAMOR_GPU_ACCESS_RO)
+ return info->ChipFamily < CHIP_FAMILY_TAHITI;
+
+ bo = radeon_get_pixmap_bo(pixmap);
+ if (bo) {
+ /* When falling back to swrast, flush all pending operations */
+ if (info->ChipFamily < CHIP_FAMILY_TAHITI)
+ radeon_glamor_flush(scrn);
+
+ ret = radeon_bo_map(bo, 1);
+ if (ret) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "%s: bo map (tiling_flags %d, access %d) failed: %s\n",
+ __FUNCTION__,
+ radeon_get_pixmap_private(pixmap)->tiling_flags,
+ access,
+ strerror(-ret));
+ return FALSE;
+ }
+
+ pixmap->devPrivate.ptr = bo->ptr;
+ }
+
+ return TRUE;
+}
+
+void
+radeon_glamor_finish_access(PixmapPtr pixmap, glamor_access_t access)
+{
+ struct radeon_bo *bo;
+
+ switch(access) {
+ case GLAMOR_GPU_ACCESS_RW:
+ case GLAMOR_GPU_ACCESS_RO:
+ break;
+ case GLAMOR_CPU_ACCESS_RO:
+ case GLAMOR_CPU_ACCESS_RW:
+ bo = radeon_get_pixmap_bo(pixmap);
+ if (bo) {
+ radeon_bo_unmap(bo);
+ pixmap->devPrivate.ptr = NULL;
+ }
+ break;
+ default:
+ ErrorF("Invalid access mode %d\n", access);
+ }
+
+ return;
+}
+
static PixmapPtr
radeon_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
unsigned usage)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ RADEONInfoPtr info = RADEONPTR(scrn);
struct radeon_pixmap *priv;
PixmapPtr pixmap, new_pixmap = NULL;
if (!(usage & RADEON_CREATE_PIXMAP_DRI2)) {
- pixmap = glamor_create_pixmap(screen, w, h, depth, usage);
- if (pixmap)
- return pixmap;
+ if (info->ChipFamily < CHIP_FAMILY_TAHITI) {
+ pixmap = glamor_create_pixmap(screen, w, h, depth, usage);
+ if (pixmap)
+ return pixmap;
+ } else
+ return fbCreatePixmap(screen, w, h, depth, usage);
}
if (w > 32767 || h > 32767)
@@ -230,9 +297,13 @@ Bool
radeon_glamor_init(ScreenPtr screen)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ RADEONInfoPtr info = RADEONPTR(scrn);
+ unsigned int glamor_init_flags = GLAMOR_INVERTED_Y_AXIS | GLAMOR_USE_EGL_SCREEN;
- if (!glamor_init(screen, GLAMOR_INVERTED_Y_AXIS | GLAMOR_USE_EGL_SCREEN |
- GLAMOR_USE_SCREEN | GLAMOR_USE_PICTURE_SCREEN)) {
+ if (info->ChipFamily < CHIP_FAMILY_TAHITI)
+ glamor_init_flags |= GLAMOR_USE_SCREEN | GLAMOR_USE_PICTURE_SCREEN;
+
+ if (!glamor_init(screen, glamor_init_flags)) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to initialize glamor.\n");
return FALSE;
@@ -251,6 +322,13 @@ radeon_glamor_init(ScreenPtr screen)
#endif
return FALSE;
+ if (!(glamor_init_flags & GLAMOR_USE_SCREEN) &&
+ !glamor_screen_init(screen)) {
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+ "GLAMOR initialization failed\n");
+ return FALSE;
+ }
+
screen->CreatePixmap = radeon_glamor_create_pixmap;
screen->DestroyPixmap = radeon_glamor_destroy_pixmap;
diff --git a/src/radeon_glamor.h b/src/radeon_glamor.h
index 40c9092..f814e46 100644
--- a/src/radeon_glamor.h
+++ b/src/radeon_glamor.h
@@ -29,6 +29,7 @@
#ifdef USE_GLAMOR
+#include "radeon_glamor_wrappers.h"
#include "radeon_surface.h"
Bool radeon_glamor_pre_init(ScrnInfoPtr scrn);
@@ -42,6 +43,8 @@ Bool radeon_glamor_create_textured_pixmap(PixmapPtr pixmap);
void radeon_glamor_exchange_buffers(PixmapPtr src, PixmapPtr dst);
Bool radeon_glamor_pixmap_is_offscreen(PixmapPtr pixmap);
+Bool radeon_glamor_prepare_access(PixmapPtr pixmap, glamor_access_t access);
+void radeon_glamor_finish_access(PixmapPtr pixmap, glamor_access_t access);
struct radeon_pixmap {
struct radeon_surface surface;
@@ -85,6 +88,8 @@ static inline Bool radeon_glamor_create_textured_pixmap(PixmapPtr pixmap) { retu
static inline void radeon_glamor_exchange_buffers(PixmapPtr src, PixmapPtr dst) {}
static inline Bool radeon_glamor_pixmap_is_offscreen(PixmapPtr pixmap) { return FALSE; }
+static inline Bool radeon_glamor_prepare_access(PixmapPtr pixmap, int access) { return FALSE; }
+static inline void radeon_glamor_finish_access(PixmapPtr pixmap, int access) {}
static inline struct radeon_pixmap *radeon_get_pixmap_private(PixmapPtr pixmap) { return NULL; }
diff --git a/src/radeon_glamor_wrappers.c b/src/radeon_glamor_wrappers.c
new file mode 100644
index 0000000..d0eb383
--- /dev/null
+++ b/src/radeon_glamor_wrappers.c
@@ -0,0 +1,1870 @@
+/*
+ * Copyright � 2001 Keith Packard
+ * 2010 Intel Corporation
+ * 2012 Advanced Micro Devices, Inc.
+ *
+ * Partly based on code Copyright � 2008 Red Hat, Inc.
+ * Partly based on code Copyright � 2000 SuSE, Inc.
+ *
+ * Partly based on code that is Copyright � The XFree86 Project Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of the opyright holders not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. The copyright holders make no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdlib.h>
+
+#include "radeon_glamor_wrappers.h"
+#include "mipict.h"
+
+
+#if HAS_DEVPRIVATEKEYREC
+DevPrivateKeyRec glamor_screen_index;
+#else
+int glamor_screen_index;
+#endif
+
+/**
+ * glamor_get_drawable_pixmap() returns a backing pixmap for a given drawable.
+ *
+ * @param pDrawable the drawable being requested.
+ *
+ * This function returns the backing pixmap for a drawable, whether it is a
+ * redirected window, unredirected window, or already a pixmap. Note that
+ * coordinate translation is needed when drawing to the backing pixmap of a
+ * redirected window, and the translation coordinates are provided by calling
+ * glamor_get_drawable_pixmap() on the drawable.
+ */
+static PixmapPtr glamor_get_drawable_pixmap(DrawablePtr pDrawable)
+{
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ return pDrawable->pScreen->
+ GetWindowPixmap((WindowPtr) pDrawable);
+ else
+ return (PixmapPtr) pDrawable;
+}
+
+/**
+ * Sets the offsets to add to coordinates to make them address the same bits in
+ * the backing drawable. These coordinates are nonzero only for redirected
+ * windows.
+ */
+static void
+glamor_get_drawable_deltas(DrawablePtr pDrawable, PixmapPtr pPixmap,
+ int *xp, int *yp)
+{
+#ifdef COMPOSITE
+ if (pDrawable->type == DRAWABLE_WINDOW) {
+ *xp = -pPixmap->screen_x;
+ *yp = -pPixmap->screen_y;
+ return;
+ }
+#endif
+
+ *xp = 0;
+ *yp = 0;
+}
+
+/**
+ * glamor_drawable_is_offscreen() is a convenience wrapper for
+ * radeon_glamor_pixmap_is_offscreen().
+ */
+static Bool glamor_drawable_is_offscreen(DrawablePtr pDrawable)
+{
+ return radeon_glamor_pixmap_is_offscreen(glamor_get_drawable_pixmap(pDrawable));
+}
+
+/**
+ * glamor_prepare_access() is GLAMOR's wrapper for the driver's PrepareAccess() handler.
+ *
+ * It deals with waiting for synchronization with the card, determining if
+ * PrepareAccess() is necessary, and working around PrepareAccess() failure.
+ */
+static Bool glamor_prepare_access(DrawablePtr pDrawable, glamor_access_t access)
+{
+ PixmapPtr pPixmap = glamor_get_drawable_pixmap(pDrawable);
+
+ return radeon_glamor_prepare_access(pPixmap, access);
+}
+
+/**
+ * glamor_finish_access() is GLAMOR's wrapper for the driver's finish_access() handler.
+ *
+ * It deals with calling the driver's finish_access() only if necessary.
+ */
+static void glamor_finish_access(DrawablePtr pDrawable, glamor_access_t access)
+{
+ PixmapPtr pPixmap = glamor_get_drawable_pixmap(pDrawable);
+
+ radeon_glamor_finish_access(pPixmap, access);
+}
+
+static Bool glamor_prepare_access_window(WindowPtr pWin)
+{
+ if (pWin->backgroundState == BackgroundPixmap) {
+ if (!glamor_prepare_access
+ (&pWin->background.pixmap->drawable, GLAMOR_CPU_ACCESS_RO))
+ return FALSE;
+ }
+
+ if (pWin->borderIsPixel == FALSE) {
+ if (!glamor_prepare_access
+ (&pWin->border.pixmap->drawable, GLAMOR_CPU_ACCESS_RO)) {
+ if (pWin->backgroundState == BackgroundPixmap)
+ glamor_finish_access(&pWin->background.pixmap->
+ drawable, GLAMOR_CPU_ACCESS_RO);
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+static void glamor_finish_access_window(WindowPtr pWin)
+{
+ if (pWin->backgroundState == BackgroundPixmap)
+ glamor_finish_access(&pWin->background.pixmap->drawable, GLAMOR_CPU_ACCESS_RO);
+
+ if (pWin->borderIsPixel == FALSE)
+ glamor_finish_access(&pWin->border.pixmap->drawable, GLAMOR_CPU_ACCESS_RO);
+}
+
+static Bool glamor_change_window_attributes(WindowPtr pWin, unsigned long mask)
+{
+ Bool ret;
+
+ if (!glamor_prepare_access_window(pWin))
+ return FALSE;
+ ret = fbChangeWindowAttributes(pWin, mask);
+ glamor_finish_access_window(pWin);
+ return ret;
+}
+
+static RegionPtr glamor_bitmap_to_region(PixmapPtr pPix)
+{
+ RegionPtr ret;
+ if (!glamor_prepare_access(&pPix->drawable, GLAMOR_CPU_ACCESS_RO))
+ return NULL;
+ ret = fbPixmapToRegion(pPix);
+ glamor_finish_access(&pPix->drawable, GLAMOR_CPU_ACCESS_RO);
+ return ret;
+}
+
+void glamor_set_fallback_debug(ScreenPtr screen, Bool enable)
+{
+ glamor_screen_t *glamor_screen = glamor_get_screen(screen);
+
+ glamor_screen->fallback_debug = enable;
+}
+
+
+/*
+ * These functions wrap the low-level fb rendering functions and
+ * synchronize framebuffer/accelerated drawing by stalling until
+ * the accelerator is idle
+ */
+
+/**
+ * Calls glamor_prepare_access with GLAMOR_PREPARE_SRC for the tile, if that is the
+ * current fill style.
+ *
+ * Solid doesn't use an extra pixmap source, and Stippled/OpaqueStippled are
+ * 1bpp and never in fb, so we don't worry about them.
+ * We should worry about them for completeness sake and going forward.
+ */
+static Bool glamor_prepare_access_gc(GCPtr pGC)
+{
+ if (pGC->stipple)
+ if (!glamor_prepare_access(&pGC->stipple->drawable, GLAMOR_CPU_ACCESS_RO))
+ return FALSE;
+ if (pGC->fillStyle == FillTiled)
+ if (!glamor_prepare_access
+ (&pGC->tile.pixmap->drawable, GLAMOR_CPU_ACCESS_RO)) {
+ if (pGC->stipple)
Reply to: