diff options
author | Masashi Kimoto <Masashi_Kimoto@hq.scei.sony.co.jp> | 2007-05-02 14:48:36 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 02:59:08 +0200 |
commit | 640729014e073e6e2de1f513b2856b81aa7d84e9 (patch) | |
tree | 218002daa9c062311b40d0f1110f029ca8d89e48 /drivers | |
parent | ps3av: misc updates (diff) | |
download | linux-640729014e073e6e2de1f513b2856b81aa7d84e9.tar.xz linux-640729014e073e6e2de1f513b2856b81aa7d84e9.zip |
ps3: Make `ps3videomode -v 0 (auto mode) work again
ps3: Make `ps3videomode -v 0' (auto mode) work again
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ps3/ps3av.c | 7 | ||||
-rw-r--r-- | drivers/video/ps3fb.c | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c index 1a56d390fcd9..5a418b1b1659 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c @@ -744,6 +744,13 @@ int ps3av_set_video_mode(u32 id, int boot) EXPORT_SYMBOL_GPL(ps3av_set_video_mode); +int ps3av_get_auto_mode(int boot) +{ + return ps3av_auto_videomode(&ps3av.av_hw_conf, boot); +} + +EXPORT_SYMBOL_GPL(ps3av_get_auto_mode); + int ps3av_set_mode(u32 id, int boot) { int res; diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c index f7f228d1c2d9..9fe64829aa81 100644 --- a/drivers/video/ps3fb.c +++ b/drivers/video/ps3fb.c @@ -732,6 +732,11 @@ static int ps3fb_ioctl(struct fb_info *info, unsigned int cmd, if (copy_from_user(&val, argp, sizeof(val))) break; + if (!(val & PS3AV_MODE_MASK)) { + u32 id = ps3av_get_auto_mode(0); + if (id > 0) + val = (val & ~PS3AV_MODE_MASK) | id; + } DPRINTK("PS3FB_IOCTL_SETMODE:%x\n", val); retval = -EINVAL; old_mode = ps3fb_mode; |