public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Dell D600: teaching radeonfb how to wake up...
@ 2003-11-19 18:01 Emmanuel Thomé
       [not found] ` <20031119180119.GB22307-xkTd+U360DcAs8EywTwl9A@public.gmane.org>
       [not found] ` <yzo1xs3ijgr.fsf@localhost.localdomain>
  0 siblings, 2 replies; 24+ messages in thread
From: Emmanuel Thomé @ 2003-11-19 18:01 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


Hi all.

I'm one of the many folks not really delighted with my dell d600's
behaviour w/ acpi.

I'm running 2.6.0-test9 ; S1 works more or less, if you care to shut
down usb and network before.

S3 works halfway. Meaning the ``going to sleep'' part works ;).  USB is
completely dead on bootup (megabytes of ``host controller halted''
messages), but that's not my #1 concern. My #1 concern is the radeon
9000 (M9) graphics card, which doesn't come up (fortunately, network is
relatively polite, and enables me to investigate). I'm not even talking
graphic mode.

There has been some short threads on the topic on this list before
( http://sourceforge.net/mailarchive/message.php?msg_id=6162540 ).

s3_mode and s3_bios reboot the box on wakeup.

There seems to be no other choice but to manually wake up & reprogram
the device. And to get the docs (I'm discussing with /dev/null at
ati.com on that. Maybe /dev/null, or some alternate source, will
provide me with a bit of info. Maybe).

Fortunately, the kernel tree contains bits of code which can be useful.
All the registers are known by name and number, for example (and it's a
pity that the documentation about the ``PWR_MAN'' register is
inexistent). And the radeonfb driver contains a few things and hints.
I'd gladly try a piece of code, supposedly coming from ATI, which ought
to reset the device somehow. This piece of code was to be linked to the
powerbook power management system, and is #if0'ed anyway since it is
quoted to be no cure for some problem. Still, I think it's worth trying.

I'm not an expert on kernel programming. On which code paths should I
plug things ? Say I have to functions radeon_go_sleep and
radeon_wake_up, what device info can I expect to access, and where
should I plug my functions ? Does anybody know of a well-educated fb
driver, where such a manual reset of the device is done on wakeup. I
could follow this as an example.

E.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found] ` <20031119180119.GB22307-xkTd+U360DcAs8EywTwl9A@public.gmane.org>
@ 2003-11-19 19:43   ` Karol Kozimor
       [not found]     ` <20031119194303.GA16571-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
  2003-11-20 11:13   ` Pavel Machek
  1 sibling, 1 reply; 24+ messages in thread
From: Karol Kozimor @ 2003-11-19 19:43 UTC (permalink / raw)
  To: Emmanuel Thomé; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Thus wrote Emmanuel Thomé:
> S3 works halfway. Meaning the ``going to sleep'' part works ;).  USB is
> completely dead on bootup (megabytes of ``host controller halted''
> messages), but that's not my #1 concern. My #1 concern is the radeon
> 9000 (M9) graphics card, which doesn't come up (fortunately, network is
> relatively polite, and enables me to investigate). I'm not even talking
> graphic mode.

I thought framebuffer was considered "graphic mode", wasn't it? Anyway,
contact Benjamin Herrenschmidt (lkml arschives), he's the one doing a major
rework of radeonfb for 2.6, so he might be able to help.
Best regards,

-- 
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]     ` <20031119194303.GA16571-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
@ 2003-11-19 19:51       ` Emmanuel Thome
       [not found]         ` <20031119205129.A19364-SAjW485I7Qt98t58zOhiHA@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Emmanuel Thome @ 2003-11-19 19:51 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Wed, Nov 19, 2003 at 08:43:03PM +0100, Karol Kozimor wrote:
> Thus wrote Emmanuel Thomé:
> > S3 works halfway. Meaning the ``going to sleep'' part works ;).  USB is
> > completely dead on bootup (megabytes of ``host controller halted''
> > messages), but that's not my #1 concern. My #1 concern is the radeon
> > 9000 (M9) graphics card, which doesn't come up (fortunately, network is
> > relatively polite, and enables me to investigate). I'm not even talking
> > graphic mode.
> 
> I thought framebuffer was considered "graphic mode", wasn't it? Anyway,

Granted. I meant ``I'm not yet trying to handle the case where X comes to
play''.

The fact that radeonfb is loaded or not does not make a big difference
anyway. It would, if eventually the radeonfb driver were able to talk the
right language to the device. Which is something I'm not going to expect
from vesafb. Proper acpi power management would be a dramatic feature to
add to radeonfb...

> contact Benjamin Herrenschmidt (lkml arschives), he's the one doing a major
> rework of radeonfb for 2.6, so he might be able to help.

yup, done that a few moments ago. I'll be glad if he answers email.


E.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]         ` <20031119205129.A19364-SAjW485I7Qt98t58zOhiHA@public.gmane.org>
@ 2003-11-19 20:08           ` Karol Kozimor
  2003-11-20 11:44           ` Ducrot Bruno
  1 sibling, 0 replies; 24+ messages in thread
