ChangeLog                                    |   26 ++++++++++
 debian/NEWS                                  |   29 -----------
 debian/changelog                             |    4 +
 debian/radeon-kms.conf                       |    2 
 debian/rules                                 |    4 +
 debian/xserver-xorg-video-ati.NEWS           |   18 +++++++
 debian/xserver-xorg-video-radeon.NEWS        |   41 ++++++++++++++++
 debian/xserver-xorg-video-radeon.postinst.in |   21 ++++++++
 debian/xserver-xorg-video-radeon.postrm.in   |   21 ++++++++
 debian/xserver-xorg-video-radeon.prerm.in    |   21 ++++++++
 src/drmmode_display.c                        |   25 +--------
 src/drmmode_display.h                        |    2 
 src/radeon_accelfuncs.c                      |    1 
 src/radeon_kms.c                             |   68 ++++++++++++++++++++++++---
 14 files changed, 224 insertions(+), 59 deletions(-)

New commits:
commit f62daf71011a40aa37802b6abd726b731985174b
Author: Brice Goglin <bgog...@debian.org>
Date:   Sun Mar 21 19:58:48 2010 +0100

    Enable kernel mode setting by default on Linux

diff --git a/debian/changelog b/debian/changelog
index 45b5eee..d02aca7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 xserver-xorg-video-ati (1:6.12.192-2) UNRELEASED; urgency=low
 
+  * Enable kernel mode setting by default on Linux.
   * Bump Standards-Version to 3.8.4, no changes needed.
   * Pull from upstream master up to commit 5c256808.
   * Stop installing the NEWS file in all binary packages, only
diff --git a/debian/radeon-kms.conf b/debian/radeon-kms.conf
new file mode 100644
index 0000000..9b86072
--- /dev/null
+++ b/debian/radeon-kms.conf
@@ -0,0 +1,2 @@
+options radeon modeset=1
+
diff --git a/debian/rules b/debian/rules
index e4cdab5..8815ada 100755
--- a/debian/rules
+++ b/debian/rules
@@ -89,6 +89,10 @@ binary-arch: build install serverabi-ati serverabi-radeon
        dh_installdocs
        dh_installchangelogs ChangeLog
        dh_install --sourcedir=debian/tmp --list-missing --exclude=.la 
--exclude=usr/share/man/man4
+ifeq ($(DEB_HOST_ARCH_OS), linux)
+       install -d -m 755 debian/xserver-xorg-video-radeon/etc/modprobe.d/
+       install -m 644 debian/radeon-kms.conf 
debian/xserver-xorg-video-radeon/etc/modprobe.d/
+endif
        dh_installman
        dh_link
        dh_strip -pxserver-xorg-video-ati 
--dbg-package=xserver-xorg-video-ati-dbg
diff --git a/debian/xserver-xorg-video-radeon.NEWS 
b/debian/xserver-xorg-video-radeon.NEWS
index 51d3dab..21cd9aa 100644
--- a/debian/xserver-xorg-video-radeon.NEWS
+++ b/debian/xserver-xorg-video-radeon.NEWS
@@ -1,3 +1,15 @@
+xserver-xorg-video-radeon (1:6.12.192-2) UNRELEASED; urgency=low
+
+  * Starting with this version, the radeon driver enables kernel mode setting
+    (KMS) by default.  This comes with a framebuffer driver which enables
+    native resolution on the console.  KMS also allows faster VT switching
+    and mode changes.
+
+    In case of trouble KMS can be disabled with the 'nomodeset' kernel
+    command line parameter, or by editing /etc/modprobe.d/radeon-kms.conf.
+
+ -- Brice Goglin <bgog...@debian.org>  Sun, 21 Mar 2010 19:46:25 +0100
+
 xserver-xorg-video-radeon (1:6.12.2-2) unstable; urgency=low
 
   * The standard linux kernels in Debian as of version 2.6.29-1 do not contain
