1 Subject: [PATCH] Add quirk for the graphics adapter in some JSxx
2 From: Tony Breeds <tony@bakeyournoodle.com>
3 References: 461002 - LTC50817
5 These devices are set to 640x480 by firmware, switch them to
8 Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
9 Signed-off-by: Olaf Hering <olh@suse.de>
11 drivers/video/aty/radeon_monitor.c | 35 +++++++++++++++++++++++++++++++++++
12 1 file changed, 35 insertions(+)
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;
20 +#ifdef CONFIG_PPC_PSERIES
21 +static int is_powerblade(const char *model)
23 + struct device_node *root;
27 + root = of_find_node_by_path("/");
28 + if (root && model) {
30 + cp = of_get_property(root, "model", &len);
32 + rc = memcmp(model, cp, min(len, l)) == 0;
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
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 */
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;
63 * Still no mode, let's pick up a default from the db