From: Karol Kozimor @ 2003-11-19 20:08 UTC (permalink / raw)
  To: Emmanuel Thome; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Thus wrote Emmanuel Thome:
> The fact that radeonfb is loaded or not does not make a big difference
> anyway. It would, if eventually the radeonfb driver were able to talk the
> right language to the device. Which is something I'm not going to expect

Right.

> from vesafb. Proper acpi power management would be a dramatic feature to
> add to radeonfb...

I'm not sure I fully understand, but I think it's not really that
complicated -- all you need is the radeonfb driver to receive the suspend
request using standard driver model, and power down the graphic adapter
using standard PCI methods, or do any card-specific wizardry, which, as you
implied, should not be difficult to implement. A similar thing should be done
at resume et voila, you get the display back on.
Best regards,

-- 
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found] ` <20031119180119.GB22307-xkTd+U360DcAs8EywTwl9A@public.gmane.org>
  2003-11-19 19:43   ` Karol Kozimor
@ 2003-11-20 11:13   ` Pavel Machek
       [not found]     ` <1069370504.705.32.camel@gaston>
  1 sibling, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2003-11-20 11:13 UTC (permalink / raw)
  To: pavel-+ZI9xUNit7I; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi!

> Fortunately, the kernel tree contains bits of code which can be useful.
> All the registers are known by name and number, for example (and it's a
> pity that the documentation about the __PWR_MAN'' register is
> inexistent). And the radeonfb driver contains a few things and hints.
> I'd gladly try a piece of code, supposedly coming from ATI, which ought
> to reset the device somehow. This piece of code was to be linked to the
> powerbook power management system, and is #if0'ed anyway since it is
> quoted to be no cure for some problem. Still, I think it's worth trying.
> 
> I'm not an expert on kernel programming. On which code paths should I
> plug things ? Say I have to functions radeon_go_sleep and
> radeon_wake_up, what device info can I expect to access, and where
> should I plug my functions ? Does anybody know of a well-educated fb
> driver, where such a manual reset of the device is done on wakeup. I
> could follow this as an example.


If I were you, I'd create fix_ati.o module which would
"do the stuff", then insert it over network. That should
make debugging easier...
-- 
				Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]         ` <20031119205129.A19364-SAjW485I7Qt98t58zOhiHA@public.gmane.org>
  2003-11-19 20:08           ` Karol Kozimor
@ 2003-11-20 11:44           ` Ducrot Bruno
  1 sibling, 0 replies; 24+ messages in thread
From: Ducrot Bruno @ 2003-11-20 11:44 UTC (permalink / raw)
  To: Emmanuel Thome; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Wed, Nov 19, 2003 at 08:51:29PM +0100, Emmanuel Thome wrote:
> On Wed, Nov 19, 2003 at 08:43:03PM +0100, Karol Kozimor wrote:
> > Thus wrote Emmanuel Thomé:
> > > S3 works halfway. Meaning the ``going to sleep'' part works ;).  USB is
> > > completely dead on bootup (megabytes of ``host controller halted''
> > > messages), but that's not my #1 concern. My #1 concern is the radeon
> > > 9000 (M9) graphics card, which doesn't come up (fortunately, network is
> > > relatively polite, and enables me to investigate). I'm not even talking
> > > graphic mode.
> > 
> > I thought framebuffer was considered "graphic mode", wasn't it? Anyway,
> 
> Granted. I meant ``I'm not yet trying to handle the case where X comes to
> play''.
> 
> The fact that radeonfb is loaded or not does not make a big difference
> anyway. It would, if eventually the radeonfb driver were able to talk the
> right language to the device. Which is something I'm not going to expect
> from vesafb. Proper acpi power management would be a dramatic feature to
> add to radeonfb...
> 
> > contact Benjamin Herrenschmidt (lkml arschives), he's the one doing a major
> > rework of radeonfb for 2.6, so he might be able to help.
> 
> yup, done that a few moments ago. I'll be glad if he answers email.

radeonfb contains suspend/resume code for pmac, written by
some ATI folks (at least on the 2.4 benh kernels, and certainly in
his 2.6 bk tree), so I guess you can start with (looking the code,
you will see some ref. to ACPI, even though it is for pmac..).
Also, dri cvs have some interresting stuff as well.

-- 
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]       ` <1069370504.705.32.camel-ZSGxbZoyBwc@public.gmane.org>
@ 2003-11-20 23:47         ` Pavel Machek
       [not found]           ` <20031120234708.GA431-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2003-11-20 23:47 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi!

> > If I were you, I'd create fix_ati.o module which would
> > "do the stuff", then insert it over network. That should
> > make debugging easier...
> 
> Nah, we really have to re-POST the chip. I don't know how
> we are supposed to do that though. Either we'll have to have
> the full POST code for a bunch of ATI chips around, which doesn't
> seem reasonable and I don't think windows drivers do that, or

