Am Mittwoch, den 16.03.2005, 17:35 +0300 schrieb Sergey Zharkov:
> Felix,
> 
> Unfortunately I never posted a bug for kernel and have no idea how to do
> that.

I found a related bug: http://bugzilla.kernel.org/show_bug.cgi?id=3864.
Though that user was not getting lockups, just some distortions.
Probably with different graphics hardware (no details in the report).

You can register at bugzilla.kernel.org (click on "New Account" near the
bottom of the page) and make an additional comment.

>  I have tryed all kernel versions starting from 2.6.11 - mm1,2,3 ,
> ac series, nitro patches, builtin swsuspend  as well as swsuspend2 2.1.8

That's good.

> - 2.1.8.2 . Hardware  is Twinhead Efio 121A laptop Via KN266 chipset,
> Athlon XP-M 1700+. 

lspci output would be nice too (for them).

> 
> The only thing - I am not shure that the via-agp driver is causing this
> bug - if I restart X after resuming I get DRM working again,  so agp
> module is there.

When X is started it allocates AGP memory, when it quits, the memory is
freed again.

Between suspend and resume via-agp it has to remember that state and
restore the AGP hardware properly on resume. That doesn't seem to work
correctly. Restarting X is a reinitialization of the relevant AGP
hardware state and restores AGP to working order. (That's my
understanding anyway)

>  Actually swsusp2 is auloading all modules on suspend
> and loading them back - so I have agp functionality restarted properly.

When you suspend with DRI enabled, the AGP module is used, so swsusp
can't unload it. If it forces unloading, you're in trouble, but I don't
think it would do that.

> What I'am afraid of is that savage_dri or savage_drv drivers writhe
> something into the chip hardware that is not loaded there by kernel
> modules start - so if i do resume from ram the chip registers keep those
> values and resume even if glx app was running in time of suspend. But if
> i resume from disk kernel modules are loaded back with initial values -
> but some commands or chip register values that were initialised by xorg
> or dri drivers need to be restored on enterVT function. The same way as
> radeon do.

As far as I can tell, the Savage hardware state is almost completely
restored in enterVT. EnterVT doesn't care about 3D state though, that's
why 3D windows that were running during suspend are black after resume.
I think it would be easy to get it working with a running 3D application
during suspension. The Xserver would have to invalidate the 3D hardware
state in the sarea, so that the 3D driver restores it after resume. I'll
send you a patch later tonight for testing this.

>  The only thing I could not find  is what is actually written
> to chip - probably it could be easeir for the guys who really create the
> driver. If you can suggest some  places   in code (function names etc )
> which do  modify hardware registers I could try to play with them.
> Actually what radeon does (if I got it correct ) - is reinitialising DMA
> each enterVT function, but I could not find function that just
> reinitialise DMA in savage code. KernelInit or AGPInit in EnterVT
> restarted the whole X server instead or restoring DMA state.

DMA itself seems to be working fine, because it worked with PCI DMA. I'm
pretty sure it's AGP that's broken after resume.

> 
> 
> 
> On Wed, 2005-03-16 at 15:24 +0100, Felix Kühling wrote:
> > Am Mittwoch, den 16.03.2005, 15:36 +0300 schrieb Sergey Zharkov:
> > > You right - just running texture_heaps=2 lament killed my system
> > > immediately.
> > 
> > Ok, that makes it very likely that the via-agp driver is at fault. We
> > should report a bug in the Linux bugzilla. First we should test if the
> > latest kernel version is affected too. Which kernel version have you
> > been using?
> > 
> > Since you have done all the testing and I am otherwise busy ATM it would
> > be very helpful if you could take care or reporting the bug in the
> > kernel bugzilla. I suppose you know that you have to provide accurate
> > information about your hardware, what tests you performed and the
> > results ...
> > 
> > Send the bug id to dri-devel, so interested DRI experts (me for one ;-)
> > can help resolve this.
> > 
> > Thanks,
> >   Felix
> > 
> > > 
> > > On Wed, 2005-03-16 at 13:30 +0100, Felix Kühling wrote:
> > > > Am Mittwoch, den 16.03.2005, 15:17 +0300 schrieb Sergey Zharkov:
> > > > > Setting BusType to "PCI" and even BusType AGP with DmaType PCI helps -
> > > > > the thing resumes.  So it seems to be a bug in AGP dma resuming. But 
> > > > > not
> > > > > in kernel one - there is a resume code in via-agp driver, that worked
> > > > > for DRI 1.0
> > > > 
> > > > You mean the old Savage DRM driver 1.0? That one didn't use DMA, which
> > > > is about the same as setting DmaMode to "None" now. Another thing you
> > > > can try is running textured applications with only AGP textures (with
> > > > BusType "AGP" and DmaType "PCI"). Run the application like this:
> > > > 
> > > > texture_heaps=2 <textured DRI application>
> > > > 
> > > > This will disable the local memory texture heap and use only the AGP
> > > > heap. If our theory is correct, it should lock up after resume.
> > > > 
> > > > Regards,
> > > >   Felix
> > > > 
> > > > > On Wed, 2005-03-16 at 13:01 +0100, Felix Kühling wrote:
> > > > > > Am Mittwoch, den 16.03.2005, 14:47 +0300 schrieb Sergey Zharkov:
> > > > > > > Felix,
> > > > > > > 
> > > > > > > I've tried some coding to make savage resume looking at radeon 
> > > > > > > resume
> > > > > > > code but failed completely :(( Unfortunately I'am ABAP/4 
> > > > > > > developer - not
> > > > > > > a C guru. 
> > > > > > > 
> > > > > > > The only thing that may help real dri developers to suggest how to
> > > > > > > resume - when I switched DMA mode from command or vertex to 
> > > > > > > "None"  i've
> > > > > > > lost about 5 % of speed but  the dri system was able to resume 
> > > > > > > from disk
> > > > > > > if no glx apps were running. And even with glx apps running it was
> > > > > > > resuming, but the glx apps were resuming with black window. 
> > > > > > > Anyway after
> > > > > > > resume I was able to start glx apps and they worked, with dma 
> > > > > > > enebled I
> > > > > > > had to pull a power cord and battery out to restart.   And the 
> > > > > > > bug is
> > > > > > > not in the kernel I guess - restarting X after resume with 
> > > > > > > enabled dma
> > > > > > > works fine.
> > > > > > 
> > > > > > Could you try if Option BusType "PCI" makes any difference with DMA
> > > > > > enabled? Try it with a DRI app running while suspending and without.
> > > > > > This is to confirm if the problem is in the Savage DRM or in the AGP
> > > > > > driver (or both :( ).
> > > > > > 
> > > > > > Thanks,
> > > > > >   Felix
> > > > > > 
-- 
| Felix Kühling <[EMAIL PROTECTED]>                     http://fxk.de.vu |
| PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3  B152 151C 5CC1 D888 E595 |



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to