Bug 12494 - Sony backlight regression from 2.6.28 to 29-rc
Sony backlight regression from 2.6.28 to 29-rc
Status: CLOSED CODE_FIX
Product: ACPI
Classification: Unclassified
Component: Power-Video
All Linux
: P1 normal
Assigned To: Zhang Rui
:
Depends on:
Blocks: 12398
  Show dependency treegraph
 
Reported: 2009-01-19 12:43 UTC by Rafael J. Wysocki
Modified: 2009-02-17 12:10 UTC (History)
8 users (show)

See Also:
Kernel Version: 2.6.29-rc
Tree: Mainline
Regression: Yes


Attachments
acpidump output on kernel 2.6.29-rc2 with sony patches (217.75 KB, application/octet-stream)
2009-01-20 03:23 UTC, Norbert Preining
Details
dmesg output of 2.6.28 without patches, and sony_laptop debug=1 (94.66 KB, application/octet-stream)
2009-01-20 05:01 UTC, Norbert Preining
Details
dmesg output of 2.6.29-rc2 without patches, and sony_laptop debug=1 (93.71 KB, application/octet-stream)
2009-01-20 05:02 UTC, Norbert Preining
Details
(ls -l /sys/class/backlight; ls -l /sys/class/backlight/acpi_video0/) output (185 bytes, application/octet-stream)
2009-01-20 05:03 UTC, Norbert Preining
Details
(ls -l /sys/class/backlight; ls -l /sys/class/backlight/acpi_video0/) output (185 bytes, application/octet-stream)
2009-01-20 05:03 UTC, Norbert Preining
Details

Description Rafael J. Wysocki 2009-01-19 12:43:06 UTC
Subject    : Sony backlight regression from 2.6.28 to 29-rc
Submitter  : Norbert Preining <preining@logic.at>
Date       : 2009-01-19 8:14
References : http://marc.info/?l=linux-acpi&m=123235286829512&w=4
Handled-By : Mattia Dongili <malattia@linux.it>