Well, if he wants to do the work for his concrete ATI chip, its fine
with me, and I'd like to see the results.

Having fix_ati.o module is certainly easier than playing with driver
model for testing...
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]           ` <20031120234708.GA431-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2003-11-21  0:24             ` Benjamin Herrenschmidt
       [not found]               ` <1069374272.723.44.camel-ZSGxbZoyBwc@public.gmane.org>
  2003-11-21 14:50             ` Emmanuel Thome
  1 sibling, 1 reply; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2003-11-21  0:24 UTC (permalink / raw)
  To: Pavel Machek; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Fri, 2003-11-21 at 10:47, Pavel Machek wrote:
> Hi!
> 
> > > If I were you, I'd create fix_ati.o module which would
> > > "do the stuff", then insert it over network. That should
> > > make debugging easier...
> > 
> > Nah, we really have to re-POST the chip. I don't know how
> > we are supposed to do that though. Either we'll have to have
> > the full POST code for a bunch of ATI chips around, which doesn't
> > seem reasonable and I don't think windows drivers do that, or
> 
> Well, if he wants to do the work for his concrete ATI chip, its fine
> with me, and I'd like to see the results.
> 
> Having fix_ati.o module is certainly easier than playing with driver
> model for testing...

My point is that he can probably NOT do the work, POSTing such a
chip is hell. I'm trying to figure out how we are supposed to do,
that is how ATI does with their own windows drivers ...

Ben.




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]               ` <1069374272.723.44.camel-ZSGxbZoyBwc@public.gmane.org>
@ 2003-11-21 12:32                 ` Karol Kozimor
       [not found]                   ` <20031121123239.GB9973-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Karol Kozimor @ 2003-11-21 12:32 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Pavel Machek, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Thus wrote Benjamin Herrenschmidt:
> My point is that he can probably NOT do the work, POSTing such a
> chip is hell. I'm trying to figure out how we are supposed to do,

Then how is Xfree86 doing that? I'm not sure if it's the whole chip that
gets POSTed, or only the 3D engine, but something definitely is done at
VT switch for the radeon driver (note: DRM module must be at least 1.9.0
and the XFree part must also be recent).
Best regards,

-- 
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]                   ` <20031121123239.GB9973-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
@ 2003-11-21 13:01                     ` Charl P. Botha
  2003-11-24  1:30                     ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 24+ messages in thread
From: Charl P. Botha @ 2003-11-21 13:01 UTC (permalink / raw)
  To: Karol Kozimor
  Cc: Benjamin Herrenschmidt, Pavel Machek,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Fri, 2003-11-21 at 13:32, Karol Kozimor wrote:
> Thus wrote Benjamin Herrenschmidt:
> > My point is that he can probably NOT do the work, POSTing such a
> > chip is hell. I'm trying to figure out how we are supposed to do,
> 
> Then how is Xfree86 doing that? I'm not sure if it's the whole chip that
> gets POSTed, or only the 3D engine, but something definitely is done at
> VT switch for the radeon driver (note: DRM module must be at least 1.9.0
> and the XFree part must also be recent).

It's not posting, it's reprogramming some of the firmware and basically
doing a hardware re-init.  This re-init assumes that a POST has already
been done, as in after an S4 resume.

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]   ` <yzo1xs3ijgr.fsf-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2003-11-21 14:35     ` Emmanuel Thomé
  2003-11-22 16:31     ` Emmanuel Thome
  1 sibling, 0 replies; 24+ messages in thread
From: Emmanuel Thomé @ 2003-11-21 14:35 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


Then you've hacked the thing way further than its current state, at
least... Would you mind sharing your code ?

E.

On Thu, Nov 20, 2003 at 08:32:04AM +0100, ole.rohne-vJEk5272eHo@public.gmane.org wrote:
> I've done similar exercises on my Fujitsu P2120 (it's an M6), and I
> concluded that the card needed to go through the BIOS POST sequence,
> but for some reason s3_bios cannot be used. I tried backporting the
> powerbook code, with no result except a hanging computer. I suspect
> even ATI docs wouldn't help as they "provide" the BIOS for this
> purpose.
> 
> I eventuall hacked it using the vm86 emulator that comes with XFree86,
> plugging in a call to BIOS POST when switching virtual console; kind
> of ugly but it worked. I think I also needed some PCI hackery in the
> radeonfb resume code, not sure if that made it back into the 2.6.0
> kernel. I haven't been able to play with it at all lately as my
> machine reboots on S3 resume with recent kernels.
> 
> Regards, Ole


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]           ` <20031120234708.GA431-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  2003-11-21  0:24             ` Benjamin Herrenschmidt
@ 2003-11-21 14:50             ` Emmanuel Thome
       [not found]               ` <20031121155010.C19564-SAjW485I7Qt98t58zOhiHA@public.gmane.org>
  1 sibling, 1 reply; 24+ messages in thread
