All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Ramsay <jim.ramsay@gmail.com>
To: "Daniël Mantione" <daniel@deadlock.et.tudelft.nl>
Cc: James Simmons <jsimmons@infradead.org>,
	yhlu <yhlu.kernel@gmail.com>,
	alex.kern@gmx.de, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Atyfb questions and issues
Date: Mon, 15 Aug 2005 14:53:58 -0600	[thread overview]
Message-ID: <4789af9e050815135347e398fd@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0508152129490.11750-100000@deadlock.et.tudelft.nl>

Sorry, Daniël, forgot to CC everyone else on this - please forgive my
resend to you.

On 8/15/05, Daniël Mantione <daniel@deadlock.et.tudelft.nl> wrote:
> I don't know what the purpose of this patch is but it copies the pre-LCD
> version of the code in mach64_ct.c into the xlinit.c code of 2.6. This is
> not the var_to_pll code. This code affects the display fifo and can
> cause wrong image if incorrectly programmed, but has nothing to do with
> initializing the chip.

The purpose of this patch is to get the xlinit working for non-i386
machines, such as the MIPS processor board I'm currently working with.
 It works for me.  The problem is that for non-i386 machines,
init_bios_setup is not called, so some values that the 2.6 code
assumes should be initialized are not.

In the 2.4 kernel I'm using as a reference with the 'xlinit' code
built in, which works on my hardware, the var_to_pll code consists of
3 calls:
- aty_valid_pll_ct
- aty_dsp_gt
- aty_calc_pll_ct

Now, the 2.6 kernel's var_to_pll code is identical, except that it
doesn't call aty_calc_pll_ct any more.  However, the differences don't
stop there.  The 'aty_valid_pll_ct' call in the 2.6 kernel is much
smaller than the 2.4 kernel - apparently it assumes that someone else
will have initialized much of the pll struct.

So to work around this I took these from the 2.4 kernel, renamed them
with 'init_' instead of 'aty_' and put them into xlinit.c, only if
__i386__ isn't defined, and call them explicitly instead of wrapping
them inside a function called 'var_to_pll'.

> The pre-LCD code caused several problems for both i386 and
> non-i386 laptops, and should not be reused. Also, Geert Uytterhoeven
> has said that he developed the pre-LCD by trial and and not by
> design. The post-LCD code is derived from the XFree86 driver, it is
> supposed to work fine if X works.

My patch won't affect non-i386 machines.  Notice the '#ifndef
__i386__' around everything I changed.

This simply fixes the issue that the new 2.6 xlinit code assumes that
you have a bios that will do *something* to your chip before handing
control over to the kernel, which is not always the case.

If you have a fix that is more correct, I'd be happy to test it for you!

-- 
Jim Ramsay
"Me fail English?  That's unpossible!"

  reply	other threads:[~2005-08-15 20:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12 17:11 Atyfb questions and issues Jim Ramsay
2005-08-12 17:24 ` Daniël Mantione
2005-08-12 17:50   ` James Simmons
2005-08-12 18:15     ` yhlu
2005-08-15 16:43       ` James Simmons
2005-08-15 20:39         ` yhlu
2005-08-15 20:51           ` Jim Ramsay
2005-08-15 21:15             ` Daniël Mantione
2005-08-12 18:02   ` yhlu
2005-08-15 16:25     ` Jim Ramsay
2005-08-15 16:40       ` James Simmons
2005-08-15 19:21         ` Jim Ramsay
2005-08-15 19:40           ` Daniël Mantione
2005-08-15 20:53             ` Jim Ramsay [this message]
     [not found] <4789af9e050815133711481beb@mail.gmail.com>
2005-08-15 21:10 ` Daniël Mantione

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4789af9e050815135347e398fd@mail.gmail.com \
    --to=jim.ramsay@gmail.com \
    --cc=alex.kern@gmx.de \
    --cc=daniel@deadlock.et.tudelft.nl \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.