This entry is being used for tracking a regression from 2.6.28.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 ykzhao 2009-01-19 16:59:51 UTC
Will you please attach the output of acpidump?
    Will you please attach the output of /sys/class/baclight/* on the working/failing kernel?
    Thanks.
Comment 2 Mattia Dongili 2009-01-19 19:21:20 UTC
I just want to add that the user mentioned that he was using patches that are not in mainline to have a functional backlight.
No really sure this is a real regression (i.e.: 2.6.28 without those patches wasn't working either).

Norbert can you clarify?

Additionally could you attach the dmesg output from working and non working kernels (possibly with sony-laptop debug=1)?

thanks
-- mattia
Comment 3 Norbert Preining 2009-01-20 03:21:18 UTC
For clarification: I was using 2.6.28-rc9 with the patches from Mattia sent as
   [PATCH 0/7] sony-laptop for acpi-test
plus a patch from Ishikawa-san as discussed in the followup of one of the patches in that series.

I will check the old kernel and build one without the patches and send the output for all of them.

The acpidump is attached.
Comment 4 Norbert Preining 2009-01-20 03:23:48 UTC
Created attachment 19897 [details]
acpidump output on kernel 2.6.29-rc2 with sony patches
Comment 5 Norbert Preining 2009-01-20 05:01:06 UTC
Ok, it is a *real* regression, with 2.6.28 *without* any patches it is working xbacklight is allowing to change the brightness), while with 2.6.29-rc2 without patches it is not working.

I attach the dmesg with loading sony_laptop debug=1 (at the end it is reloaded with debug=1) for both kernels, and the ls of /sys/... stuff.
Comment 6 Norbert Preining 2009-01-20 05:01:57 UTC
Created attachment 19901 [details]
dmesg output of 2.6.28 without patches, and sony_laptop debug=1
Comment 7 Norbert Preining 2009-01-20 05:02:34 UTC
Created attachment 19902 [details]
dmesg output of 2.6.29-rc2 without patches, and sony_laptop debug=1
Comment 8 Norbert Preining 2009-01-20 05:03:22 UTC
Created attachment 19903 [details]
(ls  -l /sys/class/backlight; ls -l /sys/class/backlight/acpi_video0/) output
Comment 9 Norbert Preining 2009-01-20 05:03:41 UTC
Created attachment 19904 [details]
(ls  -l /sys/class/backlight; ls -l /sys/class/backlight/acpi_video0/) output
Comment 10 Mattia Dongili 2009-01-26 16:20:46 UTC
sony-laptop is not involved apparently, you didn't have entries in .28 and the acpi video driver is preferred over the sony-laptop one for brightness control if both methods are available.

The acpi video driver had a couple of changes between .28 and 29-rc2, can you check if reverting them helps?
9e6dada9d255497127251c03aaa59296d186f959
935e5f290ec1eb0f1c15004421f5fd3154380fd5

also, what does xrandr --prop says?

thanks
Comment 11 Norbert Preining 2009-01-26 16:27:05 UTC
Can you send me those patches? I am not git-ified till now.
xrandr --prop shows (after calling xbacklight 50, but brightness still at full)


Screen 0: minimum 320 x 200, current 1600 x 900, maximum 1600 x 1600
VGA disconnected (normal left inverted right x axis y axis)
LVDS connected 1600x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
	PANEL_FITTING: full
		supported: center       full_aspect  full        
	BACKLIGHT_CONTROL: kernel
		supported: native       legacy       combination  kernel      
	BACKLIGHT: 4 (0x00000004) range:  (0,8)
   1600x900       60.0*+
   1440x900       60.2  
   1280x800       60.0  
   1152x864       85.1     75.0  
   1280x768       60.0  
   1152x768       54.8  
   1024x768       85.0     75.0     70.1     60.0  
   832x624        74.6  
   800x600        85.1     72.2     75.0     60.3     56.2  
   640x480        85.0     72.8     75.0     59.9  
   720x400        85.0  
   640x400        85.1  
   640x350        85.1  
TV disconnected (normal left inverted right x axis y axis)
	BOTTOM: 37 (0x00000025) range:  (0,100)
	RIGHT: 46 (0x0000002e) range:  (0,100)
	TOP: 36 (0x00000024) range:  (0,100)
	LEFT: 54 (0x00000036) range:  (0,100)
	TV_FORMAT: NTSC-M
		supported: NTSC-M       NTSC-443     NTSC-J       PAL-M       
		           PAL-N        PAL         
Comment 13 Norbert Preining 2009-01-27 00:23:34 UTC
Haaa, no, these patches are not necessary, neither are any other patch. The real problem was somehow a different .config.

With 2.6.29-rc2 suddenly my i915 drm kernel module was lost, and only with very strange playing around and hand editing of the .config file and activating CONFIG_FB I got it (the drm module) back (btw, I never had CONFIG_FB set till 2.6.28 and it always had worked to get i915 drm module).

I had to add quite some settings and it looks like one of those made the change:

That is the diff from old to new config:
@@ -1358,16 +1358,78 @@
 # CONFIG_DRM_TDFX is not set
 # CONFIG_DRM_R128 is not set
 # CONFIG_DRM_RADEON is not set
-# CONFIG_DRM_I810 is not set
-CONFIG_DRM_I830=y
-# CONFIG_DRM_I915 is not set
+CONFIG_DRM_I810=y
+# CONFIG_DRM_I830 is not set
+CONFIG_DRM_I915=y
+# CONFIG_DRM_I915_KMS is not set
 # CONFIG_DRM_MGA is not set
 # CONFIG_DRM_SIS is not set
 # CONFIG_DRM_VIA is not set
 # CONFIG_DRM_SAVAGE is not set
 # CONFIG_VGASTATE is not set
 CONFIG_VIDEO_OUTPUT_CONTROL=y
-# CONFIG_FB is not set
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB_DDC=y
+CONFIG_FB_BOOT_VESA_SUPPORT=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_VESA=y
+CONFIG_FB_INTEL=y
+CONFIG_FB_INTEL_I2C=y


And, now X also echos something new to the Xorg.0.log:
(II) intel(0): I2C device "LVDSDDC_C:ddc2" registered at address 0xA0.
(II) intel(0): I2C device "LVDSDDC_C:ddc2" removed.

So I assume that it has something to do either with CONFIG_FB_INTEL_I2C or CONFIG_FB_DDC.

But why on earth did that all work out of the box on 2.6.28?

Hope that helps to explain these problems, and someone else finds a proper solution.

Thanks

(BTW I don't consider that fixed,probably anyone having CONFIG_FB disabled in 2.6.28 will have that problem, loosing i915 drm and brightness adjustment)
Comment 14 Rafael J. Wysocki 2009-02-03 15:05:49 UTC
On Tuesday 20 January 2009, Norbert Preining wrote:
> On Mo, 19 Jan 2009, Rafael J. Wysocki wrote:
> > The following bug entry is on the current list of known regressions
> > from 2.6.28.  Please verify if it still should be listed and let me know
> > (either way).
> > 
> > 
> > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=12494
> > Subject		: Sony backlight regression from 2.6.28 to 29-rc
> 
> Yes it is.

Comment 15 Mattia Dongili 2009-02-04 02:34:39 UTC
but this is completely unrelated to sony-laptop now, let me add a couple more Cc-s to see if anyone as a clue (culprit is in comment #13).

Norbert, on your side it would be useful if you could provide the full .28 and .29-rc2 (a.k.a. working and non working .config)

thanks
Comment 16 Zhang Rui 2009-02-04 18:13:37 UTC
Norbert,
there is only one entry in /sys/class/backlight, i.e. /sys/class/backlight/acpi_video0/, in both 2.6.28 and 2.6.29-rc2, right?

will you please poke the /sys/class/backlight/acpi_video0/brightness file and see if it works in 2.6.28 and 2.6.29-rc2?
will you please attach the acpidump output using the latest pmtools at http://www.lesswatts.org/projects/acpi/utilities.php?
Comment 17 Norbert Preining 2009-02-05 06:11:26 UTC
Zhang: yes there is only one entry.

Did you read my comment about the fact that brightness is working again also in 2.6.29-rcN but ONLY after I was able to get DRM back?

So the difference is only that DRM is necessary.

The acpidump is already present in the list of attachements and was made with the latest acpidump.
Comment 18 Zhang Rui 2009-02-08 18:16:46 UTC
so the real problem is that, for the IGD OpRegion BIOS laptops, i915 driver must always be loaded if we want backlight control support, even in console mode, right?
cc jesse and matthew to see if they have any comments.

Mattia, this is not a sony platform driver problem, you can wash your hands of it now. :)
Comment 19 Norbert Preining 2009-02-17 02:49:28 UTC
Ok, with 2.6.29-rc5 (at least) using the old config from 2.6.28 enables all the necessary bits'n'pieces, notably framebuffer support.

So I am closing this bug report. Thanks
Comment 20 Norbert Preining 2009-02-17 02:50:34 UTC
ok, I "WOULD" close this bug report.
Comment 21 Rafael J. Wysocki 2009-02-17 12:24:43 UTC
On Tuesday 17 February 2009, Norbert Preining wrote:
> On Sa, 14 Feb 2009, Rafael J. Wysocki wrote:
> > The following bug entry is on the current list of known regressions
> > from 2.6.28.  Please verify if it still should be listed and let me know
> > (either way).
> > 
> > 
> > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=12494
> > Subject		: Sony backlight regression from 2.6.28 to 29-rc
> > Submitter	: Norbert Preining <preining@logic.at>
> > Date		: 2009-01-19 8:14 (27 days old)
> > References	: http://marc.info/?l=linux-acpi&m=123235286829512&w=4
> > Handled-By	: Mattia Dongili <malattia@linux.it>
> 
> 2.6.29-rc5 activates config_fb automatically, so that should be fixed.


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