Bug 29272 - [BISECTED] Screen becomes corrupted when switching video mode with Radeon KMS
[BISECTED] Screen becomes corrupted when switching video mode with Radeon KMS
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel)
All Linux
: P1 high
Assigned To: drivers_video-dri
:
Depends on:
Blocks: 27352
  Show dependency treegraph
 
Reported: 2011-02-17 00:52 UTC by Jure Repinc
Modified: 2011-02-20 00:15 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.38-rc5
Tree: Mainline
Regression: Yes


Attachments
dmesg (73.83 KB, text/plain)
2011-02-17 00:54 UTC, Jure Repinc
Details
lspci (9.54 KB, text/plain)
2011-02-17 00:55 UTC, Jure Repinc
Details
vbios (59.00 KB, application/octet-stream)
2011-02-17 01:04 UTC, Jure Repinc
Details
Xorg.0.log (37.79 KB, text/x-log)
2011-02-17 01:06 UTC, Jure Repinc
Details
set frac fb div for dce4+ (773 bytes, patch)
2011-02-17 01:24 UTC, Alex Deucher
Details | Diff
alternate patch (1.20 KB, patch)
2011-02-17 01:53 UTC, Alex Deucher
Details | Diff
one more (665 bytes, patch)
2011-02-17 02:07 UTC, Alex Deucher
Details | Diff
patch for upstream (1.87 KB, patch)
2011-02-17 02:18 UTC, Alex Deucher
Details | Diff

Description Jure Repinc 2011-02-17 00:52:25 UTC
After updating the kernel to 2.6.38-rc5 screen gets corrupted when video mode switches for KMS. This is on laptop eMachines E640G with integrated ATI Mobility Radeon HD 5470. It was working just fine with -rc4. I have bisected the commits and this one was pointed out as the culprit:

5b40ddf888398ce4cccbf3b9d0a18d90149ed7ff is the first bad commit
commit 5b40ddf888398ce4cccbf3b9d0a18d90149ed7ff
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Mon Feb 14 11:43:11 2011 -0500

    drm/radeon/kms: hopefully fix pll issues for real (v3)
    
    The problematic boards have a recommended reference divider
    to be used when spread spectrum is enabled on the laptop panel.
    Enable the use of the recommended reference divider along with
    the new pll algo.
    
    v2: testing options
    
    v3: When using the fixed reference divider with LVDS, prefer
    min m to max p and use fractional feedback dividers.
    
    Fixes:
    https://bugzilla.kernel.org/show_bug.cgi?id=28852
    https://bugzilla.kernel.org/show_bug.cgi?id=24462
    https://bugzilla.kernel.org/show_bug.cgi?id=26552
    MacbookPro issues reported by Justin Mattock <justinmattock@gmail.com>
    
    Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie <airlied@redhat.com>

:040000 040000 8736f993b97cc8370fd29048761a1e0da4969306 657bdb221e3f4da6efdfec02f8f348db5a537b29 M      drivers
Comment 1 Jure Repinc 2011-02-17 00:54:29 UTC
Created attachment 47972 [details]
dmesg
Comment 2 Jure Repinc 2011-02-17 00:55:51 UTC
Created attachment 47982 [details]
lspci
Comment 3 Alex Deucher 2011-02-17 00:58:19 UTC
Can you attach your xorg log and a copy of your vbios?

(as root)
(use lspci to get the bus id)
cd /sys/bus/pci/devices/<pci bus id>
echo 1 > rom
cat rom > /tmp/vbios.rom
echo 0 > rom
Comment 4 Jure Repinc 2011-02-17 01:04:36 UTC
Created attachment 47992 [details]
vbios
Comment 5 Jure Repinc 2011-02-17 01:06:20 UTC
Created attachment 48002 [details]
Xorg.0.log
Comment 6 Alex Deucher 2011-02-17 01:24:30 UTC
Created attachment 48012 [details]
set frac fb div for dce4+

Does this patch help?
Comment 7 Jure Repinc 2011-02-17 01:44:20 UTC
No, unfortunately it doesn't help :(
Comment 8 Alex Deucher 2011-02-17 01:53:58 UTC
Created attachment 48022 [details]
alternate patch

How about this one?
Comment 9 Jure Repinc 2011-02-17 02:06:29 UTC
Yes, this one helped :) Thank you very much!
Comment 10 Alex Deucher 2011-02-17 02:07:23 UTC
Created attachment 48032 [details]
one more

If the patch in comment 8 doesn't work, try this one.  But test the one in comment 8 first.
Comment 11 Alex Deucher 2011-02-17 02:18:55 UTC
Created attachment 48042 [details]
patch for upstream

I've attached the commit I'm sending to Dave.
Comment 12 Rafael J. Wysocki 2011-02-17 22:57:46 UTC
Handled-By : Alex Deucher <alexdeucher@gmail.com>
Patch : https://bugzilla.kernel.org/attachment.cgi?id=48042
Comment 13 Florian Mickler 2011-02-20 00:15:25 UTC
merged for .38-rc6:
commit 9f4283f49f0a96a64c5a45fe56f0f8c942885eef
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Wed Feb 16 21:17:04 2011 -0500

    drm/radeon/kms: add missing frac fb div flag for dce4+

Note You need to log in before you can comment on or make changes to this bug.