diff --git a/debian/xserver-xorg-video-radeon.postinst.in 
b/debian/xserver-xorg-video-radeon.postinst.in
new file mode 100644
index 0000000..c24fb34
--- /dev/null
+++ b/debian/xserver-xorg-video-radeon.postinst.in
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+THIS_SCRIPT=postinst
+THIS_PACKAGE=xserver-xorg-video-radeon
+
+#INCLUDE_SHELL_LIB#
+
+case "$1" in
+  abort-upgrade)
+  if dpkg --compare-versions "$2" lt-nl 1:6.12.99; then
+    # failed downgrading to a version without kms
+    remove_conffile_rollback /etc/modprobe.d/radeon-kms.conf
+  fi
+  ;;
+esac
+
+#DEBHELPER#
+
+# vim:set ai et sw=2 ts=2 tw=80:
diff --git a/debian/xserver-xorg-video-radeon.postrm.in 
b/debian/xserver-xorg-video-radeon.postrm.in
new file mode 100644
index 0000000..78c330a
--- /dev/null
+++ b/debian/xserver-xorg-video-radeon.postrm.in
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+THIS_SCRIPT=postrm
+THIS_PACKAGE=xserver-xorg-video-radeon
+
+#INCLUDE_SHELL_LIB#
+
+case "$1" in
+  upgrade)
+  if dpkg --compare-versions "$2" lt-nl 1:6.12.99; then
+    # downgrading to a version without kms
+    remove_conffile_commit /etc/modprobe.d/radeon-kms.conf
+  fi
+  ;;
+esac
+
+#DEBHELPER#
+
+# vim:set ai et sw=2 ts=2 tw=80:
diff --git a/debian/xserver-xorg-video-radeon.prerm.in 
b/debian/xserver-xorg-video-radeon.prerm.in
new file mode 100644
index 0000000..10ba541
--- /dev/null
+++ b/debian/xserver-xorg-video-radeon.prerm.in
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+THIS_SCRIPT=prerm
+THIS_PACKAGE=xserver-xorg-video-radeon
+
+#INCLUDE_SHELL_LIB#
+
+case "$1" in
+  upgrade)
+  if dpkg --compare-versions "$2" lt-nl 1:6.12.99; then
+    # downgrading to a version without kms
+    remove_conffile_lookup $THIS_PACKAGE /etc/modprobe.d/radeon-kms.conf
+  fi
+  ;;
+esac
+
+#DEBHELPER#
+
+# vim:set ai et sw=2 ts=2 tw=80:

commit 198fdd98316522b5fb22549538c18e519bc48bbe
Author: Brice Goglin <bgog...@debian.org>
Date:   Sun Mar 21 19:57:05 2010 +0100

    Use different NEWS file for -ati and -radeon

diff --git a/debian/NEWS b/debian/NEWS
deleted file mode 100644
index 40580e9..0000000
--- a/debian/NEWS
+++ /dev/null
@@ -1,29 +0,0 @@
-xserver-xorg-video-ati (1:6.12.2-2) unstable; urgency=low
-
-  * The standard linux kernels in Debian as of version 2.6.29-1 do not contain
-    the firmware necessary to allow the radeon driver to use 3D acceleration
-    via DRI. In addition, the driver will pay significant performance
-    penalties for 2D and Xvideo usage when the firmware is absent. This
-    firmware has been moved to the firmware-linux package in non-free, and
-    must be installed to use this feature.
-
- -- David Nusinow <dnusi...@debian.org>  Wed, 29 Apr 2009 21:14:53 -0400
-
-xserver-xorg-video-ati (1:6.8.1~git20080302.a4398ac3-1) experimental; 
urgency=low
-
-  * The 'ati' Xorg driver module does not contain the 'r128' and 'mach64'
-    submodules anymore. Users of Rage or Mach boards may safely remove
-    the xserver-xorg-video-ati packages only if they use Driver "r128" or
-    "mach64" instead of "ati" in their /etc/X11/xorg.conf.
-
- -- Brice Goglin <bgog...@debian.org>  Sun, 02 Mar 2008 13:22:03 +0100
-
-xserver-xorg-video-ati (1:6.7.197-1) unstable; urgency=low
-
-  * The X.Org ATI driver supports RandR 1.2 which enables dynamic
-    enabling, disabling, resizing, rotating, placing, ... of multiple
-    outputs at runtime. You might want to update your /etc/X11/xorg.conf
-    accordingly. See http://wiki.debian.org/XStrikeForce/HowToRandR12
-    and http://www.intellinuxgraphics.org/dualhead.html for some help.
-
- -- Brice Goglin <bgog...@debian.org>  Fri, 21 Dec 2007 08:12:13 +0100
diff --git a/debian/changelog b/debian/changelog
index 9c31ab9..45b5eee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ xserver-xorg-video-ati (1:6.12.192-2) UNRELEASED; urgency=low
 
   * Bump Standards-Version to 3.8.4, no changes needed.
   * Pull from upstream master up to commit 5c256808.
