rpms/xorg-x11-drv-ati/devel radeon-6.12.2-to-git.patch,NONE,1.1

Dave Airlie airlied at fedoraproject.org
Tue Aug 4 08:21:16 UTC 2009


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-drv-ati/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11417

Added Files:
	radeon-6.12.2-to-git.patch 
Log Message:
* Tue Aug 04 2009 Dave Airlie <airlied at redhat.com> 6.12.2-21
- ati: rebase to git master - need to fixup a few patches later


radeon-6.12.2-to-git.patch:
 Makefile.am                       |    2 
 README                            |   13 
 acinclude.m4                      |   77 
 configure.ac                      |   67 
 man/radeon.man                    |   24 
 shave-libtool.in                  |   69 
 shave.in                          |   79 
 src/Makefile.am                   |   15 
 src/ati_pciids_gen.h              |   15 
 src/atombios_crtc.c               |  445 ++
 src/atombios_output.c             |    5 
 src/drmmode_display.c             | 1044 +++++++
 src/drmmode_display.h             |   74 
 src/legacy_crtc.c                 |  125 
 src/legacy_output.c               |   11 
 src/pcidb/ati_pciids.csv          |   15 
 src/pcidb/parse_pci_ids.pl        |    2 
 src/r600_exa.c                    |  156 -
 src/r600_shader.c                 | 1060 ++++---
 src/r600_state.h                  |    6 
 src/r600_textured_videofuncs.c    |  169 -
 src/r6xx_accel.c                  |  128 
 src/radeon.h                      |  235 +
 src/radeon_accel.c                |  165 -
 src/radeon_accelfuncs.c           |    5 
 src/radeon_atombios.c             |  169 -
 src/radeon_atombios.h             |   13 
 src/radeon_bios.c                 |   69 
 src/radeon_chipinfo_gen.h         |   17 
 src/radeon_chipset_gen.h          |   15 
 src/radeon_commonfuncs.c          |  482 ++-
 src/radeon_crtc.c                 |  110 
 src/radeon_cursor.c               |   70 
 src/radeon_dri.c                  |   24 
 src/radeon_dri2.c                 |  334 ++
 src/radeon_dri2.h                 |   42 
 src/radeon_driver.c               |  591 ---
 src/radeon_drm.h                  |  131 
 src/radeon_dummy_bufmgr.h         |   62 
 src/radeon_exa.c                  |  142 
 src/radeon_exa_funcs.c            |  289 +
 src/radeon_exa_render.c           |  584 ++-
 src/radeon_kms.c                  |  874 +++++
 src/radeon_legacy_memory.c        |   22 
 src/radeon_macros.h               |   49 
 src/radeon_output.c               |  132 
 src/radeon_pci_chipset_gen.h      |   15 
 src/radeon_pci_device_match_gen.h |   15 
 src/radeon_pm.c                   |  886 +++++
 src/radeon_probe.c                |   82 
 src/radeon_probe.h                |   15 
 src/radeon_reg.h                  |  130 
 src/radeon_textured_video.c       |  565 ++-
 src/radeon_textured_videofuncs.c  | 5662 ++++++++++++++++++++++++--------------
 src/radeon_version.h              |    1 
 src/radeon_video.c                |   25 
 src/radeon_video.h                |   25 
 57 files changed, 11487 insertions(+), 4161 deletions(-)

--- NEW FILE radeon-6.12.2-to-git.patch ---
diff --git a/Makefile.am b/Makefile.am
index 87e90ba..e76bf11 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,6 @@ CLEANFILES = ChangeLog
 .PHONY: ChangeLog
 
 ChangeLog:
