Commit ce4c371a9de1f5b9e1d15f9d59c5f7d079bcd6d7

Authored by Geert Uytterhoeven
Committed by Linus Torvalds
1 parent 466c449e5f

ps3av: dont distinguish between `boot' and `non-boot' autodetection

don't distinguish between `boot' and `non-boot' autodetection now the
autodetection code has been improved

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 3 changed files with 10 additions and 35 deletions Side-by-side Diff

... ... @@ -760,8 +760,7 @@
760 760 }
761 761 }
762 762  
763   -static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf,
764   - int boot)
  763 +static int ps3av_auto_videomode(struct ps3av_pkt_av_get_hw_conf *av_hw_conf)
765 764 {
766 765 int i, res, id = 0, dvi = 0, rgb = 0;
767 766 struct ps3av_pkt_av_get_monitor_info monitor_info;
... ... @@ -799,28 +798,6 @@
799 798 if (ps3av->region & PS3AV_REGION_RGB)
800 799 rgb = PS3AV_MODE_RGB;
801 800 pr_debug("%s: Using avmulti mode %d\n", __func__, id);
802   - } else if (boot) {
803   - /* HDMI: using DEFAULT HDMI_MODE_ID while booting up */
804   - info = &monitor_info.info;
805   - if (ps3av->region & PS3AV_REGION_60) {
806   - if (info->res_60.res_bits & PS3AV_RESBIT_720x480P)
807   - id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_60;
808   - else if (info->res_50.res_bits & PS3AV_RESBIT_720x576P)
809   - id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_50;
810   - else {
811   - /* default */
812   - id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_60;
813   - }
814   - } else {
815   - if (info->res_50.res_bits & PS3AV_RESBIT_720x576P)
816   - id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_50;
817   - else if (info->res_60.res_bits & PS3AV_RESBIT_720x480P)
818   - id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_60;
819   - else {
820   - /* default */
821   - id = PS3AV_DEFAULT_HDMI_MODE_ID_REG_50;
822   - }
823   - }
824 801 }
825 802  
826 803 return id | dvi | rgb;
... ... @@ -862,7 +839,7 @@
862 839 }
863 840  
864 841 /* set mode using id */
865   -int ps3av_set_video_mode(u32 id, int boot)
  842 +int ps3av_set_video_mode(u32 id)
866 843 {
867 844 int size;
868 845 u32 option;
... ... @@ -876,7 +853,7 @@
876 853 /* auto mode */
877 854 option = id & ~PS3AV_MODE_MASK;
878 855 if ((id & PS3AV_MODE_MASK) == 0) {
879   - id = ps3av_auto_videomode(&ps3av->av_hw_conf, boot);
  856 + id = ps3av_auto_videomode(&ps3av->av_hw_conf);
880 857 if (id < 1) {
881 858 printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
882 859 return -EINVAL;
883 860  
... ... @@ -896,9 +873,9 @@
896 873  
897 874 EXPORT_SYMBOL_GPL(ps3av_set_video_mode);
898 875  
899   -int ps3av_get_auto_mode(int boot)
  876 +int ps3av_get_auto_mode(void)
900 877 {
901   - return ps3av_auto_videomode(&ps3av->av_hw_conf, boot);
  878 + return ps3av_auto_videomode(&ps3av->av_hw_conf);
902 879 }
903 880  
904 881 EXPORT_SYMBOL_GPL(ps3av_get_auto_mode);
... ... @@ -1044,7 +1021,7 @@
1044 1021 res);
1045 1022  
1046 1023 ps3av_get_hw_conf(ps3av);
1047   - id = ps3av_auto_videomode(&ps3av->av_hw_conf, 1);
  1024 + id = ps3av_auto_videomode(&ps3av->av_hw_conf);
1048 1025 mutex_lock(&ps3av->mutex);
1049 1026 ps3av->ps3av_mode = id;
1050 1027 mutex_unlock(&ps3av->mutex);
drivers/video/ps3fb.c
... ... @@ -548,7 +548,6 @@
548 548 unsigned int mode;
549 549 int i;
550 550 unsigned long offset;
551   - static int first = 1;
552 551  
553 552 DPRINTK("xres:%d xv:%d yres:%d yv:%d clock:%d\n",
554 553 info->var.xres, info->var.xres_virtual,
555 554  
... ... @@ -572,10 +571,9 @@
572 571 /* Keep the special bits we cannot set using fb_var_screeninfo */
573 572 ps3fb_mode = (ps3fb_mode & ~PS3AV_MODE_MASK) | mode;
574 573  
575   - if (ps3av_set_video_mode(ps3fb_mode, first))
  574 + if (ps3av_set_video_mode(ps3fb_mode))
576 575 return -EINVAL;
577 576  
578   - first = 0;
579 577 return 0;
580 578 }
581 579  
... ... @@ -737,7 +735,7 @@
737 735 break;
738 736  
739 737 if (!(val & PS3AV_MODE_MASK)) {
740   - u32 id = ps3av_get_auto_mode(0);
  738 + u32 id = ps3av_get_auto_mode();
741 739 if (id > 0)
742 740 val = (val & ~PS3AV_MODE_MASK) | id;
743 741 }
include/asm-powerpc/ps3av.h
... ... @@ -709,9 +709,9 @@
709 709 extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *,
710 710 u32);
711 711  
712   -extern int ps3av_set_video_mode(u32, int);
  712 +extern int ps3av_set_video_mode(u32);
713 713 extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32);
714   -extern int ps3av_get_auto_mode(int);
  714 +extern int ps3av_get_auto_mode(void);
715 715 extern int ps3av_get_mode(void);
716 716 extern int ps3av_get_scanmode(int);
717 717 extern int ps3av_get_refresh_rate(int);