History log of /haiku/src/tests/system/kernel/device_manager/playground/generic_video_driver.cpp
Revision Date Author Comments
# 9f925127 15-May-2008 Axel Dörfler <axeld@pinc-software.de>

This should be the last commit to this one, I'll next work on integrating it
into the kernel:
* Added device_removed() function to the device level as well.
* A device_node now also tracks its published devices.
* Made the driver API more consistent with the device API; instead of the node,
they now get the driverCookie (so they now need to store the node themselves,
the driver cookie could be retrieved via the node).
Alternatively, one could either pass both, or have something similar to what
Ingo did for the file systems, ie. pass a structure that contains both
elements. Suggestions welcome.
* Implemented device node replacement when a better driver becomes available:
the new node (and its devices) is already published even though the old device
is still in use. The new device is B_BUSY until the old one is closed.
* Implemented an update cycle counter: this will prevent a device node from
being probed again, if there is no new driver since the last time; eventually
this will be moved into devfs, though.
* Driver removal and replacement now works as expected in all tested scenarios
(device removed, better driver installed, both with and without open device).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25512 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7a6818d3 14-May-2008 Axel Dörfler <axeld@pinc-software.de>

Work in progress:
* added [un]publish_device() calls to the device manager.
* added a very basic devfs emulation to the playground to be able to test how
the manager reacts to opened devices.
* renamed *_device() functions to *_node() in the device manager API.
* made B_DEVICE_FIND_CHILD_FLAGS a generic flags field, and renamed it to
B_DEVICE_FLAGS.
* added support for keeping a driver loaded as long as its device is available.
* implemented get_next_child_node().
* added test for device removal, and implemented unregister_node() for this.
* fixed some bugs in the device node reference/initialization count maintenance.
* moved more code from register_node() to device_node::Register().
* initialize the device_node::fFlags member to the value of B_DEVICE_FLAGS, and
have additional private flags.
* renamed UninitUnusedChildren() to UninitUnusedDriver(), and fixed this
function by adding the new flag NODE_FLAG_REGISTER_INITIALIZED.
* Now remembers the support when a driver is registered - this will be used
later to be able to compare with a new driver without having to call
supports_device() again.
* Removed NODE_FLAG_REMOVE_ON_UNINIT again, as that was pretty stupid - there
is reference counting for a reason.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25498 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 548c508f 11-May-2008 Axel Dörfler <axeld@pinc-software.de>

More work-in-progress:
* Added a generic (for all devices) and specific (for a specific device) video
driver to be able to play with the replace mechanism (which is not yet done,
but works well for the one usage case tested).
* Added reference counting and initialize counting: now, each node owns a
reference of its parent, and each initialized node owns an initialization
reference of its parent.
* Added locking.
* Moved dump functionality into a member function.
* The same node can now only added once - ie. if a bus tries to register the
same device twice, it will fail.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25453 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9f925127dbb0459be00626ba0559a1f25441fac0 15-May-2008 Axel Dörfler <axeld@pinc-software.de>

This should be the last commit to this one, I'll next work on integrating it
into the kernel:
* Added device_removed() function to the device level as well.
* A device_node now also tracks its published devices.
* Made the driver API more consistent with the device API; instead of the node,
they now get the driverCookie (so they now need to store the node themselves,
the driver cookie could be retrieved via the node).
Alternatively, one could either pass both, or have something similar to what
Ingo did for the file systems, ie. pass a structure that contains both
elements. Suggestions welcome.
* Implemented device node replacement when a better driver becomes available:
the new node (and its devices) is already published even though the old device
is still in use. The new device is B_BUSY until the old one is closed.
* Implemented an update cycle counter: this will prevent a device node from
being probed again, if there is no new driver since the last time; eventually
this will be moved into devfs, though.
* Driver removal and replacement now works as expected in all tested scenarios
(device removed, better driver installed, both with and without open device).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25512 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7a6818d3fa3871322557df09106171d2150bdc8b 14-May-2008 Axel Dörfler <axeld@pinc-software.de>

Work in progress:
* added [un]publish_device() calls to the device manager.
* added a very basic devfs emulation to the playground to be able to test how
the manager reacts to opened devices.
* renamed *_device() functions to *_node() in the device manager API.
* made B_DEVICE_FIND_CHILD_FLAGS a generic flags field, and renamed it to
B_DEVICE_FLAGS.
* added support for keeping a driver loaded as long as its device is available.
* implemented get_next_child_node().
* added test for device removal, and implemented unregister_node() for this.
* fixed some bugs in the device node reference/initialization count maintenance.
* moved more code from register_node() to device_node::Register().
* initialize the device_node::fFlags member to the value of B_DEVICE_FLAGS, and
have additional private flags.
* renamed UninitUnusedChildren() to UninitUnusedDriver(), and fixed this
function by adding the new flag NODE_FLAG_REGISTER_INITIALIZED.
* Now remembers the support when a driver is registered - this will be used
later to be able to compare with a new driver without having to call
supports_device() again.
* Removed NODE_FLAG_REMOVE_ON_UNINIT again, as that was pretty stupid - there
is reference counting for a reason.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25498 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 548c508ff7032b9da455319ec37ffc242d3a43fe 11-May-2008 Axel Dörfler <axeld@pinc-software.de>

More work-in-progress:
* Added a generic (for all devices) and specific (for a specific device) video
driver to be able to play with the replace mechanism (which is not yet done,
but works well for the one usage case tested).
* Added reference counting and initialize counting: now, each node owns a
reference of its parent, and each initialized node owns an initialization
reference of its parent.
* Added locking.
* Moved dump functionality into a member function.
* The same node can now only added once - ie. if a bus tries to register the
same device twice, it will fail.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25453 a95241bf-73f2-0310-859d-f6bbb57e9c96