From: Emmanuel Thome @ 2003-11-21 14:50 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r

On Fri, Nov 21, 2003 at 12:47:08AM +0100, Pavel Machek wrote:
> Hi!
> 
> > > If I were you, I'd create fix_ati.o module which would
> > > "do the stuff", then insert it over network. That should
> > > make debugging easier...
> > 
> > Nah, we really have to re-POST the chip. I don't know how
> > we are supposed to do that though. Either we'll have to have
> > the full POST code for a bunch of ATI chips around, which doesn't
> > seem reasonable and I don't think windows drivers do that, or
> 
> Well, if he wants to do the work for his concrete ATI chip, its fine
> with me, and I'd like to see the results.
> 
> Having fix_ati.o module is certainly easier than playing with driver
> model for testing...
> 								Pavel

Certainly, it would be of great value, even if the finally chosen path is
to do the POST code. If I recall recent discussions about this on the
list, a couple of folks seem to prefer this ``hard way'' than the real
mode/int10 stuff, for reasons I understand.

Still, as you (Pavel) have yourself remarked, video chips suffering from
this unconfigured wake-up disease are tantamount. It could even be the
case of _most_ chips. If an interface for calling real mode stuff makes
it possible to cure, say half of these graphics cards for x86 laptops,
then that's not bad at all.

OTOH, even if the windows ati drivers do not fully repost the chip, the
MacOS drivers possibly _do_ such a thing, don't they ? Or do they really
get by using D2 state always ? Ben ? 

E.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]   ` <yzo1xs3ijgr.fsf-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  2003-11-21 14:35     ` Emmanuel Thomé
@ 2003-11-22 16:31     ` Emmanuel Thome
       [not found]       ` <20031122163147.GA26528-xkTd+U360DcAs8EywTwl9A@public.gmane.org>
  1 sibling, 1 reply; 24+ messages in thread
From: Emmanuel Thome @ 2003-11-22 16:31 UTC (permalink / raw)
  To: ole.rohne-vJEk5272eHo; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: Type: text/plain, Size: 1530 bytes --]


Great big thanks ! Works for me as well (the int10 part for xfree ;
haven't tried fb code yet. According to benh, restoring pci state as you
do is likely not to help much).

I suggest you update your patch for the xf86 driver as in the attached
patch, still. The reason is that I've experienced failed int10 POSTs
when they turn out to be useless. There are many registers to choose
from if one wants to decide whether the card is at D3cold or not.
CONFIG_MEMSIZE being zero is just a reasonable guess IMHO.

Many thanks,

E.

P.S for acpi-devel folks: compiled a radeon_drv.o for XFree86-4.3.0 ;
it's available at http://www.loria.fr/~thome/radeon_drv.o.gz


On Thu, Nov 20, 2003 at 08:32:04AM +0100, ole.rohne-vJEk5272eHo@public.gmane.org wrote:
> I've done similar exercises on my Fujitsu P2120 (it's an M6), and I
> concluded that the card needed to go through the BIOS POST sequence,
> but for some reason s3_bios cannot be used. I tried backporting the
> powerbook code, with no result except a hanging computer. I suspect
> even ATI docs wouldn't help as they "provide" the BIOS for this
> purpose.
> 
> I eventuall hacked it using the vm86 emulator that comes with XFree86,
> plugging in a call to BIOS POST when switching virtual console; kind
> of ugly but it worked. I think I also needed some PCI hackery in the
> radeonfb resume code, not sure if that made it back into the 2.6.0
> kernel. I haven't been able to play with it at all lately as my
> machine reboots on S3 resume with recent kernels.
> 
> Regards, Ole

[-- Attachment #2: radeon_patch_xfree86 --]
[-- Type: text/plain, Size: 1007 bytes --]

--- /usr/X11R6/lib/Server/drivers/ati/radeon_driver.c	2003-10-25 00:10:20.000000000 +0200
+++ drivers/ati/radeon_driver.c	2003-11-22 17:20:14.000000000 +0100
@@ -345,6 +345,7 @@
     "xf86InitInt10",
     "xf86FreeInt10",
     "xf86int10Addr",
+    "xf86ExecX86int10",
     NULL
 };
 
