linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* viafb on Clevo M5x0V laptop (+VT1631L)
@ 2012-08-02 18:03 Ondrej Zary
  2012-08-02 20:46 ` Florian Tobias Schandinat
  0 siblings, 1 reply; 3+ messages in thread
From: Ondrej Zary @ 2012-08-02 18:03 UTC (permalink / raw)
  To: Florian Tobias Schandinat; +Cc: linux-fbdev, Kernel development list

Hello,
I've got a Clevo M5x0V laptop which has VIA PM800 chipset (1106:3118) and 
1280x768 LCD panel connected using VT1631L LVDS transmitter. There's a 
schematic of this laptop available on the web which shows that VT1631L's I2C 
port is not connected anywhere...

viafb does not work properly - LCD panel (and backlight) is turned off upon 
module load and there's 640x480 signal on VGA connector (even when monitor 
was not connected during module load).

Looking at the code, there's almost nothing for VT1631. What needs to be done 
in order for the LCD to work? Xorg seems to work using openchrome (but it is 
not able to restore the card on resume from S3):
(II) CHROME(0): Unable to get panel size from EDID. Return code: 0
(II) CHROME(0): ViaPanelGetNativeModeFromScratchPad
(II) CHROME(0): Native Panel Resolution is 1280x768


This is from kernel 3.5 with VIAFB_DEBUG and VIAFB_WARN enabled:

[  153.051061] VIA Graphics Integration Chipset framebuffer 2.4 initializing
[  153.051765] viafb 0000:01:00.0: power state changed by ACPI to D0
[  153.051773] viafb 0000:01:00.0: power state changed by ACPI to D0
[  153.053535] Device ID = 3259
[  153.053553] FB Size = 4000
[  153.059984] VIAFB PCI Probe!!
[  153.060044] viafb: Probing I2C bus 0x26
[  153.092761] viafb: Probing I2C bus 0x31
[  155.588019] viafb: Probing I2C bus 0x2C
[  155.619016] viafb: Finished I2C bus probing
[  155.619021] parse_lcd_port: viafb_lcd_port:,interface:0
[  155.619023] parse_dvi_port: viafb_dvi_port:,interface:0
[  155.713224] TMDS Chip = 0
[  155.713227] viafb_init_dvi_size()
[  155.713229] viafb_dvi_sense!!
[  155.714415] viafb_dvi_query_EDID!!
[  155.716820] viafb_dvi_query_EDID!!
[  155.719179] viafb_lvds_identify_vt1636.
[  155.812018] viafb_lvds_identify_vt1636.
[  155.814383] viafb_init_lcd_size()
[  155.814384] fp_get_panel_id()
[  155.814387] LVDS Chip = 0
[  155.814389] LVDS1 output_interface = 6
[  155.814391] LVDS2 output_interface = 6
[  155.814405] viafb_check_var!
[  155.815250] fbcon: Via (fb0) is primary device
[  155.815257] viafb_open!
[  155.818608] viafb_set_par!
[  155.818720] via_set_primary_pitch(0x00000A00)
[  155.818723] via_set_secondary_pitch(0x00000A00)
[  155.818727] via_set_primary_color_depth(24)
[  155.818730] via_set_secondary_color_depth(24)
[  155.818788] viafb_pan_display, address = 0
[  155.818789] via_set_primary_address(0x00000000)
[  155.818793] via_set_secondary_address(0x00000000)
[  155.819020] viafb_pan_display, address = 0
[  155.819021] via_set_primary_address(0x00000000)
[  155.819025] via_set_secondary_address(0x00000000)
[  155.819044] viafb 2D engine: imageblit
...many imageblits...
[  155.826516] Console: switching to colour frame buffer device 80x30
[  155.826522] viafb_pan_display, address = 0
[  155.826523] via_set_primary_address(0x00000000)
[  155.826527] via_set_secondary_address(0x00000000)
...many imageblits...
[  155.833889] fb0: Via frame buffer device 640x480-32bpp


-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: viafb on Clevo M5x0V laptop (+VT1631L)
  2012-08-02 18:03 viafb on Clevo M5x0V laptop (+VT1631L) Ondrej Zary
@ 2012-08-02 20:46 ` Florian Tobias Schandinat
  2012-08-02 21:13   ` Ondrej Zary
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Tobias Schandinat @ 2012-08-02 20:46 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: linux-fbdev, Kernel development list

Hi Ondrej,

On 08/02/2012 06:03 PM, Ondrej Zary wrote:
> Hello,
> I've got a Clevo M5x0V laptop which has VIA PM800 chipset (1106:3118) and 
> 1280x768 LCD panel connected using VT1631L LVDS transmitter. There's a 
> schematic of this laptop available on the web which shows that VT1631L's I2C 
> port is not connected anywhere...
> 
> viafb does not work properly - LCD panel (and backlight) is turned off upon 
> module load and there's 640x480 signal on VGA connector (even when monitor 
> was not connected during module load).

Yes, that's the default (640x480-60 on the VGA output) that VIA selected
when they wrote the module. I tried to add some auto detect mechanism,
but I guess in your case it wouldn't help, even if it were complete. The
traditional way to use viafb is via module parameters as described in
Documentation/fb/viafb.txt
In your case something like this might work:
viafb_mode\x1280x768 viafb_lcd_panel_id=3 viafb_active_dev=LCD
Additionally it might be required to add viafb_lcd_port with any of
DVP0, DVP1, DFP_HIGHLOW, DFP_HIGH, DFP_LOW.

> Looking at the code, there's almost nothing for VT1631. What needs to be done 
> in order for the LCD to work? Xorg seems to work using openchrome (but it is 
> not able to restore the card on resume from S3):
> (II) CHROME(0): Unable to get panel size from EDID. Return code: 0
> (II) CHROME(0): ViaPanelGetNativeModeFromScratchPad
> (II) CHROME(0): Native Panel Resolution is 1280x768

Interesting that they get the panel resolution from the scratch pad. The
official documentation does not contain any useful information about it
(and openchrome didn't work on any of my LCD devices that I tested,
hence I didn't care whether they did have any code in that area)
Maybe the above module parameters will help you, otherwise more
investigation will be required.


Best regards,

Florian Tobias Schandinat


> 
> 
> This is from kernel 3.5 with VIAFB_DEBUG and VIAFB_WARN enabled:
> 
> [  153.051061] VIA Graphics Integration Chipset framebuffer 2.4 initializing
> [  153.051765] viafb 0000:01:00.0: power state changed by ACPI to D0
> [  153.051773] viafb 0000:01:00.0: power state changed by ACPI to D0
> [  153.053535] Device ID = 3259
> [  153.053553] FB Size = 4000
> [  153.059984] VIAFB PCI Probe!!
> [  153.060044] viafb: Probing I2C bus 0x26
> [  153.092761] viafb: Probing I2C bus 0x31
> [  155.588019] viafb: Probing I2C bus 0x2C
> [  155.619016] viafb: Finished I2C bus probing
> [  155.619021] parse_lcd_port: viafb_lcd_port:,interface:0
> [  155.619023] parse_dvi_port: viafb_dvi_port:,interface:0
> [  155.713224] TMDS Chip = 0
> [  155.713227] viafb_init_dvi_size()
> [  155.713229] viafb_dvi_sense!!
> [  155.714415] viafb_dvi_query_EDID!!
> [  155.716820] viafb_dvi_query_EDID!!
> [  155.719179] viafb_lvds_identify_vt1636.
> [  155.812018] viafb_lvds_identify_vt1636.
> [  155.814383] viafb_init_lcd_size()
> [  155.814384] fp_get_panel_id()
> [  155.814387] LVDS Chip = 0
> [  155.814389] LVDS1 output_interface = 6
> [  155.814391] LVDS2 output_interface = 6
> [  155.814405] viafb_check_var!
> [  155.815250] fbcon: Via (fb0) is primary device
> [  155.815257] viafb_open!
> [  155.818608] viafb_set_par!
> [  155.818720] via_set_primary_pitch(0x00000A00)
> [  155.818723] via_set_secondary_pitch(0x00000A00)
> [  155.818727] via_set_primary_color_depth(24)
> [  155.818730] via_set_secondary_color_depth(24)
> [  155.818788] viafb_pan_display, address = 0
> [  155.818789] via_set_primary_address(0x00000000)
> [  155.818793] via_set_secondary_address(0x00000000)
> [  155.819020] viafb_pan_display, address = 0
> [  155.819021] via_set_primary_address(0x00000000)
> [  155.819025] via_set_secondary_address(0x00000000)
> [  155.819044] viafb 2D engine: imageblit
> ...many imageblits...
> [  155.826516] Console: switching to colour frame buffer device 80x30
> [  155.826522] viafb_pan_display, address = 0
> [  155.826523] via_set_primary_address(0x00000000)
> [  155.826527] via_set_secondary_address(0x00000000)
> ...many imageblits...
> [  155.833889] fb0: Via frame buffer device 640x480-32bpp
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: viafb on Clevo M5x0V laptop (+VT1631L)
  2012-08-02 20:46 ` Florian Tobias Schandinat
