]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | Subject: [PATCH] Add quirk for the graphics adapter in some JSxx |
2 | From: Tony Breeds <tony@bakeyournoodle.com> | |
3 | References: 461002 - LTC50817 | |
4 | ||
5 | These devices are set to 640x480 by firmware, switch them to | |
6 | 800x600@60. | |
7 | ||
8 | Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> | |
9 | Signed-off-by: Olaf Hering <olh@suse.de> | |
10 | --- | |
11 | drivers/video/aty/radeon_monitor.c | 35 +++++++++++++++++++++++++++++++++++ | |
12 | 1 file changed, 35 insertions(+) | |
13 | ||
14 | --- a/drivers/video/aty/radeon_monitor.c | |
15 | +++ b/drivers/video/aty/radeon_monitor.c | |
16 | @@ -727,6 +727,25 @@ static void radeon_videomode_to_var(stru | |
17 | var->vmode = mode->vmode; | |
18 | } | |
19 | ||
20 | +#ifdef CONFIG_PPC_PSERIES | |
21 | +static int is_powerblade(const char *model) | |
22 | +{ | |
23 | + struct device_node *root; | |
24 | + const char* cp; | |
25 | + int len, l, rc = 0; | |
26 | + | |
27 | + root = of_find_node_by_path("/"); | |
28 | + if (root && model) { | |
29 | + l = strlen(model); | |
30 | + cp = of_get_property(root, "model", &len); | |
31 | + if (cp) | |
32 | + rc = memcmp(model, cp, min(len, l)) == 0; | |
33 | + of_node_put(root); | |
34 | + } | |
35 | + return rc; | |
36 | +} | |
37 | +#endif | |
38 | + | |
39 | /* | |
40 | * Build the modedb for head 1 (head 2 will come later), check panel infos | |
41 | * from either BIOS or EDID, and pick up the default mode | |
42 | @@ -862,6 +881,22 @@ void __devinit radeon_check_modes(struct | |
43 | has_default_mode = 1; | |
44 | } | |
45 | ||
46 | +#ifdef CONFIG_PPC_PSERIES | |
47 | + if (!has_default_mode && ( | |
48 | + is_powerblade("IBM,8842") || /* JS20 */ | |
49 | + is_powerblade("IBM,8844") || /* JS21 */ | |
50 | + is_powerblade("IBM,7998") || /* JS12/JS21/JS22 */ | |
51 | + is_powerblade("IBM,0792") || /* QS21 */ | |
52 | + is_powerblade("IBM,0793") /* QS22 */ | |
53 | + )) { | |
54 | + printk("Falling back to 800x600 on JSxx hardware\n"); | |
55 | + if (fb_find_mode(&info->var, info, "800x600@60", | |
56 | + info->monspecs.modedb, | |
57 | + info->monspecs.modedb_len, NULL, 8) != 0) | |
58 | + has_default_mode = 1; | |
59 | + } | |
60 | +#endif | |
61 | + | |
62 | /* | |
63 | * Still no mode, let's pick up a default from the db | |
64 | */ |