2009-06-18 17:50:42

by Vegard Nossum

[permalink] [raw]
Subject: CONFIG_FB_VIA made the screen go black

Hi,

It seems that I was unfortunate and managed to get CONFIG_FB_VIA=y in
my config. The result is that during boot, when via_fb loads, the
screen goes black. I put CONFIG_FB_VIA=n as the only change to my
config and the screen works again. Actually, just before going black,
a few lines (I mean pixel rows) would shortly flicker or move up and
down the screen.

Here's what changed in dmesg when making this config change:

pci_hotplug: PCI Hot Plug PCI Core version: 0.5
Platform driver 'da903x-backlight' needs updating - please use dev_pm_ops
-VIA Graphics Intergration Chipset framebuffer 2.4 initializing
-ioremap failed
no IO addresses supplied
Platform driver 'tmio-fb' needs updating - please use dev_pm_ops
ACPI: SSDT 000000007fe7ac90 001EA (v01 PmRef Cpu0Ist 00003000 INTL 20051117)

I don't actually have a VIA card:

01:00.0 VGA compatible controller: nVidia Corporation GeForce 8400M GS (rev a1)

The machine booted fine otherwise. This was post-2.6.30 kernel from a
few days ago. I attached the log of the failure case in case there is
anything useful in there.


Vegard


Attachments:
log.txt (19.05 kB)

2009-06-26 04:01:48

by JosephChan

[permalink] [raw]
Subject: RE: CONFIG_FB_VIA made the screen go black


> It seems that I was unfortunate and managed to get CONFIG_FB_VIA=y in my config.
> The result is that during boot, when via_fb loads, the screen goes black.
> I put CONFIG_FB_VIA=n as the > only change to my config and the screen works again.
> Actually, just before going black, a few lines (I mean pixel rows) would shortly flicker or move up and down the screen.

We will check this later.

> I don't actually have a VIA card:

Is there any idea that you have to ENABLE viafb if you don't have VIA GFX chips?
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2009-07-17 08:06:06

by JosephChan

[permalink] [raw]
Subject: RE: CONFIG_FB_VIA made the screen go black

Vegard,

We've patched this issue already. I also checked this patch with 2.6.31-rc2 kernel. It looks fine.
Would you please try this patch? Thanks.

BRs,
Joseph Chan
========

diff -ruN a/drivers/video/via/hw.c b/drivers/video/via/hw.c
--- a/drivers/video/via/hw.c 2009-06-10 11:05:27.000000000 +0800
+++ b/drivers/video/via/hw.c 2009-07-13 15:41:52.000000000 +0800
@@ -508,7 +508,6 @@
static void set_lcd_output_path(int set_iga, int output_interface);
static int search_mode_setting(int ModeInfoIndex);
static void load_fix_bit_crtc_reg(void);
-static void init_gfx_chip_info(void);
static void init_tmds_chip_info(void);
static void init_lvds_chip_info(void);
static void device_screen_off(void);
@@ -1935,7 +1934,6 @@

void viafb_init_chip_info(void)
{
- init_gfx_chip_info();
init_tmds_chip_info();
init_lvds_chip_info();

@@ -2008,7 +2006,7 @@
}
}

-static void init_gfx_chip_info(void)
+bool viafb_init_gfx_chip_info(void)
{
struct pci_dev *pdev = NULL;
u32 i;
@@ -2023,7 +2021,7 @@
}

if (!pciidlist[i].vendor)
- return ;
+ return false;

viaparinfo->chip_info->gfx_chip_name = pciidlist[i].chip_index;

@@ -2058,6 +2056,8 @@
}

pci_dev_put(pdev);
+
+ return true;
}

static void init_tmds_chip_info(void)
diff -ruN a/drivers/video/via/hw.h b/drivers/video/via/hw.h
--- a/drivers/video/via/hw.h 2009-06-10 11:05:27.000000000 +0800
+++ b/drivers/video/via/hw.h 2009-07-13 15:35:29.000000000 +0800
@@ -929,5 +929,6 @@
void viafb_set_iga_path(void);
void viafb_set_start_addr(void);
void viafb_get_fb_info(unsigned int *fb_base, unsigned int *fb_len);
+bool viafb_init_gfx_chip_info(void);

#endif /* __HW_H__ */
diff -ruN a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
--- a/drivers/video/via/viafbdev.c 2009-06-10 11:05:27.000000000 +0800
+++ b/drivers/video/via/viafbdev.c 2009-07-13 15:41:31.000000000 +0800
@@ -2142,6 +2142,13 @@
viaparinfo->chip_info = (struct chip_information *)
((unsigned long)viaparinfo->crt_setting_info + crt_length);

+ /* Identify via chip first */
+ if (!viafb_init_gfx_chip_info()) {
+ DEBUG_MSG(KERN_INFO "Not a via graphic chip \n");
+ framebuffer_release(viafbinfo);
+ return false;
+ }
+
if (viafb_dual_fb)
viafb_SAMM_ON = 1;
parse_active_dev();
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?