@ 2012-08-02 21:13   ` Ondrej Zary
  0 siblings, 0 replies; 3+ messages in thread
From: Ondrej Zary @ 2012-08-02 21:13 UTC (permalink / raw)
  To: Florian Tobias Schandinat; +Cc: linux-fbdev, Kernel development list

On Thursday 02 August 2012 22:46:18 Florian Tobias Schandinat wrote:
> Hi Ondrej,
>
> On 08/02/2012 06:03 PM, Ondrej Zary wrote:
> > Hello,
> > I've got a Clevo M5x0V laptop which has VIA PM800 chipset (1106:3118) and
> > 1280x768 LCD panel connected using VT1631L LVDS transmitter. There's a
> > schematic of this laptop available on the web which shows that VT1631L's
> > I2C port is not connected anywhere...
> >
> > viafb does not work properly - LCD panel (and backlight) is turned off
> > upon module load and there's 640x480 signal on VGA connector (even when
> > monitor was not connected during module load).
>
> Yes, that's the default (640x480-60 on the VGA output) that VIA selected
> when they wrote the module. I tried to add some auto detect mechanism,
> but I guess in your case it wouldn't help, even if it were complete. The
> traditional way to use viafb is via module parameters as described in
> Documentation/fb/viafb.txt
> In your case something like this might work:
> viafb_mode\x1280x768 viafb_lcd_panel_id=3 viafb_active_dev=LCD

Thank you very much, it works with these parameters! Looks like viafb can wake 
up the chip from S3, only the colors are messed up (X<->VT switch fixes 
that).

> Additionally it might be required to add viafb_lcd_port with any of
> DVP0, DVP1, DFP_HIGHLOW, DFP_HIGH, DFP_LOW.
>
> > Looking at the code, there's almost nothing for VT1631. What needs to be
> > done in order for the LCD to work? Xorg seems to work using openchrome
> > (but it is not able to restore the card on resume from S3):
> > (II) CHROME(0): Unable to get panel size from EDID. Return code: 0
> > (II) CHROME(0): ViaPanelGetNativeModeFromScratchPad
> > (II) CHROME(0): Native Panel Resolution is 1280x768
>
> Interesting that they get the panel resolution from the scratch pad. The
> official documentation does not contain any useful information about it
> (and openchrome didn't work on any of my LCD devices that I tested,
> hence I didn't care whether they did have any code in that area)
> Maybe the above module parameters will help you, otherwise more
> investigation will be required.

Looking at openchrome and viafb code - the code is already present in viafb in 
fp_id_to_vindex() function in lcd.c. It even finds correct panel_id for me 
(3). But it looks like that the result is not used.

-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-02 21:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02 18:03 viafb on Clevo M5x0V laptop (+VT1631L) Ondrej Zary
2012-08-02 20:46 ` Florian Tobias Schandinat
2012-08-02 21:13   ` Ondrej Zary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).