diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-01-12 13:52:37 +0100 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-02-13 08:28:14 +0100 |
commit | 5dc5f61813a9c3ab7dd0a6982ad044834134db5a (patch) | |
tree | 4a50b6713eed9d2d01d1e4cdbc8ecd1a4393e035 /drivers/video/via/via_aux.c | |
parent | viafb: fix I2C emulation on GPIO ports (diff) | |
download | linux-5dc5f61813a9c3ab7dd0a6982ad044834134db5a.tar.xz linux-5dc5f61813a9c3ab7dd0a6982ad044834134db5a.zip |
viafb: add initial EDID support
This patch adds support for using EDID data on CRT and DVP1 for
initial configuration if viafb_mode or viafb_mode1 are not present.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/via/via_aux.c')
-rw-r--r-- | drivers/video/via/via_aux.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/video/via/via_aux.c b/drivers/video/via/via_aux.c index e728b9bec235..4a0a55cdac3d 100644 --- a/drivers/video/via/via_aux.c +++ b/drivers/video/via/via_aux.c @@ -60,9 +60,29 @@ void via_aux_free(struct via_aux_bus *bus) return; list_for_each_entry_safe(pos, n, &bus->drivers, chain) { + if (pos->cleanup) + pos->cleanup(pos); + list_del(&pos->chain); + kfree(pos->data); kfree(pos); } kfree(bus); } + +const struct fb_videomode *via_aux_get_preferred_mode(struct via_aux_bus *bus) +{ + struct via_aux_drv *pos; + const struct fb_videomode *mode = NULL; + + if (!bus) + return NULL; + + list_for_each_entry(pos, &bus->drivers, chain) { + if (pos->get_preferred_mode) + mode = pos->get_preferred_mode(pos); + } + + return mode; +} |