@@ -6409,9 +6410,22 @@
 {
     ScrnInfoPtr    pScrn = xf86Screens[scrnIndex];
     RADEONInfoPtr  info  = RADEONPTR(pScrn);
+    unsigned char * RADEONMMIO = info->MMIO;
 
     RADEONTRACE(("RADEONEnterVT\n"));
 
+    if (INREG(RADEON_CONFIG_MEMSIZE) == 0) { /* Softboot V_BIOS */
+      xf86Int10InfoPtr pInt;
+	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+	       "zero MEMSIZE, probably at D3cold. Re-POSTing via int10.\n");
+      pInt = xf86InitInt10 (info->pEnt->index);
+      if (pInt) {
+        pInt->num = 0xe6;
+        xf86ExecX86int10 (pInt);
+        xf86FreeInt10 (pInt);
+      }
+    }
+
     if (info->FBDev) {
 	unsigned char *RADEONMMIO = info->MMIO;
 	if (!fbdevHWEnterVT(scrnIndex,flags)) return FALSE;

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]               ` <20031121155010.C19564-SAjW485I7Qt98t58zOhiHA@public.gmane.org>
@ 2003-11-24  1:29                 ` Benjamin Herrenschmidt
       [not found]                   ` <1069637387.723.112.camel-ZSGxbZoyBwc@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2003-11-24  1:29 UTC (permalink / raw)
  To: Emmanuel Thome; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


> Certainly, it would be of great value, even if the finally chosen path is
> to do the POST code. If I recall recent discussions about this on the
> list, a couple of folks seem to prefer this ``hard way'' than the real
> mode/int10 stuff, for reasons I understand.
>
> Still, as you (Pavel) have yourself remarked, video chips suffering from
> this unconfigured wake-up disease are tantamount. It could even be the
> case of _most_ chips. If an interface for calling real mode stuff makes
> it possible to cure, say half of these graphics cards for x86 laptops,
> then that's not bad at all.
> 
> OTOH, even if the windows ati drivers do not fully repost the chip, the
> MacOS drivers possibly _do_ such a thing, don't they ? Or do they really
> get by using D2 state always ? Ben ? 

ATI drivers on Mac do re-POST most chips except the few earlier laptops
and iMacs which only needed D2 mode. All "desktops" cards need re-POST
(Desktops Macs will shut down the power to the PCI/AGP slots when going
to sleep) and latest laptops models need that too.

I just have confirmation from ATI contacts that their Windows driver
knows how to re-POST all chips on wakeup, it doesn't rely on BIOS
services. They might help us get something into shape for Linus but it
will take time.

In the meantime, if we can (not sure about it) call back into the BIOS
when waking up (Andi seemed to imply we are in real mode when getting
out of sleep), we may just use int10 to hard re-POST video cards at this
point. We must also make sure we do that for the AGP bridge if possible.

Ben.
 



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]                   ` <20031121123239.GB9973-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
  2003-11-21 13:01                     ` Charl P. Botha
@ 2003-11-24  1:30                     ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2003-11-24  1:30 UTC (permalink / raw)
  To: Karol Kozimor; +Cc: Pavel Machek, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Fri, 2003-11-21 at 23:32, Karol Kozimor wrote:
> Thus wrote Benjamin Herrenschmidt:
> > My point is that he can probably NOT do the work, POSTing such a
> > chip is hell. I'm trying to figure out how we are supposed to do,
> 
> Then how is Xfree86 doing that? I'm not sure if it's the whole chip that
> gets POSTed, or only the 3D engine, but something definitely is done at
> VT switch for the radeon driver (note: DRM module must be at least 1.9.0
> and the XFree part must also be recent).
> Best regards,

It's the whole chip, and I think an XFree based solution isn't an option
as the kernel own console would die on a non-POSTed chip before XFree
has a chance to kick in anyway.

Ben.




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]                   ` <1069637387.723.112.camel-ZSGxbZoyBwc@public.gmane.org>
@ 2003-11-24 17:36                     ` Pavel Machek
       [not found]                       ` <20031124173603.GA298-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2003-11-24 17:36 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Emmanuel Thome, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi!

> In the meantime, if we can (not sure about it) call back into the BIOS
> when waking up (Andi seemed to imply we are in real mode when getting
> out of sleep), we may just use int10 to hard re-POST video cards at this
> point. We must also make sure we do that for the AGP bridge if
> possible.

Look at arch/i386/kernel/acpi/wakeup.S code. It attempts to do
real-mode reinitialization (if you pass right acpi_sleep= paramater),
but it only works for some people.

If it is possible to improve that real-mode code to work more people,
feel free to send patches.

[I now have another machine -- arima notebook -- where none of current
methods works. I'll need to look at it closely.]
								Pavel 

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]       ` <20031122163147.GA26528-xkTd+U360DcAs8EywTwl9A@public.gmane.org>
@ 2003-11-24 17:39         ` Pavel Machek
  0 siblings, 0 replies; 24+ messages in thread
From: Pavel Machek @ 2003-11-24 17:39 UTC (permalink / raw)
  To: Emmanuel Thome
  Cc: ole.rohne-vJEk5272eHo,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi!

> Great big thanks ! Works for me as well (the int10 part for xfree ;
> haven't tried fb code yet. According to benh, restoring pci state as you
> do is likely not to help much).

Does this mean that we should call int 0x10 with ah=0xe6 to correctly
initialize video?
								Pavel 