+  * Stop installing the NEWS file in all binary packages, only
+    keep the relevant entries in -radeon and -ati NEWS files.
 
  -- Brice Goglin <bgog...@debian.org>  Mon, 15 Mar 2010 19:13:14 +0100
 
diff --git a/debian/xserver-xorg-video-ati.NEWS 
b/debian/xserver-xorg-video-ati.NEWS
new file mode 100644
index 0000000..0d0674b
--- /dev/null
+++ b/debian/xserver-xorg-video-ati.NEWS
@@ -0,0 +1,18 @@
+xserver-xorg-video-ati (1:6.8.1~git20080302.a4398ac3-1) experimental; 
urgency=low
+
+  * The 'ati' Xorg driver module does not contain the 'r128' and 'mach64'
+    submodules anymore. Users of Rage or Mach boards may safely remove
+    the xserver-xorg-video-ati packages only if they use Driver "r128" or
+    "mach64" instead of "ati" in their /etc/X11/xorg.conf.
+
+ -- Brice Goglin <bgog...@debian.org>  Sun, 02 Mar 2008 13:22:03 +0100
+
+xserver-xorg-video-ati (1:6.7.197-1) unstable; urgency=low
+
+  * The X.Org ATI driver supports RandR 1.2 which enables dynamic
+    enabling, disabling, resizing, rotating, placing, ... of multiple
+    outputs at runtime. You might want to update your /etc/X11/xorg.conf
+    accordingly. See http://wiki.debian.org/XStrikeForce/HowToRandR12
+    and http://www.intellinuxgraphics.org/dualhead.html for some help.
+
+ -- Brice Goglin <bgog...@debian.org>  Fri, 21 Dec 2007 08:12:13 +0100
diff --git a/debian/xserver-xorg-video-radeon.NEWS 
b/debian/xserver-xorg-video-radeon.NEWS
new file mode 100644
index 0000000..51d3dab
--- /dev/null
+++ b/debian/xserver-xorg-video-radeon.NEWS
@@ -0,0 +1,29 @@
+xserver-xorg-video-radeon (1:6.12.2-2) unstable; urgency=low
+
+  * The standard linux kernels in Debian as of version 2.6.29-1 do not contain
+    the firmware necessary to allow the radeon driver to use 3D acceleration
+    via DRI. In addition, the driver will pay significant performance
+    penalties for 2D and Xvideo usage when the firmware is absent. This
+    firmware has been moved to the firmware-linux package in non-free, and
+    must be installed to use this feature.
+
+ -- David Nusinow <dnusi...@debian.org>  Wed, 29 Apr 2009 21:14:53 -0400
+
+xserver-xorg-video-ati (1:6.8.1~git20080302.a4398ac3-1) experimental; 
urgency=low
+
+  * The 'ati' Xorg driver module does not contain the 'r128' and 'mach64'
+    submodules anymore. Users of Rage or Mach boards may safely remove
+    the xserver-xorg-video-ati packages only if they use Driver "r128" or
+    "mach64" instead of "ati" in their /etc/X11/xorg.conf.
+
+ -- Brice Goglin <bgog...@debian.org>  Sun, 02 Mar 2008 13:22:03 +0100
+
+xserver-xorg-video-ati (1:6.7.197-1) unstable; urgency=low
+
+  * The X.Org ATI driver supports RandR 1.2 which enables dynamic
+    enabling, disabling, resizing, rotating, placing, ... of multiple
+    outputs at runtime. You might want to update your /etc/X11/xorg.conf
+    accordingly. See http://wiki.debian.org/XStrikeForce/HowToRandR12
+    and http://www.intellinuxgraphics.org/dualhead.html for some help.
+
+ -- Brice Goglin <bgog...@debian.org>  Fri, 21 Dec 2007 08:12:13 +0100

commit 9141f779b02f6c00460780c5f484c398733c5320
Author: Brice Goglin <bgog...@debian.org>
Date:   Sun Mar 21 16:28:52 2010 +0100

    Pull from upstream master