-	(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+	$(CHANGELOG_CMD)
 
 dist-hook: ChangeLog
diff --git a/README b/README
index 99de20d..4b92a18 100644
--- a/README
+++ b/README
@@ -1,20 +1,25 @@
 xf86-video-ati - ATI Radeon video driver for the Xorg X server
 
-Please submit bugs & patches to the Xorg bugzilla:
-
-        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
-
 All questions regarding this software should be directed at the
 Xorg mailing list:
 
         http://lists.freedesktop.org/mailman/listinfo/xorg
 
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
 The master development code repository can be found at:
 
         git://anongit.freedesktop.org/git/xorg/driver/xf86-video-ati
 
         http://cgit.freedesktop.org/xorg/driver/xf86-video-ati
 
+For patch submission instructions, see:
+
+	http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
 For more information on the git code manager, see:
 
         http://wiki.x.org/wiki/GitPage
+
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..0a3509e
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,77 @@
+dnl Make automake/libtool output more friendly to humans
+dnl  Damien Lespiau <damien.lespiau at gmail.com>
+dnl
+dnl SHAVE_INIT([shavedir],[default_mode])
+dnl
+dnl shavedir: the directory where the shave scripts are, it defaults to
+dnl           $(top_builddir)
+dnl default_mode: (enable|disable) default shave mode.  This parameter
+dnl               controls shave's behaviour when no option has been
+dnl               given to configure.  It defaults to disable.
+dnl
+dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
+dnl   before AC_CONFIG_FILE/AC_OUTPUT is perfect.  This macro rewrites CC and
+dnl   LIBTOOL, you don't want the configure tests to have these variables
+dnl   re-defined.
+dnl * This macro requires GNU make's -s option.
+
+AC_DEFUN([_SHAVE_ARG_ENABLE],
+[
+  AC_ARG_ENABLE([shave],
+    AS_HELP_STRING(
+      [--enable-shave],
+      [use shave to make the build pretty [[default=$1]]]),,
+      [enable_shave=$1]
+    )
+])
+
+AC_DEFUN([SHAVE_INIT],
+[
+  dnl you can tweak the default value of enable_shave
+  m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
+
+  if test x"$enable_shave" = xyes; then
+    dnl where can we find the shave scripts?
+    m4_if([$1],,
+      [shavedir="$ac_pwd"],
+      [shavedir="$ac_pwd/$1"])
+    AC_SUBST(shavedir)
+
+    dnl make is now quiet
+    AC_SUBST([MAKEFLAGS], [-s])
+    AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
+
+    dnl we need sed
+    AC_CHECK_PROG(SED,sed,sed,false)
+
+    dnl substitute libtool
+    SHAVE_SAVED_LIBTOOL=$LIBTOOL
+    LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
+    AC_SUBST(LIBTOOL)
+
+    dnl substitute cc/cxx
+    SHAVE_SAVED_CC=$CC
+    SHAVE_SAVED_CXX=$CXX
+    SHAVE_SAVED_FC=$FC
+    SHAVE_SAVED_F77=$F77
+    SHAVE_SAVED_OBJC=$OBJC
+    CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
+    CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
+    FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
+    F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
+    OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}"
+    AC_SUBST(CC)
+    AC_SUBST(CXX)
+    AC_SUBST(FC)
+    AC_SUBST(F77)
+    AC_SUBST(OBJC)
+
+    V=@
+  else
+    V=1
+  fi
+  Q='$(V:1=)'
+  AC_SUBST(V)
+  AC_SUBST(Q)
+])
+
diff --git a/configure.ac b/configure.ac
index 709fb19..48375ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,18 +22,26 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-ati],
-        6.12.2,
+        6.12.99,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-ati)
 
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_CONFIG_HEADER([config.h])
+
+# Require xorg-macros: XORG_RELEASE_VERSION XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
+
 AC_CONFIG_AUX_DIR(.)
 
 AM_INIT_AUTOMAKE([dist-bzip2])
+AC_SYS_LARGEFILE
 
 AM_MAINTAINER_MODE
 
+AC_CONFIG_FILES([shave shave-libtool])
+
 # Checks for programs.
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
@@ -62,6 +70,12 @@ AC_ARG_ENABLE(exa,
               [EXA="$enableval"],
               [EXA=yes])
 
+AC_ARG_ENABLE(kms,
+              AC_HELP_STRING([--disable-kms],
+                             [Disable KMS support [[default=enabled]]]),
+              [DRM_MODE="$enableval"],
+              [DRM_MODE=yes])
+
 AC_ARG_WITH(xserver-source,AC_HELP_STRING([--with-xserver-source=XSERVER_SOURCE],
                                           [Path to X server source tree]),
                            [ XSERVER_SOURCE="$withval" ],
@@ -76,6 +90,10 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2 xproto fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
+                  HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
+                  HAVE_XEXTPROTO_71="no")
+AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
 # Checks for libraries.
@@ -114,6 +132,24 @@ if test "$DRI" = yes; then
 	if test "$have_damage_h" = yes; then
 		AC_DEFINE(DAMAGE,1,[Use Damage extension])
 	fi
