Bug 2064 - [ATI/radeon] Benh's radeon patches
Summary: [ATI/radeon] Benh's radeon patches
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
: 2020 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-12 11:18 UTC by Alex Deucher
Modified: 2005-03-26 15:41 UTC (History)
7 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch 1 (8.31 KB, patch)
2004-12-12 11:20 UTC, Alex Deucher
no flags Details | Splinter Review
patch 2 (1.13 KB, patch)
2004-12-12 11:20 UTC, Alex Deucher
no flags Details | Splinter Review
patch 3 (7.24 KB, patch)
2004-12-12 11:21 UTC, Alex Deucher
no flags Details | Splinter Review
patch 4 (825 bytes, patch)
2004-12-12 11:22 UTC, Alex Deucher
no flags Details | Splinter Review
patch 5 (2.47 KB, patch)
2004-12-12 11:23 UTC, Alex Deucher
no flags Details | Splinter Review
patch 6 (2.32 KB, patch)
2004-12-12 11:23 UTC, Alex Deucher
no flags Details | Splinter Review
patch 7 (2.30 KB, patch)
2004-12-12 11:24 UTC, Alex Deucher
no flags Details | Splinter Review
patch 8 (2.72 KB, patch)
2004-12-12 11:24 UTC, Alex Deucher
no flags Details | Splinter Review
patch 9 (753 bytes, patch)
2004-12-12 11:25 UTC, Alex Deucher
no flags Details | Splinter Review
patch 10 (10.79 KB, patch)
2004-12-12 11:25 UTC, Alex Deucher
no flags Details | Splinter Review
all in one (28.73 KB, patch)
2004-12-13 19:36 UTC, Alex Deucher
no flags Details | Splinter Review
small update (28.97 KB, patch)
2004-12-15 20:58 UTC, Alex Deucher
no flags Details | Splinter Review

Description Alex Deucher 2004-12-12 11:18:52 UTC
this bug is to track Benh's radeon patches.
Comment 1 Alex Deucher 2004-12-12 11:20:05 UTC
Created attachment 1519 [details] [review]
patch 1

This patch adds the "VGAAccess" option (defaults to NO on PPC and YES on
others)
that disables all legacy VGA stuffs in the driver, since they are causing
various
issues on non-x86 machines.
Comment 2 Alex Deucher 2004-12-12 11:20:55 UTC
Created attachment 1520 [details] [review]
patch 2

This patch makes sure CRTC2_OFFSET_CNTL is cleared. None of the options in
this register should be enabled with our current driver, and some firmwares
setup a tiled display, which we _must_ disable for now. Without this, the
second screen is completely scrambled on some PowerMacs.
Comment 3 Alex Deucher 2004-12-12 11:21:34 UTC
Created attachment 1521 [details] [review]
patch 3

This patch fix the routine that probes for PLL values in absence of a
BIOS ROM. The measure is more precise, done several times to avoid
"gliches" caused by scheduling latencies, plus the patch fixes actual
bugs in the previous iteration of the code. It also add calculation of
the mclk and sclk values for proper display bandwidth calculation and
adds proper min/max PLL values for r420 type cards.
Comment 4 Alex Deucher 2004-12-12 11:22:21 UTC
Created attachment 1522 [details] [review]
patch 4

The display bandwidth calculation code has a small bug when looking at
the memory controller setup on r300 chips. Hui from ATI confirmed that
this was the right fix.
Comment 5 Alex Deucher 2004-12-12 11:23:15 UTC
Created attachment 1523 [details] [review]
patch 5

When using MergedFB, the driver would call RADEONInitPLLRegisters for the first

head even when UseBiosDividers was set to TRUE, which was incorrect. This patch

fixes it by moving the test of UseBiosDividers into RADEONInitPLLRegisters
which
simplifies the code in the caller and is more logical.
Comment 6 Alex Deucher 2004-12-12 11:23:48 UTC
Created attachment 1524 [details] [review]
patch 6

The dual head setup was recently re-broken (after having been fixed a while
ago)
with SURFACE_CNTL beeing written with the wrong value from the second head. The

problem is that usually, only the first head had a correct value in there, and
the driver would regular mixup which register setup was used to restore that
value. This patch fixes it once for all by making sure the second head does
carry the proper value too.
Comment 7 Alex Deucher 2004-12-12 11:24:22 UTC
Created attachment 1525 [details] [review]
patch 7

is set with an odd post-divider value. This makes sure we never chose
a "wrong" value when calculating the P2PLL setting on a non-CRT screen.
Comment 8 Alex Deucher 2004-12-12 11:24:47 UTC
Created attachment 1526 [details] [review]
patch 8

On some cards where no BIOS provided output mapping infos is available, the
driver would get the DDC flipped between the two outputs of the card. This
typically happen on recent Mac cards. This adds an option to force the
driver to reverse what it thinks is the primary display DDC and the
secondary display DDC. Ultimately, we'll have to do a better job of
recognizing those Mac cards though.
Comment 9 Alex Deucher 2004-12-12 11:25:18 UTC
Created attachment 1527 [details] [review]
patch 9

RadeonValidateFPModes() has a bug where it could try to dereference
a NULL pointer in some cases when linking in modes. This fixes it.
Comment 10 Alex Deucher 2004-12-12 11:25:57 UTC
Created attachment 1528 [details] [review]
patch 10

This patch adds an option for probing the PLL value at server init time
for LVDS panels and re-using it later (by setting UseBiosDividers). It's
useful on machines without an X86 BIOS image providing the proper set of
divider values for the LVDS, as the value calculated by
RADEONInitPLLRegisters()
tend not to be suitable for some LVDS panels.

It also changes a bit the way the panel infos are extracted, the previous
code didn't quite work for me, and after discussing with Hui, I decided
to move the detection earlier in the discovery process and to do it slightly
differently.
Comment 11 Alex Deucher 2004-12-12 11:41:26 UTC
as a note, patch 11 (bug 1912) is already committed to HEAD
Comment 12 Alex Deucher 2004-12-13 07:50:27 UTC
*** Bug 2020 has been marked as a duplicate of this bug. ***
Comment 13 Andrew Zschetzsche 2004-12-13 18:40:57 UTC
How does a person use these? I get errors with the patch command.
Comment 14 Alex Deucher 2004-12-13 19:36:14 UTC
Created attachment 1541 [details] [review]
all in one

patch 9 seems to have already been applied.  Here's a new all in one patch
against xorg cvs.
Comment 15 Alex Deucher 2004-12-15 20:58:25 UTC
Created attachment 1553 [details] [review]
small update

I missed a small mask change.  updated patch.
Comment 16 Alex Deucher 2004-12-17 11:41:50 UTC
applied to HEAD
Comment 17 Adam Jackson 2005-03-26 19:34:17 UTC
can we close this now?
Comment 18 Alex Deucher 2005-03-27 09:41:46 UTC
yes


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.