diff --git a/ChangeLog b/ChangeLog
index 8ba30c4..d798dd2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+commit 5c256808cb5fea955eea96ffe9196473715156aa
+Author: Alex Deucher <alexdeuc...@gmail.com>
+Date:   Wed Mar 17 23:47:50 2010 -0400
+
+    XAA: disable render accel
+    
+    It's been reported broken for a while.  Should fix
+    fdo bug 27151, others.
+
+commit a0683be5cc082bdbdd3bc4e9b52f39f423650946
+Author: Dave Airlie <airl...@redhat.com>
+Date:   Thu Mar 18 12:36:25 2010 +1000
+
+    radeon: avoid using DRI1 init path on DRI2 driver.
+    
+    I was playing with multi-seat and found this code, fixed
+    it up to be sane and more DRI2 like.
+    
+    Signed-off-by: Dave Airlie <airl...@redhat.com>
+
+commit 080a5414593e9b59ed923f26aa6057747b0c868f
+Author: Alex Deucher <alexdeuc...@gmail.com>
+Date:   Tue Mar 16 12:33:39 2010 -0400
+
+    kms: fix ums naming compat for DisplayPort
+
 commit 819b4015349b5d8c5ffa5f979097599774fce5bb
 Author: Alex Deucher <alexdeuc...@gmail.com>
 Date:   Mon Mar 15 13:47:29 2010 -0400
diff --git a/debian/changelog b/debian/changelog
index f02fff2..9c31ab9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xserver-xorg-video-ati (1:6.12.192-2) UNRELEASED; urgency=low
 
   * Bump Standards-Version to 3.8.4, no changes needed.
+  * Pull from upstream master up to commit 5c256808.
 
  -- Brice Goglin <bgog...@debian.org>  Mon, 15 Mar 2010 19:13:14 +0100
 

commit 5c256808cb5fea955eea96ffe9196473715156aa
Author: Alex Deucher <alexdeuc...@gmail.com>
Date:   Wed Mar 17 23:47:50 2010 -0400

    XAA: disable render accel
    
    It's been reported broken for a while.  Should fix
    fdo bug 27151, others.

diff --git a/src/radeon_accelfuncs.c b/src/radeon_accelfuncs.c
index dd1defd..36f25e7 100644
--- a/src/radeon_accelfuncs.c
+++ b/src/radeon_accelfuncs.c
@@ -1332,6 +1332,7 @@ FUNC_NAME(RADEONAccelInit)(ScreenPtr pScreen, 
XAAInfoRecPtr a)
 #endif
 
 #ifdef RENDER
+    info->RenderAccel = FALSE;
     if (info->RenderAccel && info->xaaReq.minorversion >= 2) {
 
        a->CPUToScreenAlphaTextureFlags = XAA_RENDER_POWER_OF_2_TILE_ONLY;

commit a0683be5cc082bdbdd3bc4e9b52f39f423650946
Author: Dave Airlie <airl...@redhat.com>
Date:   Thu Mar 18 12:36:25 2010 +1000

    radeon: avoid using DRI1 init path on DRI2 driver.
    
    I was playing with multi-seat and found this code, fixed
    it up to be sane and more DRI2 like.
    
    Signed-off-by: Dave Airlie <airl...@redhat.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 1121044..399a6a7 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1151,31 +1151,11 @@ static const xf86CrtcConfigFuncsRec 
drmmode_xf86crtc_config_funcs = {
 };
 
 
-Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, char *busId, 
char *driver_name, int cpp)
+Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
 {
        xf86CrtcConfigPtr   xf86_config;
-       RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
        int i;
-       Bool ret;
-
-       /* Create a bus Id */
-       /* Low level DRM open */
-       if (!pRADEONEnt->fd) {
-               ret = DRIOpenDRMMaster(pScrn, SAREA_MAX, busId, driver_name);
-               if (!ret) {
-                       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                                  "[dri] DRIGetVersion failed to open the 
DRM\n"
-                                  "[dri] Disabling DRI.\n");
-                       return FALSE;
-               }
 
-               drmmode->fd = DRIMasterFD(pScrn);
-               pRADEONEnt->fd = drmmode->fd;
-       } else {
-               xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                               " reusing fd for second head\n");
-               drmmode->fd = pRADEONEnt->fd;
-       }
        xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs);
        xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
 
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index 1576d49..2e76259 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -74,7 +74,7 @@ typedef struct {
 } drmmode_output_private_rec, *drmmode_output_private_ptr;
 
 
-extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, char 
*busId, char *driver_name, int cpp);
+extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp);
 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);
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 1f9c5d4..15e5e3f 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -362,12 +362,67 @@ static Bool radeon_alloc_dri(ScrnInfoPtr pScrn)
     return TRUE;
 }
 
