summaryrefslogtreecommitdiff
path: root/driver/xf86-video-ati/src
diff options
context:
space:
mode:
Diffstat (limited to 'driver/xf86-video-ati/src')
-rw-r--r--driver/xf86-video-ati/src/Makefile.am1
-rw-r--r--driver/xf86-video-ati/src/Makefile.in596
-rw-r--r--driver/xf86-video-ati/src/ati_pciids_gen.h23
-rw-r--r--driver/xf86-video-ati/src/atombios_crtc.c24
-rw-r--r--driver/xf86-video-ati/src/atombios_output.c32
-rw-r--r--driver/xf86-video-ati/src/cayman_shader.c36
-rw-r--r--driver/xf86-video-ati/src/compat-api.h94
-rw-r--r--driver/xf86-video-ati/src/drmmode_display.c85
-rw-r--r--driver/xf86-video-ati/src/drmmode_display.h3
-rw-r--r--driver/xf86-video-ati/src/evergreen_exa.c191
-rw-r--r--driver/xf86-video-ati/src/evergreen_shader.c36
-rw-r--r--driver/xf86-video-ati/src/evergreen_textured_videofuncs.c51
-rw-r--r--driver/xf86-video-ati/src/generic_bus.h2
-rw-r--r--driver/xf86-video-ati/src/legacy_crtc.c8
-rw-r--r--driver/xf86-video-ati/src/pcidb/ati_pciids.csv23
-rw-r--r--driver/xf86-video-ati/src/r600_exa.c196
-rw-r--r--driver/xf86-video-ati/src/r600_shader.c34
-rw-r--r--driver/xf86-video-ati/src/r600_textured_videofuncs.c41
-rw-r--r--driver/xf86-video-ati/src/radeon.h16
-rw-r--r--driver/xf86-video-ati/src/radeon_accel.c49
-rw-r--r--driver/xf86-video-ati/src/radeon_accelfuncs.c2
-rw-r--r--driver/xf86-video-ati/src/radeon_atombios.c113
-rw-r--r--driver/xf86-video-ati/src/radeon_atombios.h5
-rw-r--r--driver/xf86-video-ati/src/radeon_bios.c20
-rw-r--r--driver/xf86-video-ati/src/radeon_chipinfo_gen.h23
-rw-r--r--driver/xf86-video-ati/src/radeon_chipset_gen.h23
-rw-r--r--driver/xf86-video-ati/src/radeon_crtc.c3
-rw-r--r--driver/xf86-video-ati/src/radeon_cursor.c2
-rw-r--r--driver/xf86-video-ati/src/radeon_dri.c40
-rw-r--r--driver/xf86-video-ati/src/radeon_dri2.c27
-rw-r--r--driver/xf86-video-ati/src/radeon_driver.c84
-rw-r--r--driver/xf86-video-ati/src/radeon_exa.c17
-rw-r--r--driver/xf86-video-ati/src/radeon_exa_funcs.c2
-rw-r--r--driver/xf86-video-ati/src/radeon_exa_render.c321
-rw-r--r--driver/xf86-video-ati/src/radeon_exa_shared.c38
-rw-r--r--driver/xf86-video-ati/src/radeon_exa_shared.h1
-rw-r--r--driver/xf86-video-ati/src/radeon_kms.c85
-rw-r--r--driver/xf86-video-ati/src/radeon_legacy_memory.c4
-rw-r--r--driver/xf86-video-ati/src/radeon_modes.c4
-rw-r--r--driver/xf86-video-ati/src/radeon_output.c58
-rw-r--r--driver/xf86-video-ati/src/radeon_pci_chipset_gen.h23
-rw-r--r--driver/xf86-video-ati/src/radeon_pci_device_match_gen.h23
-rw-r--r--driver/xf86-video-ati/src/radeon_probe.h27
-rw-r--r--driver/xf86-video-ati/src/radeon_textured_video.c2
-rw-r--r--driver/xf86-video-ati/src/radeon_video.c42
-rw-r--r--driver/xf86-video-ati/src/radeon_vip.c16
-rw-r--r--driver/xf86-video-ati/src/radeon_xvmc.c5
-rw-r--r--driver/xf86-video-ati/src/theatre.c12
-rw-r--r--driver/xf86-video-ati/src/theatre200.c93
-rw-r--r--driver/xf86-video-ati/src/theatre_detect.c13
50 files changed, 1593 insertions, 1076 deletions
diff --git a/driver/xf86-video-ati/src/Makefile.am b/driver/xf86-video-ati/src/Makefile.am
index dc77c0248..26ceda7f1 100644
--- a/driver/xf86-video-ati/src/Makefile.am
+++ b/driver/xf86-video-ati/src/Makefile.am
@@ -137,6 +137,7 @@ EXTRA_DIST = \
cayman_reg.h \
cayman_reg_auto.h \
cayman_shader.h \
+ compat-api.h \
ati.h \
ativersion.h \
bicubic_table.h \
diff --git a/driver/xf86-video-ati/src/Makefile.in b/driver/xf86-video-ati/src/Makefile.in
index c44422c7c..a88630e0f 100644
--- a/driver/xf86-video-ati/src/Makefile.in
+++ b/driver/xf86-video-ati/src/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,18 +41,32 @@
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
-install_sh_PROGRAM = ${SHELL} $(install_sh) -c
-install_sh_SCRIPT = ${SHELL} $(install_sh) -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
@@ -67,30 +81,48 @@ host_triplet = @host@
@XSERVER_LIBPCIACCESS_TRUE@am__append_2 = $(PCIACCESS_LIBS)
@LIBUDEV_TRUE@am__append_3 = $(LIBUDEV_LIBS)
subdir = src
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(install_sh) -d
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(ati_drv_ladir)" \
"$(DESTDIR)$(radeon_drv_ladir)" \
"$(DESTDIR)$(theatre200_drv_ladir)" \
"$(DESTDIR)$(theatre_detect_drv_ladir)" \
"$(DESTDIR)$(theatre_drv_ladir)"
-ati_drv_laLTLIBRARIES_INSTALL = $(INSTALL)
-radeon_drv_laLTLIBRARIES_INSTALL = $(INSTALL)
-theatre200_drv_laLTLIBRARIES_INSTALL = $(INSTALL)
-theatre_detect_drv_laLTLIBRARIES_INSTALL = $(INSTALL)
-theatre_drv_laLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(ati_drv_la_LTLIBRARIES) $(radeon_drv_la_LTLIBRARIES) \
$(theatre200_drv_la_LTLIBRARIES) \
$(theatre_detect_drv_la_LTLIBRARIES) \
@@ -100,6 +132,13 @@ am__DEPENDENCIES_1 =
@XSERVER_LIBPCIACCESS_TRUE@ $(am__DEPENDENCIES_1)
am_ati_drv_la_OBJECTS = ati.lo atimodule.lo
ati_drv_la_OBJECTS = $(am_ati_drv_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+ati_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(ati_drv_la_LDFLAGS) $(LDFLAGS) -o $@
@DRI_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
@XSERVER_LIBPCIACCESS_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
@LIBUDEV_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1)
@@ -148,42 +187,83 @@ am_radeon_drv_la_OBJECTS = radeon_accel.lo radeon_cursor.lo \
$(am__objects_2) $(am__objects_3) atombios_output.lo \
atombios_crtc.lo $(am__objects_4)
radeon_drv_la_OBJECTS = $(am_radeon_drv_la_OBJECTS)
+radeon_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(radeon_drv_la_LDFLAGS) $(LDFLAGS) -o $@
theatre200_drv_la_LIBADD =
am_theatre200_drv_la_OBJECTS = theatre200_drv_la-theatre200.lo \
theatre200_drv_la-theatre200_module.lo
theatre200_drv_la_OBJECTS = $(am_theatre200_drv_la_OBJECTS)
+theatre200_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(theatre200_drv_la_CFLAGS) $(CFLAGS) \
+ $(theatre200_drv_la_LDFLAGS) $(LDFLAGS) -o $@
theatre_detect_drv_la_LIBADD =
am_theatre_detect_drv_la_OBJECTS = theatre_detect.lo \
theatre_detect_module.lo
theatre_detect_drv_la_OBJECTS = $(am_theatre_detect_drv_la_OBJECTS)
+theatre_detect_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(theatre_detect_drv_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
theatre_drv_la_LIBADD =
am_theatre_drv_la_OBJECTS = theatre.lo theatre_module.lo
theatre_drv_la_OBJECTS = $(am_theatre_drv_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+theatre_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(theatre_drv_la_LDFLAGS) $(LDFLAGS) -o \
+ $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = $(ati_drv_la_SOURCES) $(radeon_drv_la_SOURCES) \
$(theatre200_drv_la_SOURCES) $(theatre_detect_drv_la_SOURCES) \
$(theatre_drv_la_SOURCES)
DIST_SOURCES = $(ati_drv_la_SOURCES) $(am__radeon_drv_la_SOURCES_DIST) \
$(theatre200_drv_la_SOURCES) $(theatre_detect_drv_la_SOURCES) \
$(theatre_drv_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APP_MAN_DIR = @APP_MAN_DIR@
@@ -209,11 +289,7 @@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRIVER_NAME = @DRIVER_NAME@
DRI_CFLAGS = @DRI_CFLAGS@
-DRI_FALSE = @DRI_FALSE@
DRI_LIBS = @DRI_LIBS@
-DRI_TRUE = @DRI_TRUE@
-DRM_MODE_FALSE = @DRM_MODE_FALSE@
-DRM_MODE_TRUE = @DRM_MODE_TRUE@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -225,8 +301,7 @@ FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
-HAVE_XEXTPROTO_71_FALSE = @HAVE_XEXTPROTO_71_FALSE@
-HAVE_XEXTPROTO_71_TRUE = @HAVE_XEXTPROTO_71_TRUE@
+INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -240,22 +315,19 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
-LIBUDEV_FALSE = @LIBUDEV_FALSE@
LIBUDEV_LIBS = @LIBUDEV_LIBS@
-LIBUDEV_TRUE = @LIBUDEV_TRUE@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@@ -267,6 +339,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
@@ -278,23 +351,19 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
-USE_EXA_FALSE = @USE_EXA_FALSE@
-USE_EXA_TRUE = @USE_EXA_TRUE@
VERSION = @VERSION@
XEXT_CFLAGS = @XEXT_CFLAGS@
XEXT_LIBS = @XEXT_LIBS@
-XF86DRM_MODE_FALSE = @XF86DRM_MODE_FALSE@
-XF86DRM_MODE_TRUE = @XF86DRM_MODE_TRUE@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
-XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@
-XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -306,6 +375,7 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
@@ -334,8 +404,12 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(am__append_1) \
$(am__append_2) $(am__append_3)
@DRI_TRUE@RADEON_DRI_SRCS = radeon_dri.c
@@ -429,6 +503,7 @@ EXTRA_DIST = \
cayman_reg.h \
cayman_reg_auto.h \
cayman_shader.h \
+ compat-api.h \
ati.h \
ativersion.h \
bicubic_table.h \
@@ -475,14 +550,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -500,151 +575,187 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-ati_drv_laLTLIBRARIES: $(ati_drv_la_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(ati_drv_ladir)" || $(mkdir_p) "$(DESTDIR)$(ati_drv_ladir)"
- @list='$(ati_drv_la_LTLIBRARIES)'; for p in $$list; do \
+ @list='$(ati_drv_la_LTLIBRARIES)'; test -n "$(ati_drv_ladir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(ati_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(ati_drv_ladir)/$$f'"; \
- $(LIBTOOL) --mode=install $(ati_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(ati_drv_ladir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(ati_drv_ladir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(ati_drv_ladir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(ati_drv_ladir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(ati_drv_ladir)"; \
+ }
uninstall-ati_drv_laLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(ati_drv_la_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(ati_drv_ladir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(ati_drv_ladir)/$$p"; \
+ @list='$(ati_drv_la_LTLIBRARIES)'; test -n "$(ati_drv_ladir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(ati_drv_ladir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(ati_drv_ladir)/$$f"; \
done
clean-ati_drv_laLTLIBRARIES:
-test -z "$(ati_drv_la_LTLIBRARIES)" || rm -f $(ati_drv_la_LTLIBRARIES)
- @list='$(ati_drv_la_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(ati_drv_la_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
install-radeon_drv_laLTLIBRARIES: $(radeon_drv_la_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(radeon_drv_ladir)" || $(mkdir_p) "$(DESTDIR)$(radeon_drv_ladir)"
- @list='$(radeon_drv_la_LTLIBRARIES)'; for p in $$list; do \
+ @list='$(radeon_drv_la_LTLIBRARIES)'; test -n "$(radeon_drv_ladir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(radeon_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(radeon_drv_ladir)/$$f'"; \
- $(LIBTOOL) --mode=install $(radeon_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(radeon_drv_ladir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(radeon_drv_ladir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(radeon_drv_ladir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(radeon_drv_ladir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(radeon_drv_ladir)"; \
+ }
uninstall-radeon_drv_laLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(radeon_drv_la_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(radeon_drv_ladir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(radeon_drv_ladir)/$$p"; \
+ @list='$(radeon_drv_la_LTLIBRARIES)'; test -n "$(radeon_drv_ladir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(radeon_drv_ladir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(radeon_drv_ladir)/$$f"; \
done
clean-radeon_drv_laLTLIBRARIES:
-test -z "$(radeon_drv_la_LTLIBRARIES)" || rm -f $(radeon_drv_la_LTLIBRARIES)
- @list='$(radeon_drv_la_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(radeon_drv_la_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
install-theatre200_drv_laLTLIBRARIES: $(theatre200_drv_la_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(theatre200_drv_ladir)" || $(mkdir_p) "$(DESTDIR)$(theatre200_drv_ladir)"
- @list='$(theatre200_drv_la_LTLIBRARIES)'; for p in $$list; do \
+ @list='$(theatre200_drv_la_LTLIBRARIES)'; test -n "$(theatre200_drv_ladir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(theatre200_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(theatre200_drv_ladir)/$$f'"; \
- $(LIBTOOL) --mode=install $(theatre200_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(theatre200_drv_ladir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(theatre200_drv_ladir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(theatre200_drv_ladir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(theatre200_drv_ladir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(theatre200_drv_ladir)"; \
+ }
uninstall-theatre200_drv_laLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(theatre200_drv_la_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(theatre200_drv_ladir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(theatre200_drv_ladir)/$$p"; \
+ @list='$(theatre200_drv_la_LTLIBRARIES)'; test -n "$(theatre200_drv_ladir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(theatre200_drv_ladir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(theatre200_drv_ladir)/$$f"; \
done
clean-theatre200_drv_laLTLIBRARIES:
-test -z "$(theatre200_drv_la_LTLIBRARIES)" || rm -f $(theatre200_drv_la_LTLIBRARIES)
- @list='$(theatre200_drv_la_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(theatre200_drv_la_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
install-theatre_detect_drv_laLTLIBRARIES: $(theatre_detect_drv_la_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(theatre_detect_drv_ladir)" || $(mkdir_p) "$(DESTDIR)$(theatre_detect_drv_ladir)"
- @list='$(theatre_detect_drv_la_LTLIBRARIES)'; for p in $$list; do \
+ @list='$(theatre_detect_drv_la_LTLIBRARIES)'; test -n "$(theatre_detect_drv_ladir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(theatre_detect_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(theatre_detect_drv_ladir)/$$f'"; \
- $(LIBTOOL) --mode=install $(theatre_detect_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(theatre_detect_drv_ladir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(theatre_detect_drv_ladir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(theatre_detect_drv_ladir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(theatre_detect_drv_ladir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(theatre_detect_drv_ladir)"; \
+ }
uninstall-theatre_detect_drv_laLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(theatre_detect_drv_la_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(theatre_detect_drv_ladir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(theatre_detect_drv_ladir)/$$p"; \
+ @list='$(theatre_detect_drv_la_LTLIBRARIES)'; test -n "$(theatre_detect_drv_ladir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(theatre_detect_drv_ladir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(theatre_detect_drv_ladir)/$$f"; \
done
clean-theatre_detect_drv_laLTLIBRARIES:
-test -z "$(theatre_detect_drv_la_LTLIBRARIES)" || rm -f $(theatre_detect_drv_la_LTLIBRARIES)
- @list='$(theatre_detect_drv_la_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(theatre_detect_drv_la_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
install-theatre_drv_laLTLIBRARIES: $(theatre_drv_la_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(theatre_drv_ladir)" || $(mkdir_p) "$(DESTDIR)$(theatre_drv_ladir)"
- @list='$(theatre_drv_la_LTLIBRARIES)'; for p in $$list; do \
+ @list='$(theatre_drv_la_LTLIBRARIES)'; test -n "$(theatre_drv_ladir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(theatre_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(theatre_drv_ladir)/$$f'"; \
- $(LIBTOOL) --mode=install $(theatre_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(theatre_drv_ladir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(theatre_drv_ladir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(theatre_drv_ladir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(theatre_drv_ladir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(theatre_drv_ladir)"; \
+ }
uninstall-theatre_drv_laLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(theatre_drv_la_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(theatre_drv_ladir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(theatre_drv_ladir)/$$p"; \
+ @list='$(theatre_drv_la_LTLIBRARIES)'; test -n "$(theatre_drv_ladir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(theatre_drv_ladir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(theatre_drv_ladir)/$$f"; \
done
clean-theatre_drv_laLTLIBRARIES:
-test -z "$(theatre_drv_la_LTLIBRARIES)" || rm -f $(theatre_drv_la_LTLIBRARIES)
- @list='$(theatre_drv_la_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-ati_drv.la: $(ati_drv_la_OBJECTS) $(ati_drv_la_DEPENDENCIES)
- $(LINK) -rpath $(ati_drv_ladir) $(ati_drv_la_LDFLAGS) $(ati_drv_la_OBJECTS) $(ati_drv_la_LIBADD) $(LIBS)
-radeon_drv.la: $(radeon_drv_la_OBJECTS) $(radeon_drv_la_DEPENDENCIES)
- $(LINK) -rpath $(radeon_drv_ladir) $(radeon_drv_la_LDFLAGS) $(radeon_drv_la_OBJECTS) $(radeon_drv_la_LIBADD) $(LIBS)
-theatre200_drv.la: $(theatre200_drv_la_OBJECTS) $(theatre200_drv_la_DEPENDENCIES)
- $(LINK) -rpath $(theatre200_drv_ladir) $(theatre200_drv_la_LDFLAGS) $(theatre200_drv_la_OBJECTS) $(theatre200_drv_la_LIBADD) $(LIBS)
-theatre_detect_drv.la: $(theatre_detect_drv_la_OBJECTS) $(theatre_detect_drv_la_DEPENDENCIES)
- $(LINK) -rpath $(theatre_detect_drv_ladir) $(theatre_detect_drv_la_LDFLAGS) $(theatre_detect_drv_la_OBJECTS) $(theatre_detect_drv_la_LIBADD) $(LIBS)
-theatre_drv.la: $(theatre_drv_la_OBJECTS) $(theatre_drv_la_DEPENDENCIES)
- $(LINK) -rpath $(theatre_drv_ladir) $(theatre_drv_la_LDFLAGS) $(theatre_drv_la_OBJECTS) $(theatre_drv_la_LIBADD) $(LIBS)
+ @list='$(theatre_drv_la_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+ati_drv.la: $(ati_drv_la_OBJECTS) $(ati_drv_la_DEPENDENCIES) $(EXTRA_ati_drv_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(ati_drv_la_LINK) -rpath $(ati_drv_ladir) $(ati_drv_la_OBJECTS) $(ati_drv_la_LIBADD) $(LIBS)
+radeon_drv.la: $(radeon_drv_la_OBJECTS) $(radeon_drv_la_DEPENDENCIES) $(EXTRA_radeon_drv_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(radeon_drv_la_LINK) -rpath $(radeon_drv_ladir) $(radeon_drv_la_OBJECTS) $(radeon_drv_la_LIBADD) $(LIBS)
+theatre200_drv.la: $(theatre200_drv_la_OBJECTS) $(theatre200_drv_la_DEPENDENCIES) $(EXTRA_theatre200_drv_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(theatre200_drv_la_LINK) -rpath $(theatre200_drv_ladir) $(theatre200_drv_la_OBJECTS) $(theatre200_drv_la_LIBADD) $(LIBS)
+theatre_detect_drv.la: $(theatre_detect_drv_la_OBJECTS) $(theatre_detect_drv_la_DEPENDENCIES) $(EXTRA_theatre_detect_drv_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(theatre_detect_drv_la_LINK) -rpath $(theatre_detect_drv_ladir) $(theatre_detect_drv_la_OBJECTS) $(theatre_detect_drv_la_LIBADD) $(LIBS)
+theatre_drv.la: $(theatre_drv_la_OBJECTS) $(theatre_drv_la_DEPENDENCIES) $(EXTRA_theatre_drv_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(theatre_drv_la_LINK) -rpath $(theatre_drv_ladir) $(theatre_drv_la_OBJECTS) $(theatre_drv_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -705,60 +816,60 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theatre_module.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
CD_Operations.lo: AtomBios/CD_Operations.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT CD_Operations.lo -MD -MP -MF "$(DEPDIR)/CD_Operations.Tpo" -c -o CD_Operations.lo `test -f 'AtomBios/CD_Operations.c' || echo '$(srcdir)/'`AtomBios/CD_Operations.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/CD_Operations.Tpo" "$(DEPDIR)/CD_Operations.Plo"; else rm -f "$(DEPDIR)/CD_Operations.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='AtomBios/CD_Operations.c' object='CD_Operations.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT CD_Operations.lo -MD -MP -MF $(DEPDIR)/CD_Operations.Tpo -c -o CD_Operations.lo `test -f 'AtomBios/CD_Operations.c' || echo '$(srcdir)/'`AtomBios/CD_Operations.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/CD_Operations.Tpo $(DEPDIR)/CD_Operations.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='AtomBios/CD_Operations.c' object='CD_Operations.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o CD_Operations.lo `test -f 'AtomBios/CD_Operations.c' || echo '$(srcdir)/'`AtomBios/CD_Operations.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o CD_Operations.lo `test -f 'AtomBios/CD_Operations.c' || echo '$(srcdir)/'`AtomBios/CD_Operations.c
Decoder.lo: AtomBios/Decoder.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Decoder.lo -MD -MP -MF "$(DEPDIR)/Decoder.Tpo" -c -o Decoder.lo `test -f 'AtomBios/Decoder.c' || echo '$(srcdir)/'`AtomBios/Decoder.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/Decoder.Tpo" "$(DEPDIR)/Decoder.Plo"; else rm -f "$(DEPDIR)/Decoder.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='AtomBios/Decoder.c' object='Decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Decoder.lo -MD -MP -MF $(DEPDIR)/Decoder.Tpo -c -o Decoder.lo `test -f 'AtomBios/Decoder.c' || echo '$(srcdir)/'`AtomBios/Decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Decoder.Tpo $(DEPDIR)/Decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='AtomBios/Decoder.c' object='Decoder.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Decoder.lo `test -f 'AtomBios/Decoder.c' || echo '$(srcdir)/'`AtomBios/Decoder.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Decoder.lo `test -f 'AtomBios/Decoder.c' || echo '$(srcdir)/'`AtomBios/Decoder.c
hwserv_drv.lo: AtomBios/hwserv_drv.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hwserv_drv.lo -MD -MP -MF "$(DEPDIR)/hwserv_drv.Tpo" -c -o hwserv_drv.lo `test -f 'AtomBios/hwserv_drv.c' || echo '$(srcdir)/'`AtomBios/hwserv_drv.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/hwserv_drv.Tpo" "$(DEPDIR)/hwserv_drv.Plo"; else rm -f "$(DEPDIR)/hwserv_drv.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='AtomBios/hwserv_drv.c' object='hwserv_drv.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hwserv_drv.lo -MD -MP -MF $(DEPDIR)/hwserv_drv.Tpo -c -o hwserv_drv.lo `test -f 'AtomBios/hwserv_drv.c' || echo '$(srcdir)/'`AtomBios/hwserv_drv.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/hwserv_drv.Tpo $(DEPDIR)/hwserv_drv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='AtomBios/hwserv_drv.c' object='hwserv_drv.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hwserv_drv.lo `test -f 'AtomBios/hwserv_drv.c' || echo '$(srcdir)/'`AtomBios/hwserv_drv.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hwserv_drv.lo `test -f 'AtomBios/hwserv_drv.c' || echo '$(srcdir)/'`AtomBios/hwserv_drv.c
theatre200_drv_la-theatre200.lo: theatre200.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theatre200_drv_la_CFLAGS) $(CFLAGS) -MT theatre200_drv_la-theatre200.lo -MD -MP -MF "$(DEPDIR)/theatre200_drv_la-theatre200.Tpo" -c -o theatre200_drv_la-theatre200.lo `test -f 'theatre200.c' || echo '$(srcdir)/'`theatre200.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/theatre200_drv_la-theatre200.Tpo" "$(DEPDIR)/theatre200_drv_la-theatre200.Plo"; else rm -f "$(DEPDIR)/theatre200_drv_la-theatre200.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='theatre200.c' object='theatre200_drv_la-theatre200.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theatre200_drv_la_CFLAGS) $(CFLAGS) -MT theatre200_drv_la-theatre200.lo -MD -MP -MF $(DEPDIR)/theatre200_drv_la-theatre200.Tpo -c -o theatre200_drv_la-theatre200.lo `test -f 'theatre200.c' || echo '$(srcdir)/'`theatre200.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/theatre200_drv_la-theatre200.Tpo $(DEPDIR)/theatre200_drv_la-theatre200.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='theatre200.c' object='theatre200_drv_la-theatre200.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theatre200_drv_la_CFLAGS) $(CFLAGS) -c -o theatre200_drv_la-theatre200.lo `test -f 'theatre200.c' || echo '$(srcdir)/'`theatre200.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theatre200_drv_la_CFLAGS) $(CFLAGS) -c -o theatre200_drv_la-theatre200.lo `test -f 'theatre200.c' || echo '$(srcdir)/'`theatre200.c
theatre200_drv_la-theatre200_module.lo: theatre200_module.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theatre200_drv_la_CFLAGS) $(CFLAGS) -MT theatre200_drv_la-theatre200_module.lo -MD -MP -MF "$(DEPDIR)/theatre200_drv_la-theatre200_module.Tpo" -c -o theatre200_drv_la-theatre200_module.lo `test -f 'theatre200_module.c' || echo '$(srcdir)/'`theatre200_module.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/theatre200_drv_la-theatre200_module.Tpo" "$(DEPDIR)/theatre200_drv_la-theatre200_module.Plo"; else rm -f "$(DEPDIR)/theatre200_drv_la-theatre200_module.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='theatre200_module.c' object='theatre200_drv_la-theatre200_module.lo' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theatre200_drv_la_CFLAGS) $(CFLAGS) -MT theatre200_drv_la-theatre200_module.lo -MD -MP -MF $(DEPDIR)/theatre200_drv_la-theatre200_module.Tpo -c -o theatre200_drv_la-theatre200_module.lo `test -f 'theatre200_module.c' || echo '$(srcdir)/'`theatre200_module.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/theatre200_drv_la-theatre200_module.Tpo $(DEPDIR)/theatre200_drv_la-theatre200_module.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='theatre200_module.c' object='theatre200_drv_la-theatre200_module.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theatre200_drv_la_CFLAGS) $(CFLAGS) -c -o theatre200_drv_la-theatre200_module.lo `test -f 'theatre200_module.c' || echo '$(srcdir)/'`theatre200_module.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theatre200_drv_la_CFLAGS) $(CFLAGS) -c -o theatre200_drv_la-theatre200_module.lo `test -f 'theatre200_module.c' || echo '$(srcdir)/'`theatre200_module.c
mostlyclean-libtool:
-rm -f *.lo
@@ -766,83 +877,99 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/pcidb
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -851,7 +978,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(ati_drv_ladir)" "$(DESTDIR)$(radeon_drv_ladir)" "$(DESTDIR)$(theatre200_drv_ladir)" "$(DESTDIR)$(theatre_detect_drv_ladir)" "$(DESTDIR)$(theatre_drv_ladir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -863,16 +990,22 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -889,7 +1022,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -897,6 +1030,8 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
@@ -907,12 +1042,30 @@ install-data-am: install-ati_drv_laLTLIBRARIES \
install-theatre_detect_drv_laLTLIBRARIES \
install-theatre_drv_laLTLIBRARIES
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -933,35 +1086,40 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-ati_drv_laLTLIBRARIES uninstall-info-am \
+uninstall-am: uninstall-ati_drv_laLTLIBRARIES \
uninstall-radeon_drv_laLTLIBRARIES \
uninstall-theatre200_drv_laLTLIBRARIES \
uninstall-theatre_detect_drv_laLTLIBRARIES \
uninstall-theatre_drv_laLTLIBRARIES
+.MAKE: install-am install-strip
+
.PHONY: CTAGS GTAGS all all-am check check-am clean \
clean-ati_drv_laLTLIBRARIES clean-generic clean-libtool \
clean-radeon_drv_laLTLIBRARIES \
clean-theatre200_drv_laLTLIBRARIES \
clean-theatre_detect_drv_laLTLIBRARIES \
- clean-theatre_drv_laLTLIBRARIES ctags distclean \
+ clean-theatre_drv_laLTLIBRARIES cscopelist ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-ati_drv_laLTLIBRARIES install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-radeon_drv_laLTLIBRARIES \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-radeon_drv_laLTLIBRARIES \
install-strip install-theatre200_drv_laLTLIBRARIES \
install-theatre_detect_drv_laLTLIBRARIES \
install-theatre_drv_laLTLIBRARIES installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-ati_drv_laLTLIBRARIES uninstall-info-am \
+ uninstall-am uninstall-ati_drv_laLTLIBRARIES \
uninstall-radeon_drv_laLTLIBRARIES \
uninstall-theatre200_drv_laLTLIBRARIES \
uninstall-theatre_detect_drv_laLTLIBRARIES \
uninstall-theatre_drv_laLTLIBRARIES
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/driver/xf86-video-ati/src/ati_pciids_gen.h b/driver/xf86-video-ati/src/ati_pciids_gen.h
index 77e41ac80..b08ad88fd 100644
--- a/driver/xf86-video-ati/src/ati_pciids_gen.h
+++ b/driver/xf86-video-ati/src/ati_pciids_gen.h
@@ -460,6 +460,7 @@
#define PCI_CHIP_SUMO2_9645 0x9645
#define PCI_CHIP_SUMO_9647 0x9647
#define PCI_CHIP_SUMO_9648 0x9648
+#define PCI_CHIP_SUMO_9649 0x9649
#define PCI_CHIP_SUMO_964A 0x964A
#define PCI_CHIP_SUMO_964B 0x964B
#define PCI_CHIP_SUMO_964C 0x964C
@@ -479,6 +480,7 @@
#define PCI_CHIP_PALM_9807 0x9807
#define PCI_CHIP_PALM_9808 0x9808
#define PCI_CHIP_PALM_9809 0x9809
+#define PCI_CHIP_PALM_980A 0x980A
#define PCI_CHIP_CYPRESS_6880 0x6880
#define PCI_CHIP_CYPRESS_6888 0x6888
#define PCI_CHIP_CYPRESS_6889 0x6889
@@ -560,6 +562,7 @@
#define PCI_CHIP_TURKS_6747 0x6747
#define PCI_CHIP_TURKS_6748 0x6748
#define PCI_CHIP_TURKS_6749 0x6749
+#define PCI_CHIP_TURKS_674A 0x674A
#define PCI_CHIP_TURKS_6750 0x6750
#define PCI_CHIP_TURKS_6751 0x6751
#define PCI_CHIP_TURKS_6758 0x6758
@@ -585,6 +588,7 @@
#define PCI_CHIP_CAICOS_6767 0x6767
#define PCI_CHIP_CAICOS_6768 0x6768
#define PCI_CHIP_CAICOS_6770 0x6770
+#define PCI_CHIP_CAICOS_6771 0x6771
#define PCI_CHIP_CAICOS_6772 0x6772
#define PCI_CHIP_CAICOS_6778 0x6778
#define PCI_CHIP_CAICOS_6779 0x6779
@@ -593,6 +597,23 @@
#define PCI_CHIP_ARUBA_9901 0x9901
#define PCI_CHIP_ARUBA_9903 0x9903
#define PCI_CHIP_ARUBA_9904 0x9904
-#define PCI_CHIP_ARUBA_990f 0x990f
+#define PCI_CHIP_ARUBA_9905 0x9905
+#define PCI_CHIP_ARUBA_9906 0x9906
+#define PCI_CHIP_ARUBA_9907 0x9907
+#define PCI_CHIP_ARUBA_9908 0x9908
+#define PCI_CHIP_ARUBA_9909 0x9909
+#define PCI_CHIP_ARUBA_990A 0x990A
+#define PCI_CHIP_ARUBA_990F 0x990F
+#define PCI_CHIP_ARUBA_9910 0x9910
+#define PCI_CHIP_ARUBA_9913 0x9913
+#define PCI_CHIP_ARUBA_9917 0x9917
+#define PCI_CHIP_ARUBA_9918 0x9918
+#define PCI_CHIP_ARUBA_9919 0x9919
#define PCI_CHIP_ARUBA_9990 0x9990
#define PCI_CHIP_ARUBA_9991 0x9991
+#define PCI_CHIP_ARUBA_9992 0x9992
+#define PCI_CHIP_ARUBA_9993 0x9993
+#define PCI_CHIP_ARUBA_9994 0x9994
+#define PCI_CHIP_ARUBA_99A0 0x99A0
+#define PCI_CHIP_ARUBA_99A2 0x99A2
+#define PCI_CHIP_ARUBA_99A4 0x99A4
diff --git a/driver/xf86-video-ati/src/atombios_crtc.c b/driver/xf86-video-ati/src/atombios_crtc.c
index 8b89bcd51..d0eefa5fd 100644
--- a/driver/xf86-video-ati/src/atombios_crtc.c
+++ b/driver/xf86-video-ati/src/atombios_crtc.c
@@ -86,7 +86,7 @@ atombios_lock_crtc(atomBiosHandlePtr atomBIOS, int crtc, int lock)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &crtc_data;
- if (RHDAtomBiosFunc(atomBIOS->scrnIndex, atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(atomBIOS->pScrn, atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("%s CRTC %d success\n", lock? "Lock":"Unlock", crtc);
return ATOM_SUCCESS ;
}
@@ -109,7 +109,7 @@ atombios_enable_crtc(atomBiosHandlePtr atomBIOS, int crtc, int state)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &crtc_data;
- if (RHDAtomBiosFunc(atomBIOS->scrnIndex, atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(atomBIOS->pScrn, atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("%s CRTC %d success\n", state? "Enable":"Disable", crtc);
return ATOM_SUCCESS ;
}
@@ -132,7 +132,7 @@ atombios_enable_crtc_memreq(atomBiosHandlePtr atomBIOS, int crtc, int state)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &crtc_data;
- if (RHDAtomBiosFunc(atomBIOS->scrnIndex, atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(atomBIOS->pScrn, atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("%s CRTC memreq %d success\n", state? "Enable":"Disable", crtc);
return ATOM_SUCCESS ;
}
@@ -156,7 +156,7 @@ atombios_blank_crtc(atomBiosHandlePtr atomBIOS, int crtc, int state)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &crtc_data;
- if (RHDAtomBiosFunc(atomBIOS->scrnIndex, atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(atomBIOS->pScrn, atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("%s CRTC %d success\n", state? "Blank":"Unblank", crtc);
return ATOM_SUCCESS ;
}
@@ -230,7 +230,7 @@ atombios_set_crtc_timing(xf86CrtcPtr crtc, DisplayModePtr mode)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &param;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Set CRTC Timing success\n");
return ATOM_SUCCESS ;
}
@@ -281,7 +281,7 @@ atombios_set_crtc_dtd_timing(xf86CrtcPtr crtc, DisplayModePtr mode)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &param;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Set DTD CRTC Timing success\n");
return ATOM_SUCCESS ;
}
@@ -450,7 +450,7 @@ static uint32_t atombios_adjust_pll(xf86CrtcPtr crtc, DisplayModePtr mode, int *
args.v1.ucEncodeMode = atombios_get_encoder_mode(output);
ErrorF("before %d\n", args.v1.usPixelClock);
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
adjusted_clock = le16_to_cpu(args.v1.usPixelClock) * 10;
}
ErrorF("after %d\n", args.v1.usPixelClock);
@@ -468,7 +468,7 @@ static uint32_t atombios_adjust_pll(xf86CrtcPtr crtc, DisplayModePtr mode, int *
// args.v3.sInput.ucDispPllConfig |= DISPPLL_CONFIG_SS_ENABLE;
ErrorF("before %d 0x%x\n", args.v3.sInput.usPixelClock, args.v3.sInput.ucDispPllConfig);
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
adjusted_clock = args.v3.sOutput.ulDispPllFreq * 10;
if (args.v3.sOutput.ucRefDiv) {
pll_flags |= RADEON_PLL_USE_REF_DIV;
@@ -567,7 +567,7 @@ atombios_crtc_set_dcpll(xf86CrtcPtr crtc)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &args;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Set DCPLL success\n");
return;
}
@@ -709,7 +709,7 @@ atombios_crtc_set_pll(xf86CrtcPtr crtc, DisplayModePtr mode)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &args;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Set CRTC %d PLL success\n", radeon_crtc->crtc_id);
return;
}
@@ -1025,10 +1025,10 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc,
/* need to redraw front buffer, I guess this can be considered a hack ? */
/* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
if (pScrn->pScreen)
- xf86EnableDisableFBAccess(pScrn->scrnIndex, FALSE);
+ xf86EnableDisableFBAccess(XF86_ENABLEDISABLEFB_ARG(pScrn), FALSE);
RADEONChangeSurfaces(pScrn);
if (pScrn->pScreen)
- xf86EnableDisableFBAccess(pScrn->scrnIndex, TRUE);
+ xf86EnableDisableFBAccess(XF86_ENABLEDISABLEFB_ARG(pScrn), TRUE);
/* xf86SetRootClip would do, but can't access that here */
}
diff --git a/driver/xf86-video-ati/src/atombios_output.c b/driver/xf86-video-ati/src/atombios_output.c
index bfaeb6ba3..6c908870e 100644
--- a/driver/xf86-video-ati/src/atombios_output.c
+++ b/driver/xf86-video-ati/src/atombios_output.c
@@ -233,7 +233,7 @@ atombios_output_dac_setup(xf86OutputPtr output, int action)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &disp_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Output DAC%d setup success\n", num);
return ATOM_SUCCESS;
}
@@ -297,7 +297,7 @@ atombios_output_tv_setup(xf86OutputPtr output, int action)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &disp_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Output TV setup success\n");
return ATOM_SUCCESS;
}
@@ -332,7 +332,7 @@ atombios_external_tmds_setup(xf86OutputPtr output, int action)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &disp_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("External TMDS setup success\n");
return ATOM_SUCCESS;
}
@@ -363,7 +363,7 @@ atombios_output_ddia_setup(xf86OutputPtr output, int action)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &disp_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("DDIA setup success\n");
return ATOM_SUCCESS;
}
@@ -502,7 +502,7 @@ atombios_output_digital_setup(xf86OutputPtr output, int action)
data.exec.index = index;
data.exec.dataSpace = (void *)&space;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Output digital setup success\n");
return ATOM_SUCCESS;
}
@@ -825,7 +825,7 @@ atombios_output_dig_encoder_setup(xf86OutputPtr output, int action)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &disp_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Output DIG%d encoder setup success\n", radeon_output->dig_encoder);
return ATOM_SUCCESS;
}
@@ -1010,7 +1010,7 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int action, uint8_t
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &disp_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
if (IS_DCE32_VARIANT)
ErrorF("Output UNIPHY%d transmitter setup success\n", num);
else
@@ -1295,7 +1295,7 @@ atombios_output_yuv_setup(xf86OutputPtr output, Bool enable)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &disp_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
OUTREG(reg, temp);
@@ -1356,7 +1356,7 @@ atombios_output_overscan_setup(xf86OutputPtr output, DisplayModePtr mode, Displa
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &overscan_param;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Set CRTC %d Overscan success\n", radeon_crtc->crtc_id);
return ATOM_SUCCESS ;
}
@@ -1439,7 +1439,7 @@ atombios_output_scaler_setup(xf86OutputPtr output)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &disp_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
if (radeon_output->active_device & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT)
&& info->ChipFamily >= CHIP_FAMILY_RV515 && info->ChipFamily <= CHIP_FAMILY_RV570) {
ErrorF("forcing TV scaler\n");
@@ -1548,7 +1548,7 @@ atombios_output_dpms(xf86OutputPtr output, int mode)
reg = INREG(RADEON_BIOS_3_SCRATCH);
OUTREG(RADEON_BIOS_3_SCRATCH, reg & ~ATOM_S3_DFP2I_ACTIVE);
}
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS)
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS)
ErrorF("Output %s enable success\n",
device_name[radeon_get_device_index(radeon_output->active_device)]);
else
@@ -1580,7 +1580,7 @@ atombios_output_dpms(xf86OutputPtr output, int mode)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &disp_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data)
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data)
== ATOM_SUCCESS)
ErrorF("Output %s disable success\n",
device_name[radeon_get_device_index(radeon_output->active_device)]);
@@ -1734,7 +1734,7 @@ atombios_set_output_crtc_source(xf86OutputPtr output)
data.exec.index = index;
data.exec.dataSpace = (void *)&space;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Set CRTC %d Source success\n", radeon_crtc->crtc_id);
return;
}
@@ -2005,7 +2005,7 @@ atom_bios_dac_load_detect(atomBiosHandlePtr atomBIOS, xf86OutputPtr output)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &dac_data;
- if (RHDAtomBiosFunc(atomBIOS->scrnIndex, atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(atomBIOS->pScrn, atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Dac detection success\n");
return ATOM_SUCCESS ;
}
@@ -2118,7 +2118,7 @@ retry:
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &args;
- RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data);
+ RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data);
if (args.v1.ucReplyStatus && !args.v1.ucDataOutLen) {
if (args.v1.ucReplyStatus == 0x20 && retry_count++ < 10)
goto retry;
@@ -2159,7 +2159,7 @@ RADEONDPEncoderService(xf86OutputPtr output, int action, uint8_t ucconfig, uint8
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &args;
- RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data);
+ RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data);
ErrorF("%s: %d %d\n", __func__, action, args.ucStatus);
return args.ucStatus;
diff --git a/driver/xf86-video-ati/src/cayman_shader.c b/driver/xf86-video-ati/src/cayman_shader.c
index 01b612ad3..18e9f5077 100644
--- a/driver/xf86-video-ati/src/cayman_shader.c
+++ b/driver/xf86-video-ati/src/cayman_shader.c
@@ -1338,7 +1338,7 @@ int cayman_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader)
shader[i++] = CF_DWORD1(POP_COUNT(0),
CF_CONST(0),
COND(SQ_CF_COND_ACTIVE),
- I_COUNT(2),
+ I_COUNT(1),
VALID_PIXEL_MODE(0),
CF_INST(SQ_CF_INST_TC),
BARRIER(1));
@@ -1365,8 +1365,8 @@ int cayman_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader)
shader[i++] = TEX_DWORD1(DST_GPR(1),
DST_REL(ABSOLUTE),
DST_SEL_X(SQ_SEL_X),
- DST_SEL_Y(SQ_SEL_MASK),
- DST_SEL_Z(SQ_SEL_MASK),
+ DST_SEL_Y(SQ_SEL_Y),
+ DST_SEL_Z(SQ_SEL_Z),
DST_SEL_W(SQ_SEL_1),
LOD_BIAS(0),
COORD_TYPE_X(TEX_NORMALIZED),
@@ -1382,36 +1382,6 @@ int cayman_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader)
SRC_SEL_Z(SQ_SEL_0),
SRC_SEL_W(SQ_SEL_1));
shader[i++] = TEX_DWORD_PAD;
- /* 34/35 */
- shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE),
- INST_MOD(0),
- FETCH_WHOLE_QUAD(0),
- RESOURCE_ID(1),
- SRC_GPR(0),
- SRC_REL(ABSOLUTE),
- ALT_CONST(0),
- RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE),
- SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE));
- shader[i++] = TEX_DWORD1(DST_GPR(1),
- DST_REL(ABSOLUTE),
- DST_SEL_X(SQ_SEL_MASK),
- DST_SEL_Y(SQ_SEL_X),
- DST_SEL_Z(SQ_SEL_Y),
- DST_SEL_W(SQ_SEL_MASK),
- LOD_BIAS(0),
- COORD_TYPE_X(TEX_NORMALIZED),
- COORD_TYPE_Y(TEX_NORMALIZED),
- COORD_TYPE_Z(TEX_NORMALIZED),
- COORD_TYPE_W(TEX_NORMALIZED));
- shader[i++] = TEX_DWORD2(OFFSET_X(0),
- OFFSET_Y(0),
- OFFSET_Z(0),
- SAMPLER_ID(1),
- SRC_SEL_X(SQ_SEL_X),
- SRC_SEL_Y(SQ_SEL_Y),
- SRC_SEL_Z(SQ_SEL_0),
- SRC_SEL_W(SQ_SEL_1));
- shader[i++] = TEX_DWORD_PAD;
return i;
}
diff --git a/driver/xf86-video-ati/src/compat-api.h b/driver/xf86-video-ati/src/compat-api.h
new file mode 100644
index 000000000..b299f83ce
--- /dev/null
+++ b/driver/xf86-video-ati/src/compat-api.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2012 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Dave Airlie <airlied@redhat.com>
+ */
+
+/* this file provides API compat between server post 1.13 and pre it,
+ it should be reused inside as many drivers as possible */
+#ifndef COMPAT_API_H
+#define COMPAT_API_H
+
+#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
+#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
+#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
+#endif
+
+#ifndef XF86_HAS_SCRN_CONV
+#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
+#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
+#endif
+
+#ifndef XF86_SCRN_INTERFACE
+
+#define SCRN_ARG_TYPE int
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
+
+#define SCREEN_ARG_TYPE int
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
+
+#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
+
+#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
+#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
+
+#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
+#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
+
+#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
+
+#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
+
+#define FREE_SCREEN_ARGS_DECL int arg, int flags
+
+#define VT_FUNC_ARGS_DECL int arg, int flags
+#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags)
+
+#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
+#else
+#define SCRN_ARG_TYPE ScrnInfoPtr
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
+
+#define SCREEN_ARG_TYPE ScreenPtr
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
+
+#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
+
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
+#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
+
+#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
+#define CLOSE_SCREEN_ARGS pScreen
+
+#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
+#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
+
+#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
+
+#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
+#define VT_FUNC_ARGS(flags) pScrn
+
+#define XF86_ENABLEDISABLEFB_ARG(x) (x)
+
+#endif
+
+#endif
diff --git a/driver/xf86-video-ati/src/drmmode_display.c b/driver/xf86-video-ati/src/drmmode_display.c
index f11fc8c80..dbbf011d7 100644
--- a/driver/xf86-video-ati/src/drmmode_display.c
+++ b/driver/xf86-video-ati/src/drmmode_display.c
@@ -53,7 +53,7 @@ static PixmapPtr drmmode_create_bo_pixmap(ScrnInfoPtr pScrn,
int width, int height,
int depth, int bpp,
int pitch, int tiling,
- struct radeon_bo *bo)
+ struct radeon_bo *bo, struct radeon_surface *psurf)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
ScreenPtr pScreen = pScrn->pScreen;
@@ -73,7 +73,9 @@ static PixmapPtr drmmode_create_bo_pixmap(ScrnInfoPtr pScrn,
radeon_set_pixmap_bo(pixmap, bo);
if (info->ChipFamily >= CHIP_FAMILY_R600) {
surface = radeon_get_pixmap_surface(pixmap);
- if (surface) {
+ if (surface && psurf)
+ *surface = *psurf;
+ else if (surface) {
memset(surface, 0, sizeof(struct radeon_surface));
surface->npix_x = width;
surface->npix_y = height;
@@ -177,11 +179,12 @@ drmmode_ConvertToKMode(ScrnInfoPtr scrn,
static void
drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
{
-#if 0
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
-// drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
// drmmode_ptr drmmode = drmmode_crtc->drmmode;
+ drmmode_crtc->dpms_mode = mode;
+
+#if 0
/* bonghits in the randr 1.2 - uses dpms to disable crtc - bad buzz */
if (mode == DPMSModeOff) {
// drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
@@ -192,42 +195,41 @@ drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
static PixmapPtr
create_pixmap_for_fbcon(drmmode_ptr drmmode,
- ScrnInfoPtr pScrn, int crtc_id)
+ ScrnInfoPtr pScrn, int fbcon_id)
{
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- drmmode_crtc_private_ptr drmmode_crtc;
- PixmapPtr pixmap;
+ PixmapPtr pixmap = NULL;
struct radeon_bo *bo;
drmModeFBPtr fbcon;
struct drm_gem_flink flink;
- drmmode_crtc = xf86_config->crtc[crtc_id]->driver_private;
-
- fbcon = drmModeGetFB(drmmode->fd, drmmode_crtc->mode_crtc->buffer_id);
+ fbcon = drmModeGetFB(drmmode->fd, fbcon_id);
if (fbcon == NULL)
return NULL;
+ if (fbcon->depth != pScrn->depth ||
+ fbcon->width != pScrn->virtualX ||
+ fbcon->height != pScrn->virtualY)
+ goto out_free_fb;
+
flink.handle = fbcon->handle;
if (ioctl(drmmode->fd, DRM_IOCTL_GEM_FLINK, &flink) < 0) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Couldn't flink fbcon handle\n");
- return NULL;
+ goto out_free_fb;
}
bo = radeon_bo_open(drmmode->bufmgr, flink.name, 0, 0, 0, 0);
if (bo == NULL) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Couldn't allocate bo for fbcon handle\n");
- return NULL;
+ goto out_free_fb;
}
pixmap = drmmode_create_bo_pixmap(pScrn, fbcon->width, fbcon->height,
fbcon->depth, fbcon->bpp,
- fbcon->pitch, 0, bo);
- if (!pixmap)
- return NULL;
-
+ fbcon->pitch, 0, bo, NULL);
radeon_bo_unref(bo);
+out_free_fb:
drmModeFreeFB(fbcon);
return pixmap;
}
@@ -238,27 +240,28 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
RADEONInfoPtr info = RADEONPTR(pScrn);
PixmapPtr src, dst;
ScreenPtr pScreen = pScrn->pScreen;
- int crtc_id = 0;
+ int fbcon_id = 0;
int i;
int pitch;
uint32_t tiling_flags = 0;
Bool ret;
if (info->accelOn == FALSE)
- return;
+ goto fallback;
for (i = 0; i < xf86_config->num_crtc; i++) {
- xf86CrtcPtr crtc = xf86_config->crtc[i];
- drmmode_crtc_private_ptr drmmode_crtc;
+ drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[i]->driver_private;
- drmmode_crtc = crtc->driver_private;
if (drmmode_crtc->mode_crtc->buffer_id)
- crtc_id = i;
+ fbcon_id = drmmode_crtc->mode_crtc->buffer_id;
}
- src = create_pixmap_for_fbcon(drmmode, pScrn, crtc_id);
+ if (!fbcon_id)
+ goto fallback;
+
+ src = create_pixmap_for_fbcon(drmmode, pScrn, fbcon_id);
if (!src)
- return;
+ goto fallback;
if (info->allowColorTiling) {
if (info->ChipFamily >= CHIP_FAMILY_R600) {
@@ -278,7 +281,7 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
dst = drmmode_create_bo_pixmap(pScrn, pScrn->virtualX,
pScrn->virtualY, pScrn->depth,
pScrn->bitsPerPixel, pitch,
- tiling_flags, info->front_bo);
+ tiling_flags, info->front_bo, &info->front_surface);
if (!dst)
goto out_free_src;
@@ -297,7 +300,15 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
drmmode_destroy_bo_pixmap(dst);
out_free_src:
drmmode_destroy_bo_pixmap(src);
+ return;
+fallback:
+ /* map and memset the bo */
+ if (radeon_bo_map(info->front_bo, 1))
+ return;
+
+ memset(info->front_bo->ptr, 0x00, info->front_bo->size);
+ radeon_bo_unmap(info->front_bo);
}
static Bool
@@ -551,7 +562,7 @@ drmmode_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
pScrn->depth,
pScrn->bitsPerPixel,
rotate_pitch,
- 0, drmmode_crtc->rotate_bo);
+ 0, drmmode_crtc->rotate_bo, NULL);
if (rotate_pixmap == NULL) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Couldn't allocate shadow pixmap for rotated CRTC\n");
@@ -1243,7 +1254,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
RADEONInfoPtr info = RADEONPTR(scrn);
struct radeon_bo *old_front = NULL;
Bool ret;
- ScreenPtr screen = screenInfo.screens[scrn->scrnIndex];
+ ScreenPtr screen = xf86ScrnToScreen(scrn);
uint32_t old_fb_id;
int i, pitch, old_width, old_height, old_pitch;
int screen_size;
@@ -1467,6 +1478,7 @@ drmmode_flip_handler(int fd, unsigned int frame, unsigned int tv_sec,
}
#endif
+
static void
drm_wakeup_handler(pointer data, int err, pointer p)
{
@@ -1511,16 +1523,16 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
drmmode->event_context.page_flip_handler = drmmode_flip_handler;
#endif
- return TRUE;
+ return TRUE;
}
void drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
{
- RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
- RADEONInfoPtr info = RADEONPTR(pScrn);
+ RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
+ RADEONInfoPtr info = RADEONPTR(pScrn);
- if (pRADEONEnt->fd_wakeup_registered != serverGeneration &&
- info->dri->pKernelDRMVersion->version_minor >= 4) {
+ if (pRADEONEnt->fd_wakeup_registered != serverGeneration &&
+ info->dri->pKernelDRMVersion->version_minor >= 4) {
AddGeneralSocket(drmmode->fd);
RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
drm_wakeup_handler, drmmode);
@@ -1545,7 +1557,7 @@ void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, struct ra
drmmode_crtc->cursor_bo = bo;
}
-void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y, int flags)
+void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
xf86OutputPtr output = config->output[config->compat_output];
@@ -1707,7 +1719,7 @@ drmmode_handle_uevents(int fd, void *closure)
if (!dev)
return;
- RRGetInfo(screenInfo.screens[scrn->scrnIndex], TRUE);
+ RRGetInfo(xf86ScrnToScreen(scrn), TRUE);
udev_device_unref(dev);
}
#endif
@@ -1860,5 +1872,6 @@ error_out:
strerror(errno));
return FALSE;
}
+
#endif
#endif
diff --git a/driver/xf86-video-ati/src/drmmode_display.h b/driver/xf86-video-ati/src/drmmode_display.h
index dff03929e..04a868828 100644
--- a/driver/xf86-video-ati/src/drmmode_display.h
+++ b/driver/xf86-video-ati/src/drmmode_display.h
@@ -73,6 +73,7 @@ typedef struct {
struct radeon_bo *cursor_bo;
struct radeon_bo *rotate_bo;
unsigned rotate_fb_id;
+ int dpms_mode;
uint16_t lut_r[256], lut_g[256], lut_b[256];
} drmmode_crtc_private_rec, *drmmode_crtc_private_ptr;
@@ -102,7 +103,7 @@ extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp);
extern void drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
extern Bool drmmode_set_bufmgr(ScrnInfoPtr pScrn, drmmode_ptr drmmode, struct radeon_bo_manager *bufmgr);
extern void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, struct radeon_bo *bo);
-void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y, int flags);
+void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y);
extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
extern void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn);
diff --git a/driver/xf86-video-ati/src/evergreen_exa.c b/driver/xf86-video-ati/src/evergreen_exa.c
index cee3ec250..1e829bfd5 100644
--- a/driver/xf86-video-ati/src/evergreen_exa.c
+++ b/driver/xf86-video-ati/src/evergreen_exa.c
@@ -58,7 +58,7 @@ extern int cayman_comp_ps(RADEONChipFamily ChipSet, uint32_t* ps);
static Bool
EVERGREENPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
cb_config_t cb_conf;
@@ -214,7 +214,7 @@ EVERGREENPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
static void
EVERGREENDoneSolid(PixmapPtr pPix)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -230,7 +230,7 @@ EVERGREENDoneSolid(PixmapPtr pPix)
static void
EVERGREENSolid(PixmapPtr pPix, int x1, int y1, int x2, int y2)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
float *vb;
@@ -401,7 +401,7 @@ EVERGREENDoCopy(ScrnInfoPtr pScrn)
static void
EVERGREENDoCopyVline(PixmapPtr pPix)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -450,7 +450,7 @@ EVERGREENPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst,
int rop,
Pixel planemask)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
struct r600_accel_object src_obj, dst_obj;
@@ -539,7 +539,7 @@ EVERGREENPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst,
static void
EVERGREENDoneCopy(PixmapPtr pDst)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -557,7 +557,7 @@ EVERGREENCopy(PixmapPtr pDst,
int dstX, int dstY,
int w, int h)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -748,17 +748,8 @@ static Bool EVERGREENCheckCompositeTexture(PicturePtr pPict,
int op,
int unit)
{
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
unsigned int i;
- int max_tex_w, max_tex_h;
-
- max_tex_w = 16384;
- max_tex_h = 16384;
-
- if ((w > max_tex_w) || (h > max_tex_h))
- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h));
for (i = 0; i < sizeof(EVERGREENTexFormats) / sizeof(EVERGREENTexFormats[0]); i++) {
if (EVERGREENTexFormats[i].fmt == pPict->format)
@@ -795,12 +786,19 @@ static Bool EVERGREENCheckCompositeTexture(PicturePtr pPict,
static void EVERGREENXFormSetup(PicturePtr pPict, PixmapPtr pPix,
int unit, float *vs_alu_consts)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
int const_offset = unit * 8;
+ int w, h;
+
+ if (pPict->pDrawable) {
+ w = pPict->pDrawable->width;
+ h = pPict->pDrawable->height;
+ } else {
+ w = 1;
+ h = 1;
+ }
if (pPict->transform != 0) {
accel_state->is_transform[unit] = TRUE;
@@ -834,12 +832,10 @@ static void EVERGREENXFormSetup(PicturePtr pPict, PixmapPtr pPix,
static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
int unit)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+ unsigned int repeatType;
unsigned int i;
tex_resource_t tex_res;
tex_sampler_t tex_samp;
@@ -854,9 +850,17 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
}
/* Texture */
+ if (pPict->pDrawable) {
+ tex_res.w = pPict->pDrawable->width;
+ tex_res.h = pPict->pDrawable->height;
+ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+ } else {
+ tex_res.w = 1;
+ tex_res.h = 1;
+ repeatType = RepeatNormal;
+ }
+
tex_res.id = unit;
- tex_res.w = w;
- tex_res.h = h;
tex_res.pitch = accel_state->src_obj[unit].pitch;
tex_res.depth = 0;
tex_res.dim = SQ_TEX_DIM_2D;
@@ -1054,33 +1058,30 @@ static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture,
{
uint32_t tmp1;
PixmapPtr pSrcPixmap, pDstPixmap;
- int max_tex_w, max_tex_h, max_dst_w, max_dst_h;
/* Check for unsupported compositing operations. */
if (op >= (int) (sizeof(EVERGREENBlendOp) / sizeof(EVERGREENBlendOp[0])))
RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
- if (!pSrcPicture->pDrawable)
- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+ if (pSrcPicture->pDrawable) {
+ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
-
- max_tex_w = 8192;
- max_tex_h = 8192;
- max_dst_w = 8192;
- max_dst_h = 8192;
+ if (pSrcPixmap->drawable.width >= 16384 ||
+ pSrcPixmap->drawable.height >= 16384) {
+ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+ pSrcPixmap->drawable.width,
+ pSrcPixmap->drawable.height));
+ }
- if (pSrcPixmap->drawable.width >= max_tex_w ||
- pSrcPixmap->drawable.height >= max_tex_h) {
- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
- pSrcPixmap->drawable.width,
- pSrcPixmap->drawable.height));
- }
+ if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0))
+ return FALSE;
+ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill)
+ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
- if (pDstPixmap->drawable.width >= max_dst_w ||
- pDstPixmap->drawable.height >= max_dst_h) {
+ if (pDstPixmap->drawable.width >= 16384 ||
+ pDstPixmap->drawable.height >= 16384) {
RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n",
pDstPixmap->drawable.width,
pDstPixmap->drawable.height));
@@ -1089,38 +1090,35 @@ static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture,
if (pMaskPicture) {
PixmapPtr pMaskPixmap;
- if (!pMaskPicture->pDrawable)
- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
-
- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ if (pMaskPicture->pDrawable) {
+ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
- if (pMaskPixmap->drawable.width >= max_tex_w ||
- pMaskPixmap->drawable.height >= max_tex_h) {
- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
- pMaskPixmap->drawable.width,
- pMaskPixmap->drawable.height));
- }
+ if (pMaskPixmap->drawable.width >= 16384 ||
+ pMaskPixmap->drawable.height >= 16384) {
+ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+ pMaskPixmap->drawable.width,
+ pMaskPixmap->drawable.height));
+ }
- if (pMaskPicture->componentAlpha) {
- /* Check if it's component alpha that relies on a source alpha and
- * on the source value. We can only get one of those into the
- * single source value that we get to blend with.
- */
- if (EVERGREENBlendOp[op].src_alpha &&
- (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) !=
- (BLEND_ZERO << COLOR_SRCBLEND_shift)) {
- RADEON_FALLBACK(("Component alpha not supported with source "
- "alpha and source value blending.\n"));
+ if (pMaskPicture->componentAlpha) {
+ /* Check if it's component alpha that relies on a source alpha and
+ * on the source value. We can only get one of those into the
+ * single source value that we get to blend with.
+ */
+ if (EVERGREENBlendOp[op].src_alpha &&
+ (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) !=
+ (BLEND_ZERO << COLOR_SRCBLEND_shift)) {
+ RADEON_FALLBACK(("Component alpha not supported with source "
+ "alpha and source value blending.\n"));
+ }
}
- }
- if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1))
- return FALSE;
+ if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1))
+ return FALSE;
+ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill)
+ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
}
- if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0))
- return FALSE;
-
if (!EVERGREENGetDestFormat(pDstPicture, &tmp1))
return FALSE;
@@ -1132,7 +1130,8 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
PicturePtr pMaskPicture, PicturePtr pDstPicture,
PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst)
{
- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
+ ScreenPtr pScreen = pDst->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
uint32_t dst_format;
@@ -1142,13 +1141,19 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
struct r600_accel_object src_obj, mask_obj, dst_obj;
float *cbuf;
- if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8)
+ if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8))
return FALSE;
+ if (!pSrc) {
+ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color);
+ if (!pSrc)
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+
src_obj.offset = 0;
dst_obj.offset = 0;
- src_obj.bo = radeon_get_pixmap_bo(pSrc);
dst_obj.bo = radeon_get_pixmap_bo(pDst);
+ src_obj.bo = radeon_get_pixmap_bo(pSrc);
dst_obj.surface = radeon_get_pixmap_surface(pDst);
src_obj.surface = radeon_get_pixmap_surface(pSrc);
dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst);
@@ -1166,7 +1171,15 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
dst_obj.bpp = pDst->drawable.bitsPerPixel;
dst_obj.domain = RADEON_GEM_DOMAIN_VRAM;
- if (pMask) {
+ if (pMaskPicture) {
+ if (!pMask) {
+ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color);
+ if (!pMask) {
+ if (!pSrcPicture->pDrawable)
+ pScreen->DestroyPixmap(pSrc);
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+ }
mask_obj.offset = 0;
mask_obj.bo = radeon_get_pixmap_bo(pMask);
mask_obj.tiling_flags = radeon_get_pixmap_tiling(pMask);
@@ -1363,11 +1376,9 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
return TRUE;
}
-static void EVERGREENDoneComposite(PixmapPtr pDst)
+static void EVERGREENFinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst,
+ struct radeon_accel_state *accel_state)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
- RADEONInfoPtr info = RADEONPTR(pScrn);
- struct radeon_accel_state *accel_state = info->accel_state;
int vtx_size;
if (accel_state->vsync)
@@ -1381,19 +1392,35 @@ static void EVERGREENDoneComposite(PixmapPtr pDst)
evergreen_finish_op(pScrn, vtx_size);
}
+static void EVERGREENDoneComposite(PixmapPtr pDst)
+{
+ ScreenPtr pScreen = pDst->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ struct radeon_accel_state *accel_state = info->accel_state;
+
+ EVERGREENFinishComposite(pScrn, pDst, accel_state);
+
+ if (!accel_state->src_pic->pDrawable)
+ pScreen->DestroyPixmap(accel_state->src_pix);
+
+ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable)
+ pScreen->DestroyPixmap(accel_state->msk_pix);
+}
+
static void EVERGREENComposite(PixmapPtr pDst,
int srcX, int srcY,
int maskX, int maskY,
int dstX, int dstY,
int w, int h)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
float *vb;
if (CS_FULL(info->cs)) {
- EVERGREENDoneComposite(info->accel_state->dst_pix);
+ EVERGREENFinishComposite(pScrn, pDst, info->accel_state);
radeon_cs_flush_indirect(pScrn);
EVERGREENPrepareComposite(info->accel_state->composite_op,
info->accel_state->src_pic,
@@ -1463,7 +1490,7 @@ static Bool
EVERGREENUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h,
char *src, int src_pitch)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
struct radeon_exa_pixmap_priv *driver_priv;
@@ -1582,7 +1609,7 @@ static Bool
EVERGREENDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w,
int h, char *dst, int dst_pitch)
{
- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pSrc->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
struct radeon_exa_pixmap_priv *driver_priv;
@@ -1719,7 +1746,7 @@ out:
static int
EVERGREENMarkSync(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -1862,7 +1889,7 @@ CAYMANLoadShaders(ScrnInfoPtr pScrn)
Bool
EVERGREENDrawInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
if (info->accel_state->exa == NULL) {
diff --git a/driver/xf86-video-ati/src/evergreen_shader.c b/driver/xf86-video-ati/src/evergreen_shader.c
index bbdd7a76c..a6faba05b 100644
--- a/driver/xf86-video-ati/src/evergreen_shader.c
+++ b/driver/xf86-video-ati/src/evergreen_shader.c
@@ -1306,7 +1306,7 @@ int evergreen_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader)
shader[i++] = CF_DWORD1(POP_COUNT(0),
CF_CONST(0),
COND(SQ_CF_COND_ACTIVE),
- I_COUNT(2),
+ I_COUNT(1),
VALID_PIXEL_MODE(0),
END_OF_PROGRAM(0),
CF_INST(SQ_CF_INST_TC),
@@ -1337,8 +1337,8 @@ int evergreen_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader)
shader[i++] = TEX_DWORD1(DST_GPR(1),
DST_REL(ABSOLUTE),
DST_SEL_X(SQ_SEL_X),
- DST_SEL_Y(SQ_SEL_MASK),
- DST_SEL_Z(SQ_SEL_MASK),
+ DST_SEL_Y(SQ_SEL_Y),
+ DST_SEL_Z(SQ_SEL_Z),
DST_SEL_W(SQ_SEL_1),
LOD_BIAS(0),
COORD_TYPE_X(TEX_NORMALIZED),
@@ -1354,36 +1354,6 @@ int evergreen_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader)
SRC_SEL_Z(SQ_SEL_0),
SRC_SEL_W(SQ_SEL_1));
shader[i++] = TEX_DWORD_PAD;
- /* 34/35 */
- shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE),
- INST_MOD(0),
- FETCH_WHOLE_QUAD(0),
- RESOURCE_ID(1),
- SRC_GPR(0),
- SRC_REL(ABSOLUTE),
- ALT_CONST(0),
- RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE),
- SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE));
- shader[i++] = TEX_DWORD1(DST_GPR(1),
- DST_REL(ABSOLUTE),
- DST_SEL_X(SQ_SEL_MASK),
- DST_SEL_Y(SQ_SEL_X),
- DST_SEL_Z(SQ_SEL_Y),
- DST_SEL_W(SQ_SEL_MASK),
- LOD_BIAS(0),
- COORD_TYPE_X(TEX_NORMALIZED),
- COORD_TYPE_Y(TEX_NORMALIZED),
- COORD_TYPE_Z(TEX_NORMALIZED),
- COORD_TYPE_W(TEX_NORMALIZED));
- shader[i++] = TEX_DWORD2(OFFSET_X(0),
- OFFSET_Y(0),
- OFFSET_Z(0),
- SAMPLER_ID(1),
- SRC_SEL_X(SQ_SEL_X),
- SRC_SEL_Y(SQ_SEL_Y),
- SRC_SEL_Z(SQ_SEL_0),
- SRC_SEL_W(SQ_SEL_1));
- shader[i++] = TEX_DWORD_PAD;
return i;
}
diff --git a/driver/xf86-video-ati/src/evergreen_textured_videofuncs.c b/driver/xf86-video-ati/src/evergreen_textured_videofuncs.c
index 8ca8e6273..0643ac62f 100644
--- a/driver/xf86-video-ati/src/evergreen_textured_videofuncs.c
+++ b/driver/xf86-video-ati/src/evergreen_textured_videofuncs.c
@@ -331,7 +331,7 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
default:
accel_state->src_size[0] = accel_state->src_obj[0].pitch * pPriv->h;
- /* Y texture */
+ /* YUV texture */
tex_res.id = 0;
tex_res.w = accel_state->src_obj[0].width;
tex_res.h = accel_state->src_obj[0].height;
@@ -345,13 +345,13 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
tex_res.mip_bo = accel_state->src_obj[0].bo;
tex_res.surface = NULL;
- tex_res.format = FMT_8_8;
if (pPriv->id == FOURCC_UYVY)
- tex_res.dst_sel_x = SQ_SEL_Y; /* Y */
+ tex_res.format = FMT_GB_GR;
else
- tex_res.dst_sel_x = SQ_SEL_X; /* Y */
- tex_res.dst_sel_y = SQ_SEL_1;
- tex_res.dst_sel_z = SQ_SEL_1;
+ tex_res.format = FMT_BG_RG;
+ tex_res.dst_sel_x = SQ_SEL_Y;
+ tex_res.dst_sel_y = SQ_SEL_X;
+ tex_res.dst_sel_z = SQ_SEL_Z;
tex_res.dst_sel_w = SQ_SEL_1;
tex_res.base_level = 0;
@@ -362,7 +362,7 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
tex_res.array_mode = 1;
evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain);
- /* Y sampler */
+ /* YUV sampler */
tex_samp.id = 0;
tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL;
tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL;
@@ -375,33 +375,6 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
tex_samp.mip_filter = 0; /* no mipmap */
evergreen_set_tex_sampler(pScrn, &tex_samp);
- /* UV texture */
- tex_res.id = 1;
- tex_res.format = FMT_8_8_8_8;
- tex_res.w = accel_state->src_obj[0].width >> 1;
- tex_res.h = accel_state->src_obj[0].height;
- tex_res.pitch = accel_state->src_obj[0].pitch >> 2;
- if (pPriv->id == FOURCC_UYVY) {
- tex_res.dst_sel_x = SQ_SEL_X; /* V */
- tex_res.dst_sel_y = SQ_SEL_Z; /* U */
- } else {
- tex_res.dst_sel_x = SQ_SEL_Y; /* V */
- tex_res.dst_sel_y = SQ_SEL_W; /* U */
- }
- tex_res.dst_sel_z = SQ_SEL_1;
- tex_res.dst_sel_w = SQ_SEL_1;
- tex_res.interlaced = 0;
-
- tex_res.base = accel_state->src_obj[0].offset;
- tex_res.mip_base = accel_state->src_obj[0].offset;
- tex_res.size = accel_state->src_size[0];
- if (accel_state->src_obj[0].tiling_flags == 0)
- tex_res.array_mode = 1;
- evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain);
-
- /* UV sampler */
- tex_samp.id = 1;
- evergreen_set_tex_sampler(pScrn, &tex_samp);
break;
}
@@ -508,7 +481,7 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
}
while (nBox--) {
- int srcX, srcY, srcw, srch;
+ float srcX, srcY, srcw, srch;
int dstX, dstY, dstw, dsth;
float *vb;
@@ -520,13 +493,13 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
srcX = pPriv->src_x;
srcX += ((pBox->x1 - pPriv->drw_x) *
- pPriv->src_w) / pPriv->dst_w;
+ pPriv->src_w) / (float)pPriv->dst_w;
srcY = pPriv->src_y;
srcY += ((pBox->y1 - pPriv->drw_y) *
- pPriv->src_h) / pPriv->dst_h;
+ pPriv->src_h) / (float)pPriv->dst_h;
- srcw = (pPriv->src_w * dstw) / pPriv->dst_w;
- srch = (pPriv->src_h * dsth) / pPriv->dst_h;
+ srcw = (pPriv->src_w * dstw) / (float)pPriv->dst_w;
+ srch = (pPriv->src_h * dsth) / (float)pPriv->dst_h;
vb = radeon_vbo_space(pScrn, &accel_state->vbo, 16);
diff --git a/driver/xf86-video-ati/src/generic_bus.h b/driver/xf86-video-ati/src/generic_bus.h
index a04baa159..553d3f288 100644
--- a/driver/xf86-video-ati/src/generic_bus.h
+++ b/driver/xf86-video-ati/src/generic_bus.h
@@ -19,7 +19,7 @@
typedef struct _GENERIC_BUS_Rec *GENERIC_BUS_Ptr;
typedef struct _GENERIC_BUS_Rec{
- int scrnIndex;
+ ScrnInfoPtr pScrn;
DevUnion DriverPrivate;
Bool (*ioctl)(GENERIC_BUS_Ptr, long, long, char *);
Bool (*read)(GENERIC_BUS_Ptr, uint32_t, uint32_t, uint8_t *);
diff --git a/driver/xf86-video-ati/src/legacy_crtc.c b/driver/xf86-video-ati/src/legacy_crtc.c
index 0beb54d48..30119f5e4 100644
--- a/driver/xf86-video-ati/src/legacy_crtc.c
+++ b/driver/xf86-video-ati/src/legacy_crtc.c
@@ -853,7 +853,7 @@ RADEONInitCrtcBase(xf86CrtcPtr crtc, RADEONSavePtr save,
/*** NOTE: r3/4xx will need sarea and drm pageflip updates to handle the xytile regs for
*** pageflipping!
***/
- pSAREAPriv = DRIGetSAREAPrivate(screenInfo.screens[pScrn->scrnIndex]);
+ pSAREAPriv = DRIGetSAREAPrivate(xf86ScrnToScreen(pScrn));
/* can't get at sarea in a semi-sane way? */
pSAREA = (void *)((char*)pSAREAPriv - sizeof(XF86DRISAREARec));
@@ -1074,7 +1074,7 @@ RADEONInitCrtc2Base(xf86CrtcPtr crtc, RADEONSavePtr save,
/*** NOTE: r3/4xx will need sarea and drm pageflip updates to handle the xytile regs for
*** pageflipping!
***/
- pSAREAPriv = DRIGetSAREAPrivate(screenInfo.screens[pScrn->scrnIndex]);
+ pSAREAPriv = DRIGetSAREAPrivate(xf86ScrnToScreen(pScrn));
/* can't get at sarea in a semi-sane way? */
pSAREA = (void *)((char*)pSAREAPriv - sizeof(XF86DRISAREARec));
@@ -1884,10 +1884,10 @@ legacy_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
/* need to redraw front buffer, I guess this can be considered a hack ? */
/* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
if (pScrn->pScreen)
- xf86EnableDisableFBAccess(pScrn->scrnIndex, FALSE);
+ xf86EnableDisableFBAccess(XF86_ENABLEDISABLEFB_ARG(pScrn), FALSE);
RADEONChangeSurfaces(pScrn);
if (pScrn->pScreen)
- xf86EnableDisableFBAccess(pScrn->scrnIndex, TRUE);
+ xf86EnableDisableFBAccess(XF86_ENABLEDISABLEFB_ARG(pScrn), TRUE);
/* xf86SetRootClip would do, but can't access that here */
}
diff --git a/driver/xf86-video-ati/src/pcidb/ati_pciids.csv b/driver/xf86-video-ati/src/pcidb/ati_pciids.csv
index 337643821..501a0f61a 100644
--- a/driver/xf86-video-ati/src/pcidb/ati_pciids.csv
+++ b/driver/xf86-video-ati/src/pcidb/ati_pciids.csv
@@ -461,6 +461,7 @@
"0x9645","SUMO2_9645","SUMO2",1,1,,,1,"SUMO2"
"0x9647","SUMO_9647","SUMO",1,1,,,1,"SUMO"
"0x9648","SUMO_9648","SUMO",1,1,,,1,"SUMO"
+"0x9649","SUMO_9649","SUMO",1,1,,,1,"SUMO"
"0x964A","SUMO_964A","SUMO",,1,,,1,"SUMO"
"0x964B","SUMO_964B","SUMO",,1,,,1,"SUMO"
"0x964C","SUMO_964C","SUMO",,1,,,1,"SUMO"
@@ -480,6 +481,7 @@
"0x9807","PALM_9807","PALM",,1,,,1,"AMD Radeon HD 6200 Series Graphics"
"0x9808","PALM_9808","PALM",,1,,,1,"PALM"
"0x9809","PALM_9809","PALM",,1,,,1,"PALM"
+"0x980A","PALM_980A","PALM",,1,,,1,"PALM"
"0x6880","CYPRESS_6880","CYPRESS",1,,,,,"CYPRESS"
"0x6888","CYPRESS_6888","CYPRESS",,,,,,"ATI FirePro (FireGL) Graphics Adapter"
"0x6889","CYPRESS_6889","CYPRESS",,,,,,"ATI FirePro (FireGL) Graphics Adapter"
@@ -561,6 +563,7 @@
"0x6747","TURKS_6747","TURKS",,,,,,"TURKS"
"0x6748","TURKS_6748","TURKS",,,,,,"TURKS"
"0x6749","TURKS_6749","TURKS",,,,,,"TURKS"
+"0x674A","TURKS_674A","TURKS",,,,,,"TURKS"
"0x6750","TURKS_6750","TURKS",,,,,,"TURKS"
"0x6751","TURKS_6751","TURKS",,,,,,"TURKS"
"0x6758","TURKS_6758","TURKS",,,,,,"TURKS"
@@ -586,6 +589,7 @@
"0x6767","CAICOS_6767","CAICOS",,,,,,"CAICOS"
"0x6768","CAICOS_6768","CAICOS",,,,,,"CAICOS"
"0x6770","CAICOS_6770","CAICOS",,,,,,"CAICOS"
+"0x6771","CAICOS_6771","CAICOS",,,,,,"CAICOS"
"0x6772","CAICOS_6772","CAICOS",,,,,,"CAICOS"
"0x6778","CAICOS_6778","CAICOS",,,,,,"CAICOS"
"0x6779","CAICOS_6779","CAICOS",,,,,,"CAICOS"
@@ -594,6 +598,23 @@
"0x9901","ARUBA_9901","ARUBA",,,,,,"ARUBA"
"0x9903","ARUBA_9903","ARUBA",1,,,,,"ARUBA"
"0x9904","ARUBA_9904","ARUBA",,,,,,"ARUBA"
-"0x990f","ARUBA_990f","ARUBA",,,,,,"ARUBA"
+"0x9905","ARUBA_9905","ARUBA",,,,,,"ARUBA"
+"0x9906","ARUBA_9906","ARUBA",,,,,,"ARUBA"
+"0x9907","ARUBA_9907","ARUBA",1,,,,,"ARUBA"
+"0x9908","ARUBA_9908","ARUBA",1,,,,,"ARUBA"
+"0x9909","ARUBA_9909","ARUBA",1,,,,,"ARUBA"
+"0x990A","ARUBA_990A","ARUBA",1,,,,,"ARUBA"
+"0x990F","ARUBA_990F","ARUBA",,,,,,"ARUBA"
+"0x9910","ARUBA_9910","ARUBA",1,,,,,"ARUBA"
+"0x9913","ARUBA_9913","ARUBA",1,,,,,"ARUBA"
+"0x9917","ARUBA_9917","ARUBA",,,,,,"ARUBA"
+"0x9918","ARUBA_9918","ARUBA",,,,,,"ARUBA"
+"0x9919","ARUBA_9919","ARUBA",,,,,,"ARUBA"
"0x9990","ARUBA_9990","ARUBA",1,,,,,"ARUBA"
"0x9991","ARUBA_9991","ARUBA",,,,,,"ARUBA"
+"0x9992","ARUBA_9992","ARUBA",1,,,,,"ARUBA"
+"0x9993","ARUBA_9993","ARUBA",,,,,,"ARUBA"
+"0x9994","ARUBA_9994","ARUBA",1,,,,,"ARUBA"
+"0x99A0","ARUBA_99A0","ARUBA",1,,,,,"ARUBA"
+"0x99A2","ARUBA_99A2","ARUBA",1,,,,,"ARUBA"
+"0x99A4","ARUBA_99A4","ARUBA",,,,,,"ARUBA"
diff --git a/driver/xf86-video-ati/src/r600_exa.c b/driver/xf86-video-ati/src/r600_exa.c
index e1eb62f14..470de0101 100644
--- a/driver/xf86-video-ati/src/r600_exa.c
+++ b/driver/xf86-video-ati/src/r600_exa.c
@@ -168,7 +168,7 @@ R600SetAccelState(ScrnInfoPtr pScrn,
static Bool
R600PrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
cb_config_t cb_conf;
@@ -323,7 +323,7 @@ R600PrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
static void
R600DoneSolid(PixmapPtr pPix)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -339,7 +339,7 @@ R600DoneSolid(PixmapPtr pPix)
static void
R600Solid(PixmapPtr pPix, int x1, int y1, int x2, int y2)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
float *vb;
@@ -517,7 +517,7 @@ R600DoCopy(ScrnInfoPtr pScrn)
static void
R600DoCopyVline(PixmapPtr pPix)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -566,7 +566,7 @@ R600PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst,
int rop,
Pixel planemask)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
struct r600_accel_object src_obj, dst_obj;
@@ -681,7 +681,7 @@ R600PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst,
static void
R600DoneCopy(PixmapPtr pDst)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -702,7 +702,7 @@ R600Copy(PixmapPtr pDst,
int dstX, int dstY,
int w, int h)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -901,17 +901,8 @@ static Bool R600CheckCompositeTexture(PicturePtr pPict,
int op,
int unit)
{
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
unsigned int i;
- int max_tex_w, max_tex_h;
-
- max_tex_w = 8192;
- max_tex_h = 8192;
-
- if ((w > max_tex_w) || (h > max_tex_h))
- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h));
for (i = 0; i < sizeof(R600TexFormats) / sizeof(R600TexFormats[0]); i++) {
if (R600TexFormats[i].fmt == pPict->format)
@@ -948,12 +939,10 @@ static Bool R600CheckCompositeTexture(PicturePtr pPict,
static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
int unit)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+ unsigned int repeatType;
unsigned int i;
tex_resource_t tex_res;
tex_sampler_t tex_samp;
@@ -969,9 +958,16 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
}
/* Texture */
+ if (pPict->pDrawable) {
+ tex_res.w = pPict->pDrawable->width;
+ tex_res.h = pPict->pDrawable->height;
+ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+ } else {
+ tex_res.w = 1;
+ tex_res.h = 1;
+ repeatType = RepeatNormal;
+ }
tex_res.id = unit;
- tex_res.w = w;
- tex_res.h = h;
tex_res.pitch = accel_state->src_obj[unit].pitch;
tex_res.depth = 0;
tex_res.dim = SQ_TEX_DIM_2D;
@@ -1170,24 +1166,24 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
vs_alu_consts[0] = xFixedToFloat(pPict->transform->matrix[0][0]);
vs_alu_consts[1] = xFixedToFloat(pPict->transform->matrix[0][1]);
vs_alu_consts[2] = xFixedToFloat(pPict->transform->matrix[0][2]);
- vs_alu_consts[3] = 1.0 / w;
+ vs_alu_consts[3] = 1.0 / tex_res.w;
vs_alu_consts[4] = xFixedToFloat(pPict->transform->matrix[1][0]);
vs_alu_consts[5] = xFixedToFloat(pPict->transform->matrix[1][1]);
vs_alu_consts[6] = xFixedToFloat(pPict->transform->matrix[1][2]);
- vs_alu_consts[7] = 1.0 / h;
+ vs_alu_consts[7] = 1.0 / tex_res.h;
} else {
accel_state->is_transform[unit] = FALSE;
vs_alu_consts[0] = 1.0;
vs_alu_consts[1] = 0.0;
vs_alu_consts[2] = 0.0;
- vs_alu_consts[3] = 1.0 / w;
+ vs_alu_consts[3] = 1.0 / tex_res.w;
vs_alu_consts[4] = 0.0;
vs_alu_consts[5] = 1.0;
vs_alu_consts[6] = 0.0;
- vs_alu_consts[7] = 1.0 / h;
+ vs_alu_consts[7] = 1.0 / tex_res.h;
}
/* VS alu constants */
@@ -1202,33 +1198,30 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
{
uint32_t tmp1;
PixmapPtr pSrcPixmap, pDstPixmap;
- int max_tex_w, max_tex_h, max_dst_w, max_dst_h;
/* Check for unsupported compositing operations. */
if (op >= (int) (sizeof(R600BlendOp) / sizeof(R600BlendOp[0])))
RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
- if (!pSrcPicture->pDrawable)
- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+ if (pSrcPicture->pDrawable) {
+ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
-
- max_tex_w = 8192;
- max_tex_h = 8192;
- max_dst_w = 8192;
- max_dst_h = 8192;
+ if (pSrcPixmap->drawable.width >= 8192 ||
+ pSrcPixmap->drawable.height >= 8192) {
+ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+ pSrcPixmap->drawable.width,
+ pSrcPixmap->drawable.height));
+ }
- if (pSrcPixmap->drawable.width >= max_tex_w ||
- pSrcPixmap->drawable.height >= max_tex_h) {
- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
- pSrcPixmap->drawable.width,
- pSrcPixmap->drawable.height));
- }
+ if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0))
+ return FALSE;
+ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill)
+ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
- if (pDstPixmap->drawable.width >= max_dst_w ||
- pDstPixmap->drawable.height >= max_dst_h) {
+ if (pDstPixmap->drawable.width >= 8192 ||
+ pDstPixmap->drawable.height >= 8192) {
RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n",
pDstPixmap->drawable.width,
pDstPixmap->drawable.height));
@@ -1237,38 +1230,35 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
if (pMaskPicture) {
PixmapPtr pMaskPixmap;
- if (!pMaskPicture->pDrawable)
- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
-
- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ if (pMaskPicture->pDrawable) {
+ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
- if (pMaskPixmap->drawable.width >= max_tex_w ||
- pMaskPixmap->drawable.height >= max_tex_h) {
- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
- pMaskPixmap->drawable.width,
- pMaskPixmap->drawable.height));
- }
+ if (pMaskPixmap->drawable.width >= 8192 ||
+ pMaskPixmap->drawable.height >= 8192) {
+ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+ pMaskPixmap->drawable.width,
+ pMaskPixmap->drawable.height));
+ }
- if (pMaskPicture->componentAlpha) {
- /* Check if it's component alpha that relies on a source alpha and
- * on the source value. We can only get one of those into the
- * single source value that we get to blend with.
- */
- if (R600BlendOp[op].src_alpha &&
- (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) !=
- (BLEND_ZERO << COLOR_SRCBLEND_shift)) {
- RADEON_FALLBACK(("Component alpha not supported with source "
- "alpha and source value blending.\n"));
+ if (pMaskPicture->componentAlpha) {
+ /* Check if it's component alpha that relies on a source alpha and
+ * on the source value. We can only get one of those into the
+ * single source value that we get to blend with.
+ */
+ if (R600BlendOp[op].src_alpha &&
+ (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) !=
+ (BLEND_ZERO << COLOR_SRCBLEND_shift)) {
+ RADEON_FALLBACK(("Component alpha not supported with source "
+ "alpha and source value blending.\n"));
+ }
}
- }
- if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1))
- return FALSE;
+ if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1))
+ return FALSE;
+ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill)
+ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
}
- if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0))
- return FALSE;
-
if (!R600GetDestFormat(pDstPicture, &tmp1))
return FALSE;
@@ -1280,7 +1270,8 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
PicturePtr pMaskPicture, PicturePtr pDstPicture,
PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst)
{
- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
+ ScreenPtr pScreen = pDst->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
uint32_t dst_format;
@@ -1288,15 +1279,21 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
shader_config_t vs_conf, ps_conf;
struct r600_accel_object src_obj, mask_obj, dst_obj;
- if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8)
+ if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8))
return FALSE;
+ if (!pSrc) {
+ pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color);
+ if (!pSrc)
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+
#if defined(XF86DRM_MODE)
if (info->cs) {
src_obj.offset = 0;
dst_obj.offset = 0;
- src_obj.bo = radeon_get_pixmap_bo(pSrc);
dst_obj.bo = radeon_get_pixmap_bo(pDst);
+ src_obj.bo = radeon_get_pixmap_bo(pSrc);
dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst);
src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc);
dst_obj.surface = radeon_get_pixmap_surface(pDst);
@@ -1322,7 +1319,16 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
dst_obj.bpp = pDst->drawable.bitsPerPixel;
dst_obj.domain = RADEON_GEM_DOMAIN_VRAM;
- if (pMask) {
+ if (pMaskPicture) {
+ if (!pMask) {
+ pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color);
+ if (!pMask) {
+ if (!pSrcPicture->pDrawable)
+ pScreen->DestroyPixmap(pSrc);
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+ }
+
#if defined(XF86DRM_MODE)
if (info->cs) {
mask_obj.offset = 0;
@@ -1509,11 +1515,9 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
return TRUE;
}
-static void R600DoneComposite(PixmapPtr pDst)
+static void R600FinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst,
+ struct radeon_accel_state *accel_state)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
- RADEONInfoPtr info = RADEONPTR(pScrn);
- struct radeon_accel_state *accel_state = info->accel_state;
int vtx_size;
if (accel_state->vsync)
@@ -1527,13 +1531,29 @@ static void R600DoneComposite(PixmapPtr pDst)
r600_finish_op(pScrn, vtx_size);
}
+static void R600DoneComposite(PixmapPtr pDst)
+{
+ ScreenPtr pScreen = pDst->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ struct radeon_accel_state *accel_state = info->accel_state;
+
+ R600FinishComposite(pScrn, pDst, accel_state);
+
+ if (!accel_state->src_pic->pDrawable)
+ pScreen->DestroyPixmap(accel_state->src_pix);
+
+ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable)
+ pScreen->DestroyPixmap(accel_state->msk_pix);
+}
+
static void R600Composite(PixmapPtr pDst,
int srcX, int srcY,
int maskX, int maskY,
int dstX, int dstY,
int w, int h)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
float *vb;
@@ -1543,7 +1563,7 @@ static void R600Composite(PixmapPtr pDst,
#ifdef XF86DRM_MODE
if (info->cs && CS_FULL(info->cs)) {
- R600DoneComposite(info->accel_state->dst_pix);
+ R600FinishComposite(pScrn, pDst, info->accel_state);
radeon_cs_flush_indirect(pScrn);
R600PrepareComposite(info->accel_state->composite_op,
info->accel_state->src_pic,
@@ -1708,7 +1728,7 @@ static Bool
R600UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h,
char *src, int src_pitch)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
uint32_t dst_pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8);
uint32_t dst_mc_addr = exaGetPixmapOffset(pDst) + info->fbLocation + pScrn->fbOffset;
@@ -1724,7 +1744,7 @@ static Bool
R600DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h,
char *dst, int dst_pitch)
{
- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pSrc->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
uint32_t src_pitch = exaGetPixmapPitch(pSrc) / (pSrc->drawable.bitsPerPixel / 8);
@@ -1824,7 +1844,7 @@ static Bool
R600UploadToScreenCS(PixmapPtr pDst, int x, int y, int w, int h,
char *src, int src_pitch)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
struct radeon_exa_pixmap_priv *driver_priv;
@@ -1947,7 +1967,7 @@ static Bool
R600DownloadFromScreenCS(PixmapPtr pSrc, int x, int y, int w,
int h, char *dst, int dst_pitch)
{
- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pSrc->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
struct radeon_exa_pixmap_priv *driver_priv;
@@ -2085,7 +2105,7 @@ out:
static int
R600MarkSync(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -2096,7 +2116,7 @@ R600MarkSync(ScreenPtr pScreen)
static void
R600Sync(ScreenPtr pScreen, int marker)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_accel_state *accel_state = info->accel_state;
@@ -2216,7 +2236,7 @@ R600LoadShaders(ScrnInfoPtr pScrn)
static Bool
R600PrepareAccess(PixmapPtr pPix, int index)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -2229,7 +2249,7 @@ R600PrepareAccess(PixmapPtr pPix, int index)
static void
R600FinishAccess(PixmapPtr pPix, int index)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -2241,7 +2261,7 @@ R600FinishAccess(PixmapPtr pPix, int index)
Bool
R600DrawInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
if (info->accel_state->exa == NULL) {
diff --git a/driver/xf86-video-ati/src/r600_shader.c b/driver/xf86-video-ati/src/r600_shader.c
index ab2f4850f..4cb2fc89a 100644
--- a/driver/xf86-video-ati/src/r600_shader.c
+++ b/driver/xf86-video-ati/src/r600_shader.c
@@ -1090,7 +1090,7 @@ int R600_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader)
shader[i++] = CF_DWORD1(POP_COUNT(0),
CF_CONST(0),
COND(SQ_CF_COND_ACTIVE),
- I_COUNT(2),
+ I_COUNT(1),
CALL_COUNT(0),
END_OF_PROGRAM(0),
VALID_PIXEL_MODE(0),
@@ -1120,8 +1120,8 @@ int R600_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader)
shader[i++] = TEX_DWORD1(DST_GPR(1),
DST_REL(ABSOLUTE),
DST_SEL_X(SQ_SEL_X),
- DST_SEL_Y(SQ_SEL_MASK),
- DST_SEL_Z(SQ_SEL_MASK),
+ DST_SEL_Y(SQ_SEL_Y),
+ DST_SEL_Z(SQ_SEL_Z),
DST_SEL_W(SQ_SEL_1),
LOD_BIAS(0),
COORD_TYPE_X(TEX_NORMALIZED),
@@ -1137,34 +1137,6 @@ int R600_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader)
SRC_SEL_Z(SQ_SEL_0),
SRC_SEL_W(SQ_SEL_1));
shader[i++] = TEX_DWORD_PAD;
- /* 28/29 */
- shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE),
- BC_FRAC_MODE(0),
- FETCH_WHOLE_QUAD(0),
- RESOURCE_ID(1),
- SRC_GPR(0),
- SRC_REL(ABSOLUTE),
- R7xx_ALT_CONST(0));
- shader[i++] = TEX_DWORD1(DST_GPR(1),
- DST_REL(ABSOLUTE),
- DST_SEL_X(SQ_SEL_MASK),
- DST_SEL_Y(SQ_SEL_X),
- DST_SEL_Z(SQ_SEL_Y),
- DST_SEL_W(SQ_SEL_MASK),
- LOD_BIAS(0),
- COORD_TYPE_X(TEX_NORMALIZED),
- COORD_TYPE_Y(TEX_NORMALIZED),
- COORD_TYPE_Z(TEX_NORMALIZED),
- COORD_TYPE_W(TEX_NORMALIZED));
- shader[i++] = TEX_DWORD2(OFFSET_X(0),
- OFFSET_Y(0),
- OFFSET_Z(0),
- SAMPLER_ID(1),
- SRC_SEL_X(SQ_SEL_X),
- SRC_SEL_Y(SQ_SEL_Y),
- SRC_SEL_Z(SQ_SEL_0),
- SRC_SEL_W(SQ_SEL_1));
- shader[i++] = TEX_DWORD_PAD;
return i;
}
diff --git a/driver/xf86-video-ati/src/r600_textured_videofuncs.c b/driver/xf86-video-ati/src/r600_textured_videofuncs.c
index 62da992ca..7610050a0 100644
--- a/driver/xf86-video-ati/src/r600_textured_videofuncs.c
+++ b/driver/xf86-video-ati/src/r600_textured_videofuncs.c
@@ -358,7 +358,7 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
default:
accel_state->src_size[0] = accel_state->src_obj[0].pitch * pPriv->h;
- /* Y texture */
+ /* YUV texture */
tex_res.id = 0;
tex_res.w = accel_state->src_obj[0].width;
tex_res.h = accel_state->src_obj[0].height;
@@ -371,13 +371,13 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
tex_res.bo = accel_state->src_obj[0].bo;
tex_res.mip_bo = accel_state->src_obj[0].bo;
- tex_res.format = FMT_8_8;
if (pPriv->id == FOURCC_UYVY)
- tex_res.dst_sel_x = SQ_SEL_Y; /* Y */
+ tex_res.format = FMT_GB_GR;
else
- tex_res.dst_sel_x = SQ_SEL_X; /* Y */
- tex_res.dst_sel_y = SQ_SEL_1;
- tex_res.dst_sel_z = SQ_SEL_1;
+ tex_res.format = FMT_BG_RG;
+ tex_res.dst_sel_x = SQ_SEL_Y;
+ tex_res.dst_sel_y = SQ_SEL_X;
+ tex_res.dst_sel_z = SQ_SEL_Z;
tex_res.dst_sel_w = SQ_SEL_1;
tex_res.request_size = 1;
@@ -389,7 +389,7 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
tex_res.tile_mode = 1;
r600_set_tex_resource(pScrn, accel_state->ib, &tex_res, accel_state->src_obj[0].domain);
- /* Y sampler */
+ /* YUV sampler */
tex_samp.id = 0;
tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL;
tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL;
@@ -403,33 +403,6 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
tex_samp.mip_filter = 0; /* no mipmap */
r600_set_tex_sampler(pScrn, accel_state->ib, &tex_samp);
- /* UV texture */
- tex_res.id = 1;
- tex_res.format = FMT_8_8_8_8;
- tex_res.w = accel_state->src_obj[0].width >> 1;
- tex_res.h = accel_state->src_obj[0].height;
- tex_res.pitch = accel_state->src_obj[0].pitch >> 2;
- if (pPriv->id == FOURCC_UYVY) {
- tex_res.dst_sel_x = SQ_SEL_X; /* V */
- tex_res.dst_sel_y = SQ_SEL_Z; /* U */
- } else {
- tex_res.dst_sel_x = SQ_SEL_Y; /* V */
- tex_res.dst_sel_y = SQ_SEL_W; /* U */
- }
- tex_res.dst_sel_z = SQ_SEL_1;
- tex_res.dst_sel_w = SQ_SEL_1;
- tex_res.interlaced = 0;
-
- tex_res.base = accel_state->src_obj[0].offset;
- tex_res.mip_base = accel_state->src_obj[0].offset;
- tex_res.size = accel_state->src_size[0];
- if (accel_state->src_obj[0].tiling_flags == 0)
- tex_res.tile_mode = 1;
- r600_set_tex_resource(pScrn, accel_state->ib, &tex_res, accel_state->src_obj[0].domain);
-
- /* UV sampler */
- tex_samp.id = 1;
- r600_set_tex_sampler(pScrn, accel_state->ib, &tex_samp);
break;
}
diff --git a/driver/xf86-video-ati/src/radeon.h b/driver/xf86-video-ati/src/radeon.h
index c41e11157..40416c265 100644
--- a/driver/xf86-video-ati/src/radeon.h
+++ b/driver/xf86-video-ati/src/radeon.h
@@ -42,6 +42,7 @@
#include <sys/time.h> /* For gettimeofday() */
#include "config.h"
+
#include "xf86str.h"
#include "compiler.h"
#include "xf86fbman.h"
@@ -101,6 +102,8 @@
#include "picturestr.h"
#endif
+#include "compat-api.h"
+
#include "simple_list.h"
#include "atipcirename.h"
@@ -404,7 +407,8 @@ typedef enum {
RADEON_MAC_MINI_EXTERNAL,
RADEON_MAC_MINI_INTERNAL,
RADEON_MAC_IMAC_G5_ISIGHT,
- RADEON_MAC_EMAC
+ RADEON_MAC_EMAC,
+ RADEON_MAC_SAM440EP
} RADEONMacModel;
#endif
@@ -511,7 +515,7 @@ struct radeon_dri {
int numVisualConfigs;
__GLXvisualConfig *pVisualConfigs;
RADEONConfigPrivPtr pVisualConfigsPriv;
- Bool (*DRICloseScreen)(int, ScreenPtr);
+ Bool (*DRICloseScreen)(CLOSE_SCREEN_ARGS_DECL);
drm_handle_t fbHandle;
@@ -858,9 +862,9 @@ typedef struct {
RADEONSavePtr SavedReg; /* Original (text) mode */
RADEONSavePtr ModeReg; /* Current mode */
- Bool (*CloseScreen)(int, ScreenPtr);
+ Bool (*CloseScreen)(CLOSE_SCREEN_ARGS_DECL);
- void (*BlockHandler)(int, pointer, pointer, pointer);
+ void (*BlockHandler)(BLOCKHANDLER_ARGS_DECL);
Bool PaletteSavedOnVT; /* Palette saved on last VT switch */
@@ -1116,7 +1120,7 @@ extern void RADEONCPFlushIndirect(ScrnInfoPtr pScrn, int discard);
extern void RADEONCPReleaseIndirect(ScrnInfoPtr pScrn);
extern int RADEONCPStop(ScrnInfoPtr pScrn, RADEONInfoPtr info);
# ifdef USE_XAA
-extern Bool RADEONSetupMemXAA_DRI(int scrnIndex, ScreenPtr pScreen);
+extern Bool RADEONSetupMemXAA_DRI(ScreenPtr pScreen);
# endif
uint32_t radeonGetPixmapOffset(PixmapPtr pPix);
#endif
@@ -1125,7 +1129,7 @@ extern int radeon_cs_space_remaining(ScrnInfoPtr pScrn);
#ifdef USE_XAA
/* radeon_accelfuncs.c */
extern void RADEONAccelInitMMIO(ScreenPtr pScreen, XAAInfoRecPtr a);
-extern Bool RADEONSetupMemXAA(int scrnIndex, ScreenPtr pScreen);
+extern Bool RADEONSetupMemXAA(ScreenPtr pScreen);
#endif
/* radeon_bios.c */
diff --git a/driver/xf86-video-ati/src/radeon_accel.c b/driver/xf86-video-ati/src/radeon_accel.c
index 1cebcf6a7..89673a77b 100644
--- a/driver/xf86-video-ati/src/radeon_accel.c
+++ b/driver/xf86-video-ati/src/radeon_accel.c
@@ -555,7 +555,7 @@ void RADEONEngineInit(ScrnInfoPtr pScrn)
uint32_t radeonGetPixmapOffset(PixmapPtr pPix)
{
- ScrnInfoPtr pScrn = xf86Screens[pPix->drawable.pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
uint32_t offset = 0;
if (info->cs)
@@ -982,10 +982,9 @@ void RADEONCopySwap(uint8_t *dst, uint8_t *src, unsigned int size, int swap)
for (; nwords > 0; --nwords, ++d, ++s)
#ifdef __powerpc__
- asm volatile("stwbrx %0,0,%1" : : "r" (*s), "r" (d));
+ asm volatile("sthbrx %0,0,%1" : : "r" (*s), "r" (d));
#else
- *d = ((*s >> 24) & 0xff) | ((*s >> 8) & 0xff00)
- | ((*s & 0xff00) << 8) | ((*s & 0xff) << 24);
+ *d = (*s >> 8) | (*s << 8);
#endif
return;
}
@@ -1066,7 +1065,7 @@ RADEONHostDataBlitCopyPass(
Bool RADEONAccelInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
#ifdef USE_EXA
@@ -1151,9 +1150,9 @@ void RADEONInit3DEngine(ScrnInfoPtr pScrn)
#ifdef USE_XAA
#ifdef XF86DRI
Bool
-RADEONSetupMemXAA_DRI(int scrnIndex, ScreenPtr pScreen)
+RADEONSetupMemXAA_DRI(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
int cpp = info->CurrentLayout.pixel_bytes;
int depthCpp = (info->dri->depthBits - 8) / 4;
@@ -1325,7 +1324,7 @@ RADEONSetupMemXAA_DRI(int scrnIndex, ScreenPtr pScreen)
MemBox.y2 = scanlines;
if (!xf86InitFBManager(pScreen, &MemBox)) {
- xf86DrvMsg(scrnIndex, X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Memory manager initialization to "
"(%d,%d) (%d,%d) failed\n",
MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2);
@@ -1333,7 +1332,7 @@ RADEONSetupMemXAA_DRI(int scrnIndex, ScreenPtr pScreen)
} else {
int width, height;
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Memory manager initialized to (%d,%d) (%d,%d)\n",
MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2);
/* why oh why can't we just request modes which are guaranteed to be 16 lines
@@ -1345,19 +1344,19 @@ RADEONSetupMemXAA_DRI(int scrnIndex, ScreenPtr pScreen)
- pScrn->virtualY + 2 : 2,
0, NULL, NULL,
NULL))) {
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Reserved area from (%d,%d) to (%d,%d)\n",
fbarea->box.x1, fbarea->box.y1,
fbarea->box.x2, fbarea->box.y2);
} else {
- xf86DrvMsg(scrnIndex, X_ERROR, "Unable to reserve area\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to reserve area\n");
}
RADEONDRIAllocatePCIGARTTable(pScreen);
if (xf86QueryLargestOffscreenArea(pScreen, &width,
&height, 0, 0, 0)) {
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Largest offscreen area available: %d x %d\n",
width, height);
@@ -1371,28 +1370,28 @@ RADEONSetupMemXAA_DRI(int scrnIndex, ScreenPtr pScreen)
- info->dri->depthTexLines);
info->dri->backArea = NULL;
} else {
- xf86DrvMsg(scrnIndex, X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Unable to determine largest offscreen area "
"available\n");
return FALSE;
}
}
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Will use front buffer at offset 0x%x\n",
info->dri->frontOffset);
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Will use back buffer at offset 0x%x\n",
info->dri->backOffset);
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Will use depth buffer at offset 0x%x\n",
info->dri->depthOffset);
if (info->cardType==CARD_PCIE)
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Will use %d kb for PCI GART table at offset 0x%x\n",
info->dri->pciGartSize/1024, (unsigned)info->dri->pciGartOffset);
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Will use %d kb for textures at offset 0x%x\n",
info->dri->textureSize/1024, info->dri->textureOffset);
@@ -1409,9 +1408,9 @@ RADEONSetupMemXAA_DRI(int scrnIndex, ScreenPtr pScreen)
#endif /* XF86DRI */
Bool
-RADEONSetupMemXAA(int scrnIndex, ScreenPtr pScreen)
+RADEONSetupMemXAA(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
BoxRec MemBox;
int y2;
@@ -1434,7 +1433,7 @@ RADEONSetupMemXAA(int scrnIndex, ScreenPtr pScreen)
MemBox.y2 = 8191;
if (!xf86InitFBManager(pScreen, &MemBox)) {
- xf86DrvMsg(scrnIndex, X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Memory manager initialization to "
"(%d,%d) (%d,%d) failed\n",
MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2);
@@ -1443,7 +1442,7 @@ RADEONSetupMemXAA(int scrnIndex, ScreenPtr pScreen)
int width, height;
FBAreaPtr fbarea;
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Memory manager initialized to (%d,%d) (%d,%d)\n",
MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2);
if ((fbarea = xf86AllocateOffscreenArea(pScreen,
@@ -1453,16 +1452,16 @@ RADEONSetupMemXAA(int scrnIndex, ScreenPtr pScreen)
- pScrn->virtualY + 2 : 2,
0, NULL, NULL,
NULL))) {
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Reserved area from (%d,%d) to (%d,%d)\n",
fbarea->box.x1, fbarea->box.y1,
fbarea->box.x2, fbarea->box.y2);
} else {
- xf86DrvMsg(scrnIndex, X_ERROR, "Unable to reserve area\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to reserve area\n");
}
if (xf86QueryLargestOffscreenArea(pScreen, &width, &height,
0, 0, 0)) {
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Largest offscreen area available: %d x %d\n",
width, height);
}
diff --git a/driver/xf86-video-ati/src/radeon_accelfuncs.c b/driver/xf86-video-ati/src/radeon_accelfuncs.c
index d0bead353..fe892add2 100644
--- a/driver/xf86-video-ati/src/radeon_accelfuncs.c
+++ b/driver/xf86-video-ati/src/radeon_accelfuncs.c
@@ -1152,7 +1152,7 @@ FUNC_NAME(RADEONDisableClipping)(ScrnInfoPtr pScrn)
void
FUNC_NAME(RADEONAccelInit)(ScreenPtr pScreen, XAAInfoRecPtr a)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
a->Flags = (PIXMAP_CACHE
diff --git a/driver/xf86-video-ati/src/radeon_atombios.c b/driver/xf86-video-ati/src/radeon_atombios.c
index 6cc3daa8d..19bf86c9d 100644
--- a/driver/xf86-video-ati/src/radeon_atombios.c
+++ b/driver/xf86-video-ati/src/radeon_atombios.c
@@ -228,7 +228,7 @@ CailDebug(int scrnIndex, const char *format, ...)
va_end(ap);
}
# define CAILFUNC(ptr) \
- CailDebug(((atomBiosHandlePtr)(ptr))->scrnIndex, "CAIL: %s\n", __func__)
+ CailDebug(((atomBiosHandlePtr)(ptr))->pScrn->scrnIndex, "CAIL: %s\n", __func__)
# endif
@@ -414,10 +414,10 @@ rhdAtomGetFbBaseAndSize(atomBiosHandlePtr handle, unsigned int *base,
unsigned int *size)
{
AtomBiosArgRec data;
- if (RHDAtomBiosFunc(handle->scrnIndex, handle, GET_FW_FB_SIZE, &data)
+ if (RHDAtomBiosFunc(handle->pScrn, handle, GET_FW_FB_SIZE, &data)
== ATOM_SUCCESS) {
if (data.val == 0) {
- xf86DrvMsg(handle->scrnIndex, X_WARNING, "%s: AtomBIOS specified VRAM "
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_WARNING, "%s: AtomBIOS specified VRAM "
"scratch space size invalid\n", __func__);
return FALSE;
}
@@ -425,7 +425,7 @@ rhdAtomGetFbBaseAndSize(atomBiosHandlePtr handle, unsigned int *base,
*size = (int)data.val;
} else
return FALSE;
- if (RHDAtomBiosFunc(handle->scrnIndex, handle, GET_FW_FB_START, &data)
+ if (RHDAtomBiosFunc(handle->pScrn, handle, GET_FW_FB_START, &data)
== ATOM_SUCCESS) {
if (data.val == 0)
return FALSE;
@@ -450,32 +450,32 @@ rhdAtomAllocateFbScratch(atomBiosHandlePtr handle,
handle->fbBase = 0;
if (rhdAtomGetFbBaseAndSize(handle, &fb_base, &fb_size)) {
- xf86DrvMsg(handle->scrnIndex, X_INFO, "AtomBIOS requests %ikB"
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_INFO, "AtomBIOS requests %ikB"
" of VRAM scratch space\n",fb_size);
fb_size *= 1024; /* convert to bytes */
- xf86DrvMsg(handle->scrnIndex, X_INFO, "AtomBIOS VRAM scratch base: 0x%x\n",
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_INFO, "AtomBIOS VRAM scratch base: 0x%x\n",
fb_base);
} else {
fb_size = 20 * 1024;
- xf86DrvMsg(handle->scrnIndex, X_INFO, " default to: %i\n",fb_size);
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_INFO, " default to: %i\n",fb_size);
}
if (fb_base && fb_size && size) {
/* 4k align */
fb_size = (fb_size & ~(uint32_t)0xfff) + ((fb_size & 0xfff) ? 1 : 0);
if ((fb_base + fb_size) > (start + size)) {
- xf86DrvMsg(handle->scrnIndex, X_WARNING,
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_WARNING,
"%s: FW FB scratch area %i (size: %i)"
" extends beyond available framebuffer size %i\n",
__func__, fb_base, fb_size, size);
} else if ((fb_base + fb_size) < (start + size)) {
- xf86DrvMsg(handle->scrnIndex, X_WARNING,
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_WARNING,
"%s: FW FB scratch area not located "
"at the end of VRAM. Scratch End: "
"0x%x VRAM End: 0x%x\n", __func__,
(unsigned int)(fb_base + fb_size),
size);
} else if (fb_base < start) {
- xf86DrvMsg(handle->scrnIndex, X_WARNING,
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_WARNING,
"%s: FW FB scratch area extends below "
"the base of the free VRAM: 0x%x Base: 0x%x\n",
__func__, (unsigned int)(fb_base), start);
@@ -487,7 +487,7 @@ rhdAtomAllocateFbScratch(atomBiosHandlePtr handle,
}
if (!handle->fbBase) {
- xf86DrvMsg(handle->scrnIndex, X_INFO,
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_INFO,
"Cannot get VRAM scratch space. "
"Allocating in main memory instead\n");
handle->scratchBase = calloc(fb_size,1);
@@ -503,24 +503,24 @@ rhdAtomASICInit(atomBiosHandlePtr handle)
ASIC_INIT_PS_ALLOCATION asicInit;
AtomBiosArgRec data;
- RHDAtomBiosFunc(handle->scrnIndex, handle,
+ RHDAtomBiosFunc(handle->pScrn, handle,
GET_DEFAULT_ENGINE_CLOCK,
&data);
asicInit.sASICInitClocks.ulDefaultEngineClock = cpu_to_le32(data.val / 10);/*in 10 Khz*/
- RHDAtomBiosFunc(handle->scrnIndex, handle,
+ RHDAtomBiosFunc(handle->pScrn, handle,
GET_DEFAULT_MEMORY_CLOCK,
&data);
asicInit.sASICInitClocks.ulDefaultMemoryClock = cpu_to_le32(data.val / 10);/*in 10 Khz*/
data.exec.dataSpace = NULL;
data.exec.index = 0x0;
data.exec.pspace = &asicInit;
- xf86DrvMsg(handle->scrnIndex, X_INFO, "Calling ASIC Init\n");
- if (RHDAtomBiosFunc(handle->scrnIndex, handle,
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_INFO, "Calling ASIC Init\n");
+ if (RHDAtomBiosFunc(handle->pScrn, handle,
ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
- xf86DrvMsg(handle->scrnIndex, X_INFO, "ASIC_INIT Successful\n");
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_INFO, "ASIC_INIT Successful\n");
return TRUE;
}
- xf86DrvMsg(handle->scrnIndex, X_INFO, "ASIC_INIT Failed\n");
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_INFO, "ASIC_INIT Failed\n");
return FALSE;
}
@@ -538,7 +538,7 @@ atombios_clk_gating_setup(ScrnInfoPtr pScrn, Bool enable)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &dynclk_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Dynamic clock gating %s success\n", enable? "enable" : "disable");
return ATOM_SUCCESS;
}
@@ -568,7 +568,7 @@ atombios_static_pwrmgt_setup(ScrnInfoPtr pScrn, Bool enable)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &pwrmgt_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
ErrorF("Static power management %s success\n", enable? "enable" : "disable");
return ATOM_SUCCESS;
}
@@ -595,7 +595,7 @@ atombios_set_engine_clock(ScrnInfoPtr pScrn, uint32_t engclock)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &eng_clock_ps;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
/* ErrorF("Set engine clock success\n"); */
return ATOM_SUCCESS;
}
@@ -623,7 +623,7 @@ atombios_set_memory_clock(ScrnInfoPtr pScrn, uint32_t memclock)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &mem_clock_ps;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
/* ErrorF("Set memory clock success\n"); */
return ATOM_SUCCESS;
}
@@ -637,8 +637,8 @@ static AtomBiosResult
rhdAtomInit(atomBiosHandlePtr unused1, AtomBiosRequestID unused2,
AtomBiosArgPtr data)
{
- int scrnIndex = data->val;
- RADEONInfoPtr info = RADEONPTR(xf86Screens[scrnIndex]);
+ ScrnInfoPtr pScrn = data->pScrn;
+ RADEONInfoPtr info = RADEONPTR(pScrn);
atomDataTablesPtr atomDataPtr;
unsigned int cmd_offset;
atomBiosHandlePtr handle = NULL;
@@ -652,20 +652,20 @@ rhdAtomInit(atomBiosHandlePtr unused1, AtomBiosRequestID unused2,
#endif
if (!(atomDataPtr = calloc(1, sizeof(atomDataTables)))) {
- xf86DrvMsg(scrnIndex,X_ERROR,"Cannot allocate memory for "
+ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Cannot allocate memory for "
"ATOM BIOS data tabes\n");
goto error;
}
- if (!rhdAtomGetDataTable(scrnIndex, info->VBIOS, atomDataPtr, &cmd_offset, BIOSImageSize))
+ if (!rhdAtomGetDataTable(pScrn->scrnIndex, info->VBIOS, atomDataPtr, &cmd_offset, BIOSImageSize))
goto error1;
if (!(handle = calloc(1, sizeof(atomBiosHandleRec)))) {
- xf86DrvMsg(scrnIndex,X_ERROR,"Cannot allocate memory\n");
+ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Cannot allocate memory\n");
goto error1;
}
handle->BIOSBase = info->VBIOS;
handle->atomDataPtr = atomDataPtr;
handle->cmd_offset = cmd_offset;
- handle->scrnIndex = scrnIndex;
+ handle->pScrn = pScrn;
#if XSERVER_LIBPCIACCESS
handle->device = info->PciInfo;
#else
@@ -869,7 +869,7 @@ rhdAtomLvdsDDC(atomBiosHandlePtr handle, uint32_t offset, unsigned char *record)
/* for testing */
{
- xf86MonPtr mon = xf86InterpretEDID(handle->scrnIndex,EDIDBlock);
+ xf86MonPtr mon = xf86InterpretEDID(handle->pScrn->scrnIndex,EDIDBlock);
xf86PrintEDID(mon);
free(mon);
}
@@ -882,7 +882,7 @@ rhdAtomLvdsDDC(atomBiosHandlePtr handle, uint32_t offset, unsigned char *record)
break;
default:
- xf86DrvMsg(handle->scrnIndex, X_ERROR,
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_ERROR,
"%s: unknown record type: %x\n",__func__,*record);
return NULL;
}
@@ -1240,7 +1240,7 @@ rhdAtomGPIOI2CInfoQuery(atomBiosHandlePtr handle,
case ATOM_GPIO_I2C_CLK_MASK:
if ((sizeof(ATOM_COMMON_TABLE_HEADER)
+ (*val * sizeof(ATOM_GPIO_I2C_ASSIGMENT))) > size) {
- xf86DrvMsg(handle->scrnIndex, X_ERROR, "%s: GPIO_I2C Device "
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_ERROR, "%s: GPIO_I2C Device "
"num %lu exeeds table size %u\n",__func__,
(unsigned long)val,
size);
@@ -1498,7 +1498,7 @@ xf86MonPtr radeon_atom_get_edid(xf86OutputPtr output)
data.exec.dataSpace = (void *)&space;
data.exec.pspace = &edid_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS)
+ if (RHDAtomBiosFunc(info->atomBIOS->pScrn, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS)
ErrorF("Atom Get EDID success\n");
else
ErrorF("Atom Get EDID failed\n");
@@ -2653,7 +2653,7 @@ static AtomBiosResult
rhdAtomExec (atomBiosHandlePtr handle,
AtomBiosRequestID unused, AtomBiosArgPtr data)
{
- RADEONInfoPtr info = RADEONPTR (xf86Screens[handle->scrnIndex]);
+ RADEONInfoPtr info = RADEONPTR (handle->pScrn);
Bool ret = FALSE;
char *msg;
int idx = data->exec.index;
@@ -2667,7 +2667,7 @@ rhdAtomExec (atomBiosHandlePtr handle,
return ATOM_FAILED;
if (handle->fbBase) {
if (!info->FB) {
- xf86DrvMsg(handle->scrnIndex, X_ERROR, "%s: "
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_ERROR, "%s: "
"Cannot exec AtomBIOS: framebuffer not mapped\n",
__func__);
return ATOM_FAILED;
@@ -2680,16 +2680,16 @@ rhdAtomExec (atomBiosHandlePtr handle,
handle->BIOSBase,
&msg);
if (!ret)
- xf86DrvMsg(handle->scrnIndex, X_ERROR, "%s\n",msg);
+ xf86DrvMsg(handle->pScrn->scrnIndex, X_ERROR, "%s\n",msg);
else
- xf86DrvMsgVerb(handle->scrnIndex, X_INFO, 5, "%s\n",msg);
+ xf86DrvMsgVerb(handle->pScrn->scrnIndex, X_INFO, 5, "%s\n",msg);
return (ret) ? ATOM_SUCCESS : ATOM_FAILED;
}
# endif
AtomBiosResult
-RHDAtomBiosFunc(int scrnIndex, atomBiosHandlePtr handle,
+RHDAtomBiosFunc(ScrnInfoPtr pScrn, atomBiosHandlePtr handle,
AtomBiosRequestID id, AtomBiosArgPtr data)
{
AtomBiosResult ret = ATOM_FAILED;
@@ -2710,12 +2710,12 @@ RHDAtomBiosFunc(int scrnIndex, atomBiosHandlePtr handle,
}
if (req_func == NULL) {
- xf86DrvMsg(scrnIndex, X_ERROR, "Unknown AtomBIOS request: %i\n",id);
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unknown AtomBIOS request: %i\n",id);
return ATOM_NOT_IMPLEMENTED;
}
/* Hack for now */
if (id == ATOMBIOS_INIT)
- data->val = scrnIndex;
+ data->pScrn = pScrn;
if (id == ATOMBIOS_INIT || handle)
ret = req_func(handle, id, data);
@@ -2724,15 +2724,15 @@ RHDAtomBiosFunc(int scrnIndex, atomBiosHandlePtr handle,
switch (msg_f) {
case MSG_FORMAT_DEC:
- xf86DrvMsg(scrnIndex,X_INFO,"%s: %li\n", msg,
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"%s: %li\n", msg,
(unsigned long) data->val);
break;
case MSG_FORMAT_HEX:
- xf86DrvMsg(scrnIndex,X_INFO,"%s: 0x%lx\n",msg ,
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"%s: 0x%lx\n",msg ,
(unsigned long) data->val);
break;
case MSG_FORMAT_NONE:
- xf86DrvMsgVerb(scrnIndex, 7, X_INFO,
+ xf86DrvMsgVerb(pScrn->scrnIndex, 7, X_INFO,
"Call to %s succeeded\n", msg);
break;
}
@@ -2744,11 +2744,11 @@ RHDAtomBiosFunc(int scrnIndex, atomBiosHandlePtr handle,
switch (msg_f) {
case MSG_FORMAT_DEC:
case MSG_FORMAT_HEX:
- xf86DrvMsgVerb(scrnIndex, 1, X_WARNING,
+ xf86DrvMsgVerb(pScrn->scrnIndex, 1, X_WARNING,
"Call to %s %s\n", msg, result);
break;
case MSG_FORMAT_NONE:
- xf86DrvMsg(scrnIndex,X_INFO,"Query for %s: %s\n", msg, result);
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Query for %s: %s\n", msg, result);
break;
}
}
@@ -2788,7 +2788,7 @@ CailDelayMicroSeconds(VOID *CAIL, UINT32 delay)
UINT32
CailReadATIRegister(VOID* CAIL, UINT32 idx)
{
- ScrnInfoPtr pScrn = xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex];
+ ScrnInfoPtr pScrn = ((atomBiosHandlePtr)CAIL)->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
unsigned char *RADEONMMIO = pRADEONEnt->MMIO;
@@ -2810,7 +2810,7 @@ CailReadATIRegister(VOID* CAIL, UINT32 idx)
VOID
CailWriteATIRegister(VOID *CAIL, UINT32 idx, UINT32 data)
{
- ScrnInfoPtr pScrn = xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex];
+ ScrnInfoPtr pScrn = ((atomBiosHandlePtr)CAIL)->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
unsigned char *RADEONMMIO = pRADEONEnt->MMIO;
@@ -2830,7 +2830,7 @@ CailWriteATIRegister(VOID *CAIL, UINT32 idx, UINT32 data)
UINT32
CailReadFBData(VOID* CAIL, UINT32 idx)
{
- ScrnInfoPtr pScrn = xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex];
+ ScrnInfoPtr pScrn = ((atomBiosHandlePtr)CAIL)->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
UINT32 ret;
@@ -2844,7 +2844,7 @@ CailReadFBData(VOID* CAIL, UINT32 idx)
ret = *(uint32_t*)((uint8_t*)(((atomBiosHandlePtr)CAIL)->scratchBase) + idx);
/*DEBUGP(ErrorF("%s(%x) = %x\n",__func__,idx,ret));*/
} else {
- xf86DrvMsg(((atomBiosHandlePtr)CAIL)->scrnIndex,X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,
"%s: no fbbase set\n",__func__);
return 0;
}
@@ -2854,24 +2854,25 @@ CailReadFBData(VOID* CAIL, UINT32 idx)
VOID
CailWriteFBData(VOID *CAIL, UINT32 idx, UINT32 data)
{
+ ScrnInfoPtr pScrn = ((atomBiosHandlePtr)CAIL)->pScrn;
CAILFUNC(CAIL);
/*DEBUGP(ErrorF("%s(%x,%x)\n",__func__,idx,data));*/
if (((atomBiosHandlePtr)CAIL)->fbBase) {
uint8_t *FBBase = (uint8_t*)
- RADEONPTR(xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex])->FB;
+ RADEONPTR(pScrn)->FB;
*((uint32_t*)(FBBase + (((atomBiosHandlePtr)CAIL)->fbBase) + idx)) = data;
} else if (((atomBiosHandlePtr)CAIL)->scratchBase) {
*(uint32_t*)((uint8_t*)(((atomBiosHandlePtr)CAIL)->scratchBase) + idx) = data;
} else
- xf86DrvMsg(((atomBiosHandlePtr)CAIL)->scrnIndex,X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,
"%s: no fbbase set\n",__func__);
}
ULONG
CailReadMC(VOID *CAIL, ULONG Address)
{
- ScrnInfoPtr pScrn = xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex];
+ ScrnInfoPtr pScrn = ((atomBiosHandlePtr)CAIL)->pScrn;
ULONG ret;
CAILFUNC(CAIL);
@@ -2884,7 +2885,7 @@ CailReadMC(VOID *CAIL, ULONG Address)
VOID
CailWriteMC(VOID *CAIL, ULONG Address, ULONG data)
{
- ScrnInfoPtr pScrn = xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex];
+ ScrnInfoPtr pScrn = ((atomBiosHandlePtr)CAIL)->pScrn;
CAILFUNC(CAIL);
/*DEBUGP(ErrorF("%s(%x,%x)\n",__func__,Address,data));*/
@@ -2896,14 +2897,16 @@ CailWriteMC(VOID *CAIL, ULONG Address, ULONG data)
VOID
CailReadPCIConfigData(VOID*CAIL, VOID* ret, UINT32 idx,UINT16 size)
{
- pci_device_cfg_read(RADEONPTR(xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex])->PciInfo,
+ ScrnInfoPtr pScrn = ((atomBiosHandlePtr)CAIL)->pScrn;
+ pci_device_cfg_read(RADEONPTR(pScrn)->PciInfo,
ret,idx << 2 , size >> 3, NULL);
}
VOID
CailWritePCIConfigData(VOID*CAIL,VOID*src,UINT32 idx,UINT16 size)
{
- pci_device_cfg_write(RADEONPTR(xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex])->PciInfo,
+ ScrnInfoPtr pScrn = ((atomBiosHandlePtr)CAIL)->pScrn;
+ pci_device_cfg_write(RADEONPTR(pScrn)->PciInfo,
src, idx << 2, size >> 3, NULL);
}
@@ -2965,7 +2968,7 @@ CailWritePCIConfigData(VOID*CAIL,VOID*src,UINT32 idx,UINT16 size)
ULONG
CailReadPLL(VOID *CAIL, ULONG Address)
{
- ScrnInfoPtr pScrn = xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex];
+ ScrnInfoPtr pScrn = ((atomBiosHandlePtr)CAIL)->pScrn;
ULONG ret;
CAILFUNC(CAIL);
@@ -2978,7 +2981,7 @@ CailReadPLL(VOID *CAIL, ULONG Address)
VOID
CailWritePLL(VOID *CAIL, ULONG Address,ULONG Data)
{
- ScrnInfoPtr pScrn = xf86Screens[((atomBiosHandlePtr)CAIL)->scrnIndex];
+ ScrnInfoPtr pScrn = ((atomBiosHandlePtr)CAIL)->pScrn;
CAILFUNC(CAIL);
/*DEBUGP(ErrorF("%s(%x,%x)\n",__func__,Address,Data));*/
diff --git a/driver/xf86-video-ati/src/radeon_atombios.h b/driver/xf86-video-ati/src/radeon_atombios.h
index 866c4bf39..0671b8d05 100644
--- a/driver/xf86-video-ati/src/radeon_atombios.h
+++ b/driver/xf86-video-ati/src/radeon_atombios.h
@@ -105,10 +105,11 @@ typedef union AtomBiosArg
DisplayModePtr modes;
AtomExecRec exec;
AtomFbRec fb;
+ ScrnInfoPtr pScrn;
} AtomBiosArgRec, *AtomBiosArgPtr;
extern AtomBiosResult
-RHDAtomBiosFunc(int scrnIndex, atomBiosHandlePtr handle,
+RHDAtomBiosFunc(ScrnInfoPtr pScrn, atomBiosHandlePtr handle,
AtomBiosRequestID id, AtomBiosArgPtr data);
extern Bool
@@ -254,7 +255,7 @@ typedef struct _atomDataTables
} atomDataTables, *atomDataTablesPtr;
typedef struct _atomBiosHandle {
- int scrnIndex;
+ ScrnInfoPtr pScrn;
unsigned char *BIOSBase;
atomDataTablesPtr atomDataPtr;
unsigned int cmd_offset;
diff --git a/driver/xf86-video-ati/src/radeon_bios.c b/driver/xf86-video-ati/src/radeon_bios.c
index 5f1253421..ffa12dfb1 100644
--- a/driver/xf86-video-ati/src/radeon_bios.c
+++ b/driver/xf86-video-ati/src/radeon_bios.c
@@ -429,35 +429,35 @@ RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
if (info->IsAtomBios) {
AtomBiosArgRec atomBiosArg;
- if (RHDAtomBiosFunc(pScrn->scrnIndex, NULL, ATOMBIOS_INIT, &atomBiosArg)
+ if (RHDAtomBiosFunc(pScrn, NULL, ATOMBIOS_INIT, &atomBiosArg)
== ATOM_SUCCESS) {
info->atomBIOS = atomBiosArg.atomhandle;
}
atomBiosArg.fb.start = info->FbFreeStart;
atomBiosArg.fb.size = info->FbFreeSize;
- if (RHDAtomBiosFunc(pScrn->scrnIndex, info->atomBIOS, ATOMBIOS_ALLOCATE_FB_SCRATCH,
+ if (RHDAtomBiosFunc(pScrn, info->atomBIOS, ATOMBIOS_ALLOCATE_FB_SCRATCH,
&atomBiosArg) == ATOM_SUCCESS) {
info->FbFreeStart = atomBiosArg.fb.start;
info->FbFreeSize = atomBiosArg.fb.size;
}
- RHDAtomBiosFunc(pScrn->scrnIndex, info->atomBIOS, GET_DEFAULT_ENGINE_CLOCK,
+ RHDAtomBiosFunc(pScrn, info->atomBIOS, GET_DEFAULT_ENGINE_CLOCK,
&atomBiosArg);
- RHDAtomBiosFunc(pScrn->scrnIndex, info->atomBIOS, GET_DEFAULT_MEMORY_CLOCK,
+ RHDAtomBiosFunc(pScrn, info->atomBIOS, GET_DEFAULT_MEMORY_CLOCK,
&atomBiosArg);
- RHDAtomBiosFunc(pScrn->scrnIndex, info->atomBIOS,
+ RHDAtomBiosFunc(pScrn, info->atomBIOS,
GET_MAX_PIXEL_CLOCK_PLL_OUTPUT, &atomBiosArg);
- RHDAtomBiosFunc(pScrn->scrnIndex, info->atomBIOS,
+ RHDAtomBiosFunc(pScrn, info->atomBIOS,
GET_MIN_PIXEL_CLOCK_PLL_OUTPUT, &atomBiosArg);
- RHDAtomBiosFunc(pScrn->scrnIndex, info->atomBIOS,
+ RHDAtomBiosFunc(pScrn, info->atomBIOS,
GET_MAX_PIXEL_CLOCK_PLL_INPUT, &atomBiosArg);
- RHDAtomBiosFunc(pScrn->scrnIndex, info->atomBIOS,
+ RHDAtomBiosFunc(pScrn, info->atomBIOS,
GET_MIN_PIXEL_CLOCK_PLL_INPUT, &atomBiosArg);
- RHDAtomBiosFunc(pScrn->scrnIndex, info->atomBIOS,
+ RHDAtomBiosFunc(pScrn, info->atomBIOS,
GET_MAX_PIXEL_CLK, &atomBiosArg);
- RHDAtomBiosFunc(pScrn->scrnIndex, info->atomBIOS,
+ RHDAtomBiosFunc(pScrn, info->atomBIOS,
GET_REF_CLOCK, &atomBiosArg);
info->MasterDataStart = RADEON_BIOS16 (info->ROMHeaderStart + 32);
diff --git a/driver/xf86-video-ati/src/radeon_chipinfo_gen.h b/driver/xf86-video-ati/src/radeon_chipinfo_gen.h
index a57882502..c64c92127 100644
--- a/driver/xf86-video-ati/src/radeon_chipinfo_gen.h
+++ b/driver/xf86-video-ati/src/radeon_chipinfo_gen.h
@@ -380,6 +380,7 @@ static RADEONCardInfo RADEONCards[] = {
{ 0x9645, CHIP_FAMILY_SUMO2, 1, 1, 0, 0, 1 },
{ 0x9647, CHIP_FAMILY_SUMO, 1, 1, 0, 0, 1 },
{ 0x9648, CHIP_FAMILY_SUMO, 1, 1, 0, 0, 1 },
+ { 0x9649, CHIP_FAMILY_SUMO, 1, 1, 0, 0, 1 },
{ 0x964A, CHIP_FAMILY_SUMO, 0, 1, 0, 0, 1 },
{ 0x964B, CHIP_FAMILY_SUMO, 0, 1, 0, 0, 1 },
{ 0x964C, CHIP_FAMILY_SUMO, 0, 1, 0, 0, 1 },
@@ -399,6 +400,7 @@ static RADEONCardInfo RADEONCards[] = {
{ 0x9807, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 },
{ 0x9808, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 },
{ 0x9809, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 },
+ { 0x980A, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 },
{ 0x6880, CHIP_FAMILY_CYPRESS, 1, 0, 0, 0, 0 },
{ 0x6888, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 },
{ 0x6889, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 },
@@ -480,6 +482,7 @@ static RADEONCardInfo RADEONCards[] = {
{ 0x6747, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 },
{ 0x6748, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 },
{ 0x6749, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 },
+ { 0x674A, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 },
{ 0x6750, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 },
{ 0x6751, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 },
{ 0x6758, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 },
@@ -505,6 +508,7 @@ static RADEONCardInfo RADEONCards[] = {
{ 0x6767, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 },
{ 0x6768, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 },
{ 0x6770, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 },
+ { 0x6771, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 },
{ 0x6772, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 },
{ 0x6778, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 },
{ 0x6779, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 },
@@ -513,7 +517,24 @@ static RADEONCardInfo RADEONCards[] = {
{ 0x9901, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
{ 0x9903, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
{ 0x9904, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
- { 0x990f, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
+ { 0x9905, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
+ { 0x9906, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
+ { 0x9907, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
+ { 0x9908, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
+ { 0x9909, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
+ { 0x990A, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
+ { 0x990F, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
+ { 0x9910, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
+ { 0x9913, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
+ { 0x9917, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
+ { 0x9918, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
+ { 0x9919, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
{ 0x9990, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
{ 0x9991, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
+ { 0x9992, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
+ { 0x9993, CHIP_FAMILY_ARUBA, 0, 0, 0, 0, 0 },
+ { 0x9994, CHIP_FAMILY_ARUBA, 1, 0, 0, 0, 0 },
+ { 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 },
};
diff --git a/driver/xf86-video-ati/src/radeon_chipset_gen.h b/driver/xf86-video-ati/src/radeon_chipset_gen.h
index e7f7379a0..d2f61a06d 100644
--- a/driver/xf86-video-ati/src/radeon_chipset_gen.h
+++ b/driver/xf86-video-ati/src/radeon_chipset_gen.h
@@ -380,6 +380,7 @@ static SymTabRec RADEONChipsets[] = {
{ PCI_CHIP_SUMO2_9645, "SUMO2" },
{ PCI_CHIP_SUMO_9647, "SUMO" },
{ PCI_CHIP_SUMO_9648, "SUMO" },
+ { PCI_CHIP_SUMO_9649, "SUMO" },
{ PCI_CHIP_SUMO_964A, "SUMO" },
{ PCI_CHIP_SUMO_964B, "SUMO" },
{ PCI_CHIP_SUMO_964C, "SUMO" },
@@ -399,6 +400,7 @@ static SymTabRec RADEONChipsets[] = {
{ PCI_CHIP_PALM_9807, "AMD Radeon HD 6200 Series Graphics" },
{ PCI_CHIP_PALM_9808, "PALM" },
{ PCI_CHIP_PALM_9809, "PALM" },
+ { PCI_CHIP_PALM_980A, "PALM" },
{ PCI_CHIP_CYPRESS_6880, "CYPRESS" },
{ PCI_CHIP_CYPRESS_6888, "ATI FirePro (FireGL) Graphics Adapter" },
{ PCI_CHIP_CYPRESS_6889, "ATI FirePro (FireGL) Graphics Adapter" },
@@ -480,6 +482,7 @@ static SymTabRec RADEONChipsets[] = {
{ PCI_CHIP_TURKS_6747, "TURKS" },
{ PCI_CHIP_TURKS_6748, "TURKS" },
{ PCI_CHIP_TURKS_6749, "TURKS" },
+ { PCI_CHIP_TURKS_674A, "TURKS" },
{ PCI_CHIP_TURKS_6750, "TURKS" },
{ PCI_CHIP_TURKS_6751, "TURKS" },
{ PCI_CHIP_TURKS_6758, "TURKS" },
@@ -505,6 +508,7 @@ static SymTabRec RADEONChipsets[] = {
{ PCI_CHIP_CAICOS_6767, "CAICOS" },
{ PCI_CHIP_CAICOS_6768, "CAICOS" },
{ PCI_CHIP_CAICOS_6770, "CAICOS" },
+ { PCI_CHIP_CAICOS_6771, "CAICOS" },
{ PCI_CHIP_CAICOS_6772, "CAICOS" },
{ PCI_CHIP_CAICOS_6778, "CAICOS" },
{ PCI_CHIP_CAICOS_6779, "CAICOS" },
@@ -513,8 +517,25 @@ static SymTabRec RADEONChipsets[] = {
{ PCI_CHIP_ARUBA_9901, "ARUBA" },
{ PCI_CHIP_ARUBA_9903, "ARUBA" },
{ PCI_CHIP_ARUBA_9904, "ARUBA" },
- { PCI_CHIP_ARUBA_990f, "ARUBA" },
+ { PCI_CHIP_ARUBA_9905, "ARUBA" },
+ { PCI_CHIP_ARUBA_9906, "ARUBA" },
+ { PCI_CHIP_ARUBA_9907, "ARUBA" },
+ { PCI_CHIP_ARUBA_9908, "ARUBA" },
+ { PCI_CHIP_ARUBA_9909, "ARUBA" },
+ { PCI_CHIP_ARUBA_990A, "ARUBA" },
+ { PCI_CHIP_ARUBA_990F, "ARUBA" },
+ { PCI_CHIP_ARUBA_9910, "ARUBA" },
+ { PCI_CHIP_ARUBA_9913, "ARUBA" },
+ { PCI_CHIP_ARUBA_9917, "ARUBA" },
+ { PCI_CHIP_ARUBA_9918, "ARUBA" },
+ { PCI_CHIP_ARUBA_9919, "ARUBA" },
{ PCI_CHIP_ARUBA_9990, "ARUBA" },
{ PCI_CHIP_ARUBA_9991, "ARUBA" },
+ { PCI_CHIP_ARUBA_9992, "ARUBA" },
+ { PCI_CHIP_ARUBA_9993, "ARUBA" },
+ { PCI_CHIP_ARUBA_9994, "ARUBA" },
+ { PCI_CHIP_ARUBA_99A0, "ARUBA" },
+ { PCI_CHIP_ARUBA_99A2, "ARUBA" },
+ { PCI_CHIP_ARUBA_99A4, "ARUBA" },
{ -1, NULL }
};
diff --git a/driver/xf86-video-ati/src/radeon_crtc.c b/driver/xf86-video-ati/src/radeon_crtc.c
index ade12283e..18b015595 100644
--- a/driver/xf86-video-ati/src/radeon_crtc.c
+++ b/driver/xf86-video-ati/src/radeon_crtc.c
@@ -492,7 +492,6 @@ radeon_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
ScrnInfoPtr pScrn = crtc->scrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "mode_set: x %d y %d\n", x, y);
if (IS_AVIVO_VARIANT || info->r4xx_atom) {
atombios_crtc_mode_set(crtc, mode, adjusted_mode, x, y);
} else {
@@ -1120,7 +1119,7 @@ RADEONSetTiling(ScrnInfoPtr pScrn)
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"[drm] failed changing tiling status\n");
/* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
- pSAREAPriv = DRIGetSAREAPrivate(screenInfo.screens[pScrn->scrnIndex]);
+ pSAREAPriv = DRIGetSAREAPrivate(xf86ScrnToScreen(pScrn));
info->tilingEnabled = pSAREAPriv->tiling_enabled ? TRUE : FALSE;
}
#endif
diff --git a/driver/xf86-video-ati/src/radeon_cursor.c b/driver/xf86-video-ati/src/radeon_cursor.c
index 6c2b9e8ac..faf71aeee 100644
--- a/driver/xf86-video-ati/src/radeon_cursor.c
+++ b/driver/xf86-video-ati/src/radeon_cursor.c
@@ -407,7 +407,7 @@ radeon_crtc_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
/* Initialize hardware cursor support. */
Bool RADEONCursorInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
diff --git a/driver/xf86-video-ati/src/radeon_dri.c b/driver/xf86-video-ati/src/radeon_dri.c
index 56b1969d7..0d031f5ea 100644
--- a/driver/xf86-video-ati/src/radeon_dri.c
+++ b/driver/xf86-video-ati/src/radeon_dri.c
@@ -91,7 +91,7 @@ static void RADEONDRIClipNotify(ScreenPtr pScreen, WindowPtr *ppWin, int num);
*/
static Bool RADEONInitVisualConfigs(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
int numConfigs = 0;
__GLXvisualConfig *pConfigs = 0;
@@ -317,7 +317,7 @@ static void RADEONDestroyContext(ScreenPtr pScreen, drm_context_t hwContext,
*/
static void RADEONEnterServer(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
drm_radeon_sarea_t *pSAREAPriv;
@@ -359,7 +359,7 @@ static void RADEONEnterServer(ScreenPtr pScreen)
*/
static void RADEONLeaveServer(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
RING_LOCALS;
@@ -490,7 +490,7 @@ static void RADEONDRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
{
#ifdef USE_XAA
ScreenPtr pScreen = pParent->drawable.pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
BoxPtr pboxTmp, pboxNext, pboxBase;
@@ -900,7 +900,7 @@ static Bool RADEONSetAgpMode(RADEONInfoPtr info, ScreenPtr pScreen)
/* Initialize Radeon's AGP registers */
static void RADEONSetAgpBase(RADEONInfoPtr info, ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
unsigned char *RADEONMMIO = info->MMIO;
if (info->ChipFamily >= CHIP_FAMILY_R600)
@@ -1156,7 +1156,7 @@ static Bool RADEONDRIPciInit(RADEONInfoPtr info, ScreenPtr pScreen)
/* Initialize the kernel data structures */
static int RADEONDRIKernelInit(RADEONInfoPtr info, ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
int cpp = info->CurrentLayout.pixel_bytes;
drm_radeon_init_t drmInfo;
@@ -1263,7 +1263,7 @@ static Bool RADEONDRIBufInit(RADEONInfoPtr info, ScreenPtr pScreen)
static void RADEONDRIIrqInit(RADEONInfoPtr info, ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
if (!info->dri->irq) {
info->dri->irq = drmGetInterruptFromBusID(
@@ -1507,7 +1507,7 @@ Bool RADEONDRISetVBlankInterrupt(ScrnInfoPtr pScrn, Bool on)
*/
Bool RADEONDRIScreenInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
DRIInfoPtr pDRIInfo;
RADEONDRIPtr pRADEONDRI;
@@ -1689,15 +1689,15 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen)
return TRUE;
}
-static Bool RADEONDRIDoCloseScreen(int scrnIndex, ScreenPtr pScreen)
+static Bool RADEONDRIDoCloseScreen(CLOSE_SCREEN_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONDRICloseScreen(pScreen);
pScreen->CloseScreen = info->dri->DRICloseScreen;
- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
}
/* Finish initializing the device-dependent DRI state, and call
@@ -1706,7 +1706,7 @@ static Bool RADEONDRIDoCloseScreen(int scrnIndex, ScreenPtr pScreen)
*/
Bool RADEONDRIFinishScreenInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
drm_radeon_sarea_t *pSAREAPriv;
RADEONDRIPtr pRADEONDRI;
@@ -1804,7 +1804,7 @@ Bool RADEONDRIFinishScreenInit(ScreenPtr pScreen)
void RADEONDRIResume(ScreenPtr pScreen)
{
int _ret;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
if (info->dri->pKernelDRMVersion->version_minor >= 9) {
@@ -1839,7 +1839,7 @@ void RADEONDRIResume(ScreenPtr pScreen)
void RADEONDRIStop(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
RING_LOCALS;
@@ -1862,7 +1862,7 @@ void RADEONDRIStop(ScreenPtr pScreen)
*/
void RADEONDRICloseScreen(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
drm_radeon_init_t drmInfo;
@@ -2066,7 +2066,7 @@ out:
static void RADEONEnablePageFlip(ScreenPtr pScreen)
{
#ifdef DAMAGE
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
if (info->dri->allowPageFlip) {
@@ -2106,7 +2106,7 @@ static void RADEONDRITransitionMultiToSingle3d(ScreenPtr pScreen)
static void RADEONDRITransitionTo3d(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
#ifdef USE_XAA
FBAreaPtr fbarea;
@@ -2194,7 +2194,7 @@ static void RADEONDRITransitionTo3d(ScreenPtr pScreen)
static void RADEONDRITransitionTo2d(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
drm_radeon_sarea_t *pSAREAPriv = DRIGetSAREAPrivate(pScreen);
@@ -2239,7 +2239,7 @@ static void RADEONDRITransitionTo2d(ScreenPtr pScreen)
static void
RADEONDRIClipNotify(ScreenPtr pScreen, WindowPtr *ppWin, int num)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
REGION_UNINIT(pScreen, &info->dri->driRegion);
@@ -2262,7 +2262,7 @@ RADEONDRIClipNotify(ScreenPtr pScreen, WindowPtr *ppWin, int num)
void RADEONDRIAllocatePCIGARTTable(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
if (info->cardType != CARD_PCIE ||
diff --git a/driver/xf86-video-ati/src/radeon_dri2.c b/driver/xf86-video-ati/src/radeon_dri2.c
index 8bd3f6671..43514b7b5 100644
--- a/driver/xf86-video-ati/src/radeon_dri2.c
+++ b/driver/xf86-video-ati/src/radeon_dri2.c
@@ -81,7 +81,7 @@ radeon_dri2_create_buffers(DrawablePtr drawable,
int count)
{
ScreenPtr pScreen = drawable->pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
BufferPtr buffers;
struct dri2_buffer_priv *privates;
@@ -245,7 +245,7 @@ radeon_dri2_create_buffer(DrawablePtr drawable,
unsigned int format)
{
ScreenPtr pScreen = drawable->pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
BufferPtr buffers;
struct dri2_buffer_priv *privates;
@@ -414,7 +414,7 @@ radeon_dri2_destroy_buffer(DrawablePtr drawable, BufferPtr buffers)
/* Trying to free an already freed buffer is unlikely to end well */
if (private->refcnt == 0) {
- ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"Attempted to destroy previously destroyed buffer.\
@@ -443,7 +443,7 @@ radeon_dri2_copy_region(DrawablePtr drawable,
struct dri2_buffer_priv *src_private = src_buffer->driverPrivate;
struct dri2_buffer_priv *dst_private = dest_buffer->driverPrivate;
ScreenPtr pScreen = drawable->pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
DrawablePtr src_drawable;
DrawablePtr dst_drawable;
RegionPtr copy_clip;
@@ -620,7 +620,7 @@ radeon_dri2_client_state_changed(CallbackListPtr *ClientStateCallback, pointer d
static int radeon_dri2_drawable_crtc(DrawablePtr pDraw)
{
ScreenPtr pScreen = pDraw->pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcPtr crtc;
int crtc_id = -1;
@@ -744,6 +744,7 @@ can_flip(ScrnInfoPtr pScrn, DrawablePtr draw,
{
return draw->type == DRAWABLE_WINDOW &&
RADEONPTR(pScrn)->allowPageFlip &&
+ pScrn->vtSema &&
DRI2CanFlip(draw) &&
can_exchange(pScrn, draw, front, back);
}
@@ -773,7 +774,7 @@ radeon_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPt
/* Do we need to update the Screen? */
screen = draw->pScreen;
- info = RADEONPTR(xf86Screens[screen->myNum]);
+ info = RADEONPTR(xf86ScreenToScrn(screen));
if (front_radeon->bo == info->front_bo) {
radeon_bo_unref(info->front_bo);
info->front_bo = back_radeon->bo;
@@ -804,7 +805,7 @@ void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec,
goto cleanup;
screen = drawable->pScreen;
- scrn = xf86Screens[screen->myNum];
+ scrn = xf86ScreenToScrn(screen);
switch (event->type) {
case DRI2_FLIP:
@@ -885,7 +886,7 @@ static drmVBlankSeqType populate_vbl_request_type(RADEONInfoPtr info, int crtc)
static int radeon_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
{
ScreenPtr screen = draw->pScreen;
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
RADEONInfoPtr info = RADEONPTR(scrn);
drmVBlank vbl;
int ret;
@@ -925,7 +926,7 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw,
CARD64 remainder)
{
ScreenPtr screen = draw->pScreen;
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
RADEONInfoPtr info = RADEONPTR(scrn);
DRI2FrameEventPtr wait_info = NULL;
drmVBlank vbl;
@@ -1061,7 +1062,7 @@ void radeon_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec,
}
screen = drawable->pScreen;
- scrn = xf86Screens[screen->myNum];
+ scrn = xf86ScreenToScrn(screen);
pixmap = screen->GetScreenPixmap(screen);
xf86DrvMsgVerb(scrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
@@ -1123,7 +1124,7 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
void *data)
{
ScreenPtr screen = draw->pScreen;
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
RADEONInfoPtr info = RADEONPTR(scrn);
drmVBlank vbl;
int ret, crtc= radeon_dri2_drawable_crtc(draw), flip = 0;
@@ -1309,7 +1310,7 @@ blit_fallback:
Bool
radeon_dri2_screen_init(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
DRI2InfoRec dri2_info = { 0 };
#ifdef USE_DRI2_SCHEDULING
@@ -1413,7 +1414,7 @@ radeon_dri2_screen_init(ScreenPtr pScreen)
void radeon_dri2_close_screen(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
#ifdef USE_DRI2_SCHEDULING
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
diff --git a/driver/xf86-video-ati/src/radeon_driver.c b/driver/xf86-video-ati/src/radeon_driver.c
index 7f8df9c64..78a074dd0 100644
--- a/driver/xf86-video-ati/src/radeon_driver.c
+++ b/driver/xf86-video-ati/src/radeon_driver.c
@@ -121,7 +121,7 @@
#include "radeon_chipinfo_gen.h"
/* Forward definitions for driver functions */
-static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen);
+static Bool RADEONCloseScreen(CLOSE_SCREEN_ARGS_DECL);
static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode);
static void RADEONSave(ScrnInfoPtr pScrn);
@@ -231,7 +231,7 @@ static void *
radeonShadowWindow(ScreenPtr screen, CARD32 row, CARD32 offset, int mode,
CARD32 *size, void *closure)
{
- ScrnInfoPtr pScrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(screen);
RADEONInfoPtr info = RADEONPTR(pScrn);
int stride;
@@ -243,7 +243,7 @@ radeonShadowWindow(ScreenPtr screen, CARD32 row, CARD32 offset, int mode,
static Bool
RADEONCreateScreenResources (ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
PixmapPtr pixmap;
@@ -3376,15 +3376,14 @@ static void RADEONLoadPalette(ScrnInfoPtr pScrn, int numColors,
#endif
}
-static void RADEONBlockHandler(int i, pointer blockData,
- pointer pTimeout, pointer pReadmask)
+static void RADEONBlockHandler(BLOCKHANDLER_ARGS_DECL)
{
- ScreenPtr pScreen = screenInfo.screens[i];
- ScrnInfoPtr pScrn = xf86Screens[i];
+ SCREEN_PTR(arg);
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
pScreen->BlockHandler = info->BlockHandler;
- (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
+ (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
pScreen->BlockHandler = RADEONBlockHandler;
if (info->VideoTimerCallback)
@@ -3451,10 +3450,9 @@ RADEONInitBIOSRegisters(ScrnInfoPtr pScrn)
/* Called at the start of each server generation. */
-Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
- int argc, char **argv)
+Bool RADEONScreenInit(SCREEN_INIT_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
int hasDRI = 0;
#ifdef RENDER
@@ -3639,14 +3637,14 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
info->dri->textureSize = -1;
}
}
- if (!RADEONSetupMemXAA_DRI(scrnIndex, pScreen))
+ if (!RADEONSetupMemXAA_DRI(pScreen))
return FALSE;
pScrn->fbOffset = info->dri->frontOffset;
}
#endif
#ifdef USE_XAA
- if (!info->useEXA && !hasDRI && !RADEONSetupMemXAA(scrnIndex, pScreen))
+ if (!info->useEXA && !hasDRI && !RADEONSetupMemXAA(pScreen))
return FALSE;
#endif
@@ -3668,9 +3666,9 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
int maxy = info->FbMapSize / width_bytes;
if (maxy <= pScrn->virtualY * 3) {
- xf86DrvMsg(scrnIndex, X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Static buffer allocation failed. Disabling DRI.\n");
- xf86DrvMsg(scrnIndex, X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"At least %d kB of video memory needed at this "
"resolution and depth.\n",
(pScrn->displayWidth * pScrn->virtualY *
@@ -3819,16 +3817,16 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"Initializing Acceleration\n");
if (RADEONAccelInit(pScreen)) {
- xf86DrvMsg(scrnIndex, X_INFO, "Acceleration enabled\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration enabled\n");
info->accelOn = TRUE;
} else {
- xf86DrvMsg(scrnIndex, X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Acceleration initialization failed\n");
- xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n");
info->accelOn = FALSE;
}
} else {
- xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n");
info->accelOn = FALSE;
}
@@ -3855,19 +3853,19 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
if (xf86QueryLargestOffscreenArea(pScreen, &width, &height,
0, 0, 0)) {
- xf86DrvMsg(scrnIndex, X_INFO,
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Largest offscreen area available: %d x %d\n",
width, height);
}
}
#endif /* USE_XAA */
} else {
- xf86DrvMsg(scrnIndex, X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Hardware cursor initialization failed\n");
- xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using software cursor\n");
}
} else {
- xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using software cursor\n");
}
/* DGA setup */
@@ -3907,7 +3905,7 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
info->CreateScreenResources = pScreen->CreateScreenResources;
pScreen->CreateScreenResources = RADEONCreateScreenResources;
- if (!xf86CrtcScreenInit (pScreen))
+ if (!xf86CrtcScreenInit (pScreen))
return FALSE;
/* Colormap setup */
@@ -5940,7 +5938,7 @@ static void RADEONRestore(ScrnInfoPtr pScrn)
static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
Bool unblank;
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
@@ -5958,9 +5956,9 @@ static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode)
return TRUE;
}
-Bool RADEONSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
+Bool RADEONSwitchMode(SWITCH_MODE_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
RADEONInfoPtr info = RADEONPTR(pScrn);
Bool tilingOld = info->tilingEnabled;
Bool ret;
@@ -5997,9 +5995,9 @@ Bool RADEONSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
if (info->tilingEnabled != tilingOld) {
/* need to redraw front buffer, I guess this can be considered a hack ? */
- xf86EnableDisableFBAccess(scrnIndex, FALSE);
+ xf86EnableDisableFBAccess(arg, FALSE);
RADEONChangeSurfaces(pScrn);
- xf86EnableDisableFBAccess(scrnIndex, TRUE);
+ xf86EnableDisableFBAccess(arg, TRUE);
/* xf86SetRootClip would do, but can't access that here */
}
@@ -6054,10 +6052,10 @@ xf86ModeBandwidth(DisplayModePtr mode, int depth)
#endif
/* Used to disallow modes that are not supported by the hardware */
-ModeStatus RADEONValidMode(int scrnIndex, DisplayModePtr mode,
+ModeStatus RADEONValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
Bool verbose, int flag)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
@@ -6161,7 +6159,7 @@ void RADEONDoAdjustFrame(ScrnInfoPtr pScrn, int x, int y, Bool crtc2)
/*** NOTE: r3/4xx will need sarea and drm pageflip updates to handle the xytile regs for
*** pageflipping!
***/
- pSAREAPriv = DRIGetSAREAPrivate(screenInfo.screens[pScrn->scrnIndex]);
+ pSAREAPriv = DRIGetSAREAPrivate(xf86ScrnToScreen(pScrn));
/* can't get at sarea in a semi-sane way? */
pSAREA = (void *)((char*)pSAREAPriv - sizeof(XF86DRISAREARec));
@@ -6192,9 +6190,9 @@ void RADEONDoAdjustFrame(ScrnInfoPtr pScrn, int x, int y, Bool crtc2)
OUTREG(reg, Base);
}
-void RADEONAdjustFrame(int scrnIndex, int x, int y, int flags)
+void RADEONAdjustFrame(ADJUST_FRAME_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
@@ -6230,9 +6228,9 @@ void RADEONAdjustFrame(int scrnIndex, int x, int y, int flags)
/* Called when VT switching back to the X server. Reinitialize the
* video mode.
*/
-Bool RADEONEnterVT(int scrnIndex, int flags)
+Bool RADEONEnterVT(VT_FUNC_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
int i;
@@ -6330,9 +6328,9 @@ Bool RADEONEnterVT(int scrnIndex, int flags)
/* Called when VT switching away from the X server. Restore the
* original text mode.
*/
-void RADEONLeaveVT(int scrnIndex, int flags)
+void RADEONLeaveVT(VT_FUNC_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
int i;
@@ -6417,9 +6415,9 @@ void RADEONLeaveVT(int scrnIndex, int flags)
* text mode, unmap video memory, and unwrap and call the saved
* CloseScreen function.
*/
-static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
+static Bool RADEONCloseScreen(CLOSE_SCREEN_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
int i;
@@ -6502,12 +6500,12 @@ static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
pScreen->BlockHandler = info->BlockHandler;
pScreen->CloseScreen = info->CloseScreen;
- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
}
-void RADEONFreeScreen(int scrnIndex, int flags)
+void RADEONFreeScreen(FREE_SCREEN_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
diff --git a/driver/xf86-video-ati/src/radeon_exa.c b/driver/xf86-video-ati/src/radeon_exa.c
index 99a58069e..e6d9eafac 100644
--- a/driver/xf86-video-ati/src/radeon_exa.c
+++ b/driver/xf86-video-ati/src/radeon_exa.c
@@ -48,7 +48,7 @@
/***********************************************************************/
-#define RINFO_FROM_SCREEN(pScr) ScrnInfoPtr pScrn = xf86Screens[pScr->myNum]; \
+#define RINFO_FROM_SCREEN(pScr) ScrnInfoPtr pScrn = xf86ScreenToScrn(pScr); \
RADEONInfoPtr info = RADEONPTR(pScrn)
static struct {
@@ -301,7 +301,7 @@ static void RADEONFinishAccess_BE(PixmapPtr pPix, int index)
Bool RADEONPrepareAccess_CS(PixmapPtr pPix, int index)
{
ScreenPtr pScreen = pPix->drawable.pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_exa_pixmap_priv *driver_priv;
uint32_t possible_domains = ~0U;
@@ -384,7 +384,7 @@ void RADEONFinishAccess_CS(PixmapPtr pPix, int index)
void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_exa_pixmap_priv *new_priv;
@@ -450,7 +450,7 @@ void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height,
int depth, int usage_hint, int bitsPerPixel,
int *new_pitch)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_exa_pixmap_priv *new_priv;
int pitch, base_align;
@@ -511,6 +511,13 @@ void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height,
surface.last_level = 0;
surface.bpe = cpp;
surface.nsamples = 1;
+ if (height < 64) {
+ /* disable 2d tiling for small surface to work around
+ * the fact that ddx align height to 8 pixel for old
+ * obscure reason i can't remember
+ */
+ tiling &= ~RADEON_TILING_MACRO;
+ }
surface.flags = RADEON_SURF_SCANOUT;
surface.flags |= RADEON_SURF_SET(RADEON_SURF_TYPE_2D, TYPE);
surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR, MODE);
@@ -706,7 +713,7 @@ Bool RADEONEXAPixmapIsOffscreen(PixmapPtr pPix)
*/
Bool RADEONSetupMemEXA (ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
int cpp = info->CurrentLayout.pixel_bytes;
diff --git a/driver/xf86-video-ati/src/radeon_exa_funcs.c b/driver/xf86-video-ati/src/radeon_exa_funcs.c
index 058a547b8..9382e2dac 100644
--- a/driver/xf86-video-ati/src/radeon_exa_funcs.c
+++ b/driver/xf86-video-ati/src/radeon_exa_funcs.c
@@ -71,7 +71,7 @@ FUNC_NAME(RADEONMarkSync)(ScreenPtr pScreen)
static void
FUNC_NAME(RADEONSync)(ScreenPtr pScreen, int marker)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
if (info->cs)
diff --git a/driver/xf86-video-ati/src/radeon_exa_render.c b/driver/xf86-video-ati/src/radeon_exa_render.c
index e5c231faa..c42ae2879 100644
--- a/driver/xf86-video-ati/src/radeon_exa_render.c
+++ b/driver/xf86-video-ati/src/radeon_exa_render.c
@@ -299,8 +299,8 @@ static Bool RADEONSetupSourceTile(PicturePtr pPict,
if (repeatType == RepeatNormal || repeatType == RepeatReflect) {
Bool badPitch = needMatchingPitch && !RADEONPitchMatches(pPix);
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
+ int w = pPict->pDrawable ? pPict->pDrawable->width : 1;
+ int h = pPict->pDrawable ? pPict->pDrawable->height : 1;
if (pPict->transform) {
if (badPitch)
@@ -338,17 +338,8 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict,
int unit)
{
unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
int i;
- /* r100 limit should be 2048, there are issues with 2048
- * see 197a62704742a4a19736c2637ac92d1dc5ab34ed
- */
-
- if ((w > 2047) || (h > 2047))
- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h));
-
for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++) {
if (R100TexFormats[i].fmt == pPict->format)
break;
@@ -357,7 +348,7 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict,
RADEON_FALLBACK(("Unsupported picture format 0x%x\n",
(int)pPict->format));
- if (!RADEONCheckTexturePOT(pPict, unit == 0))
+ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0))
return FALSE;
if (pPict->filter != PictFilterNearest &&
@@ -392,15 +383,24 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
{
RINFO_FROM_SCREEN(pPix->drawable.pScreen);
uint32_t txfilter, txformat, txoffset, txpitch;
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
- Bool repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) &&
- !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y));
- int i;
+ unsigned int repeatType;
+ Bool repeat;
+ int i, w, h;
struct radeon_exa_pixmap_priv *driver_priv;
ACCEL_PREAMBLE();
+ if (pPict->pDrawable) {
+ w = pPict->pDrawable->width;
+ h = pPict->pDrawable->height;
+ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+ } else {
+ w = h = 1;
+ repeatType = RepeatNormal;
+ }
+
+ repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) &&
+ !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y));
+
txpitch = exaGetPixmapPitch(pPix);
txoffset = 0;
@@ -510,22 +510,6 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
- if (!pSrcPicture->pDrawable)
- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
-
- /* r100 limit should be 2048, there are issues with 2048
- * see 197a62704742a4a19736c2637ac92d1dc5ab34ed
- */
-
- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
-
- if (pSrcPixmap->drawable.width > 2047 ||
- pSrcPixmap->drawable.height > 2047) {
- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
- pSrcPixmap->drawable.width,
- pSrcPixmap->drawable.height));
- }
-
pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
if (pDstPixmap->drawable.width > 2047 ||
@@ -535,20 +519,35 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
pDstPixmap->drawable.height));
}
+ if (pSrcPicture->pDrawable) {
+ /* r100 limit should be 2048, there are issues with 2048
+ * see 197a62704742a4a19736c2637ac92d1dc5ab34ed
+ */
+ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+
+ if (pSrcPixmap->drawable.width > 2047 ||
+ pSrcPixmap->drawable.height > 2047) {
+ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+ pSrcPixmap->drawable.width,
+ pSrcPixmap->drawable.height));
+ }
+ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill)
+ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
+
if (pMaskPicture) {
PixmapPtr pMaskPixmap;
- if (!pMaskPicture->pDrawable)
- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
-
- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ if (pMaskPicture->pDrawable) {
+ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
- if (pMaskPixmap->drawable.width > 2047 ||
- pMaskPixmap->drawable.height > 2047) {
- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
- pMaskPixmap->drawable.width,
- pMaskPixmap->drawable.height));
- }
+ if (pMaskPixmap->drawable.width > 2047 ||
+ pMaskPixmap->drawable.height > 2047) {
+ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+ pMaskPixmap->drawable.width,
+ pMaskPixmap->drawable.height));
+ }
+ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill)
+ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
if (pMaskPicture->componentAlpha) {
/* Check if it's component alpha that relies on a source alpha and
@@ -624,7 +623,8 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op,
PixmapPtr pMask,
PixmapPtr pDst)
{
- RINFO_FROM_SCREEN(pDst->drawable.pScreen);
+ ScreenPtr pScreen = pDst->drawable.pScreen;
+ RINFO_FROM_SCREEN(pScreen);
uint32_t dst_format, dst_pitch, colorpitch;
uint32_t pp_cntl, blendcntl, cblend, ablend;
int pixel_shift;
@@ -648,12 +648,27 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op,
CHECK_OFFSET(pDst, 0x0f, "destination");
+ if (!pSrc) {
+ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color));
+ if (!pSrc)
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+
if (((dst_pitch >> pixel_shift) & 0x7) != 0)
RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch));
if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE))
return FALSE;
+ if (pMaskPicture && !pMask) {
+ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
+ if (!pMask) {
+ if (!pSrcPicture->pDrawable)
+ pScreen->DestroyPixmap(pSrc);
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+ }
+
RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture,
pSrc, pMask, pDst);
@@ -741,17 +756,8 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict,
int unit)
{
unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
int i;
- /* r200 limit should be 2048, there are issues with 2048
- * see bug 19269
- */
-
- if ((w > 2047) || (h > 2047))
- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h));
-
for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++)
{
if (R200TexFormats[i].fmt == pPict->format)
@@ -761,7 +767,7 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict,
RADEON_FALLBACK(("Unsupported picture format 0x%x\n",
(int)pPict->format));
- if (!RADEONCheckTexturePOT(pPict, unit == 0))
+ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0))
return FALSE;
if (pPict->filter != PictFilterNearest &&
@@ -794,15 +800,24 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
{
RINFO_FROM_SCREEN(pPix->drawable.pScreen);
uint32_t txfilter, txformat, txoffset, txpitch;
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
- Bool repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) &&
- !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y));
- int i;
+ unsigned int repeatType;
+ Bool repeat;
+ int i, w, h;
struct radeon_exa_pixmap_priv *driver_priv;
ACCEL_PREAMBLE();
+ if (pPict->pDrawable) {
+ w = pPict->pDrawable->width;
+ h = pPict->pDrawable->height;
+ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+ } else {
+ w = h = 1;
+ repeatType = RepeatNormal;
+ }
+
+ repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) &&
+ !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y));
+
txpitch = exaGetPixmapPitch(pPix);
txoffset = 0;
@@ -911,22 +926,6 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
- if (!pSrcPicture->pDrawable)
- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
-
- /* r200 limit should be 2048, there are issues with 2048
- * see bug 19269
- */
-
- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
-
- if (pSrcPixmap->drawable.width > 2047 ||
- pSrcPixmap->drawable.height > 2047) {
- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
- pSrcPixmap->drawable.width,
- pSrcPixmap->drawable.height));
- }
-
pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
if (pDstPixmap->drawable.width > 2047 ||
@@ -936,20 +935,35 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
pDstPixmap->drawable.height));
}
+ if (pSrcPicture->pDrawable) {
+ /* r200 limit should be 2048, there are issues with 2048
+ * see 197a62704742a4a19736c2637ac92d1dc5ab34ed
+ */
+ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+
+ if (pSrcPixmap->drawable.width > 2047 ||
+ pSrcPixmap->drawable.height > 2047) {
+ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+ pSrcPixmap->drawable.width,
+ pSrcPixmap->drawable.height));
+ }
+ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill)
+ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
+
if (pMaskPicture) {
PixmapPtr pMaskPixmap;
- if (!pMaskPicture->pDrawable)
- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
-
- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ if (pMaskPicture->pDrawable) {
+ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
- if (pMaskPixmap->drawable.width > 2047 ||
- pMaskPixmap->drawable.height > 2047) {
- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
- pMaskPixmap->drawable.width,
- pMaskPixmap->drawable.height));
- }
+ if (pMaskPixmap->drawable.width > 2047 ||
+ pMaskPixmap->drawable.height > 2047) {
+ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+ pMaskPixmap->drawable.width,
+ pMaskPixmap->drawable.height));
+ }
+ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill)
+ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
if (pMaskPicture->componentAlpha) {
/* Check if it's component alpha that relies on a source alpha and
@@ -982,7 +996,8 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture,
PicturePtr pMaskPicture, PicturePtr pDstPicture,
PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst)
{
- RINFO_FROM_SCREEN(pDst->drawable.pScreen);
+ ScreenPtr pScreen = pDst->drawable.pScreen;
+ RINFO_FROM_SCREEN(pScreen);
uint32_t dst_format, dst_pitch;
uint32_t pp_cntl, blendcntl, cblend, ablend, colorpitch;
int pixel_shift;
@@ -1009,9 +1024,24 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture,
if (((dst_pitch >> pixel_shift) & 0x7) != 0)
RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch));
+ if (!pSrc) {
+ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color));
+ if (!pSrc)
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+
if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE))
return FALSE;
+ if (pMaskPicture && !pMask) {
+ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
+ if (!pMask) {
+ if (!pSrcPicture->pDrawable)
+ pScreen->DestroyPixmap(pSrc);
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+ }
+
RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture,
pSrc, pMask, pDst);
@@ -1110,25 +1140,10 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict,
Bool is_r500)
{
ScreenPtr pScreen = pDstPict->pDrawable->pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
-
unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
int i;
- int max_tex_w, max_tex_h;
-
- if (is_r500) {
- max_tex_w = 4096;
- max_tex_h = 4096;
- } else {
- max_tex_w = 2048;
- max_tex_h = 2048;
- }
-
- if ((w > max_tex_w) || (h > max_tex_h))
- RADEON_FALLBACK(("Picture w/h too large (%dx%d)\n", w, h));
for (i = 0; i < sizeof(R300TexFormats) / sizeof(R300TexFormats[0]); i++)
{
@@ -1139,7 +1154,7 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict,
RADEON_FALLBACK(("Unsupported picture format 0x%x\n",
(int)pPict->format));
- if (!RADEONCheckTexturePOT(pPict, unit == 0)) {
+ if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) {
if (info->cs) {
struct radeon_exa_pixmap_priv *driver_priv;
PixmapPtr pPix;
@@ -1181,15 +1196,23 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
{
RINFO_FROM_SCREEN(pPix->drawable.pScreen);
uint32_t txfilter, txformat0, txformat1, txoffset, txpitch, us_format = 0;
- int w = pPict->pDrawable->width;
- int h = pPict->pDrawable->height;
+ int w, h;
int i, pixel_shift, out_size = 6;
- unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+ unsigned int repeatType;
struct radeon_exa_pixmap_priv *driver_priv;
ACCEL_PREAMBLE();
TRACE;
+ if (pPict->pDrawable) {
+ w = pPict->pDrawable->width;
+ h = pPict->pDrawable->height;
+ repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
+ } else {
+ w = h = 1;
+ repeatType = RepeatNormal;
+ }
+
txpitch = exaGetPixmapPitch(pPix);
txoffset = 0;
@@ -1384,7 +1407,7 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
uint32_t tmp1;
ScreenPtr pScreen = pDstPicture->pDrawable->pScreen;
PixmapPtr pSrcPixmap, pDstPixmap;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
int max_tex_w, max_tex_h, max_dst_w, max_dst_h;
@@ -1394,11 +1417,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
- if (!pSrcPicture->pDrawable)
- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
-
- pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
-
if (IS_R500_3D) {
max_tex_w = 4096;
max_tex_h = 4096;
@@ -1416,13 +1434,6 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
}
}
- if (pSrcPixmap->drawable.width > max_tex_w ||
- pSrcPixmap->drawable.height > max_tex_h) {
- RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
- pSrcPixmap->drawable.width,
- pSrcPixmap->drawable.height));
- }
-
pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable);
if (pDstPixmap->drawable.width > max_dst_w ||
@@ -1432,20 +1443,32 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
pDstPixmap->drawable.height));
}
+ if (pSrcPicture->pDrawable) {
+ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+
+ if (pSrcPixmap->drawable.width > max_tex_w ||
+ pSrcPixmap->drawable.height > max_tex_h) {
+ RADEON_FALLBACK(("Source w/h too large (%d,%d).\n",
+ pSrcPixmap->drawable.width,
+ pSrcPixmap->drawable.height));
+ }
+ } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill)
+ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
+
if (pMaskPicture) {
PixmapPtr pMaskPixmap;
- if (!pMaskPicture->pDrawable)
- RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+ if (pMaskPicture->pDrawable) {
+ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
- pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
-
- if (pMaskPixmap->drawable.width > max_tex_w ||
- pMaskPixmap->drawable.height > max_tex_h) {
- RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
- pMaskPixmap->drawable.width,
- pMaskPixmap->drawable.height));
- }
+ if (pMaskPixmap->drawable.width > max_tex_w ||
+ pMaskPixmap->drawable.height > max_tex_h) {
+ RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n",
+ pMaskPixmap->drawable.width,
+ pMaskPixmap->drawable.height));
+ }
+ } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill)
+ RADEON_FALLBACK(("Gradient pictures not supported yet\n"));
if (pMaskPicture->componentAlpha) {
/* Check if it's component alpha that relies on a source alpha and
@@ -1479,7 +1502,8 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
PicturePtr pMaskPicture, PicturePtr pDstPicture,
PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst)
{
- RINFO_FROM_SCREEN(pDst->drawable.pScreen);
+ ScreenPtr pScreen = pDst->drawable.pScreen;
+ RINFO_FROM_SCREEN(pScreen);
uint32_t dst_format, dst_pitch;
uint32_t txenable, colorpitch;
uint32_t blendcntl, output_fmt;
@@ -1508,9 +1532,24 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
if (((dst_pitch >> pixel_shift) & 0x7) != 0)
RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch));
+ if (!pSrc) {
+ pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color));
+ if (!pSrc)
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+
if (!RADEONSetupSourceTile(pSrcPicture, pSrc, TRUE, FALSE))
return FALSE;
+ if (pMaskPicture && !pMask) {
+ pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
+ if (!pMask) {
+ if (!pSrcPicture->pDrawable)
+ pScreen->DestroyPixmap(pSrc);
+ RADEON_FALLBACK("Failed to create solid scratch pixmap\n");
+ }
+ }
+
RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture,
pSrc, pMask, pDst);
@@ -2132,7 +2171,7 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture,
return TRUE;
}
-static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst)
+static void FUNC_NAME(RadeonFinishComposite)(PixmapPtr pDst)
{
RINFO_FROM_SCREEN(pDst->drawable.pScreen);
ACCEL_PREAMBLE();
@@ -2179,6 +2218,20 @@ static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst)
LEAVE_DRAW(0);
}
+static void FUNC_NAME(RadeonDoneComposite)(PixmapPtr pDst)
+{
+ ScreenPtr pScreen = pDst->drawable.pScreen;
+ RINFO_FROM_SCREEN(pScreen);
+ struct radeon_accel_state *accel_state = info->accel_state;
+
+ FUNC_NAME(RadeonFinishComposite)(pDst);
+
+ if (!accel_state->src_pic->pDrawable)
+ pScreen->DestroyPixmap(accel_state->src_pix);
+
+ if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable)
+ pScreen->DestroyPixmap(accel_state->msk_pix);
+}
#ifdef ACCEL_CP
@@ -2257,7 +2310,7 @@ static void FUNC_NAME(RadeonCompositeTile)(ScrnInfoPtr pScrn,
if ((info->cs && CS_FULL(info->cs)) ||
(!info->cs && (info->cp->indirectBuffer->used + 4 * 32) >
info->cp->indirectBuffer->total)) {
- FUNC_NAME(RadeonDoneComposite)(info->accel_state->dst_pix);
+ FUNC_NAME(RadeonFinishComposite)(info->accel_state->dst_pix);
if (info->cs)
radeon_cs_flush_indirect(pScrn);
else
diff --git a/driver/xf86-video-ati/src/radeon_exa_shared.c b/driver/xf86-video-ati/src/radeon_exa_shared.c
index be1d2fafe..b83eb81c3 100644
--- a/driver/xf86-video-ati/src/radeon_exa_shared.c
+++ b/driver/xf86-video-ati/src/radeon_exa_shared.c
@@ -126,6 +126,44 @@ Bool RADEONCheckBPP(int bpp)
return FALSE;
}
+PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid)
+{
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ PixmapPtr pPix = pScreen->CreatePixmap(pScreen, 1, 1, 32, 0);
+
+ exaMoveInPixmap(pPix);
+
+#if defined(XF86DRM_MODE)
+ if (info->cs) {
+ struct radeon_bo *bo;
+
+ bo = radeon_get_pixmap_bo(pPix);
+
+ if (radeon_bo_map(bo, 1)) {
+ pScreen->DestroyPixmap(pPix);
+ return NULL;
+ }
+
+ memcpy(bo->ptr, &solid, 4);
+ radeon_bo_unmap(bo);
+
+ return pPix;
+ }
+#endif
+
+ if (!exaDrawableIsOffscreen(&pPix->drawable)) {
+ pScreen->DestroyPixmap(pPix);
+ return NULL;
+ }
+
+ /* XXX: Big hammer... */
+ info->accel_state->exa->WaitMarker(pScreen, info->accel_state->exaSyncMarker);
+ memcpy(info->FB + exaGetPixmapOffset(pPix), &solid, 4);
+
+ return pPix;
+}
+
static Bool radeon_vb_get(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
diff --git a/driver/xf86-video-ati/src/radeon_exa_shared.h b/driver/xf86-video-ati/src/radeon_exa_shared.h
index 7b8b5cae1..60a10459f 100644
--- a/driver/xf86-video-ati/src/radeon_exa_shared.h
+++ b/driver/xf86-video-ati/src/radeon_exa_shared.h
@@ -40,6 +40,7 @@ extern void RADEONVlineHelperClear(ScrnInfoPtr pScrn);
extern void RADEONVlineHelperSet(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2);
extern Bool RADEONValidPM(uint32_t pm, int bpp);
extern Bool RADEONCheckBPP(int bpp);
+extern PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid);
#define RADEON_TRACE_FALL 0
#define RADEON_TRACE_DRAW 0
diff --git a/driver/xf86-video-ati/src/radeon_kms.c b/driver/xf86-video-ati/src/radeon_kms.c
index dda25e900..c757e88b0 100644
--- a/driver/xf86-video-ati/src/radeon_kms.c
+++ b/driver/xf86-video-ati/src/radeon_kms.c
@@ -144,7 +144,7 @@ static void *
radeonShadowWindow(ScreenPtr screen, CARD32 row, CARD32 offset, int mode,
CARD32 *size, void *closure)
{
- ScrnInfoPtr pScrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(screen);
RADEONInfoPtr info = RADEONPTR(pScrn);
int stride;
@@ -156,7 +156,7 @@ radeonShadowWindow(ScreenPtr screen, CARD32 row, CARD32 offset, int mode,
static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
PixmapPtr pixmap;
struct radeon_surface *surface;
@@ -192,15 +192,14 @@ static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen)
return TRUE;
}
-static void RADEONBlockHandler_KMS(int i, pointer blockData,
- pointer pTimeout, pointer pReadmask)
+static void RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL)
{
- ScreenPtr pScreen = screenInfo.screens[i];
- ScrnInfoPtr pScrn = xf86Screens[i];
+ SCREEN_PTR(arg);
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
pScreen->BlockHandler = info->BlockHandler;
- (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
+ (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
pScreen->BlockHandler = RADEONBlockHandler_KMS;
if (info->VideoTimerCallback)
@@ -841,7 +840,7 @@ static Bool RADEONCursorInit_KMS(ScreenPtr pScreen)
static Bool RADEONSaveScreen_KMS(ScreenPtr pScreen, int mode)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
Bool unblank;
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
@@ -863,9 +862,9 @@ static Bool RADEONSaveScreen_KMS(ScreenPtr pScreen, int mode)
* text mode, unmap video memory, and unwrap and call the saved
* CloseScreen function.
*/
-static Bool RADEONCloseScreen_KMS(int scrnIndex, ScreenPtr pScreen)
+static Bool RADEONCloseScreen_KMS(CLOSE_SCREEN_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
@@ -898,13 +897,13 @@ static Bool RADEONCloseScreen_KMS(int scrnIndex, ScreenPtr pScreen)
xf86ClearPrimInitDone(info->pEnt->index);
pScreen->BlockHandler = info->BlockHandler;
pScreen->CloseScreen = info->CloseScreen;
- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
}
-void RADEONFreeScreen_KMS(int scrnIndex, int flags)
+void RADEONFreeScreen_KMS(FREE_SCREEN_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
@@ -916,10 +915,9 @@ void RADEONFreeScreen_KMS(int scrnIndex, int flags)
RADEONFreeRec(pScrn);
}
-Bool RADEONScreenInit_KMS(int scrnIndex, ScreenPtr pScreen,
- int argc, char **argv)
+Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
int subPixelOrder = SubPixelUnknown;
char* s;
@@ -975,7 +973,10 @@ Bool RADEONScreenInit_KMS(int scrnIndex, ScreenPtr pScreen,
radeon_cs_set_limit(info->cs, RADEON_GEM_DOMAIN_GTT, info->gart_size);
radeon_cs_space_set_flush(info->cs, (void(*)(void *))radeon_cs_flush_indirect, pScrn);
- radeon_setup_kernel_mem(pScreen);
+ if (!radeon_setup_kernel_mem(pScreen)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "radeon_setup_kernel_mem failed\n");
+ return FALSE;
+ }
front_ptr = info->front_bo->ptr;
if (info->r600_shadow_fb) {
@@ -1050,18 +1051,18 @@ Bool RADEONScreenInit_KMS(int scrnIndex, ScreenPtr pScreen,
}
if (info->r600_shadow_fb) {
- xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n");
info->accelOn = FALSE;
} else {
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"Initializing Acceleration\n");
if (RADEONAccelInit(pScreen)) {
- xf86DrvMsg(scrnIndex, X_INFO, "Acceleration enabled\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration enabled\n");
info->accelOn = TRUE;
} else {
- xf86DrvMsg(scrnIndex, X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Acceleration initialization failed\n");
- xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n");
info->accelOn = FALSE;
}
}
@@ -1101,7 +1102,7 @@ Bool RADEONScreenInit_KMS(int scrnIndex, ScreenPtr pScreen,
if (info->r600_shadow_fb == TRUE) {
if (!shadowSetup(pScreen)) {
- xf86DrvMsg(scrnIndex, X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Shadowfb initialization failed\n");
return FALSE;
}
@@ -1147,9 +1148,9 @@ Bool RADEONScreenInit_KMS(int scrnIndex, ScreenPtr pScreen,
return TRUE;
}
-Bool RADEONEnterVT_KMS(int scrnIndex, int flags)
+Bool RADEONEnterVT_KMS(VT_FUNC_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
RADEONInfoPtr info = RADEONPTR(pScrn);
int ret;
@@ -1175,9 +1176,9 @@ Bool RADEONEnterVT_KMS(int scrnIndex, int flags)
}
-void RADEONLeaveVT_KMS(int scrnIndex, int flags)
+void RADEONLeaveVT_KMS(VT_FUNC_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
@@ -1198,26 +1199,26 @@ void RADEONLeaveVT_KMS(int scrnIndex, int flags)
}
-Bool RADEONSwitchMode_KMS(int scrnIndex, DisplayModePtr mode, int flags)
+Bool RADEONSwitchMode_KMS(SWITCH_MODE_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
Bool ret;
ret = xf86SetSingleMode (pScrn, mode, RR_Rotate_0);
return ret;
}
-void RADEONAdjustFrame_KMS(int scrnIndex, int x, int y, int flags)
+void RADEONAdjustFrame_KMS(ADJUST_FRAME_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
RADEONInfoPtr info = RADEONPTR(pScrn);
- drmmode_adjust_frame(pScrn, &info->drmmode, x, y, flags);
+ drmmode_adjust_frame(pScrn, &info->drmmode, x, y);
return;
}
static Bool radeon_setup_kernel_mem(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
int cpp = info->CurrentLayout.pixel_bytes;
@@ -1233,8 +1234,10 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen)
}
if (info->r600_shadow_fb == FALSE) {
info->accel_state->exa = exaDriverAlloc();
- if (info->accel_state->exa == NULL)
+ if (info->accel_state->exa == NULL) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "exaDriverAlloc failed\n");
return FALSE;
+ }
}
if (info->allowColorTiling) {
@@ -1247,12 +1250,17 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen)
} else
tiling_flags |= RADEON_TILING_MACRO;
}
- pitch = RADEON_ALIGN(pScrn->displayWidth, drmmode_get_pitch_align(pScrn, cpp, tiling_flags)) * cpp;
+ pitch = RADEON_ALIGN(pScrn->virtualX, drmmode_get_pitch_align(pScrn, cpp, tiling_flags)) * cpp;
screen_size = RADEON_ALIGN(pScrn->virtualY, drmmode_get_height_align(pScrn, tiling_flags)) * pitch;
base_align = drmmode_get_base_align(pScrn, cpp, tiling_flags);
if (info->ChipFamily >= CHIP_FAMILY_R600) {
+ if(!info->surf_man) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "failed to initialise surface manager\n");
+ return FALSE;
+ }
memset(&surface, 0, sizeof(struct radeon_surface));
- surface.npix_x = pScrn->displayWidth;
+ surface.npix_x = pScrn->virtualX;
surface.npix_y = pScrn->virtualY;
surface.npix_z = 1;
surface.blk_w = 1;
@@ -1274,9 +1282,13 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen)
surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_2D, MODE);
}
if (radeon_surface_best(info->surf_man, &surface)) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "radeon_surface_best failed\n");
return FALSE;
}
if (radeon_surface_init(info->surf_man, &surface)) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "radeon_surface_init failed\n");
return FALSE;
}
pitch = surface.level[0].pitch_bytes;
@@ -1311,6 +1323,7 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen)
cursor_size, 0,
RADEON_GEM_DOMAIN_VRAM, 0);
if (!info->cursor_bo[c]) {
+ ErrorF("Failed to allocate cursor buffer memory\n");
return FALSE;
}
@@ -1352,6 +1365,8 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen)
radeon_bo_set_tiling(info->front_bo, tiling_flags, pitch);
}
+ info->CurrentLayout.displayWidth = pScrn->displayWidth = pitch / cpp;
+
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Front buffer size: %dK\n", info->front_bo->size/1024);
radeon_kms_update_vram_limit(pScrn, screen_size);
return TRUE;
diff --git a/driver/xf86-video-ati/src/radeon_legacy_memory.c b/driver/xf86-video-ati/src/radeon_legacy_memory.c
index 5d66c920d..b01ba8ccb 100644
--- a/driver/xf86-video-ati/src/radeon_legacy_memory.c
+++ b/driver/xf86-video-ati/src/radeon_legacy_memory.c
@@ -18,7 +18,7 @@ radeon_legacy_allocate_memory(ScrnInfoPtr pScrn,
int align,
int domain)
{
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
RADEONInfoPtr info = RADEONPTR(pScrn);
uint32_t offset = 0;
@@ -121,7 +121,7 @@ radeon_legacy_free_memory(ScrnInfoPtr pScrn,
}
#endif
#ifdef USE_EXA
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
if (info->useEXA) {
ExaOffscreenArea *area = mem_struct;
diff --git a/driver/xf86-video-ati/src/radeon_modes.c b/driver/xf86-video-ati/src/radeon_modes.c
index d5635c969..215cde318 100644
--- a/driver/xf86-video-ati/src/radeon_modes.c
+++ b/driver/xf86-video-ati/src/radeon_modes.c
@@ -496,7 +496,7 @@ RADEONProbeOutputModes(xf86OutputPtr output)
else
modes = RADEONTVModes(output);
} else if (radeon_output->active_device & (ATOM_DEVICE_CV_SUPPORT)) {
- atomBiosResult = RHDAtomBiosFunc(pScrn->scrnIndex, info->atomBIOS,
+ atomBiosResult = RHDAtomBiosFunc(pScrn, info->atomBIOS,
ATOMBIOS_GET_CV_MODES, &atomBiosArg);
if (atomBiosResult == ATOM_SUCCESS) {
modes = atomBiosArg.modes;
@@ -514,7 +514,7 @@ RADEONProbeOutputModes(xf86OutputPtr output)
#endif
if (modes == NULL) {
if ((radeon_output->active_device & (ATOM_DEVICE_LCD_SUPPORT)) && info->IsAtomBios) {
- atomBiosResult = RHDAtomBiosFunc(pScrn->scrnIndex,
+ atomBiosResult = RHDAtomBiosFunc(pScrn,
info->atomBIOS,
ATOMBIOS_GET_PANEL_EDID, &atomBiosArg);
if (atomBiosResult == ATOM_SUCCESS) {
diff --git a/driver/xf86-video-ati/src/radeon_output.c b/driver/xf86-video-ati/src/radeon_output.c
index 7883bb110..b279567f3 100644
--- a/driver/xf86-video-ati/src/radeon_output.c
+++ b/driver/xf86-video-ati/src/radeon_output.c
@@ -2460,6 +2460,62 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
ATOM_DEVICE_TV1_SUPPORT))
return FALSE;
return TRUE;
+ case RADEON_MAC_SAM440EP:
+ /* LVDS header */
+ info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(0);
+ info->BiosConnector[0].ConnectorType = CONNECTOR_LVDS;
+ info->BiosConnector[0].valid = TRUE;
+ info->BiosConnector[0].devices = ATOM_DEVICE_LCD1_SUPPORT;
+ if (!radeon_add_encoder(pScrn,
+ radeon_get_encoder_id_from_supported_device(pScrn,
+ ATOM_DEVICE_LCD1_SUPPORT,
+ 0),
+ ATOM_DEVICE_LCD1_SUPPORT))
+ return FALSE;
+
+ /* DVI-I port */
+ info->BiosConnector[1].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
+ info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I;
+ info->BiosConnector[1].valid = TRUE;
+ info->BiosConnector[1].devices = ATOM_DEVICE_CRT2_SUPPORT | ATOM_DEVICE_DFP1_SUPPORT;
+ if (!radeon_add_encoder(pScrn,
+ radeon_get_encoder_id_from_supported_device(pScrn,
+ ATOM_DEVICE_CRT2_SUPPORT,
+ 2),
+ ATOM_DEVICE_CRT2_SUPPORT))
+ return FALSE;
+ if (!radeon_add_encoder(pScrn,
+ radeon_get_encoder_id_from_supported_device(pScrn,
+ ATOM_DEVICE_DFP1_SUPPORT,
+ 0),
+ ATOM_DEVICE_DFP1_SUPPORT))
+ return FALSE;
+
+ /* VGA header */
+ info->BiosConnector[2].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
+ info->BiosConnector[2].ConnectorType = CONNECTOR_VGA;
+ info->BiosConnector[2].valid = TRUE;
+ info->BiosConnector[2].devices = ATOM_DEVICE_CRT1_SUPPORT;
+ if (!radeon_add_encoder(pScrn,
+ radeon_get_encoder_id_from_supported_device(pScrn,
+ ATOM_DEVICE_CRT1_SUPPORT,
+ 1),
+ ATOM_DEVICE_CRT1_SUPPORT))
+ return FALSE;
+
+ /* s-video */
+ info->BiosConnector[3].ConnectorType = CONNECTOR_STV;
+ info->BiosConnector[3].load_detection = FALSE;
+ info->BiosConnector[3].ddc_i2c.valid = FALSE;
+ info->BiosConnector[3].valid = TRUE;
+ info->BiosConnector[3].devices = ATOM_DEVICE_TV1_SUPPORT;
+ if (!radeon_add_encoder(pScrn,
+ radeon_get_encoder_id_from_supported_device(pScrn,
+ ATOM_DEVICE_TV1_SUPPORT,
+ 2),
+ ATOM_DEVICE_TV1_SUPPORT))
+ return FALSE;
+ return TRUE;
default:
return FALSE;
}
@@ -2939,6 +2995,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
info->MacModel = RADEON_MAC_IMAC_G5_ISIGHT;
else if (!strncmp("emac", optstr, strlen("emac")))
info->MacModel = RADEON_MAC_EMAC;
+ else if (!strncmp("sam440ep", optstr, strlen("sam440ep")))
+ info->MacModel = RADEON_MAC_SAM440EP;
else {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid Mac Model: %s\n", optstr);
}
diff --git a/driver/xf86-video-ati/src/radeon_pci_chipset_gen.h b/driver/xf86-video-ati/src/radeon_pci_chipset_gen.h
index aef8d897d..dbf072855 100644
--- a/driver/xf86-video-ati/src/radeon_pci_chipset_gen.h
+++ b/driver/xf86-video-ati/src/radeon_pci_chipset_gen.h
@@ -380,6 +380,7 @@ PciChipsets RADEONPciChipsets[] = {
{ PCI_CHIP_SUMO2_9645, PCI_CHIP_SUMO2_9645, RES_SHARED_VGA },
{ PCI_CHIP_SUMO_9647, PCI_CHIP_SUMO_9647, RES_SHARED_VGA },
{ PCI_CHIP_SUMO_9648, PCI_CHIP_SUMO_9648, RES_SHARED_VGA },
+ { PCI_CHIP_SUMO_9649, PCI_CHIP_SUMO_9649, RES_SHARED_VGA },
{ PCI_CHIP_SUMO_964A, PCI_CHIP_SUMO_964A, RES_SHARED_VGA },
{ PCI_CHIP_SUMO_964B, PCI_CHIP_SUMO_964B, RES_SHARED_VGA },
{ PCI_CHIP_SUMO_964C, PCI_CHIP_SUMO_964C, RES_SHARED_VGA },
@@ -399,6 +400,7 @@ PciChipsets RADEONPciChipsets[] = {
{ PCI_CHIP_PALM_9807, PCI_CHIP_PALM_9807, RES_SHARED_VGA },
{ PCI_CHIP_PALM_9808, PCI_CHIP_PALM_9808, RES_SHARED_VGA },
{ PCI_CHIP_PALM_9809, PCI_CHIP_PALM_9809, RES_SHARED_VGA },
+ { PCI_CHIP_PALM_980A, PCI_CHIP_PALM_980A, RES_SHARED_VGA },
{ PCI_CHIP_CYPRESS_6880, PCI_CHIP_CYPRESS_6880, RES_SHARED_VGA },
{ PCI_CHIP_CYPRESS_6888, PCI_CHIP_CYPRESS_6888, RES_SHARED_VGA },
{ PCI_CHIP_CYPRESS_6889, PCI_CHIP_CYPRESS_6889, RES_SHARED_VGA },
@@ -480,6 +482,7 @@ PciChipsets RADEONPciChipsets[] = {
{ PCI_CHIP_TURKS_6747, PCI_CHIP_TURKS_6747, RES_SHARED_VGA },
{ PCI_CHIP_TURKS_6748, PCI_CHIP_TURKS_6748, RES_SHARED_VGA },
{ PCI_CHIP_TURKS_6749, PCI_CHIP_TURKS_6749, RES_SHARED_VGA },
+ { PCI_CHIP_TURKS_674A, PCI_CHIP_TURKS_674A, RES_SHARED_VGA },
{ PCI_CHIP_TURKS_6750, PCI_CHIP_TURKS_6750, RES_SHARED_VGA },
{ PCI_CHIP_TURKS_6751, PCI_CHIP_TURKS_6751, RES_SHARED_VGA },
{ PCI_CHIP_TURKS_6758, PCI_CHIP_TURKS_6758, RES_SHARED_VGA },
@@ -505,6 +508,7 @@ PciChipsets RADEONPciChipsets[] = {
{ PCI_CHIP_CAICOS_6767, PCI_CHIP_CAICOS_6767, RES_SHARED_VGA },
{ PCI_CHIP_CAICOS_6768, PCI_CHIP_CAICOS_6768, RES_SHARED_VGA },
{ PCI_CHIP_CAICOS_6770, PCI_CHIP_CAICOS_6770, RES_SHARED_VGA },
+ { PCI_CHIP_CAICOS_6771, PCI_CHIP_CAICOS_6771, RES_SHARED_VGA },
{ PCI_CHIP_CAICOS_6772, PCI_CHIP_CAICOS_6772, RES_SHARED_VGA },
{ PCI_CHIP_CAICOS_6778, PCI_CHIP_CAICOS_6778, RES_SHARED_VGA },
{ PCI_CHIP_CAICOS_6779, PCI_CHIP_CAICOS_6779, RES_SHARED_VGA },
@@ -513,8 +517,25 @@ PciChipsets RADEONPciChipsets[] = {
{ PCI_CHIP_ARUBA_9901, PCI_CHIP_ARUBA_9901, RES_SHARED_VGA },
{ PCI_CHIP_ARUBA_9903, PCI_CHIP_ARUBA_9903, RES_SHARED_VGA },
{ PCI_CHIP_ARUBA_9904, PCI_CHIP_ARUBA_9904, RES_SHARED_VGA },
- { PCI_CHIP_ARUBA_990f, PCI_CHIP_ARUBA_990f, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9905, PCI_CHIP_ARUBA_9905, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9906, PCI_CHIP_ARUBA_9906, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9907, PCI_CHIP_ARUBA_9907, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9908, PCI_CHIP_ARUBA_9908, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9909, PCI_CHIP_ARUBA_9909, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_990A, PCI_CHIP_ARUBA_990A, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_990F, PCI_CHIP_ARUBA_990F, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9910, PCI_CHIP_ARUBA_9910, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9913, PCI_CHIP_ARUBA_9913, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9917, PCI_CHIP_ARUBA_9917, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9918, PCI_CHIP_ARUBA_9918, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9919, PCI_CHIP_ARUBA_9919, RES_SHARED_VGA },
{ PCI_CHIP_ARUBA_9990, PCI_CHIP_ARUBA_9990, RES_SHARED_VGA },
{ PCI_CHIP_ARUBA_9991, PCI_CHIP_ARUBA_9991, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9992, PCI_CHIP_ARUBA_9992, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9993, PCI_CHIP_ARUBA_9993, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_9994, PCI_CHIP_ARUBA_9994, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_99A0, PCI_CHIP_ARUBA_99A0, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_99A2, PCI_CHIP_ARUBA_99A2, RES_SHARED_VGA },
+ { PCI_CHIP_ARUBA_99A4, PCI_CHIP_ARUBA_99A4, RES_SHARED_VGA },
{ -1, -1, RES_UNDEFINED }
};
diff --git a/driver/xf86-video-ati/src/radeon_pci_device_match_gen.h b/driver/xf86-video-ati/src/radeon_pci_device_match_gen.h
index 681a6b8a5..a6663e00a 100644
--- a/driver/xf86-video-ati/src/radeon_pci_device_match_gen.h
+++ b/driver/xf86-video-ati/src/radeon_pci_device_match_gen.h
@@ -380,6 +380,7 @@ static const struct pci_id_match radeon_device_match[] = {
ATI_DEVICE_MATCH( PCI_CHIP_SUMO2_9645, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_SUMO_9647, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_SUMO_9648, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_SUMO_9649, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_SUMO_964A, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_SUMO_964B, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_SUMO_964C, 0 ),
@@ -399,6 +400,7 @@ static const struct pci_id_match radeon_device_match[] = {
ATI_DEVICE_MATCH( PCI_CHIP_PALM_9807, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_PALM_9808, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_PALM_9809, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_PALM_980A, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_6880, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_6888, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_6889, 0 ),
@@ -480,6 +482,7 @@ static const struct pci_id_match radeon_device_match[] = {
ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6747, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6748, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6749, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_TURKS_674A, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6750, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6751, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6758, 0 ),
@@ -505,6 +508,7 @@ static const struct pci_id_match radeon_device_match[] = {
ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6767, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6768, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6770, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6771, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6772, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6778, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6779, 0 ),
@@ -513,8 +517,25 @@ static const struct pci_id_match radeon_device_match[] = {
ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9901, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9903, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9904, 0 ),
- ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_990f, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9905, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9906, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9907, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9908, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9909, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_990A, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_990F, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9910, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9913, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9917, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9918, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9919, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9990, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9991, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9992, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9993, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9994, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_99A0, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_99A2, 0 ),
+ ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_99A4, 0 ),
{ 0, 0, 0 }
};
diff --git a/driver/xf86-video-ati/src/radeon_probe.h b/driver/xf86-video-ati/src/radeon_probe.h
index 4a7c0e7c1..fb891902e 100644
--- a/driver/xf86-video-ati/src/radeon_probe.h
+++ b/driver/xf86-video-ati/src/radeon_probe.h
@@ -43,6 +43,7 @@
#include "xf86Crtc.h"
+#include "compat-api.h"
#ifdef USE_EXA
#include "exa.h"
#endif
@@ -761,28 +762,28 @@ extern PciChipsets RADEONPciChipsets[];
/* radeon_driver.c */
extern Bool RADEONPreInit(ScrnInfoPtr, int);
-extern Bool RADEONScreenInit(int, ScreenPtr, int, char **);
-extern Bool RADEONSwitchMode(int, DisplayModePtr, int);
+extern Bool RADEONScreenInit(SCREEN_INIT_ARGS_DECL);
+extern Bool RADEONSwitchMode(SWITCH_MODE_ARGS_DECL);
#ifdef X_XF86MiscPassMessage
extern Bool RADEONHandleMessage(int, const char*, const char*,
char**);
#endif
-extern void RADEONAdjustFrame(int, int, int, int);
-extern Bool RADEONEnterVT(int, int);
-extern void RADEONLeaveVT(int, int);
-extern void RADEONFreeScreen(int, int);
-extern ModeStatus RADEONValidMode(int, DisplayModePtr, Bool, int);
+extern void RADEONAdjustFrame(ADJUST_FRAME_ARGS_DECL);
+extern Bool RADEONEnterVT(VT_FUNC_ARGS_DECL);
+extern void RADEONLeaveVT(VT_FUNC_ARGS_DECL);
+extern void RADEONFreeScreen(FREE_SCREEN_ARGS_DECL);
+extern ModeStatus RADEONValidMode(SCRN_ARG_TYPE, DisplayModePtr, Bool, int);
extern const OptionInfoRec *RADEONOptionsWeak(void);
#ifdef XF86DRM_MODE
extern Bool RADEONPreInit_KMS(ScrnInfoPtr, int);
-extern Bool RADEONScreenInit_KMS(int, ScreenPtr, int, char **);
-extern Bool RADEONSwitchMode_KMS(int, DisplayModePtr, int);
-extern void RADEONAdjustFrame_KMS(int, int, int, int);
-extern Bool RADEONEnterVT_KMS(int, int);
-extern void RADEONLeaveVT_KMS(int, int);
-extern void RADEONFreeScreen_KMS(int scrnIndex, int flags);
+extern Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL);
+extern Bool RADEONSwitchMode_KMS(SWITCH_MODE_ARGS_DECL);
+extern void RADEONAdjustFrame_KMS(ADJUST_FRAME_ARGS_DECL);
+extern Bool RADEONEnterVT_KMS(VT_FUNC_ARGS_DECL);
+extern void RADEONLeaveVT_KMS(VT_FUNC_ARGS_DECL);
+extern void RADEONFreeScreen_KMS(FREE_SCREEN_ARGS_DECL);
#endif
#endif /* _RADEON_PROBE_H_ */
diff --git a/driver/xf86-video-ati/src/radeon_textured_video.c b/driver/xf86-video-ati/src/radeon_textured_video.c
index ff2bb9f98..48564f829 100644
--- a/driver/xf86-video-ati/src/radeon_textured_video.c
+++ b/driver/xf86-video-ati/src/radeon_textured_video.c
@@ -811,7 +811,7 @@ static void radeon_unload_bicubic_texture(ScrnInfoPtr pScrn)
XF86VideoAdaptorPtr
RADEONSetupImageTexturedVideo(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONPortPrivPtr pPortPriv;
XF86VideoAdaptorPtr adapt;
diff --git a/driver/xf86-video-ati/src/radeon_video.c b/driver/xf86-video-ati/src/radeon_video.c
index 0e2c1275c..b7a9a55e0 100644
--- a/driver/xf86-video-ati/src/radeon_video.c
+++ b/driver/xf86-video-ati/src/radeon_video.c
@@ -19,6 +19,14 @@
#include "atipciids.h"
#include "xf86fbman.h"
+/* DPMS */
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
+#define DPMS_SERVER
+#include <X11/extensions/dpms.h>
+#endif
+
#include <X11/extensions/Xv.h>
#include "fourcc.h"
@@ -135,6 +143,22 @@ radeon_box_area(BoxPtr box)
return (int) (box->x2 - box->x1) * (int) (box->y2 - box->y1);
}
+static Bool
+radeon_crtc_is_enabled(xf86CrtcPtr crtc)
+{
+ RADEONCrtcPrivatePtr radeon_crtc;
+
+#ifdef XF86DRM_MODE
+ if (RADEONPTR(crtc->scrn)->cs) {
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ return drmmode_crtc->dpms_mode == DPMSModeOn;
+ }
+#endif
+
+ radeon_crtc = crtc->driver_private;
+ return radeon_crtc->enabled;
+}
+
xf86CrtcPtr
radeon_pick_best_crtc(ScrnInfoPtr pScrn,
int x1, int x2, int y1, int y2)
@@ -145,6 +169,9 @@ radeon_pick_best_crtc(ScrnInfoPtr pScrn,
RROutputPtr primary_output = NULL;
xf86CrtcPtr best_crtc = NULL, primary_crtc = NULL;
+ if (!pScrn->vtSema)
+ return NULL;
+
box.x1 = x1;
box.x2 = x2;
box.y1 = y1;
@@ -152,7 +179,10 @@ radeon_pick_best_crtc(ScrnInfoPtr pScrn,
best_coverage = 0;
/* Prefer the CRTC of the primary output */
- if (dixPrivateKeyRegistered(rrPrivKey)) {
+#ifdef HAS_DIXREGISTERPRIVATEKEY
+ if (dixPrivateKeyRegistered(rrPrivKey))
+#endif
+ {
primary_output = RRFirstOutput(pScrn->pScreen);
}
if (primary_output && primary_output->crtc)
@@ -160,6 +190,10 @@ radeon_pick_best_crtc(ScrnInfoPtr pScrn,
for (c = 0; c < xf86_config->num_crtc; c++) {
xf86CrtcPtr crtc = xf86_config->crtc[c];
+
+ if (!radeon_crtc_is_enabled(crtc))
+ continue;
+
radeon_crtc_box(crtc, &crtc_box);
radeon_box_intersect(&cover_box, &crtc_box, &box);
coverage = radeon_box_area(&cover_box);
@@ -279,7 +313,7 @@ radeon_crtc_clip_video(ScrnInfoPtr pScrn,
void RADEONInitVideo(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
@@ -1616,7 +1650,7 @@ skip_theatre:
static XF86VideoAdaptorPtr
RADEONSetupImageVideo(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONPortPrivPtr pPriv;
XF86VideoAdaptorPtr adapt;
@@ -3391,7 +3425,7 @@ RADEONDisplaySurface(
static void
RADEONInitOffscreenImages(ScreenPtr pScreen)
{
-/* ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+/* ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn); */
XF86OffscreenImagePtr offscreenImages;
/* need to free this someplace */
diff --git a/driver/xf86-video-ati/src/radeon_vip.c b/driver/xf86-video-ati/src/radeon_vip.c
index 845707890..eacfc803d 100644
--- a/driver/xf86-video-ati/src/radeon_vip.c
+++ b/driver/xf86-video-ati/src/radeon_vip.c
@@ -48,7 +48,7 @@ static Bool RADEONVIP_ioctl(GENERIC_BUS_Ptr b, long ioctl, long arg1, char *arg2
static uint32_t RADEONVIP_idle(GENERIC_BUS_Ptr b)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -69,7 +69,7 @@ static uint32_t RADEONVIP_idle(GENERIC_BUS_Ptr b)
static uint32_t RADEONVIP_fifo_idle(GENERIC_BUS_Ptr b, uint8_t channel)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -79,7 +79,7 @@ static uint32_t RADEONVIP_fifo_idle(GENERIC_BUS_Ptr b, uint8_t channel)
timeout = INREG(VIPH_TIMEOUT_STAT);
if((timeout & 0x0000000f) & channel) /* lockup ?? */
{
- xf86DrvMsg(b->scrnIndex, X_INFO, "RADEON_fifo_idle\n");
+ xf86DrvMsg(b->pScrn->scrnIndex, X_INFO, "RADEON_fifo_idle\n");
RADEONWaitForFifo(pScrn, 2);
OUTREG(VIPH_TIMEOUT_STAT, (timeout & 0xfffffff0) | channel);
RADEONWaitForIdleMMIO(pScrn);
@@ -107,7 +107,7 @@ static uint32_t RADEONVIP_fifo_idle(GENERIC_BUS_Ptr b, uint8_t channel)
static Bool RADEONVIP_read(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count, uint8_t *buffer)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
uint32_t status,tmp;
@@ -173,7 +173,7 @@ static Bool RADEONVIP_read(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count,
static Bool RADEONVIP_fifo_read(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count, uint8_t *buffer)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
uint32_t status,tmp;
@@ -247,7 +247,7 @@ static Bool RADEONVIP_fifo_read(GENERIC_BUS_Ptr b, uint32_t address, uint32_t co
static Bool RADEONVIP_write(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count, uint8_t *buffer)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -280,7 +280,7 @@ static Bool RADEONVIP_write(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count,
static Bool RADEONVIP_fifo_write(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count, uint8_t *buffer)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -350,7 +350,7 @@ void RADEONVIP_reset(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
void RADEONVIP_init(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
{
pPriv->VIP=calloc(1,sizeof(GENERIC_BUS_Rec));
- pPriv->VIP->scrnIndex=pScrn->scrnIndex;
+ pPriv->VIP->pScrn=pScrn;
pPriv->VIP->DriverPrivate.ptr=pPriv;
pPriv->VIP->ioctl=RADEONVIP_ioctl;
pPriv->VIP->read=RADEONVIP_read;
diff --git a/driver/xf86-video-ati/src/radeon_xvmc.c b/driver/xf86-video-ati/src/radeon_xvmc.c
index 0f5431869..e96f06358 100644
--- a/driver/xf86-video-ati/src/radeon_xvmc.c
+++ b/driver/xf86-video-ati/src/radeon_xvmc.c
@@ -29,11 +29,12 @@
#include "config.h"
#endif
+#include <xf86.h>
#include "radeon_video.h"
+#include "compat-api.h"
#include <X11/extensions/Xv.h>
#include <X11/extensions/XvMC.h>
-#include <xf86.h>
#include "fourcc.h"
#define FOURCC_RGB 0x0000003
@@ -126,7 +127,7 @@ RADEONCreateAdaptorXvMC(ScreenPtr pScreen, char *xv_adaptor_name)
assert(pScreen);
- pScrn = xf86Screens[pScreen->myNum];
+ pScrn = xf86ScreenToScrn(pScreen);
adaptor = xf86XvMCCreateAdaptorRec();
if (!adaptor)
diff --git a/driver/xf86-video-ati/src/theatre.c b/driver/xf86-video-ati/src/theatre.c
index fc68f275b..09640faf8 100644
--- a/driver/xf86-video-ati/src/theatre.c
+++ b/driver/xf86-video-ati/src/theatre.c
@@ -1150,7 +1150,7 @@ _X_EXPORT void RT_SetStandard (TheatrePtr t, uint16_t wStandard)
uint16_t wFrameTotal = 0;
double dbSPPeriod = 4.70;
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"Rage Theatre setting standard 0x%04x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"Rage Theatre setting standard 0x%04x\n",
wStandard);
t->wStandard = wStandard;
@@ -1798,7 +1798,7 @@ void RT_SetConnector (TheatrePtr t, uint16_t wConnector, int tunerFlag)
counter++;
}
dwTempContrast = ReadRT_fld (fld_LP_CONTRAST);
- if(counter>=10000)xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ if(counter>=10000)xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"Rage Theatre: timeout waiting for line count (%u)\n",
(unsigned)ReadRT_fld (fld_VS_LINE_COUNT));
@@ -1848,14 +1848,14 @@ void RT_SetConnector (TheatrePtr t, uint16_t wConnector, int tunerFlag)
{
i--;
}
- if(i<0) xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Rage Theatre: waiting for fld_HS_GENLOCKED failed\n");
+ if(i<0) xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Rage Theatre: waiting for fld_HS_GENLOCKED failed\n");
/* now we are waiting for a non-visible line.. and there is absolutely no point to wait too long */
counter = 0;
while (!((ReadRT_fld (fld_VS_LINE_COUNT)> 1) && (ReadRT_fld (fld_VS_LINE_COUNT)<20)) && (counter < 10000)){
counter++;
}
WriteRT_fld (fld_LP_CONTRAST, dwTempContrast);
- if(counter>=10000)xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ if(counter>=10000)xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"Rage Theatre: timeout waiting for line count (%u)\n",
(unsigned)ReadRT_fld (fld_VS_LINE_COUNT));
@@ -1948,7 +1948,7 @@ _X_EXPORT void DumpRageTheatreRegs(TheatrePtr t)
for(i=0;i<0x900;i+=4)
{
RT_regr(i, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"register 0x%04x is equal to 0x%08x\n", i, (unsigned)data);
}
@@ -2154,7 +2154,7 @@ void DumpRageTheatreRegsByName(TheatrePtr t)
for(i=0; rt_reg_list[i].name!=NULL;i++){
RT_regr(rt_reg_list[i].addr, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"register (0x%04lx) %s is equal to 0x%08x\n",
rt_reg_list[i].addr, rt_reg_list[i].name, (unsigned)data);
}
diff --git a/driver/xf86-video-ati/src/theatre200.c b/driver/xf86-video-ati/src/theatre200.c
index cee48e66b..d98477749 100644
--- a/driver/xf86-video-ati/src/theatre200.c
+++ b/driver/xf86-video-ati/src/theatre200.c
@@ -22,6 +22,9 @@
* authorization from the author.
*
* $Log: theatre200.c,v $
+ * Revision 1.7 2012/08/08 16:25:22 matthieu
+ * Update to xf86-video-ati 6.14.6. Tested by mpi@, brad, eric@, ajacoutot@.
+ *
* Revision 1.6 2012/03/04 16:01:20 matthieu
* Re-update xf86-video-ati to 6.14.3.
*
@@ -362,7 +365,7 @@ static int dsp_init(TheatrePtr t, struct rt200_microc_data* microc_datap)
{
uint32_t data;
int i = 0;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
/* Map FIFOD to DSP Port I/O port */
RT_regr(VIP_HOSTINTF_PORT_CNTL, &data);
@@ -391,7 +394,7 @@ static int dsp_load(TheatrePtr t, struct rt200_microc_data* microc_datap)
uint32_t tries = 0;
uint32_t result = 0;
uint32_t seg_id = 0;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
DEBUG("Microcode: before everything: %x\n", data8);
@@ -631,7 +634,7 @@ static uint32_t dsp_set_video_input_connector(TheatrePtr t, uint32_t connector)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((connector << 8) & 0xff00) | (55 & 0xff);
@@ -647,7 +650,7 @@ static uint32_t dsp_reset(TheatrePtr t)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((2 << 8) & 0xff00) | (8 & 0xff);
@@ -663,7 +666,7 @@ static uint32_t dsp_set_lowpowerstate(TheatrePtr t, uint32_t pstate)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((pstate << 8) & 0xff00) | (82 & 0xff);
@@ -677,7 +680,7 @@ static uint32_t dsp_set_video_standard(TheatrePtr t, uint32_t standard)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((standard << 8) & 0xff00) | (52 & 0xff);
@@ -692,7 +695,7 @@ static uint32_t dsp_set_videostreamformat(TheatrePtr t, uint32_t format)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((format << 8) & 0xff00) | (65 & 0xff);
@@ -707,7 +710,7 @@ static uint32_t dsp_video_standard_detection(TheatrePtr t)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = 0 | (54 & 0xff);
@@ -724,7 +727,7 @@ static uint32_t dsp_get_signallockstatus(TheatrePtr t)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = 0 | (77 & 0xff);
@@ -741,7 +744,7 @@ static uint32_t dsp_get_signallinenumber(TheatrePtr t)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = 0 | (78 & 0xff);
@@ -759,7 +762,7 @@ static uint32_t dsp_set_brightness(TheatrePtr t, uint8_t brightness)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((brightness << 8) & 0xff00) | (67 & 0xff);
@@ -775,7 +778,7 @@ static uint32_t dsp_set_contrast(TheatrePtr t, uint8_t contrast)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((contrast << 8) & 0xff00) | (71 & 0xff);
@@ -792,7 +795,7 @@ static uint32_t dsp_set_sharpness(TheatrePtr t, int sharpness)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = 0 | (73 & 0xff);
@@ -809,7 +812,7 @@ static uint32_t dsp_set_tint(TheatrePtr t, uint8_t tint)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((tint << 8) & 0xff00) | (75 & 0xff);
@@ -825,7 +828,7 @@ static uint32_t dsp_set_saturation(TheatrePtr t, uint8_t saturation)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((saturation << 8) & 0xff00) | (69 & 0xff);
@@ -841,7 +844,7 @@ static uint32_t dsp_set_video_scaler_horizontal(TheatrePtr t, uint16_t output_wi
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((output_width << 8) & 0x00ffff00) | (195 & 0xff);
fb_scratch1 = ((horz_end << 16) & 0xffff0000) | (horz_start & 0xffff);
@@ -858,7 +861,7 @@ static uint32_t dsp_set_video_scaler_vertical(TheatrePtr t, uint16_t output_heig
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((output_height << 8) & 0x00ffff00) | (196 & 0xff);
fb_scratch1 = ((vert_end << 16) & 0xffff0000) | (vert_start & 0xffff);
@@ -875,7 +878,7 @@ static uint32_t dsp_audio_mute(TheatrePtr t, uint8_t left, uint8_t right)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((right << 16) & 0xff0000) | ((left << 8) & 0xff00) | (21 & 0xff);
@@ -891,7 +894,7 @@ static uint32_t dsp_set_audio_volume(TheatrePtr t, uint8_t left, uint8_t right,
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((auto_mute << 24) & 0xff000000) | ((right << 16) & 0xff0000) | ((left << 8) & 0xff00) | (22 & 0xff);
@@ -908,7 +911,7 @@ static uint32_t dsp_audio_detection(TheatrePtr t, uint8_t option)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((option << 8) & 0xff00) | (16 & 0xff);
@@ -925,7 +928,7 @@ static uint32_t dsp_configure_i2s_port(TheatrePtr t, uint8_t tx_mode, uint8_t rx
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((clk_mode << 24) & 0xff000000) | ((rx_mode << 16) & 0xff0000) | ((tx_mode << 8) & 0xff00) | (40 & 0xff);
@@ -941,7 +944,7 @@ static uint32_t dsp_configure_spdif_port(TheatrePtr t, uint8_t state)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((state << 8) & 0xff00) | (41 & 0xff);
@@ -1671,7 +1674,7 @@ _X_EXPORT void RT_SetInterlace (TheatrePtr t, uint8_t bInterlace)
****************************************************************************/
_X_EXPORT void RT_SetStandard (TheatrePtr t, uint16_t wStandard)
{
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"Rage Theatre setting standard 0x%04x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"Rage Theatre setting standard 0x%04x\n",
wStandard);
t->wStandard = wStandard;
@@ -1815,11 +1818,11 @@ _X_EXPORT void RT_SetConnector (TheatrePtr t, uint16_t wConnector, int tunerFlag
t->wConnector = wConnector;
theatre_read(t, VIP_GPIO_CNTL, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %x\n",
(unsigned)data);
theatre_read(t, VIP_GPIO_INOUT, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %x\n",
(unsigned)data);
switch (wConnector)
@@ -1869,11 +1872,11 @@ _X_EXPORT void RT_SetConnector (TheatrePtr t, uint16_t wConnector, int tunerFlag
}
theatre_read(t, VIP_GPIO_CNTL, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %x\n",
(unsigned)data);
theatre_read(t, VIP_GPIO_INOUT, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %x\n",
(unsigned)data);
@@ -1933,19 +1936,19 @@ _X_EXPORT void InitTheatre(TheatrePtr t)
if (t->microc_path == NULL)
{
t->microc_path = DEFAULT_MICROC_PATH;
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: Use default microcode path: %s\n", DEFAULT_MICROC_PATH);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: Use default microcode path: %s\n", DEFAULT_MICROC_PATH);
}
else
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: Use microcode path: %s\n", t->microc_path);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: Use microcode path: %s\n", t->microc_path);
if (t->microc_type == NULL)
{
t->microc_type = DEFAULT_MICROC_TYPE;
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: Use default microcode type: %s\n", DEFAULT_MICROC_TYPE);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: Use default microcode type: %s\n", DEFAULT_MICROC_TYPE);
}
else
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: Use microcode type: %s\n", t->microc_type);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: Use microcode type: %s\n", t->microc_type);
if (DownloadMicrocode(t) < 0)
{
@@ -1964,45 +1967,45 @@ static int DownloadMicrocode(TheatrePtr t)
struct rt200_microc_data microc_data;
microc_data.microc_seg_list = NULL;
- if (microc_load(t->microc_path, t->microc_type, &microc_data, t->VIP->scrnIndex) < 0)
+ if (microc_load(t->microc_path, t->microc_type, &microc_data, t->VIP->pScrn->scrnIndex) < 0)
{
- xf86DrvMsg(t->VIP->scrnIndex, X_ERROR, "Microcode: cannot load microcode\n");
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_ERROR, "Microcode: cannot load microcode\n");
goto err_exit;
}
else
{
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: device_id: %x\n", microc_data.microc_head.device_id);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: vendor_id: %x\n", microc_data.microc_head.vendor_id);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: rev_id: %x\n", microc_data.microc_head.revision_id);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: num_seg: %x\n", microc_data.microc_head.num_seg);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: device_id: %x\n", microc_data.microc_head.device_id);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: vendor_id: %x\n", microc_data.microc_head.vendor_id);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: rev_id: %x\n", microc_data.microc_head.revision_id);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: num_seg: %x\n", microc_data.microc_head.num_seg);
}
if (dsp_init(t, &microc_data) < 0)
{
- xf86DrvMsg(t->VIP->scrnIndex, X_ERROR, "Microcode: dsp_init failed\n");
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_ERROR, "Microcode: dsp_init failed\n");
goto err_exit;
}
else
{
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: dsp_init OK\n");
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: dsp_init OK\n");
}
if (dsp_load(t, &microc_data) < 0)
{
- xf86DrvMsg(t->VIP->scrnIndex, X_ERROR, "Microcode: dsp_download failed\n");
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_ERROR, "Microcode: dsp_download failed\n");
goto err_exit;
}
else
{
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: dsp_download OK\n");
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: dsp_download OK\n");
}
- microc_clean(&microc_data, t->VIP->scrnIndex);
+ microc_clean(&microc_data, t->VIP->pScrn->scrnIndex);
return 0;
err_exit:
- microc_clean(&microc_data, t->VIP->scrnIndex);
+ microc_clean(&microc_data, t->VIP->pScrn->scrnIndex);
return -1;
}
@@ -2027,7 +2030,7 @@ _X_EXPORT void DumpRageTheatreRegs(TheatrePtr t)
for(i=0;i<0x900;i+=4)
{
RT_regr(i, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"register 0x%04x is equal to 0x%08x\n", i, (unsigned)data);
}
@@ -2233,7 +2236,7 @@ void DumpRageTheatreRegsByName(TheatrePtr t)
for(i=0; rt_reg_list[i].name!=NULL;i++){
RT_regr(rt_reg_list[i].addr, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"register (0x%04lx) %s is equal to 0x%08x\n",
rt_reg_list[i].addr, rt_reg_list[i].name, (unsigned)data);
}
diff --git a/driver/xf86-video-ati/src/theatre_detect.c b/driver/xf86-video-ati/src/theatre_detect.c
index c07df4b4d..b30a2e3aa 100644
--- a/driver/xf86-video-ati/src/theatre_detect.c
+++ b/driver/xf86-video-ati/src/theatre_detect.c
@@ -22,6 +22,9 @@
* authorization from the author.
*
* $Log: theatre_detect.c,v $
+ * Revision 1.7 2012/08/08 16:25:22 matthieu
+ * Update to xf86-video-ati 6.14.6. Tested by mpi@, brad, eric@, ajacoutot@.
+ *
* Revision 1.6 2012/03/04 16:01:20 matthieu
* Re-update xf86-video-ati to 6.14.3.
*
@@ -90,7 +93,7 @@ _X_EXPORT TheatrePtr DetectTheatre(GENERIC_BUS_Ptr b)
b->ioctl(b,GB_IOCTL_GET_TYPE,20,s);
if(strcmp(VIP_TYPE, s)){
- xf86DrvMsg(b->scrnIndex, X_ERROR, "DetectTheatre must be called with bus of type \"%s\", not \"%s\"\n",
+ xf86DrvMsg(b->pScrn->scrnIndex, X_ERROR, "DetectTheatre must be called with bus of type \"%s\", not \"%s\"\n",
VIP_TYPE, s);
return NULL;
}
@@ -105,7 +108,7 @@ _X_EXPORT TheatrePtr DetectTheatre(GENERIC_BUS_Ptr b)
{
if(b->read(b, ((i & 0x03)<<14) | VIP_VIP_VENDOR_DEVICE_ID, 4, (uint8_t *)&val))
{
- if(val)xf86DrvMsg(b->scrnIndex, X_INFO,
+ if(val)xf86DrvMsg(b->pScrn->scrnIndex, X_INFO,
"Device %d on VIP bus ids as 0x%08x\n", i,
(unsigned)val);
if(t->theatre_num>=0)continue; /* already found one instance */
@@ -120,10 +123,10 @@ _X_EXPORT TheatrePtr DetectTheatre(GENERIC_BUS_Ptr b)
break;
}
} else {
- xf86DrvMsg(b->scrnIndex, X_INFO, "No response from device %d on VIP bus\n",i);
+ xf86DrvMsg(b->pScrn->scrnIndex, X_INFO, "No response from device %d on VIP bus\n",i);
}
}
- if(t->theatre_num>=0)xf86DrvMsg(b->scrnIndex, X_INFO,
+ if(t->theatre_num>=0)xf86DrvMsg(b->pScrn->scrnIndex, X_INFO,
"Detected Rage Theatre as device %d on VIP bus with id 0x%08x\n",
t->theatre_num, (unsigned)t->theatre_id);
@@ -134,7 +137,7 @@ _X_EXPORT TheatrePtr DetectTheatre(GENERIC_BUS_Ptr b)
}
RT_regr(VIP_VIP_REVISION_ID, &val);
- xf86DrvMsg(b->scrnIndex, X_INFO, "Detected Rage Theatre revision %8.8X\n",
+ xf86DrvMsg(b->pScrn->scrnIndex, X_INFO, "Detected Rage Theatre revision %8.8X\n",
(unsigned)val);
#if 0