This page describes a small program , called ATiNfo, that may help reading the PLL data from ATi BIOS for ATi Radeon cards. PLL is a Phased Lock Loop, that is a technology for synthesizing frequencies that suppose to dither the LCD interface clock. Now, I have absolutely *no* idea what the hell the above words mean. Anyway, the piece is mostly stolen from Radeon frame buffer driver version 0.1.4, that in it's turn comes from Linux kernel, and is copyright by Ani Joshi (ajoshi at unixbox dot com).

Why do you need it?

Well, some people (including me) were having troubles figuring the right horizontal clock frequence for X, if ran on ATi radeons, that is ze5XXX HP laptop series (and I guess a bunch more). To guess the correct rate, what I had to do, is to compile in the radeonfb driver, start it up, and see what it tells me. Now, not everybody are that eager to recompile linux kernels all the time, so here is a separate tiny thingy, that you can use to just see what the horizontal freq is supposed to be on your laptop.

How does it work

It may not at all. I give absolutely no warranty on the below piece of code, and as much liability as well. In other words, if you laptop bursts into flames once you run it, or if your dog bites the mailman while you're running it, neither you, mailman, or your dog may sue me for any of that, and that was an example, so please be reasonable.

The way it works, is it tries to find the ATi radeon BIOS in your system, and then it gets this PLL structure out of it, and dumps it. Or tells you if it couldn't find a BIOS.

How do you make it work

Well, you'll need your kernel sources and whatever gcc you used to compile your kernel, or just whatever gcc you have installed should do. That was only tested with kernel 2.4.20, and gcc 2.96. The download links for the source code can be found below. So, here are the steps:

Now, ATiNfo printed the kernel output to the kernel log. I'm no kernel guru and don't know a better way to first provide a makefile, and second, know a way to print that info to more convinient location. Yous syslog daemon should be able to pick up that information and normally store it to /var/log/messages file. This is the lines I have after running insmod:

Apr 24 23:19:45 mage kernel: atinfo : detecting ATi Radeon BIOS PLL settings
Apr 24 23:19:45 mage kernel: atinfo: ref_clk=2700, ref_div=60, xclk=16600
If you don't see any messages that have 'atinfo' in them, then your kernel output is either not going anywhere or is going someplace else. Here is my version of syslog.conf file, that you may temporarly use to ensure kernel messages are going to '/var/log/messages' file. If you replace this file, dont' forget to kill -1 your syslog daemon before retrying the insmod.
Anyway, the "xclk=" part of the second message is what you're after. That's the horizontal frequency you should try supplying to your X configuration. 16600, that's what I have, will stand to 16.6 Khz horizontal sync rate for X.


Ok, here is the source file:


Just wanted to say thanks to all the people who were sending me emails with questions and stuff, that finally worked out as an incentive to create that page and that code.
(C) Pawel S. Veselov, 2003.

[Back] Return to my homepage

[Or press "BACK" button on your cool browser ;)]