+static Bool radeon_open_drm_master(ScrnInfoPtr pScrn)
+{
+    RADEONInfoPtr  info   = RADEONPTR(pScrn);
+    RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
+    struct pci_device *dev = info->PciInfo;
+    char *busid;
+    drmSetVersion sv;
+    int err;
+
+    if (pRADEONEnt->fd) {
+       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                  " reusing fd for second head\n");
+
+       info->dri2.drm_fd = pRADEONEnt->fd;
+       goto out;
+    }
+
+    busid = XNFprintf("pci:%04x:%02x:%02x.%d",
+                     dev->domain, dev->bus, dev->dev, dev->func);
+
+    info->dri2.drm_fd = drmOpen("radeon", busid);
+    if (info->dri2.drm_fd == -1) {
+
+       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                  "[drm] Failed to open DRM device for %s: %s\n",
+                  busid, strerror(errno));
+       xfree(busid);
+       return FALSE;
+    }
+    xfree(busid);
+
+    /* Check that what we opened was a master or a master-capable FD,
+     * by setting the version of the interface we'll use to talk to it.
+     * (see DRIOpenDRMMaster() in DRI1)
+     */
+    sv.drm_di_major = 1;
+    sv.drm_di_minor = 1;
+    sv.drm_dd_major = -1;
+    sv.drm_dd_minor = -1;
+    err = drmSetInterfaceVersion(info->dri2.drm_fd, &sv);
+    if (err != 0) {
+       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                  "[drm] failed to set drm interface version.\n");
+       drmClose(info->dri2.drm_fd);
+       info->dri2.drm_fd = -1;
+
+       return FALSE;
+    }
+
+    pRADEONEnt->fd = info->dri2.drm_fd;
+ out:
+    info->drmmode.fd = info->dri2.drm_fd;
+    info->dri->drmFD = info->dri2.drm_fd;
+    return TRUE;
+}
+
 Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 {
     RADEONInfoPtr     info;
     RADEONEntPtr pRADEONEnt;
     DevUnion* pPriv;
-    char *bus_id;
     Gamma  zeros = { 0.0, 0.0, 0.0 };
 
     xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
@@ -434,17 +489,16 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
         "KMS Color Tiling: %sabled\n", info->allowColorTiling ? "en" : "dis");
 
-    bus_id = DRICreatePCIBusID(info->PciInfo);
-    if (drmmode_pre_init(pScrn, &info->drmmode, bus_id, "radeon", 
pScrn->bitsPerPixel / 8) == FALSE) {
-       xfree(bus_id);
+    if (radeon_open_drm_master(pScrn) == FALSE) {
+       xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Kernel modesetting setup 
failed\n");
+       goto fail;
+    }
+    if (drmmode_pre_init(pScrn, &info->drmmode, pScrn->bitsPerPixel / 8) == 
FALSE) {
        xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Kernel modesetting setup 
failed\n");
        goto fail;
     }
 
-    info->dri->drmFD = info->drmmode.fd;
-    info->dri2.drm_fd = info->drmmode.fd;
     info->dri2.enabled = FALSE;
-    xfree(bus_id);
     info->dri->pKernelDRMVersion = drmGetVersion(info->dri->drmFD);
     if (info->dri->pKernelDRMVersion == NULL) {
        xf86DrvMsg(pScrn->scrnIndex, X_ERROR,

commit 080a5414593e9b59ed923f26aa6057747b0c868f
Author: Alex Deucher <alexdeuc...@gmail.com>
Date:   Tue Mar 16 12:33:39 2010 -0400

    kms: fix ums naming compat for DisplayPort

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 253ec1e..1121044 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -844,7 +844,7 @@ const char *output_names[] = { "None",
                               "LVDS",
                               "CTV",
                               "DIN",
-                              "DP",
+                              "DisplayPort",
                               "HDMI",
                               "HDMI",
                               "TV",
@@ -889,6 +889,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, 
int num)
            case DRM_MODE_CONNECTOR_DVIA:
            case DRM_MODE_CONNECTOR_HDMIA:
            case DRM_MODE_CONNECTOR_HDMIB:
+           case DRM_MODE_CONNECTOR_DisplayPort:
                snprintf(name, 32, "%s-%d", 
output_names[koutput->connector_type], koutput->connector_type_id - 1);
                break;
            default:


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1ntqlu-0002uc...@alioth.debian.org

Reply via email to