/sys/class/backlight/intel_backlight was available on a Toshiba CB35 Chromebook during the 3.14 series kernels, but disappeared with the release of 3.15. Bisecting identified the cause as: commit b93124202fc10450a923e24cb052cacb40b2aa46 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux With the following patch (just for testing), the backlight is available again and works as expected. diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index aff4a11..6743817 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -302,7 +302,7 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) entry = &backlight_data->data[panel_type]; - dev_priv->vbt.backlight.present = entry->type == BDB_BACKLIGHT_TYPE_PWM; + dev_priv->vbt.backlight.present = entry->type == BDB_BACKLIGHT_TYPE_NONE; if (!dev_priv->vbt.backlight.present) { DRM_DEBUG_KMS("PWM backlight not present in VBT (type %u)\n", entry->type); Linux 3.15 dmesg ---------------- Jun 08 23:28:00 pc kernel: [drm:i915_dump_device_info] i915 device info: gen=7, pciid=0x0a06 flags=is_mobile,need_gfx_hws,is_haswell,has_fbc,has_hotplug,has_llc,has_ddi,has_fpga_dbg, ... Jun 08 23:28:00 pc kernel: [drm:parse_general_features] BDB_GENERAL_FEATURES int_tv_support 0 int_crt_support 0 lvds_use_ssc 0 lvds_ssc_freq 120000 display_clock_mode 0 fdi_rx_polarity_inverted 0 Jun 08 23:28:00 pc kernel: [drm:parse_general_definitions] crt_ddc_bus_pin: 0 Jun 08 23:28:00 pc kernel: [drm:parse_lfp_panel_data] Found panel mode in BIOS VBT tables: Jun 08 23:28:00 pc kernel: [drm:drm_mode_debug_printmodeline] Modeline 0:"1366x768" 0 70000 1366 1402 1438 1476 768 772 780 790 0x8 0xa Jun 08 23:28:00 pc kernel: [drm:parse_lfp_panel_data] VBT initial LVDS value 300300 Jun 08 23:28:00 pc kernel: [drm:parse_lfp_backlight] PWM backlight not present in VBT (type 0) Jun 08 23:28:00 pc kernel: [drm:parse_sdvo_panel_data] Found SDVO panel mode in BIOS VBT tables: Jun 08 23:28:00 pc kernel: [drm:drm_mode_debug_printmodeline] Modeline 0:"1600x1200" 0 162000 1600 1664 1856 2160 1200 1201 1204 1250 0x8 0xa Jun 08 23:28:00 pc kernel: [drm:parse_sdvo_device_mapping] No SDVO device info is found in VBT Jun 08 23:28:00 pc kernel: [drm:parse_mipi] No MIPI BDB found Jun 08 23:28:00 pc kernel: [drm:parse_ddi_port] Port A VBT info: DP:1 HDMI:0 DVI:0 EDP:1 CRT:0 Jun 08 23:28:00 pc kernel: [drm:parse_ddi_port] VBT HDMI level shift for port A: 0 Jun 08 23:28:00 pc kernel: [drm:parse_ddi_port] Port B VBT info: DP:0 HDMI:1 DVI:1 EDP:0 CRT:0 Jun 08 23:28:00 pc kernel: [drm:parse_ddi_port] VBT HDMI level shift for port B: 6 ... Jun 08 23:28:00 pc kernel: [drm:_edp_panel_vdd_on] Turning eDP VDD on Jun 08 23:28:00 pc kernel: [drm:_edp_panel_vdd_on] PP_STATUS: 0x80000008 PP_CONTROL: 0xabcd000f Jun 08 23:28:00 pc kernel: [drm:intel_dp_get_dpcd] DPCD: 11 0a 81 01 00 00 01 80 02 00 00 00 00 01 00 Jun 08 23:28:00 pc kernel: [drm:intel_dp_init_panel_power_sequencer_registers] panel power sequencer register settings: PP_ON 0x7d00001, PP_OFF 0x1f40001, PP_DIV 0x4af06 Jun 08 23:28:00 pc kernel: [drm:drm_edid_to_eld] ELD: no CEA Extension found Jun 08 23:28:00 pc kernel: [drm:intel_panel_setup_backlight] native backlight control not available per VBT Linux 3.15 dmesg with patch --------------------------- Jun 09 00:23:59 pc kernel: [drm:i915_dump_device_info] i915 device info: gen=7, pciid=0x0a06 flags=is_mobile,need_gfx_hws,is_haswell,has_fbc,has_hotplug,has_llc,has_ddi,has_fpga_dbg, ... Jun 09 00:23:59 pc kernel: [drm:parse_general_features] BDB_GENERAL_FEATURES int_tv_support 0 int_crt_support 0 lvds_use_ssc 0 lvds_ssc_freq 120000 display_clock_mode 0 fdi_rx_polarity_inverted 0 Jun 09 00:23:59 pc kernel: [drm:parse_general_definitions] crt_ddc_bus_pin: 0 Jun 09 00:23:59 pc kernel: [drm:parse_lfp_panel_data] Found panel mode in BIOS VBT tables: Jun 09 00:23:59 pc kernel: [drm:drm_mode_debug_printmodeline] Modeline 0:"1366x768" 0 70000 1366 1402 1438 1476 768 772 780 790 0x8 0xa Jun 09 00:23:59 pc kernel: [drm:parse_lfp_panel_data] VBT initial LVDS value 300300 Jun 09 00:23:59 pc kernel: [drm:parse_lfp_backlight] VBT backlight PWM modulation frequency 200 Hz, active high, min brightness 0, level 255 Jun 09 00:23:59 pc kernel: [drm:parse_sdvo_panel_data] Found SDVO panel mode in BIOS VBT tables: Jun 09 00:23:59 pc kernel: [drm:drm_mode_debug_printmodeline] Modeline 0:"1600x1200" 0 162000 1600 1664 1856 2160 1200 1201 1204 1250 0x8 0xa Jun 09 00:23:59 pc kernel: [drm:parse_sdvo_device_mapping] No SDVO device info is found in VBT Jun 09 00:23:59 pc kernel: [drm:parse_mipi] No MIPI BDB found Jun 09 00:23:59 pc kernel: [drm:parse_ddi_port] Port A VBT info: DP:1 HDMI:0 DVI:0 EDP:1 CRT:0 Jun 09 00:23:59 pc kernel: [drm:parse_ddi_port] VBT HDMI level shift for port A: 0 Jun 09 00:23:59 pc kernel: [drm:parse_ddi_port] Port B VBT info: DP:0 HDMI:1 DVI:1 EDP:0 CRT:0 Jun 09 00:23:59 pc kernel: [drm:parse_ddi_port] VBT HDMI level shift for port B: 6 ... Jun 09 00:23:59 pc kernel: [drm:intel_panel_setup_backlight] backlight initialized, enabled, brightness 937/937, sysfs interface registered ... Jun 09 00:23:59 pc kernel: [drm:intel_panel_actually_set_backlight] set backlight PWM = 0 ... Jun 09 00:24:00 pc kernel: [drm:intel_panel_actually_set_backlight] set backlight PWM = 937 ... Jun 09 00:24:00 pc kernel: [drm:intel_backlight_device_update_status] updating intel_backlight, brightness=900/937 Jun 09 00:24:00 pc kernel: [drm:intel_panel_actually_set_backlight] set backlight PWM = 900
Either the bios is incorrect on your machine, or we are interpreting that version of the bios incorrectly. If it is just a bad bios, you will need to quirk.
Caused by commit c675949ec58ca50d5a3ae3c757892f1560f6e896 Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Apr 9 11:31:37 2014 +0300 drm/i915: do not setup backlight if not available according to VBT There are plenty of machines that have a dedicated EC for backlight control, and break if we provide a backlight interface and touch the backlight registers. The way to provide the information to the kernel is the VBT.
How would this problem be fixed on my machine? Do I need to submit a patch to enable a "quirk mode" for it? Or maybe there is already a kernel command line option that solves this problem?
How would this problem be fixed on my machine? Do I need to submit a patch to enable a quirk mode for it? Or maybe there is already a kernel command line option that solves this problem?
An Acer C720 user has confirmed this diagnostic patch has restored their backlight functionality that disappeared in 3.15. The Acer C720 is another Haswell generation Chromebook that uses coreboot with seabios.
Please attach /sys/kernel/debug/dri/0/i915_opregion.
I think we need to treat this as a regression and fix it one way or another.
Same bisect result but likely different fix required: https://bugzilla.kernel.org/show_bug.cgi?id=77831
/sys/kernel/debug/dri/0/i915_opregion has length 0 bytes under both 3.14.4 (where backlight works) and 3.15.0 (where it doesn't). Just for the record (in regard to the kernel.org bugzilla report) apple_bl isn't loaded on the chromebook.
Hmm, please attach dmesg with drm.debug=0xe module parameter set all the way from boot.
Please attach the dump produced by intel_bios_dumper tool from the intel-gpu-tools package: http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/
Created attachment 101189 [details] dmesg output with drm.debug=0xe, acer c720 3.15
Created attachment 101190 [details] intel bios dump, acer c720, 3.15
Is the patch in the first post the best there is at the moment?
Created attachment 101223 [details] [review] Revert "drm/i915: do not setup backlight if not available according to VBT" (In reply to comment #14) > Is the patch in the first post the best there is at the moment? If you want to run a patched system, the attached patch is better. I am still hesitant to merge it, as it will regress a load of other systems. Still trying to figure out a better alternative.
Created attachment 101229 [details] vbios for 3.14 with working backlight
Created attachment 101230 [details] vbios for 3.15 with no backlight control
Created attachment 101231 [details] dmesg for 3.15 with no backlight control
It looks like the chromebooks aren't adding the backlight control because the VBT size check passes but the VBT says there is no backlight. Do we know of any other machines besides the chromebooks with this exact problem? If not, maybe a quirk would be the best approach? I think I know how to identify the machines in question.
(In reply to comment #19) > It looks like the chromebooks aren't adding the backlight control because > the VBT size check passes but the VBT says there is no backlight. Yes. Either the VBT is wrong or we're interpreting the VBT wrong. I'm still waiting on an enquiry about the latter possibility.
Chromebooks generally don't have fully configured VBTs, so we'll probably need a DMI match table for them, or some other detection method. Starting with the BYT chromebooks, the VBTs will have a bit more info, but we still rely on the OEMs to program it, so it'll likely only have the bare minimum set of info required to get Chrome up and running with the Chrome kernel, so there may be missing or uninitialized fields relative to a typical PC.
Jani, do you have a preference as to who writes the patch? Here's some DMI information for Haswell Chromebook laptops. DMI_BIOS_VENDOR all four laptops = "coreboot" DMI_PRODUCT_NAME Acer C720 = "Peppy" Dell Chromebook 11 = "Wolf" HP Chromebook 14 = "Falco" Toshiba CB35 = "Leon"
As far as I can tell, those are the only four Haswell Chromebooks.
I'm working on a patch. If anyone with an HP 14 Chromebook or Dell 11 Chromebook would like to help, please post the output from: sudo dmidecode|grep Product sudo lspci -vnn|grep -A 10 "Graphics Controller"
Created attachment 101813 [details] [review] Patch against Linux 3.16-rc2
Created attachment 101814 [details] [review] Patch against drm-intel-nightly
Looking for testers for the patch posted today (either against 3.16-rc2 or drm-intel-nightly) by users of Acer C720, Dell 11, HP 14, and Toshiba CB35 Chromebooks. Thanks!
Scot, please submit your patch (against drm-intel-nightly) to the intel-gfx mailing list for a wider audience. Thanks.
Created attachment 101879 [details] dmidecode/product & lscpi/vga
macbook 4,1 also affected.
Comment on attachment 101879 [details] dmidecode/product & lscpi/vga kernel 3.13.x all works kernel 3.14.x black screen at kernel boot time, but restored by init programs kernel 3.15.x screen to full bright and not backlight
(In reply to comment #29) > Created attachment 101879 [details] > dmidecode/product & lscpi/vga
damocles, have you seen https://bugzilla.kernel.org/show_bug.cgi?id=77831 ?
Patches applied to drm-intel-fixes
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.