+
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $CFLAGS"
+	AM_CONDITIONAL(DRM_MODE, test x$DRM_MODE = xyes)
+	if test "$DRM_MODE" = yes; then
+	   	AC_CHECK_HEADER(xf86drmMode.h,[DRM_MODE=yes],[DRM_MODE=no],[#include <stdint.h>
+#include <stdlib.h>])
+		if test "x$DRM_MODE" = xyes; then
+		   	PKG_CHECK_MODULES(LIBDRM_RADEON, [xorg-server >= 1.6 libdrm_radeon],
+			[LIBDRM_RADEON=yes], [LIBDRM_RADEON=no])
[...19762 lines suppressed...]
+
+	BEGIN_ACCEL(2);
+	OUT_ACCEL_REG(R300_SC_SCISSOR0, (((dstX) << R300_SCISSOR_X_SHIFT) |
+					 ((dstY) << R300_SCISSOR_Y_SHIFT)));
+	OUT_ACCEL_REG(R300_SC_SCISSOR1, (((dstX + dstw - 1) << R300_SCISSOR_X_SHIFT) |
+					 ((dstY + dsth - 1) << R300_SCISSOR_Y_SHIFT)));
+	FINISH_ACCEL();
+
+#ifdef ACCEL_CP
+	BEGIN_RING(3 * vtx_count + 4);
+	OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2,
+			    3 * vtx_count));
+	OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST |
+		 RADEON_CP_VC_CNTL_PRIM_WALK_RING |
+		 (3 << RADEON_CP_VC_CNTL_NUM_SHIFT));
+#else /* ACCEL_CP */
+	BEGIN_ACCEL(2 + vtx_count * 3);
+	OUT_ACCEL_REG(RADEON_SE_VF_CNTL, (RADEON_VF_PRIM_TYPE_TRIANGLE_LIST |
+					  RADEON_VF_PRIM_WALK_DATA |
+					  (3 << RADEON_VF_NUM_VERTICES_SHIFT)));
+#endif
+	if (pPriv->bicubic_enabled) {
+	    VTX_OUT_6((float)dstX,            (float)dstY,
+		      (float)srcX / pPriv->w, (float)srcY / pPriv->h,
+		      (float)srcX + 0.5,      (float)srcY + 0.5);
+	    VTX_OUT_6((float)dstX,            (float)(dstY + dstw + dsth),
+		      (float)srcX / pPriv->w, ((float)srcY + (float)srch * (((float)dstw / (float)dsth) + 1.0)) / pPriv->h,
+		      (float)srcX + 0.5,      (float)srcY + (float)srch * (((float)dstw / (float)dsth) + 1.0) + 0.5);
+	    VTX_OUT_6((float)(dstX + dstw + dsth),                       (float)dstY,
+		      ((float)srcX + (float)srcw * (((float)dsth / (float)dstw) + 1.0)) / pPriv->w,
+		      (float)srcY / pPriv->h,
+		      (float)srcX + (float)srcw * (((float)dsth / (float)dstw) + 1.0) + 0.5,
+		      (float)srcY + 0.5);
+	} else {
+	    /*
+	     * Render a big, scissored triangle. This means
+	     * increasing the triangle size and adjusting
+	     * texture coordinates.
+	     */
+	    VTX_OUT_4((float)dstX,            (float)dstY,
+		      (float)srcX / pPriv->w, (float)srcY / pPriv->h);
+	    VTX_OUT_4((float)dstX,                              (float)(dstY + dsth + dstw),
+		      (float)srcX / pPriv->w, ((float)srcY + (float)srch * (((float)dstw / (float)dsth) + 1.0)) / pPriv->h);
+	    VTX_OUT_4((float)(dstX + dstw + dsth),              (float)dstY,
+		      ((float)srcX + (float)srcw * (((float)dsth / (float)dstw) + 1.0)) / pPriv->w,
+		      (float)srcY / pPriv->h);
+	}
+
+	/* flushing is pipelined, free/finish is not */
+	OUT_ACCEL_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D);
+
+#ifdef ACCEL_CP
+	ADVANCE_RING();
+#else
+	FINISH_ACCEL();
+#endif /* !ACCEL_CP */
+
+	pBox++;
+    }
+
+    BEGIN_ACCEL(3);
+    OUT_ACCEL_REG(R300_SC_CLIP_RULE, 0xAAAA);
+    OUT_ACCEL_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_RB3D_DC_FLUSH_ALL);
     OUT_ACCEL_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_3D_IDLECLEAN);
     FINISH_ACCEL();
 
     DamageDamageRegion(pPriv->pDraw, &pPriv->clip);
 }
 
-#undef VTX_OUT
-#undef VTX_OUT_FILTER
+#undef VTX_OUT_4
+#undef VTX_OUT_6
 #undef FUNC_NAME
diff --git a/src/radeon_version.h b/src/radeon_version.h
index 5717ead..129046d 100644
--- a/src/radeon_version.h
+++ b/src/radeon_version.h
@@ -38,6 +38,7 @@
 #define RADEON_DRIVER_NAME   "radeon"
 #define R200_DRIVER_NAME     "r200"
 #define R300_DRIVER_NAME     "r300"
