[haiku-development] Re: Asus Eee PC B202

  • From: David McPaul <dlmcpaul@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 16 Feb 2009 08:22:38 +1100

2009/2/16 Nick <tonestone57@xxxxxxxxxxx>:
>> > For DAC mode P2 should be from 5 to 10
>> > For LVDS mode P2 can be from 7 to 12
>> >
>> > All other values seem to match what we have.
>> >
>> > Since the driver has a number of TODO's about LVDS support perhaps a
>> > better range would be 7 to 10 which should work for both?
>> >
>> > Your thoughts appreciated?
>>
>> Ok annoyingly the driver seems to ignore p2 from the table and
>> overwrite with a different set of constants which are 7 to 14
>> presumably it is trying to handle LVDS mode.
>>
>> The driver also seems to have several different ways of detecting LVDS
>> mode, hmm.
>
> For LVDS mode P2 is 7 or 14.
>
> Here is the Xorg driver which Haiku is based off.  Look through the tree.
> http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/
>
> You'll see Xorg uses 7 & 14 for LVDS P2 here:
> http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/i830_display.c?id=5257e36f502676fd6a44bbb8e747d9138ed3bc5c#n116
>
> The pdf link you gave also had the same info, I quote below:
>
> FPB0/FPB1  P2 Clock Divide:
> For DPLLB in Serial DVO or DAC mode , BITS(27:26)=01
> 00 = Divide by 10. This is used when Dot Clock  =< 270MHz in sDVO, HDMI, or
> DAC modes
> 01 = Divide by 5.  This is used when Dot Clock >270MHz
> 10 = Reserved
> 11 = Reserved
> For DPLLB in LVDS mode, BITS(27:26)=10
> 00 = Divide by 14.  This is used in Single-Channel LVDS
> 01 = Divide by 7.    This is used in Dual-Channel LVDS
> 10 = Reserved
> 11 = Reserved

Ok, the table on page 49 must be incorrect for the LVDS values then
(Note the ] char)

P-Div Value 7-98] Combined P1 and P2 for LVDS mode

A P2 of 7-14 with P1 of 1-8 does not fit in 7-98  (should be 7-112)

> What is going on for me, siarzhuk ( & likely you & others ) is that:
> 1) Driver is trying to use DAC mode/p2 values
> 2) Our video cards want ( Single-Channel ) LVDS mode
> 3) Driver fails & hangs
>
> Look at the picture I've attached to the ticket.
> http://dev.haiku-os.org/attachment/ticket/3149/P1010003.JPG
>
> You'll see that P2 limits are 10 & 5 ( DAC ) but it found P2 = 14 ( LVDS )
> for me the first time around.  Then the driver tries to adjust the other
> values so that I can use DAC p2 = 10 which does not work - hangs.
>
> In general, the solution involves fixing LVDS mode & providing values
> of 14 & 7 for P2 when LVDS detected.

I am pretty sure the driver does do this.  It overrides the p2 values
with 7 or 14 based on some LVDS flags.
You can see that in your picture, although the limits were 5 and 10 it
used 14 for p2 on the first try, the second time it used 10 when
perhaps it should have used 7.

Well, I am trying a few changes to the driver and will see what I can
come up with, it;s a slow process though.

On the good side, HDA audio seems to work.

-- 
Cheers
David

Other related posts: