On Tuesday, July 3, 2007 5:26:07 Philippe Gaultier wrote:
> Anyway, I tried the last release of the modsetting-101 branch
> yesterday night and I wasn't able to make it work :
> - I compiled the code (everything was fine)
> - I inserted the drm module
>
> Jul 2 21:10:56 coreduo [drm] Initialized drm 1.1.0 20060810
>
> - I inserted the i915 module
>
> Jul 2 21:11:10 coreduo ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16
> (level, low) -> IRQ 16
> Jul 2 21:11:10 coreduo PCI: Setting latency timer of device
> 0000:00:02.0 to 64 Jul 2 21:11:10 coreduo i2c_adapter i2c-3: unable
> to read EDID block. Jul 2 21:11:10 coreduo i2c_adapter i2c-3: unable
> to read EDID block. Jul 2 21:11:10 coreduo i2c_adapter i2c-3: unable
> to read EDID block. Jul 2 21:11:10 coreduo i915 0000:00:02.0: LVDS:
> no EDID data Jul 2 21:11:11 coreduo i2c_adapter i2c-3: sendbytes:
> error - bailout. Jul 2 21:11:11 coreduo i2c_adapter i2c-3: unable to
> read EDID block. Jul 2 21:11:11 coreduo i915 0000:00:02.0: TMDS-1:
> no EDID data Jul 2 21:11:11 coreduo allocated 640x480 fb:
> 0x00020000, bo f611c6c0 Jul 2 21:11:11 coreduo fb0: intelfb frame
> buffer device
> Jul 2 21:11:11 coreduo [drm] Initialized i915 1.9.0 20070209 on
> minor 0
>
> Driver insertion seems fine except I still got the EDID trouble (I'll
> try to do some debug)
>
> When the driver is loaded, I get a blue screen on my hdmi/Plasma TV
> set showing the message "No signal" (that was not the case with
> previous release)
That could be because the monitor wasn't detected and the driver had
trouble programming a good mode.
> Jul 2 21:11:24 coreduo Call Trace:
> Jul 2 21:11:24 coreduo [<f8d241f0>] drm_cleanup+0x7a/0x19b [drm]
> Jul 2 21:11:24 coreduo [<f8d243e0>] drm_cleanup_pci+0x16/0x24 [drm]
> Jul 2 21:11:24 coreduo [<c02467d7>] pci_device_remove+0x16/0x36
> Jul 2 21:11:24 coreduo [<c02917bd>]
> __device_release_driver+0x64/0x8d Jul 2 21:11:24 coreduo
> [<c0291cca>] driver_detach+0xc3/0xc9 Jul 2 21:11:24 coreduo
> [<c02913d8>] bus_remove_driver+0x63/0x81 Jul 2 21:11:24 coreduo
> [<c0291cf1>] driver_unregister+0x8/0x1d Jul 2 21:11:24 coreduo
> [<c0246931>] pci_unregister_driver+0xe/0x67 Jul 2 21:11:24 coreduo
> [<f8d243c8>] drm_exit+0xb7/0xb9 [drm] Jul 2 21:11:24 coreduo
> [<c01367cb>] sys_delete_module+0x138/0x19a Jul 2 21:11:24 coreduo
> [<c01493f5>] remove_vma+0x36/0x3b
> Jul 2 21:11:24 coreduo [<c0149e3f>] do_munmap+0x16e/0x1c3
> Jul 2 21:11:24 coreduo [<c0102702>] sysenter_past_esp+0x5f/0x85
> Jul 2 21:11:24 coreduo [<c0350000>] xfrm_state_add+0x13/0x1d0
I know there are some issues with module removal unless you have a
kernel with some additional fb patches (something like the attached,
which has been superceded by a better patch by Antonio).
> If I do a "shutdown -r now", the whole system seems to freeze (I'm
> ssh'ing it because I dont have anything displayed on the console
> since I inserted the i915 module)
>
> Here is the log (after the shutdown -r now)
>
> Jul 2 21:12:04 coreduo shutdown[1642]: shutting down for system
> reboot Jul 2 21:12:04 coreduo init: Switching to runlevel: 6
>
> I cannot get more information... from the system logs
Yeah, after a bug like the above, the kernel might have trouble doing
much else.
> So here are some questions :
> 1. If I compile the source code, do I need to install libdrm.so/la
> before doing the insmod
No, that's just the userspace library. You'll need it if you want to
use drm* calls for modesetting in your application, but it's not
strictly needed for the kernel stuff to work.
> 2. Is there a way to force the driver to keep the display on TMDS-1
> ?
It'll try to probe all available outputs, so if everything goes well,
TMDS-1 will be setup correctly. Using the modesetting ioctls, you can
control whether TMDS-1 is cloned, an extension of another output or has
its own CRTC.
Jesse
--- linux-2.6.21-rc4/drivers/video/fbmem.c 2007-03-15 17:20:01.000000000 -0700
+++ linux-2.6.21-rc4-modesetting/drivers/video/fbmem.c 2007-04-26 18:16:52.000000000 -0700
@@ -1349,6 +1349,8 @@
if (!registered_fb[i])
return -EINVAL;
+ event.info = fb_info;
+ fb_notifier_call_chain(FB_EVENT_FB_UNBIND, &event);
if (fb_info->pixmap.addr &&
(fb_info->pixmap.flags & FB_PIXMAP_DEFAULT))
kfree(fb_info->pixmap.addr);
--- linux-2.6.21-rc4/include/linux/fb.h 2007-03-15 17:20:01.000000000 -0700
+++ linux-2.6.21-rc4-modesetting/include/linux/fb.h 2007-04-26 17:33:07.000000000 -0700
@@ -525,6 +525,8 @@
#define FB_EVENT_MODE_CHANGE_ALL 0x0B
/* A software display blank change occured */
#define FB_EVENT_CONBLANK 0x0C
+/* Unbind from the console if possible */
+#define FB_EVENT_FB_UNBIND 0x0E
struct fb_event {
struct fb_info *info;
--- linux-2.6.21-rc4/include/linux/console.h 2007-03-15 17:20:01.000000000 -0700
+++ linux-2.6.21-rc4-modesetting/include/linux/console.h 2007-04-26 17:56:31.000000000 -0700
@@ -64,6 +64,7 @@
extern const struct consw newport_con; /* SGI Newport console */
extern const struct consw prom_con; /* SPARC PROM console */
+int unbind_con_driver(const struct consw *csw, int first, int last, int deflt);
int con_is_bound(const struct consw *csw);
int register_con_driver(const struct consw *csw, int first, int last);
int unregister_con_driver(const struct consw *csw);
--- linux-2.6.21-rc4/drivers/video/console/fbcon.c 2007-03-15 17:20:01.000000000 -0700
+++ linux-2.6.21-rc4-modesetting/drivers/video/console/fbcon.c 2007-04-26 18:15:49.000000000 -0700
@@ -563,8 +563,10 @@
for (i = first_fb_vc; i <= last_fb_vc; i++)
con2fb_map[i] = info_idx;
+ printk(KERN_ERR "calling take_over_console, return value: ");
err = take_over_console(&fb_con, first_fb_vc, last_fb_vc,
fbcon_is_default);
+ printk(KERN_ERR "%d\n", err);
if (err) {
for (i = first_fb_vc; i <= last_fb_vc; i++) {
@@ -2896,6 +2898,13 @@
return found;
}
+static int fbcon_fb_unbind(int idx)
+{
+ unbind_con_driver(&fb_con, 0, MAX_NR_CONSOLES - 1, 0);
+
+ return 0;
+}
+
static int fbcon_fb_unregistered(int idx)
{
int i;
@@ -2933,6 +2942,7 @@
{
int ret = 0, i;
+ printk(KERN_ERR "fbcon registration called\n");
if (info_idx == -1) {
for (i = first_fb_vc; i <= last_fb_vc; i++) {
if (con2fb_map_boot[i] == idx) {
@@ -2941,8 +2951,10 @@
}
}
- if (info_idx != -1)
+ if (info_idx != -1) {
+ printk(KERN_ERR "fb taking over console\n");
ret = fbcon_takeover(1);
+ }
} else {
for (i = first_fb_vc; i <= last_fb_vc; i++) {
if (con2fb_map_boot[i] == idx &&
@@ -3036,6 +3048,9 @@
mode = event->data;
ret = fbcon_mode_deleted(info, mode);
break;
+ case FB_EVENT_FB_UNBIND:
+ ret = fbcon_fb_unbind(info->node);
+ break;
case FB_EVENT_FB_REGISTERED:
ret = fbcon_fb_registered(info->node);
break;
--- linux-2.6.21-rc4/drivers/char/vt.c 2007-03-15 17:20:01.000000000 -0700
+++ linux-2.6.21-rc4-modesetting/drivers/char/vt.c 2007-04-26 18:22:42.000000000 -0700
@@ -2832,8 +2832,24 @@
return retval;
}
-static int unbind_con_driver(const struct consw *csw, int first, int last,
- int deflt)
+/**
+ * unbind_con_driver - unbind a console driver
+ * @csw: pointer to console driver to unregister
+ * @first: first in range of consoles that @csw should be unbound from
+ * @last: last in range of consoles that @csw should be unbound from
+ * @deflt: should next bound console driver be default after @csw is unbound?
+ *
+ * To unbind a driver from all possible consoles, pass 0 as @first and
+ * %MAX_NR_CONSOLES as @last.
+ *
+ * @deflt controls whether the console that ends up replacing @csw should be
+ * the default console.
+ *
+ * RETURNS:
+ * -ENODEV if @csw isn't a registered console driver or can't be unregistered
+ * or 0 on success.
+ */
+int unbind_con_driver(const struct consw *csw, int first, int last, int deflt)
{
struct module *owner = csw->owner;
const struct consw *defcsw = NULL;
@@ -2918,6 +2934,7 @@
return retval;
}
+EXPORT_SYMBOL(unbind_con_driver);
static int vt_bind(struct con_driver *con)
{
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel