rpms/xorg-x11-drv-intel/devel uevent.patch, NONE, 1.1 xorg-x11-drv-intel.spec, 1.24, 1.25
Adam Jackson
ajax at fedoraproject.org
Wed Sep 2 21:54:31 UTC 2009
- Previous message (by thread): rpms/auto-destdir/devel auto-destdir.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/mpich2/EL-5 .cvsignore, 1.4, 1.5 mpich2.spec, 1.7, 1.8 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ajax
Update of /cvs/pkgs/rpms/xorg-x11-drv-intel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27047
Modified Files:
xorg-x11-drv-intel.spec
Added Files:
uevent.patch
Log Message:
* Wed Sep 02 2009 Adam Jackson <ajax at redhat.com> 2.8.0-9
- uevent.patch: Catch uevents for output hotplug, rescan when they happen,
and send RANDR events for any changes.
uevent.patch:
Makefile.am | 2 -
i830.h | 5 +++
i830_driver.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 86 insertions(+), 1 deletion(-)
--- NEW FILE uevent.patch ---
diff -up xf86-video-intel-20090812/src/i830_driver.c.uevent xf86-video-intel-20090812/src/i830_driver.c
--- xf86-video-intel-20090812/src/i830_driver.c.uevent 2009-09-01 15:41:32.803946753 -0400
+++ xf86-video-intel-20090812/src/i830_driver.c 2009-09-01 15:41:32.836946701 -0400
@@ -84,6 +84,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "i915_drm.h"
#include <xf86drmMode.h>
+#include "libudev.h"
+
#define BIT(x) (1 << (x))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define NB_OF(x) (sizeof (x) / sizeof (*x))
@@ -2526,6 +2528,80 @@ i830_disable_render_standby(ScrnInfoPtr
}
}
+static void
+I830HandleUEvents(int fd, void *closure)
+{
+ ScrnInfoPtr pScrn = closure;
+ I830Ptr pI830 = I830PTR(pScrn);
+ struct udev_device *dev;
+
+ dev = udev_monitor_receive_device(pI830->uevent_monitor);
+ if (!dev)
+ return;
+
+ /*
+ * technically we should inspect the event to see that it's a hotplug.
+ * but we know it's a hotplug, we don't get events for anything else.
+ * XXX but we should definitely trim by drm node
+ */
+
+ RRGetInfo(screenInfo.screens[pScrn->scrnIndex], TRUE);
+
+ udev_device_unref(dev);
+}
+
+static void
+I830UeventInit(ScrnInfoPtr pScrn)
+{
+ I830Ptr pI830 = I830PTR(pScrn);
+ struct udev *u;
+ struct udev_monitor *mon;
+
+ u = udev_new();
+ if (!u)
+ return;
+
+ mon = udev_monitor_new_from_netlink(u, "udev");
+
+ if (!mon) {
+ udev_unref(u);
+ return;
+ }
+
+ if (udev_monitor_filter_add_match_subsystem_devtype(mon,
+ "drm",
+ "drm_minor") < 0 ||
+ udev_monitor_enable_receiving(mon) < 0)
+ {
+ udev_monitor_unref(mon);
+ udev_unref(u);
+ return;
+ }
+
+ pI830->uevent_handler =
+ xf86AddGeneralHandler(udev_monitor_get_fd(mon),
+ I830HandleUEvents,
+ pScrn);
+
+ pI830->uevent_monitor = mon;
+}
+
+static void
+I830UeventFini(ScrnInfoPtr pScrn)
+{
+ I830Ptr pI830 = I830PTR(pScrn);
+
+ if (pI830->uevent_handler)
+ {
+ struct udev *u = udev_monitor_get_udev(pI830->uevent_monitor);
+
+ xf86RemoveGeneralHandler(pI830->uevent_handler);
+
+ udev_monitor_unref(pI830->uevent_monitor);
+ udev_unref(u);
+ }
+}
+
static Bool
I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
{
@@ -2834,6 +2910,8 @@ I830ScreenInit(int scrnIndex, ScreenPtr
pI830->closing = FALSE;
pI830->suspended = FALSE;
+ I830UeventInit(pScrn);
+
return TRUE;
}
@@ -3093,6 +3171,8 @@ I830CloseScreen(int scrnIndex, ScreenPtr
pI830->closing = TRUE;
+ I830UeventFini(pScrn);
+
if (pScrn->vtSema == TRUE) {
I830LeaveVT(scrnIndex, 0);
}
--- xf86-video-intel-20090812/src/i830.h.uevent 2009-09-01 15:41:32.825975679 -0400
+++ xf86-video-intel-20090812/src/i830.h 2009-09-01 15:41:32.838947026 -0400
@@ -47,6 +47,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
#ifndef _I830_H_
#define _I830_H_
+#include "libudev.h"
+
#include "xf86_OSproc.h"
#include "compiler.h"
#include "xf86PciInfo.h"
@@ -618,6 +620,9 @@ typedef struct _I830Rec {
/** User option to print acceleration fallback info to the server log. */
Bool fallback_debug;
struct sdvo_device_mapping sdvo_mappings[2];
+
+ struct udev_monitor *uevent_monitor;
+ InputHandlerProc uevent_handler;
} I830Rec;
#define I830PTR(p) ((I830Ptr)((p)->driverPrivate))
--- xf86-video-intel-20090812/src/Makefile.am.uevent 2009-08-11 14:50:03.000000000 -0400
+++ xf86-video-intel-20090812/src/Makefile.am 2009-09-01 15:44:06.552076300 -0400
@@ -32,7 +32,7 @@ AM_CFLAGS = @WARN_CFLAGS@ @XORG_CFLAGS@
intel_drv_la_LTLIBRARIES = intel_drv.la
intel_drv_la_LDFLAGS = -module -avoid-version
intel_drv_ladir = @moduledir@/drivers
-intel_drv_la_LIBADD = -lm @DRM_LIBS@ -ldrm_intel ../uxa/libuxa.la
+intel_drv_la_LIBADD = -ludev -lm @DRM_LIBS@ -ldrm_intel ../uxa/libuxa.la
intel_drv_la_LIBADD += @PCIACCESS_LIBS@
INTEL_DRI_SRCS = \
Index: xorg-x11-drv-intel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-intel/devel/xorg-x11-drv-intel.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- xorg-x11-drv-intel.spec 20 Aug 2009 21:23:04 -0000 1.24
+++ xorg-x11-drv-intel.spec 2 Sep 2009 21:54:31 -0000 1.25
@@ -8,7 +8,7 @@
Summary: Xorg X11 Intel video driver
Name: xorg-x11-drv-intel
Version: 2.8.0
-Release: 8%{?dist}
+Release: 9%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -31,6 +31,7 @@ Patch21: intel-2.8.0-lvds-first.patch
Patch40: dri2-page-flip.patch
Patch50: intel-2.8.0-shadow-no-offset.patch
+Patch60: uevent.patch
ExclusiveArch: %{ix86} x86_64 ia64
@@ -83,6 +84,7 @@ Debugging tools for Intel graphics chips
%patch21 -p1 -b .lvds-first
%patch40 -p1 -b .flip
%patch50 -p1 -b .shadow-no-offset
+%patch60 -p1 -b .uevent
%build
@@ -138,6 +140,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/intel_*.1*
%changelog
+* Wed Sep 02 2009 Adam Jackson <ajax at redhat.com> 2.8.0-9
+- uevent.patch: Catch uevents for output hotplug, rescan when they happen,
+ and send RANDR events for any changes.
+
* Thu Aug 20 2009 Kristian Høgsberg <krh at redhat.com> - 2.8.0-8
- Don't use fb offset when using shadow fbs.
- Previous message (by thread): rpms/auto-destdir/devel auto-destdir.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/mpich2/EL-5 .cvsignore, 1.4, 1.5 mpich2.spec, 1.7, 1.8 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list