> +    if (INREG(RADEON_CONFIG_MEMSIZE) == 0) { /* Softboot V_BIOS */
> +      xf86Int10InfoPtr pInt;
> +	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
> +	       "zero MEMSIZE, probably at D3cold. Re-POSTing via int10.\n");
> +      pInt = xf86InitInt10 (info->pEnt->index);
> +      if (pInt) {
> +        pInt->num = 0xe6;
> +        xf86ExecX86int10 (pInt);
> +        xf86FreeInt10 (pInt);
> +      }
> +    }
> +
>      if (info->FBDev) {
>  	unsigned char *RADEONMMIO = info->MMIO;
>  	if (!fbdevHWEnterVT(scrnIndex,flags)) return FALSE;


-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]                       ` <20031124173603.GA298-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2003-11-25  2:02                         ` Benjamin Herrenschmidt
       [not found]                           ` <1069725771.876.296.camel-ZSGxbZoyBwc@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2003-11-25  2:02 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Emmanuel Thome, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Tue, 2003-11-25 at 04:36, Pavel Machek wrote:
> Hi!
> 
> > In the meantime, if we can (not sure about it) call back into the BIOS
> > when waking up (Andi seemed to imply we are in real mode when getting
> > out of sleep), we may just use int10 to hard re-POST video cards at this
> > point. We must also make sure we do that for the AGP bridge if
> > possible.
> 
> Look at arch/i386/kernel/acpi/wakeup.S code. It attempts to do
> real-mode reinitialization (if you pass right acpi_sleep= paramater),
> but it only works for some people.
> 
> If it is possible to improve that real-mode code to work more people,
> feel free to send patches.
> 
> [I now have another machine -- arima notebook -- where none of current
> methods works. I'll need to look at it closely.]

Well, I did a quick look only, I'm a bit dumb with x86 assembly, but
it looks you are only trying to call VESA for setting a mode, not
doing a full POST of the card

Ben.




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]                           ` <1069725771.876.296.camel-ZSGxbZoyBwc@public.gmane.org>
@ 2003-11-25 12:04                             ` Pavel Machek
       [not found]                               ` <20031125120443.GA297-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2003-11-25 12:04 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Emmanuel Thome, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi!

> > > In the meantime, if we can (not sure about it) call back into the BIOS
> > > when waking up (Andi seemed to imply we are in real mode when getting
> > > out of sleep), we may just use int10 to hard re-POST video cards at this
> > > point. We must also make sure we do that for the AGP bridge if
> > > possible.
> > 
> > Look at arch/i386/kernel/acpi/wakeup.S code. It attempts to do
> > real-mode reinitialization (if you pass right acpi_sleep= paramater),
> > but it only works for some people.
> > 
> > If it is possible to improve that real-mode code to work more people,
> > feel free to send patches.
> > 
> > [I now have another machine -- arima notebook -- where none of current
> > methods works. I'll need to look at it closely.]
> 
> Well, I did a quick look only, I'm a bit dumb with x86 assembly, but
> it looks you are only trying to call VESA for setting a mode, not
> doing a full POST of the card

Yes, that's what I'm optionaly doing, but I'm also (optionally) doing:

        testl   $1, video_flags - wakeup_code
        jz      1f
        lcall   $0xc000,$3
        movw    %cs, %ax
        movw    %ax, %ds                                        # Bios
might have played with that
        movw    %ax, %ss
1:

...that should be POST(?)
								Pavel

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]                               ` <20031125120443.GA297-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2003-11-26 13:24                                 ` Ducrot Bruno
       [not found]                                   ` <20031126132419.GL7374-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Ducrot Bruno @ 2003-11-26 13:24 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Benjamin Herrenschmidt, Emmanuel Thome,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Tue, Nov 25, 2003 at 01:04:43PM +0100, Pavel Machek wrote:
> Hi!
> 
> > > > In the meantime, if we can (not sure about it) call back into the BIOS
> > > > when waking up (Andi seemed to imply we are in real mode when getting
> > > > out of sleep), we may just use int10 to hard re-POST video cards at this
> > > > point. We must also make sure we do that for the AGP bridge if
> > > > possible.
> > > 
> > > Look at arch/i386/kernel/acpi/wakeup.S code. It attempts to do
> > > real-mode reinitialization (if you pass right acpi_sleep= paramater),
> > > but it only works for some people.
> > > 
> > > If it is possible to improve that real-mode code to work more people,
> > > feel free to send patches.
> > > 
> > > [I now have another machine -- arima notebook -- where none of current
> > > methods works. I'll need to look at it closely.]
> > 
> > Well, I did a quick look only, I'm a bit dumb with x86 assembly, but
> > it looks you are only trying to call VESA for setting a mode, not
> > doing a full POST of the card
> 
> Yes, that's what I'm optionaly doing, but I'm also (optionally) doing:
> 
>         testl   $1, video_flags - wakeup_code
>         jz      1f
>         lcall   $0xc000,$3
>         movw    %cs, %ax
>         movw    %ax, %ds                                        # Bios
> might have played with that
>         movw    %ax, %ss
> 1:
> 
> ...that should be POST(?)
> 								Pavel

>From Ralph Brown interrupt list:

--------V--/YfH7FhGJxf49RI1O+iZ8Pj1EjU76Jnw+PUSNTvomfDsgDyMMLuEDg@public.gmane.org
CALL C000h:0003h - VIDEO BIOS INITIALIZATION
InstallCheck:	C000h:0000h must contain the word AA55h and the 
		  512*BYTE[C000h:0002h] bytes must sum to 00h (mod 256)
Note:	is normally called only by the System ROM BIOS initialization code

In fact, this is a general method to POST any card if you know the
location of the ROM in the EISA space.

-- 
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]                                   ` <20031126132419.GL7374-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
@ 2003-11-26 22:34                                     ` Pavel Machek
       [not found]                                       ` <20031126223436.GD207-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Pavel Machek @ 2003-11-26 22:34 UTC (permalink / raw)
  To: Ducrot Bruno
  Cc: Benjamin Herrenschmidt, Emmanuel Thome,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi!

