video-adapter-pm large data patch
Richard Hughes
hughsient at gmail.com
Sun Sep 10 14:32:12 PDT 2006
Attached to this mail is a patch against HEAD that adds lots of fdi
files for the video_adapter_pm namespace. I had to bzip it else it's
over 60k in size.
Initially, I've just converted the whitelist.c from the s2ram project
which matches against dmi data. This provides a really good "kick-start"
to the database. This does mean we SuspendVideo the computer device,
rather than the display device but I don't think it's a big problem
right now.
Ultimately I think we should aim to match against the adapter VID/PID's
(as this is very close to the dmi data anyway), and provides the
SuspendVideo method against the video device. This also lets us handle
the case where we have two different adapter types in one system.
I think this display adapter data belongs in HAL, rather than pm-utils
as HAL is the provider of information, and pm-utils the consumer and
user. It also lets other projects such as s2ram use either:
* a copy of the xml data files using a simple xml parser at compile time
* the HAL attributes if a HAL dep is okay.
Obviously I think the latter is best, but I think Stefan (IIRC) didn't
want a HAL hard dep.
There's lots of optimisations we could do with the XML. For some keys we
want to match "My very fancy model name" against "My very" so I've used
the attribute "contains" when really we want an attribute
"prefixed_with". I'm not sure if this buys us much, if any.
Also if we match a vendor block, we really want a key called
"<match_once ...> that skips the rest of the sub blocks if found,
although I don't think this will slow us down much.
I'm sure this is going to be the first of many iterations of this patch,
so feel free to rip it apart :-)
Comments please.
Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-video-pm-01.patch.bz2
Type: application/x-bzip
Size: 2880 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20060910/4b116bfb/hal-video-pm-01.patch.bin
More information about the hal
mailing list