Bug 26926 - [KMS][RV635] broken colors/fonts on DVI-0 (DVI-1 is OK)
Summary: [KMS][RV635] broken colors/fonts on DVI-0 (DVI-1 is OK)
Status: RESOLVED DUPLICATE of bug 27478
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-06 07:03 UTC by Rafał Miłecki
Modified: 2010-04-21 22:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg.log (3.46 KB, text/plain)
2010-03-06 07:03 UTC, Rafał Miłecki
no flags Details
colors1 bad (photo) (144.67 KB, image/jpeg)
2010-03-06 07:04 UTC, Rafał Miłecki
no flags Details
colors1 good (screenshot) (211.74 KB, image/png)
2010-03-06 07:04 UTC, Rafał Miłecki
no flags Details
colors2 bad (photo) (233.59 KB, image/jpeg)
2010-03-06 07:04 UTC, Rafał Miłecki
no flags Details
colors2 good (screenshot) (455.14 KB, image/png)
2010-03-06 07:05 UTC, Rafał Miłecki
no flags Details
RV635 ROM (63.00 KB, application/octet-stream)
2010-04-19 11:48 UTC, Rafał Miłecki
no flags Details

Description Rafał Miłecki 2010-03-06 07:03:08 UTC
I've just tried KMS on my RV635 and my old D-SUB (analog) LCD displays colors incorrectly when using DVI-0. When switching to DVI-1 it works fine.

Any idea what can be a reason? In both cases we use INTERNAL_KLDSCP_DACx.
Comment 1 Rafał Miłecki 2010-03-06 07:03:35 UTC
Created attachment 33810 [details]
dmesg.log
Comment 2 Rafał Miłecki 2010-03-06 07:04:15 UTC
Created attachment 33811 [details]
colors1 bad (photo)
Comment 3 Rafał Miłecki 2010-03-06 07:04:29 UTC
Created attachment 33812 [details]
colors1 good (screenshot)
Comment 4 Rafał Miłecki 2010-03-06 07:04:55 UTC
Created attachment 33813 [details]
colors2 bad (photo)
Comment 5 Rafał Miłecki 2010-03-06 07:05:16 UTC
Created attachment 33814 [details]
colors2 good (screenshot)
Comment 6 Alex Deucher 2010-03-06 07:08:50 UTC
Does UMS work ok?  I suspect it's the bg/adj values for the dac.
Comment 7 Rafał Miłecki 2010-03-06 07:11:38 UTC
(In reply to comment #6)
> Does UMS work ok?  I suspect it's the bg/adj values for the dac.

At least radeonhd does work fine for both DVIs. Will test radeon soon.

Can you point me to some part of code or registers that I can compare?

Do we really submit other data for AtomBIOS DAC-controlling commands at all?
Comment 8 Alex Deucher 2010-03-06 07:28:43 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Does UMS work ok?  I suspect it's the bg/adj values for the dac.
> 
> At least radeonhd does work fine for both DVIs. Will test radeon soon.
> 
> Can you point me to some part of code or registers that I can compare?
> 
> Do we really submit other data for AtomBIOS DAC-controlling commands at all?
> 

The bg/dac adj values are golden values set in the atombios dac command tables.  It might be a bug in the kms atom parser (I've fixed several of them recently) or a bad paramater passed to one of the tables, or something else completely unrelated.  Make sure your kms tree has this patch:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=6a8a2d702b33c6ed5c789f21b4e89fdf221f01ca
I'd suggest using avivotool to dump the regs and compare.  The dac regs are at 0x7000-0x706c,0x7ef0-0x7ef8 (DAC1) and 0x7100-0x716c,0x7ff0-0x7ff8 (DAC2)
the second set in each group are the dac bgadj and macro regs.
Comment 9 Rafał Miłecki 2010-03-06 12:00:15 UTC
I use drm-linus which contains "fix shr/shl ops".

Thanks a lot for giving registers! It gave nice results :)

# diff -u bad.log ok.log
--- bad.log     2010-03-06 20:54:42.288325112 +0100
+++ ok.log      2010-03-06 20:52:30.060416677 +0100
@@ -52,7 +52,7 @@
 0x7134: 0x02020200
 0x7138: 0x00000000
 0x713C: 0x00000000
-0x7140: 0x000001E6
+0x7140: 0x00000000
 0x7144: 0x00000000
 0x7148: 0x00000000
 0x714C: 0x00000000
@@ -66,5 +66,5 @@
 0x716C: 0x00000000
 rhd_dump: v1.3.0, git branch master, commit d6631a8c
 0x7FF0: 0x00000020
-0x7FF4: 0x00200102
+0x7FF4: 0x00202902
 0x7FF8: 0x00700251

# rhd_dump -w 0x7FF4 0x00202902 1:00.0

It made the trick. Now need just to find out why 0x7FF4 had incorrect value...
Comment 10 Rafał Miłecki 2010-04-19 11:48:24 UTC
Created attachment 35168 [details]
RV635 ROM
Comment 11 Rafał Miłecki 2010-04-19 11:50:48 UTC
Can be duplicate of bug #27478, will try to check if I'll get access to this RV635.
Comment 12 Alex Deucher 2010-04-21 22:29:07 UTC
This is indeed a duplicate of bug 27478.

*** This bug has been marked as a duplicate of bug 27478 ***


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.