> > > > > In the meantime, if we can (not sure about it) call back into the BIOS
> > > > > when waking up (Andi seemed to imply we are in real mode when getting
> > > > > out of sleep), we may just use int10 to hard re-POST video cards at this
> > > > > point. We must also make sure we do that for the AGP bridge if
> > > > > possible.
> > > > 
> > > > Look at arch/i386/kernel/acpi/wakeup.S code. It attempts to do
> > > > real-mode reinitialization (if you pass right acpi_sleep= paramater),
> > > > but it only works for some people.
> > > > 
> > > > If it is possible to improve that real-mode code to work more people,
> > > > feel free to send patches.
> > > > 
> > > > [I now have another machine -- arima notebook -- where none of current
> > > > methods works. I'll need to look at it closely.]
> > > 
> > > Well, I did a quick look only, I'm a bit dumb with x86 assembly, but
> > > it looks you are only trying to call VESA for setting a mode, not
> > > doing a full POST of the card
> > 
> > Yes, that's what I'm optionaly doing, but I'm also (optionally) doing:
> > 
> >         testl   $1, video_flags - wakeup_code
> >         jz      1f
> >         lcall   $0xc000,$3
> >         movw    %cs, %ax
> >         movw    %ax, %ds                                        # Bios
> > might have played with that
> >         movw    %ax, %ss
> > 1:
> > 
> > ...that should be POST(?)
> > 								Pavel
> 
> >From Ralph Brown interrupt list:
> 
> --------V--/YfH7FhGJxf49RI1O+iZ8Pj1EjU76Jnw+PUSNTvomfDsgDyMMLuEDg@public.gmane.org
> CALL C000h:0003h - VIDEO BIOS INITIALIZATION
> InstallCheck:	C000h:0000h must contain the word AA55h and the 
> 		  512*BYTE[C000h:0002h] bytes must sum to 00h (mod 256)
> Note:	is normally called only by the System ROM BIOS initialization code
> 
> In fact, this is a general method to POST any card if you know the
> location of the ROM in the EISA space.

That's what I'm doing, but it crashes machine on most
machines. Perhaps PCI needs to be already initialized at this point or
something like that?
								Pavel

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]                                       ` <20031126223436.GD207-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2003-11-26 23:27                                         ` Benjamin Herrenschmidt
  2003-11-27 10:47                                         ` Ducrot Bruno
  1 sibling, 0 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2003-11-26 23:27 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Ducrot Bruno, Emmanuel Thome,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


> That's what I'm doing, but it crashes machine on most
> machines. Perhaps PCI needs to be already initialized at this point or
> something like that?

Yes, what I've been told is that you need to have re-initialized the AGP
slot first, which may need yet another BIOS driver to POST, or some ACPI
wakeup thingy (re-initializing the AGP bridge means in some case filling
some non-documented registers with proper timing & clock skew values
etc...)

Ben.





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]                                       ` <20031126223436.GD207-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  2003-11-26 23:27                                         ` Benjamin Herrenschmidt
@ 2003-11-27 10:47                                         ` Ducrot Bruno
       [not found]                                           ` <20031127104722.GM7374-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
  1 sibling, 1 reply; 24+ messages in thread
From: Ducrot Bruno @ 2003-11-27 10:47 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Benjamin Herrenschmidt, Emmanuel Thome,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Wed, Nov 26, 2003 at 11:34:36PM +0100, Pavel Machek wrote:
> That's what I'm doing, but it crashes machine on most
> machines. Perhaps PCI needs to be already initialized at this point or
> something like that?

In fact, I don't think that POST is a good idea anyway (we had
alerady that discussion).  It's way too early in the resume path.
Perhaps POSTing after PCI subsystem wakeup may help, but then you
may have to go with int 10 instead (and that will be pretty hard
to do that in kernel space).

-- 
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

* Re: Dell D600: teaching radeonfb how to wake up...
       [not found]                                           ` <20031127104722.GM7374-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
