Commit 64072901 authored by Masashi Kimoto's avatar Masashi Kimoto Committed by Linus Torvalds

ps3: Make `ps3videomode -v 0 (auto mode) work again

ps3: Make `ps3videomode -v 0' (auto mode) work again
Signed-off-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fffe52e8
...@@ -744,6 +744,13 @@ int ps3av_set_video_mode(u32 id, int boot) ...@@ -744,6 +744,13 @@ int ps3av_set_video_mode(u32 id, int boot)
EXPORT_SYMBOL_GPL(ps3av_set_video_mode); 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 ps3av_set_mode(u32 id, int boot)
{ {
int res; int res;
......
...@@ -732,6 +732,11 @@ static int ps3fb_ioctl(struct fb_info *info, unsigned int cmd, ...@@ -732,6 +732,11 @@ static int ps3fb_ioctl(struct fb_info *info, unsigned int cmd,
if (copy_from_user(&val, argp, sizeof(val))) if (copy_from_user(&val, argp, sizeof(val)))
break; 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); DPRINTK("PS3FB_IOCTL_SETMODE:%x\n", val);
retval = -EINVAL; retval = -EINVAL;
old_mode = ps3fb_mode; old_mode = ps3fb_mode;
......
...@@ -706,6 +706,7 @@ extern int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf, ...@@ -706,6 +706,7 @@ extern int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf,
extern int ps3av_set_video_mode(u32, int); extern int ps3av_set_video_mode(u32, int);
extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32);
extern int ps3av_get_auto_mode(int);
extern int ps3av_set_mode(u32, int); extern int ps3av_set_mode(u32, int);
extern int ps3av_get_mode(void); extern int ps3av_get_mode(void);
extern int ps3av_get_scanmode(int); extern int ps3av_get_scanmode(int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment