aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ps3/ps3av.c7
-rw-r--r--drivers/video/ps3fb.c5
-rw-r--r--include/asm-powerpc/ps3av.h1
3 files changed, 13 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)
744 744
745EXPORT_SYMBOL_GPL(ps3av_set_video_mode); 745EXPORT_SYMBOL_GPL(ps3av_set_video_mode);
746 746
747int ps3av_get_auto_mode(int boot)
748{
749 return ps3av_auto_videomode(&ps3av.av_hw_conf, boot);
750}
751
752EXPORT_SYMBOL_GPL(ps3av_get_auto_mode);
753
747int ps3av_set_mode(u32 id, int boot) 754int ps3av_set_mode(u32 id, int boot)
748{ 755{
749 int res; 756 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,
732 if (copy_from_user(&val, argp, sizeof(val))) 732 if (copy_from_user(&val, argp, sizeof(val)))
733 break; 733 break;
734 734
735 if (!(val & PS3AV_MODE_MASK)) {
736 u32 id = ps3av_get_auto_mode(0);
737 if (id > 0)
738 val = (val & ~PS3AV_MODE_MASK) | id;
739 }
735 DPRINTK("PS3FB_IOCTL_SETMODE:%x\n", val); 740 DPRINTK("PS3FB_IOCTL_SETMODE:%x\n", val);
736 retval = -EINVAL; 741 retval = -EINVAL;
737 old_mode = ps3fb_mode; 742 old_mode = ps3fb_mode;
diff --git a/include/asm-powerpc/ps3av.h b/include/asm-powerpc/ps3av.h
index 1366fc5b452d..9efc40f1c778 100644
--- a/include/asm-powerpc/ps3av.h
+++ b/include/asm-powerpc/ps3av.h
@@ -706,6 +706,7 @@ extern int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf,
706 706
707extern int ps3av_set_video_mode(u32, int); 707extern int ps3av_set_video_mode(u32, int);
708extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); 708extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32);
709extern int ps3av_get_auto_mode(int);
709extern int ps3av_set_mode(u32, int); 710extern int ps3av_set_mode(u32, int);
710extern int ps3av_get_mode(void); 711extern int ps3av_get_mode(void);
711extern int ps3av_get_scanmode(int); 712extern int ps3av_get_scanmode(int);