diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-27 08:35:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-27 08:35:26 -0700 |
commit | b387e41e523c1aa347cff055455d0dd129357df4 (patch) | |
tree | 736b8f4ff0c683031d2f642c182fd01ed73be5d1 /drivers | |
parent | 43a1141b9f4fd9453b43ba5e8f136e7d47220dde (diff) | |
parent | bac821a6e3404330d509fd3a245bf7701f210c7c (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Benjamin Herrenschmidt:
"Here's a handful of powerpc patches, a couple of regression fixes for
problems introduced in the main batch in this merge window, a couple
of defconfig updates, and some trivials.
The radeonfb one is something that was long standing in SLES which I
forgot to pickup earlier."
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/ftrace: Trace function graph entry before updating index
radeonfb: Add quirk for the graphics adapter in some JSxx
powerpc: Lack of firmware flash support is not an error
powerpc: Enable pseries hardware RNG and crypto modules
powerpc: Update g5_defconfig
powerpc/kvm/bookehv: Fix build regression
powerpc: Set stack limit properly in crit_transfer_to_handler
Diffstat (limited to 'drivers')
-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 9261c918fde..5c23eac0eb9 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, var->vmode = mode->vmode; } +#ifdef CONFIG_PPC_PSERIES +static int is_powerblade(const char *model) +{ + struct device_node *root; + const char* cp; + int len, l, rc = 0; + + root = of_find_node_by_path("/"); + if (root && model) { + l = strlen(model); + cp = of_get_property(root, "model", &len); + if (cp) + rc = memcmp(model, cp, min(len, l)) == 0; + of_node_put(root); + } + return rc; +} +#endif + /* * Build the modedb for head 1 (head 2 will come later), check panel infos * 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_ has_default_mode = 1; } +#ifdef CONFIG_PPC_PSERIES + if (!has_default_mode && ( + is_powerblade("IBM,8842") || /* JS20 */ + is_powerblade("IBM,8844") || /* JS21 */ + is_powerblade("IBM,7998") || /* JS12/JS21/JS22 */ + is_powerblade("IBM,0792") || /* QS21 */ + is_powerblade("IBM,0793") /* QS22 */ + )) { + printk("Falling back to 800x600 on JSxx hardware\n"); + if (fb_find_mode(&info->var, info, "800x600@60", + info->monspecs.modedb, + info->monspecs.modedb_len, NULL, 8) != 0) + has_default_mode = 1; + } +#endif + /* * Still no mode, let's pick up a default from the db */ |