Mailinglist Archive: radeonhd (427 mails)

< Previous Next >
Re: [radeonhd] [PATCH]es: Set engine clock after suspend & resume
  • From: Rafał Miłecki <zajec5@xxxxxxxxx>
  • Date: Mon, 18 May 2009 15:02:50 +0200
  • Message-id: <b170af450905180602l792aaeaan1cba9508b26dbb76@xxxxxxxxxxxxxx>
2009/5/18 Luc Verhaegen <libv@xxxxxxxxx>:
On Mon, May 18, 2009 at 02:26:16PM +0200, Rafa?? Mi??ecki wrote:
Currently we set engine clock only on starting X. After suspend &
resume card is reseted to default state (including engine clock) and
clock is on max speed again.

I see two solutions for this situation:

1) On every RHDEnterVT(...) we should check if engine clock changed,
and if it did, set it again. We shouldn't just set it on every
RHDEnterVT(...) because simple switching to console and back doesn't
change engine clock. It would be great to "just know" if
RHDEnterVT(...) was called after console switching or after resuming,
but AFAIK we don't know it.
2) Set engine clock on every RHDEnterVT(...) and restore default speed
on every RHDLeaveVT(...)

Second solution is probably nicer/cleaner. We keep engine clock in
default state after switching from X, but do we actually want/need it?

Please comment, discuss :)

How intrusive is setting the engine clock?

Do you mean if changing it affects something? Don't really know that.
I'm sure too low value will cause screen corruptions. In my case
minimal value without corruptions is 168750Hz.

Whatever happens, when leaving the VT we must restore the original
clock. There is absolutely no way around this, except when this ends up
leaving the vt garbled (which is usually because of a lack of
information or a lack of rather lengthy debugging on actual hw).

Now, since we have to restore the original clock upon leaving the VT
anyway, we also have to set the engine clock upon entering VT again.
Just like everything else registerwise happens just the same with
ScreenInit as with EnterVT, engine clock setting should happen this way
as well and i would be amazed if this wasn't already happening like
that.

Luc Verhaegen.

So my case no. 2 and patch "b": set.engine.clock.b.patch

I'm afraid we currently don't restore engine clock on leaving VT
(somehow, it doesn't cause any problems for me). With attached patch
applied I get following output:
(II) RADEONHD(0): Just leaved VT, engine clock is at 168750Hz, default
is 680000Hz

Yang: do you/we still need that "empty" RHDGetEngineClock(...); calls?
/* Induce logging of new engine clock */
RHDGetEngineClock(rhdPtr);

--
Rafał Miłecki
< Previous Next >