@ 2003-11-28  0:10                                             ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2003-11-28  0:10 UTC (permalink / raw)
  To: Ducrot Bruno
  Cc: Pavel Machek, Emmanuel Thome,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Thu, 2003-11-27 at 21:47, Ducrot Bruno wrote:
> On Wed, Nov 26, 2003 at 11:34:36PM +0100, Pavel Machek wrote:
> > That's what I'm doing, but it crashes machine on most
> > machines. Perhaps PCI needs to be already initialized at this point or
> > something like that?
> 
> In fact, I don't think that POST is a good idea anyway (we had
> alerady that discussion).  It's way too early in the resume path.
> Perhaps POSTing after PCI subsystem wakeup may help, but then you
> may have to go with int 10 instead (and that will be pretty hard
> to do that in kernel space).

Well... we have to POST the card one way or another. So unless ATI
provides us with the complete POST code for all of their chipset
revisions, which may never happen, we are stuck with using the BIOS
POST facility.

However, I think Pavel is right here, we should probably restore
the PCI bus (and AGP !) completely before attempting that. Which
means we'll probably have to add a facility to x86 to go back to
real mode run that dawn int10 thing.

Something else we need on x86 (I need that at least in radeonfb),
provided that doesn't exist already, is a small hook in the PCI
code at probe time that "detects" which VGA PCI chbip had IO
decoding enabled, that is which one is the primary one.

I need that in order to properly retreive some tables, as on a
bunch of laptops, the video BIOS ROM isn't accessible on the PCI
ROM BAR of the card. So I need to check when dealing with the
primary card and peek at the BIOS image at c0000 instead of the
PCI ROM.

ben.
 



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

end of thread, other threads:[~2003-11-28  0:10 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-19 18:01 Dell D600: teaching radeonfb how to wake up Emmanuel Thomé
     [not found] ` <20031119180119.GB22307-xkTd+U360DcAs8EywTwl9A@public.gmane.org>
2003-11-19 19:43   ` Karol Kozimor
     [not found]     ` <20031119194303.GA16571-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-11-19 19:51       ` Emmanuel Thome
     [not found]         ` <20031119205129.A19364-SAjW485I7Qt98t58zOhiHA@public.gmane.org>
2003-11-19 20:08           ` Karol Kozimor
2003-11-20 11:44           ` Ducrot Bruno
2003-11-20 11:13   ` Pavel Machek
     [not found]     ` <1069370504.705.32.camel@gaston>
     [not found]       ` <1069370504.705.32.camel-ZSGxbZoyBwc@public.gmane.org>
2003-11-20 23:47         ` Pavel Machek
     [not found]           ` <20031120234708.GA431-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-11-21  0:24             ` Benjamin Herrenschmidt
     [not found]               ` <1069374272.723.44.camel-ZSGxbZoyBwc@public.gmane.org>
2003-11-21 12:32                 ` Karol Kozimor
     [not found]                   ` <20031121123239.GB9973-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-11-21 13:01                     ` Charl P. Botha
2003-11-24  1:30                     ` Benjamin Herrenschmidt
2003-11-21 14:50             ` Emmanuel Thome
     [not found]               ` <20031121155010.C19564-SAjW485I7Qt98t58zOhiHA@public.gmane.org>
2003-11-24  1:29                 ` Benjamin Herrenschmidt
     [not found]                   ` <1069637387.723.112.camel-ZSGxbZoyBwc@public.gmane.org>
2003-11-24 17:36                     ` Pavel Machek
     [not found]                       ` <20031124173603.GA298-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-11-25  2:02                         ` Benjamin Herrenschmidt
     [not found]                           ` <1069725771.876.296.camel-ZSGxbZoyBwc@public.gmane.org>
2003-11-25 12:04                             ` Pavel Machek
     [not found]                               ` <20031125120443.GA297-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-11-26 13:24                                 ` Ducrot Bruno
     [not found]                                   ` <20031126132419.GL7374-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2003-11-26 22:34                                     ` Pavel Machek
     [not found]                                       ` <20031126223436.GD207-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-11-26 23:27                                         ` Benjamin Herrenschmidt
2003-11-27 10:47                                         ` Ducrot Bruno
     [not found]                                           ` <20031127104722.GM7374-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2003-11-28  0:10                                             ` Benjamin Herrenschmidt
     [not found] ` <yzo1xs3ijgr.fsf@localhost.localdomain>
     [not found]   ` <yzo1xs3ijgr.fsf-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-11-21 14:35     ` Emmanuel Thomé
2003-11-22 16:31     ` Emmanuel Thome
     [not found]       ` <20031122163147.GA26528-xkTd+U360DcAs8EywTwl9A@public.gmane.org>
2003-11-24 17:39         ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox