[Intel-gfx] DRM/i915 Kernel Warning
Jonas Bonn
jonas at southpole.se
Tue May 19 09:05:01 CEST 2009
(I just discovered that this list was members only, hence my earlier attempts to post this were rejected... sorry for the spam in case my earlier posts manage to squeeze through in any case).
Hi,
I sent this to the dri-devel list earlier... it seems that wasn't the right place, though. I hope I got the right list this time; please do let me know, otherwise.
Original mail follows below...
Regards,
Jonas Bonn
South Pole AB
------
With 2.6.30-rc4 (and now 2.6.30-rc5, too) I get the following warning:
WARNING: at fs/sysfs/dir.c:487 sysfs_add_one+0xcf/0xe6()
Hardware name: P5K-VM
sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:02.0/drm/ca
rd0/card0-VGA-1'
Pid: 578, comm: work_for_cpu Not tainted 2.6.30-rc4-jonas #79
Call Trace:
[<ffffffff81057fb5>] warn_slowpath+0xce/0x102
[<ffffffff814c8b64>] ? thread_return+0x41/0xbb
[<ffffffff8104b2ae>] ? resched_task+0x27/0x6e
[<ffffffff81241421>] ? idr_get_empty_slot+0x169/0x24d
[<ffffffff8124762f>] ? string+0x3f/0xa2
[<ffffffff8112cafe>] ? sysfs_pathname+0x37/0x3f
[<ffffffff8112cafe>] ? sysfs_pathname+0x37/0x3f
[<ffffffff8112cafe>] ? sysfs_pathname+0x37/0x3f
[<ffffffff8112cafe>] ? sysfs_pathname+0x37/0x3f
[<ffffffff8112cbd5>] sysfs_add_one+0xcf/0xe6
[<ffffffff8112d200>] create_dir+0x58/0x93
[<ffffffff8112d273>] sysfs_create_dir+0x38/0x4f
[<ffffffff81242457>] ? kobject_get+0x1a/0x22
[<ffffffff8124260c>] kobject_add_internal+0x131/0x20d
[<ffffffff81248676>] ? delay_tsc+0x2c/0x60
[<ffffffff812427c0>] kobject_add_varg+0x41/0x4e
[<ffffffff812428d2>] kobject_add+0x89/0x8b
[<ffffffff81242776>] ? kobject_set_name_vargs+0x4f/0x58
[<ffffffff81242457>] ? kobject_get+0x1a/0x22
[<ffffffff812fa80e>] device_add+0x144/0x5bc
[<ffffffff81241786>] ? idr_get_new_above+0x11/0x31
[<ffffffff812420b3>] ? kobject_init+0x43/0x83
[<ffffffff812fac9f>] device_register+0x19/0x1e
[<ffffffff812d0653>] drm_sysfs_connector_add+0xb6/0x1a2
[<ffffffff812eb238>] intel_sdvo_init+0x3c1/0x5a7
[<ffffffff812d038f>] ? drm_sysfs_hotplug_event+0x53/0x5a
[<ffffffff812e78a3>] intel_modeset_init+0x4c2/0x77b
[<ffffffff812dadbe>] i915_driver_load+0x931/0x99a
[<ffffffff812ce2ae>] drm_get_dev+0x333/0x3fc
[<ffffffff810525ae>] ? default_wake_function+0xd/0xf
[<ffffffff81067e98>] ? do_work_for_cpu+0x0/0x26
[<ffffffff814bbc14>] i915_pci_probe+0x10/0x12
[<ffffffff81259e93>] local_pci_probe+0x12/0x16
[<ffffffff81067eab>] do_work_for_cpu+0x13/0x26
[<ffffffff8106b168>] kthread+0x56/0x83
[<ffffffff8102ac0a>] child_rip+0xa/0x20
[<ffffffff8106b112>] ? kthread+0x0/0x83
[<ffffffff8102ac00>] ? child_rip+0x0/0x20
and
kobject_add_internal failed for card0-VGA-1 with -EEXIST, don't try to register
things with the same name in the same directory.
Pid: 578, comm: work_for_cpu Tainted: G W 2.6.30-rc4-jonas #79
Call Trace:
[<ffffffff812421ba>] ? kobject_put+0x47/0x4b
[<ffffffff812426b6>] kobject_add_internal+0x1db/0x20d
[<ffffffff81248676>] ? delay_tsc+0x2c/0x60
[<ffffffff812427c0>] kobject_add_varg+0x41/0x4e
[<ffffffff812428d2>] kobject_add+0x89/0x8b
[<ffffffff81242776>] ? kobject_set_name_vargs+0x4f/0x58
[<ffffffff81242457>] ? kobject_get+0x1a/0x22
[<ffffffff812fa80e>] device_add+0x144/0x5bc
[<ffffffff81241786>] ? idr_get_new_above+0x11/0x31
[<ffffffff812420b3>] ? kobject_init+0x43/0x83
[<ffffffff812fac9f>] device_register+0x19/0x1e
[<ffffffff812d0653>] drm_sysfs_connector_add+0xb6/0x1a2
[<ffffffff812eb238>] intel_sdvo_init+0x3c1/0x5a7
[<ffffffff812d038f>] ? drm_sysfs_hotplug_event+0x53/0x5a
[<ffffffff812e78a3>] intel_modeset_init+0x4c2/0x77b
[<ffffffff812dadbe>] i915_driver_load+0x931/0x99a
[<ffffffff812ce2ae>] drm_get_dev+0x333/0x3fc
[<ffffffff810525ae>] ? default_wake_function+0xd/0xf
[<ffffffff81067e98>] ? do_work_for_cpu+0x0/0x26
[<ffffffff814bbc14>] i915_pci_probe+0x10/0x12
[<ffffffff81259e93>] local_pci_probe+0x12/0x16
[<ffffffff81067eab>] do_work_for_cpu+0x13/0x26
[<ffffffff8106b168>] kthread+0x56/0x83
[<ffffffff8102ac0a>] child_rip+0xa/0x20
[<ffffffff8106b112>] ? kthread+0x0/0x83
[<ffffffff8102ac00>] ? child_rip+0x0/0x20
This happens because the type of connector in intel_sdvo_init is intially set to "Unknown". The 'type_id' of the connector is thus selected from the ID pool for connectors of type "Unknown". When the connector type is subsequently changed, the type_id is wrong as it hasn't been taken from the right pool.
The attached patch resolves this by determing the connector type before initializing the connector. It should be noted that the "connector_type" should not be changed after the connector has been initialized.
More information about the Intel-gfx
mailing list