rpms/xorg-x11-drv-radeonhd/devel xorg-x11-drv-radeonhd-Fail-PciProbe-if-KMS-is-enabled.patch, NONE, 1.1 .cvsignore, 1.50, 1.51 sources, 1.51, 1.52 xorg-x11-drv-radeonhd-README.fedora, 1.51, 1.52 xorg-x11-drv-radeonhd.spec, 1.67, 1.68

Hans Ulrich Niedermann ndim at fedoraproject.org
Fri Dec 4 00:33:01 UTC 2009


Author: ndim

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

Modified Files:
	.cvsignore sources xorg-x11-drv-radeonhd-README.fedora 
	xorg-x11-drv-radeonhd.spec 
Added Files:
	xorg-x11-drv-radeonhd-Fail-PciProbe-if-KMS-is-enabled.patch 
Log Message:
* Fri Dec 04 2009 Hans Ulrich Niedermann <hun at n-dimensional.de> - 1.3.0-4.2.20091204git
- Abort driver startup if kernel modesetting (KMS) is enabled
- New snapshot (upstream commit 98d1d5f68f5be3f9dc3cd4b483ca4bea708e1eb8):
  - 98d1d5f6: Blacklist: Marking 0x9710, 0x1043, 0x83A2 hotplug unusable.
  - f7aed406: conntest: Update PCI ID list.


xorg-x11-drv-radeonhd-Fail-PciProbe-if-KMS-is-enabled.patch:
 rhd_driver.c |   43 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

--- NEW FILE xorg-x11-drv-radeonhd-Fail-PciProbe-if-KMS-is-enabled.patch ---
>From e6e4a2ff28a841f788d4ff28d3fb175c9ae69a63 Mon Sep 17 00:00:00 2001
From: Hans Ulrich Niedermann <hun at n-dimensional.de>
Date: Fri, 4 Dec 2009 01:26:25 +0100
Subject: [PATCH] Fail PciProbe if KMS is enabled

This copies the radeon_kernel_mode_enabled() function from radeon's
radeon_probe.c's radeon_get_scrninfo(), and puts it into
rhd_driver.c's RHDPciProbe().

If kernel modesetting (KMS) is detected and active, we abort the
PciProbe and do not touch the GPU in any way.

Then at least the KMS console continues working, and there is an
error message for the user to read.
---
 src/rhd_driver.c |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/src/rhd_driver.c b/src/rhd_driver.c
index 2d7f803..058a308 100644
--- a/src/rhd_driver.c
+++ b/src/rhd_driver.c
@@ -2,6 +2,7 @@
  * Copyright 2007-2009  Luc Verhaegen <libv at exsuse.de>
  * Copyright 2007-2009  Matthias Hopf <mhopf at novell.com>
  * Copyright 2007-2009  Egbert Eich   <eich at novell.com>
+ * Copyright      2009  Dave Airlie   <airlied at redhat.com>
  * Copyright 2007-2009  Advanced Micro Devices, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -88,6 +89,7 @@
 #define _XF86DRI_SERVER_
 #include "dri.h"
 #include "GL/glxint.h"
+#include "xf86drmMode.h"
 #endif
 
 #if HAVE_XF86_ANSIC_H
@@ -398,6 +400,34 @@ RHDAvailableOptions(int chipid, int busid)
  *
  */
 #ifdef XSERVER_LIBPCIACCESS
+
+/* The radeon_kernel_mode_enabled() function is taken verbatim from
+ * radeon's radeon_probe.c file. */
+static Bool radeon_kernel_mode_enabled(ScrnInfoPtr pScrn, struct pci_device *pci_dev)
+{
+    char *busIdString;
+    int ret;
+
+    if (!xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
+      xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
+		   "[KMS] No DRICreatePCIBusID symbol, no kernel modesetting.\n");
+	return FALSE;
+    }
+
+    busIdString = DRICreatePCIBusID(pci_dev);
+    ret = drmCheckModesettingSupported(busIdString);
+    xfree(busIdString);
+    if (ret) {
+      xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
+		   "[KMS] drm report modesetting isn't supported.\n");
+	return FALSE;
+    }
+
+    xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
+		   "[KMS] Kernel modesetting enabled.\n");
+    return TRUE;
+}
+
 static Bool
 RHDPciProbe(DriverPtr drv, int entityNum,
 	    struct pci_device *dev, intptr_t matchData)
