Bug 10870 - radeonfb backlight config mismatch
Summary: radeonfb backlight config mismatch
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Console/Framebuffers (show other bugs)
Hardware: All Linux
: P1 low
Assignee: James Simmons
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-06 03:47 UTC by Gokdeniz Karadag
Modified: 2012-05-21 15:45 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.25.4
Subsystem:
Regression: No
Bisected commit-id:


Attachments
patch for CONFIG_PMAC_BACKLIGHT->CONFIG_FB_RADEON_BACKLIGHT (474 bytes, patch)
2008-06-06 05:23 UTC, Gokdeniz Karadag
Details | Diff
.config for 2.6.29 (64.84 KB, text/plain)
2009-06-27 10:56 UTC, Gokdeniz Karadag
Details

Description Gokdeniz Karadag 2008-06-06 03:47:44 UTC
Distribution: Gentoo 
Hardware Environment: ATI Technologies Inc RS300M AGP [Radeon Mobility 9100IGP]

Problem Description:

In the radeon framebuffer driver, drivers/video/aty/radeon_base.c 
CONFIG_PMAC_BACKLIGHT is used to enable/disable backlight support. But in the config file generated by 'menuconfig', CONFIG_FB_RADEON_BACKLIGHT is used for this purpose, PMAC is for Macintosh. This mismatch prevents compilation of radeonfb without backlight support.

The exact lines from Linux Torvalds' git tree as of now
drivers/video/aty/radeon_base.c:
279 #ifdef CONFIG_PMAC_BACKLIGHT
280 static int backlight = 1;
281 #else
282 static int backlight = 0;
283 #endif

Should be
279 #ifdef CONFIG_FB_RADEON_BACKLIGHT

I tested a kernel build with this change applied.
Comment 1 Andrew Morton 2008-06-06 04:02:56 UTC
Please email me a patch?
Comment 2 Gokdeniz Karadag 2008-06-06 05:23:08 UTC
Created attachment 16411 [details]
patch for CONFIG_PMAC_BACKLIGHT->CONFIG_FB_RADEON_BACKLIGHT

generated this patch on Linus' latest tree
Comment 3 Alan 2009-03-25 16:21:33 UTC
Current kernel builds fine with radeonfb and no radeonfb backlight
Comment 4 Gokdeniz Karadag 2009-06-27 10:54:38 UTC
When I try to compile without radeon backlight support. 

I get the following error. When I apply the one-liner patch I provided the error is gone. 

The patch attached to this report.
http://bugzilla.kernel.org/attachment.cgi?id=16411

The error message before the patch with radeon framebuffer backlight disabled

drivers/built-in.o: In function `radeonfb_pci_register':
radeon_base.c:(.devinit.text+0x35c3): undefined reference to `radeonfb_bl_init'
drivers/built-in.o: In function `radeonfb_pci_unregister':
radeon_base.c:(.devexit.text+0xa0): undefined reference to `radeonfb_bl_exit'

If I enable radeon framebuffer backlight before applying the patch, I get this error.

drivers/built-in.o: In function `radeonfb_bl_init':
(.text+0x517f3): undefined reference to `fb_bl_default_curve'

I'm attaching my .config.
Comment 5 Gokdeniz Karadag 2009-06-27 10:56:56 UTC
Created attachment 22122 [details]
.config for 2.6.29

Note thet the fix is still needed in radeon fb code in Linus' latest git tree.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/video/aty/radeon_base.c;h=6c37e8ee5efe04c75bb10fa09ec5186f37233f97;hb=HEAD
Comment 6 James Simmons 2010-02-16 16:52:59 UTC
Patch looks good. Will push upstream.

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