+#define R600_DRIVER_NAME     "r600"
 
 #define RADEON_VERSION_MAJOR PACKAGE_VERSION_MAJOR
 #define RADEON_VERSION_MINOR PACKAGE_VERSION_MINOR
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 6314eb1..f1fe72b 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -284,7 +284,7 @@ void RADEONInitVideo(ScreenPtr pScreen)
     memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr));
     adaptors = newAdaptors;
 
-    if (!IS_AVIVO_VARIANT) {
+    if (!IS_AVIVO_VARIANT && !info->kms_enabled) {
 	overlayAdaptor = RADEONSetupImageVideo(pScreen);
 	if (overlayAdaptor != NULL) {
 	    adaptors[num_adaptors++] = overlayAdaptor;
@@ -541,18 +541,6 @@ static XF86ImageRec Images[NUM_IMAGES] =
 
 #endif
 
-/* Reference color space transform data */
-typedef struct tagREF_TRANSFORM
-{
-    float   RefLuma;
-    float   RefRCb;
-    float   RefRCr;
-    float   RefGCb;
-    float   RefGCr;
-    float   RefBCb;
-    float   RefBCr;
-} REF_TRANSFORM;
-
 /* Parameters for ITU-R BT.601 and ITU-R BT.709 colour spaces */
 static REF_TRANSFORM trans[2] =
 {
@@ -560,7 +548,6 @@ static REF_TRANSFORM trans[2] =
     {1.1678, 0.0, 1.7980, -0.2139, -0.5345, 2.1186, 0.0}  /* BT.709 */
 };
 
-
 /* Gamma curve definition for preset gammas */
 typedef struct tagGAMMA_CURVE_R100
 {
@@ -1661,10 +1648,6 @@ RADEONStopVideo(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
 
   if (pPriv->textured) {
       if (cleanup) {
-	  if (pPriv->bicubic_memory != NULL) {
-	      radeon_legacy_free_memory(pScrn, pPriv->bicubic_memory);
-	      pPriv->bicubic_memory = NULL;
-	  }
 	  if (pPriv->video_memory != NULL) {
 	      radeon_legacy_free_memory(pScrn, pPriv->video_memory);
 	      pPriv->video_memory = NULL;
@@ -1717,12 +1700,6 @@ RADEONSetPortAttribute(ScrnInfoPtr  pScrn,
 
     RADEON_SYNC(info, pScrn);
 
-#define RTFSaturation(a)   (1.0 + ((a)*1.0)/1000.0)
-#define RTFBrightness(a)   (((a)*1.0)/2000.0)
-#define RTFIntensity(a)   (((a)*1.0)/2000.0)
-#define RTFContrast(a)   (1.0 + ((a)*1.0)/1000.0)
-#define RTFHue(a)   (((a)*3.1416)/1000.0)
-
     if(attribute == xvAutopaintColorkey)
     {
 	pPriv->autopaint_colorkey = ClipValue (value, 0, 1);
diff --git a/src/radeon_video.h b/src/radeon_video.h
index 4498002..989942c 100644
--- a/src/radeon_video.h
+++ b/src/radeon_video.h
@@ -90,14 +90,10 @@ typedef struct {
    void         *video_memory;
    int           video_offset;
 
-   Bool          planar_hw;
-   Bool          planar_state;
    int           planeu_offset;
    int           planev_offset;
 
    /* bicubic filtering */
-   void         *bicubic_memory;
-   int           bicubic_offset;
    Bool          bicubic_enabled;
    uint32_t      bicubic_src_offset;
    int           bicubic_state;
@@ -120,9 +116,30 @@ typedef struct {
     int src_w, src_h, dst_w, dst_h;
     int w, h;
     int drw_x, drw_y;
+    int src_x, src_y;
     int vsync;
+
+    struct radeon_bo *src_bo;
 } RADEONPortPrivRec, *RADEONPortPrivPtr;
 
+/* Reference color space transform data */
+typedef struct tagREF_TRANSFORM
+{
+    float   RefLuma;
+    float   RefRCb;
+    float   RefRCr;
+    float   RefGCb;
+    float   RefGCr;
+    float   RefBCb;
+    float   RefBCr;
+} REF_TRANSFORM;
+
+#define RTFSaturation(a)   (1.0 + ((a)*1.0)/1000.0)
+#define RTFBrightness(a)   (((a)*1.0)/2000.0)
+#define RTFIntensity(a)   (((a)*1.0)/2000.0)
+#define RTFContrast(a)   (1.0 + ((a)*1.0)/1000.0)
+#define RTFHue(a)   (((a)*3.1416)/1000.0)
+
 xf86CrtcPtr
 radeon_xv_pick_best_crtc(ScrnInfoPtr pScrn,
 			 int x1, int x2, int y1, int y2);




More information about the scm-commits mailing list