@@ -409,6 +439,18 @@ RHDPciProbe(DriverPtr drv, int entityNum,
 				RES_SHARED_VGA, NULL, NULL, NULL, NULL);
     if (pScrn != NULL) {
 
+	if (dev) {
+	    Bool kms = radeon_kernel_mode_enabled(pScrn, dev);
+	    if (kms) {
+		xf86DrvMsgVerb(pScrn->scrnIndex, X_ERROR, 0,
+		    "FATAL: RADEONHD does not work with kernel modesetting (KMS).\n"
+		    "\tAppend \"nomodeset\" or \"radeon.modeset=0\" (depending\n"
+		    "\ton your kernel version, or just add both to be sure) to \n"
+		    "\tyour kernel command line in /boot/grub/grub.conf.\n");
+		return FALSE;
+	    }
+	}
+
 	pScrn->driverVersion = RHD_VERSION;
 	pScrn->driverName    = RHD_DRIVER_NAME;
 	pScrn->name          = RHD_NAME;
-- 
1.6.2.5



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-radeonhd/devel/.cvsignore,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -p -r1.50 -r1.51
--- .cvsignore	12 Nov 2009 15:30:07 -0000	1.50
+++ .cvsignore	4 Dec 2009 00:33:00 -0000	1.51
@@ -1 +1 @@
-xf86-video-radeonhd-1.3.0-20091112git.tar.lzma
+xf86-video-radeonhd-1.3.0-20091204git.tar.lzma


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-radeonhd/devel/sources,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -p -r1.51 -r1.52
--- sources	12 Nov 2009 15:30:08 -0000	1.51
+++ sources	4 Dec 2009 00:33:00 -0000	1.52
@@ -1 +1 @@
-5b4c5aa647b53866f78c2aea479739ee  xf86-video-radeonhd-1.3.0-20091112git.tar.lzma
+1bab87280d94db5197c3b700b05024a3  xf86-video-radeonhd-1.3.0-20091204git.tar.lzma


Index: xorg-x11-drv-radeonhd-README.fedora
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-radeonhd/devel/xorg-x11-drv-radeonhd-README.fedora,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -p -r1.51 -r1.52
--- xorg-x11-drv-radeonhd-README.fedora	12 Nov 2009 15:30:08 -0000	1.51
+++ xorg-x11-drv-radeonhd-README.fedora	4 Dec 2009 00:33:01 -0000	1.52
@@ -11,7 +11,7 @@ quickly (and releases happen too infrequ
 package tarball releases. For this reason, we are packaging selected
 snapshots of upstream's git repository here.
 
-Latest upstream commit: 6387ab4c1d0ff71e556b1c96f21b4e765a6c8e5a
+Latest upstream commit: 98d1d5f68f5be3f9dc3cd4b483ca4bea708e1eb8
 
 
 Contents
@@ -57,7 +57,8 @@ handled by radeon(4) from the xorg-x11-d
 
 To use the radeonhd(4) driver from the xorg-x11-drv-radeonhd
 package instead, you need to adapt your /etc/X11/xorg.conf file,
-or create it if it does not exist yet.
+or create[https://fedoraproject.org/wiki/How_to_create_xorg.conf]
+it if it does not exist yet.
 
 A minimal /etc/X11/xorg.conf file could look like this:
 
@@ -67,6 +68,12 @@ A minimal /etc/X11/xorg.conf file could 
         Option "DRI" "on"
     EndSection
 
+Additionally, you need to modify your /boot/grub/grub.conf file to
+add the "nomodeset" or "radeon.modeset=0" kernel boot command
+line parameter to disable KMS.
+
+If unsure, just adding both parameters should do the job.
+
 
 4. Known Issues
 ===============


Index: xorg-x11-drv-radeonhd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-radeonhd/devel/xorg-x11-drv-radeonhd.spec,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -p -r1.67 -r1.68
--- xorg-x11-drv-radeonhd.spec	12 Nov 2009 15:30:08 -0000	1.67
+++ xorg-x11-drv-radeonhd.spec	4 Dec 2009 00:33:01 -0000	1.68
@@ -20,8 +20,8 @@
 %endif
 
 %if %{snapshot}
-%define date 20091112
-%define git_commit 6387ab4c1d0ff71e556b1c96f21b4e765a6c8e5a
+%define date 20091204
+%define git_commit 98d1d5f68f5be3f9dc3cd4b483ca4bea708e1eb8
 %define alphatag .%{date}git
 %define tarball %{tarname}-%{version}-%{date}git
 %define ship_utils 1
@@ -30,10 +30,10 @@
 %define ship_utils 1
 %endif
 
-Summary:       Xorg X11 radeonhd driver for AMD GPG r5xx/r6xx Chipsets
+Summary:       Xorg X11 radeonhd driver for AMD GPG r[5-8]xx Chipsets
 Name:          xorg-x11-drv-radeonhd
 Version:       1.3.0
-Release:       3.15%{?alphatag}%{?dist}
+Release:       4.2%{?alphatag}%{?dist}
 
 License:       MIT
 Group:         User Interface/X Hardware Support
@@ -64,6 +64,9 @@ Source11:      %{name}-Generate-xinf-fil
 # Upstream does not install rhd_conntest, but we do. Adapt docs accordingly.
 Patch100:      xorg-x11-drv-radeonhd-Fix-location-of-rhd_conntest-in-msgs.patch
 
+# Abort driver init and Xorg startup when KMS is enabled
+Patch110:      xorg-x11-drv-radeonhd-Fail-PciProbe-if-KMS-is-enabled.patch
+
 # 200-299: Misc patches
 
 ExcludeArch:   s390 s390x
@@ -105,7 +108,7 @@ BuildRequires: libXext-devel
 
 
 %description
-X.org X11 radeonhd driver for AMD GPG r5xx/r6xx Chipsets.
+X.org X11 radeonhd driver for AMD GPG r5xx/r6xx/r7xx/r8xx Chipsets.
 %if %{snapshot}
 This package is a snapshot of a work in progress. You may experience
 regressions, bugs, errors, broken displays, and other undesirable phenomena.
@@ -119,6 +122,7 @@ Built from git commit: %{git_commit}
 %setup -q -n %{tarball}
 %if %{snapshot}
 %patch100 -p1 -b .conntest-docrefs
+%patch110 -p1 -b .kms-check
 %endif
 sed -i 's|\(built from %%s\)\\n\\n"|\1\\n\\tFedora package %{name}-%{version}-%{release}\\n\\n"|' src/rhd_id.c
 
@@ -170,6 +174,12 @@ sed -i 's|\(built from %%s\)\\n\\n"|\1\\
 %endif
 
 %changelog
+* Fri Dec 04 2009 Hans Ulrich Niedermann <hun at n-dimensional.de> - 1.3.0-4.2.20091204git
+- Abort driver startup if kernel modesetting (KMS) is enabled
+- New snapshot (upstream commit 98d1d5f68f5be3f9dc3cd4b483ca4bea708e1eb8):
+  - 98d1d5f6: Blacklist: Marking 0x9710, 0x1043, 0x83A2 hotplug unusable.
+  - f7aed406: conntest: Update PCI ID list.
+
 * Thu Nov 12 2009 Hans Ulrich Niedermann <hun at n-dimensional.de> - 1.3.0-3.15.20091112git
 - Skipping the 1.3.0 release due to a838114e and probably other fixes.
 - New snapshot (upstream commit 6387ab4c1d0ff71e556b1c96f21b4e765a6c8e5a):




More information about the fedora-extras-commits mailing list