diff options
author | Tony Breeds <tony@bakeyournoodle.com> | 2012-07-18 02:49:04 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-07-26 21:42:33 -0400 |
commit | e5ae3cdfd5741364e39705592b9aee9fb836f3d3 (patch) | |
tree | 9545829cf589e95a12948ef694dbf99d665d6835 /drivers/video | |
parent | 0e3849836bb17cd95729587c4a834f2ebf4f9f42 (diff) |
radeonfb: Add quirk for the graphics adapter in some JSxx
These devices are set to 640x480 by firmware, switch them to 800x600@60
so that the graphical installer can run on remote console.
Reported by IBM during SLES10 SP2 beta testing:
https://bugzilla.novell.com/show_bug.cgi?id=461002
LTC50817
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/aty/radeon_monitor.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c index 9261c918fde8..5c23eac0eb9a 100644 --- a/drivers/video/aty/radeon_monitor.c +++ b/drivers/video/aty/radeon_monitor.c | |||
@@ -730,6 +730,25 @@ static void radeon_videomode_to_var(struct fb_var_screeninfo *var, | |||
730 | var->vmode = mode->vmode; | 730 | var->vmode = mode->vmode; |
731 | } | 731 | } |
732 | 732 | ||
733 | #ifdef CONFIG_PPC_PSERIES | ||
734 | static int is_powerblade(const char *model) | ||
735 | { | ||
736 | struct device_node *root; | ||
737 | const char* cp; | ||
738 | int len, l, rc = 0; | ||
739 | |||
740 | root = of_find_node_by_path("/"); | ||
741 | if (root && model) { | ||
742 | l = strlen(model); | ||
743 | cp = of_get_property(root, "model", &len); | ||
744 | if (cp) | ||
745 | rc = memcmp(model, cp, min(len, l)) == 0; | ||
746 | of_node_put(root); | ||
747 | } | ||
748 | return rc; | ||
749 | } | ||
750 | #endif | ||
751 | |||
733 | /* | 752 | /* |
734 | * Build the modedb for head 1 (head 2 will come later), check panel infos | 753 | * Build the modedb for head 1 (head 2 will come later), check panel infos |
735 | * from either BIOS or EDID, and pick up the default mode | 754 | * from either BIOS or EDID, and pick up the default mode |
@@ -865,6 +884,22 @@ void __devinit radeon_check_modes(struct radeonfb_info *rinfo, const char *mode_ | |||
865 | has_default_mode = 1; | 884 | has_default_mode = 1; |
866 | } | 885 | } |
867 | 886 | ||
887 | #ifdef CONFIG_PPC_PSERIES | ||
888 | if (!has_default_mode && ( | ||
889 | is_powerblade("IBM,8842") || /* JS20 */ | ||
890 | is_powerblade("IBM,8844") || /* JS21 */ | ||
891 | is_powerblade("IBM,7998") || /* JS12/JS21/JS22 */ | ||
892 | is_powerblade("IBM,0792") || /* QS21 */ | ||
893 | is_powerblade("IBM,0793") /* QS22 */ | ||
894 | )) { | ||
895 | printk("Falling back to 800x600 on JSxx hardware\n"); | ||
896 | if (fb_find_mode(&info->var, info, "800x600@60", | ||
897 | info->monspecs.modedb, | ||
898 | info->monspecs.modedb_len, NULL, 8) != 0) | ||
899 | has_default_mode = 1; | ||
900 | } | ||
901 | #endif | ||
902 | |||
868 | /* | 903 | /* |
869 | * Still no mode, let's pick up a default from the db | 904 | * Still no mode, let's pick up a default from the db |
870 | */ | 905 | */ |