Bug 88501

Summary: AMD/ATI RS690M Console blanks to white
Product: Drivers Reporter: business.kid
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: NEW ---    
Severity: normal CC: alexdeucher, fepaw95099, mlsemon35, pr0v1d3nc14
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 3.6.0-rc5 to 3.18.0-rc4 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: Git Bisect log, & git visualise o/p
LSPCI -vnn
Kernel Config 3.6.0-rc5+
possible fix
Your patch slightly adjusted

Description business.kid 2014-11-19 15:47:47 UTC
Created attachment 158181 [details]
Git Bisect log, & git visualise o/p

Without X running, linux consoles blank after a period adjustable by setterm. Mine does not. It goes white. If I invert the screen colours, it goes whiter. Backlight?
I cloned the Linus-stable git and tried it. 3.18.0-rc4 twists this slightly - The FIRST time the screen blanks, it does so correctly; every other time, it blanks to white. 
I'm a hardware guy, not a software expert. Git bisect gives the output below. Details of the box also attached

The box is a HP 6715S, twin core Turion, 3G ram. It's running Slackware-current as of Sept 30th, 2014. LSPCI output attached. Bios Version: ATI 02/13/08,1.
Comment 1 business.kid 2014-11-19 15:51:17 UTC
Created attachment 158191 [details]
LSPCI -vnn
Comment 2 business.kid 2014-11-19 16:15:52 UTC
Created attachment 158201 [details]
Kernel Config 3.6.0-rc5+
Comment 3 Alex Deucher 2014-11-19 18:04:33 UTC
Does booting a recent kernel with radeon.backlight=0 fix the issue?
Comment 4 Alex Deucher 2014-11-19 18:17:20 UTC
Created attachment 158211 [details]
possible fix

Does this patch fix the issue (against 3.17 or newer kernel)?
Comment 5 business.kid 2014-11-20 09:10:01 UTC
<Does booting a recent kernel with radeon.backlight=0 fix the issue?>
Yes, this fixes the issue on 3.18-rc4

<Does this patch fix the issue (against 3.17 or newer kernel)?>
No, it does not. I get the same behaviour - first time it blanks to dark, every other time it blanks to white.

I am a very rusty amateur at C, but I will adjust that patch very slightly here and have another go.
Comment 6 business.kid 2014-11-20 15:40:36 UTC
Created attachment 158261 [details]
Your patch slightly adjusted

This seems to work. I know little of C, and less of graphics programming, but I got suspicious of the second 'if' construct inside a chain bracket, so I tweaked syntax. I built it here and tried it.

I now am sorted out, thank you. If you want something else tried, let me know. Otherwise, I assure you, I will *not* be building another kernel on that box for quite some time!
Comment 7 Alex Deucher 2014-11-20 15:52:21 UTC
The code should be fine as is.  Are you sure you tested the right kernel?
Comment 8 business.kid 2014-11-20 17:33:21 UTC
Yes. I tested in order
1. 3.18.0-rc4 with no patch - white 2nd time.
2. 3.18.0-rc4 with the boot option - dark every time
3. 3.18.0-rc4 with your patch applied and no boot option - white 2nd time 
4. 3.18.0-rc4 with a syntax error :-/ module did not load.
5. 3.18.0-rc4 with the attached suggested fix, and no boot option. - dark every time.

I have built ~ 20 kernels in the last few days, and am not keeping any of them. The only reason I edited the patch was that I felt it unsafe to put an 'if' below an 'else' in the same chain bracket. I have met some compilers that don't respond to that as one would expect. I don't know what gcc does, and can't swear that the logic follows correctly. I just tried it.
Comment 9 pr0v1d3nc14 2015-03-09 22:52:08 UTC
Have the same problem and no idea how to patch :( some may help?
RS690M on AMD Thurion 64x2...
Comment 10 Alex Deucher 2015-03-10 00:27:48 UTC
The fix is already upstream.  Alternatively, you can boot with radeon.backlight=0 on the kernel command line in grub.
Comment 11 anonymous 2019-03-05 01:10:22 UTC
https://bugzilla.kernel.org/show_bug.cgi?id=202739 might be a fix.