On 25.10.2015 04:25, Michael Burian wrote: > hi, > > after updating the kernel from linux-stable[0] v4.2.3 to v4.2.4 on my > hp compaq nx9420 laptop (Debian Jessie, amd64), the backlight is turned off > within the first couple of seconds during boot. > > The situation persists (Xorg seems to be running fine, icons can be recognized > by illuminating the screen with a flashlight) until reboot using an earlier > kernel. > > current mainline[1] as of now (4.3.0-rc6-00277-g01815536) is also affected > > Workaround: use earlier kernel (v4.2.3) or (see below) > > Hardware: > > lspci | grep adeo > 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV530/M56-P [Mobility Radeon X1600] > > git bisect log > # bad: [190bd21bba09ed476d9359d3e8be20e8d9dcd8a4] Linux 4.2.4 > # good: [fcba09f2b0bf27eeaa1d4d439edb649585f35040] Linux 4.2.3 > git bisect start 'v4.2.4' 'v4.2.3' 'drivers/gpu/' > # good: [885838eef785ff810dac945be8132856f2113cf1] drm/amdgpu: make UVD handle checking more strict > git bisect good 885838eef785ff810dac945be8132856f2113cf1 > # good: [230f6fd628c83fcb44ea364d69a9ad88826ef8c4] drm/i915/bios: handle MIPI Sequence Block v3+ gracefully > git bisect good 230f6fd628c83fcb44ea364d69a9ad88826ef8c4 > # bad: [5a633828b4b2bef343826afcb0a70770c4911c55] drm/radeon: Restore LCD backlight level on resume (>= R5xx) > git bisect bad 5a633828b4b2bef343826afcb0a70770c4911c55 > # good: [60a09aef456ef590762d47da9c25650e230e2f85] drm: Reject DRI1 hw lock ioctl functions for kms drivers > git bisect good 60a09aef456ef590762d47da9c25650e230e2f85 > # first bad commit: [5a633828b4b2bef343826afcb0a70770c4911c55] drm/radeon: Restore LCD backlight level on resume (>= R5xx) > > Workaround 2: > > reverting this single commit 5a633828b4b2bef343826afcb0a70770c4911c55 fixes the problem in linux-stable[0] > as well as mainline[1] 4.3.0-rc6-00277-g01815536 Please provide the dmesg output from running with the attached debugging patch. Alex, any other ideas what might go wrong? -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index 65adb9c..31be81e 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -77,9 +77,12 @@ atombios_get_backlight_level(struct radeon_encoder *radeon_encoder) struct drm_device *dev = radeon_encoder->base.dev; struct radeon_device *rdev = dev->dev_private; - if (!(rdev->mode_info.firmware_flags & ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU)) + if (WARN_ON(!(rdev->mode_info.firmware_flags & ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU))) return 0; + DRM_INFO("Backlight controlled by GPU, current level %u\n", + radeon_atom_get_backlight_level_from_reg(rdev)); + return radeon_atom_get_backlight_level_from_reg(rdev); } @@ -93,7 +96,7 @@ atombios_set_backlight_level(struct radeon_encoder *radeon_encoder, u8 level) DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION args; int index; - if (!(rdev->mode_info.firmware_flags & ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU)) + if (WARN_ON(!(rdev->mode_info.firmware_flags & ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU))) return; if ((radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) && @@ -105,6 +108,7 @@ atombios_set_backlight_level(struct radeon_encoder *radeon_encoder, u8 level) switch (radeon_encoder->encoder_id) { case ENCODER_OBJECT_ID_INTERNAL_LVDS: case ENCODER_OBJECT_ID_INTERNAL_LVTM1: + DRM_INFO("Setting LVDS backlight level to %u\n", level); index = GetIndexIntoMasterTable(COMMAND, LCD1OutputControl); if (dig->backlight_level == 0) { args.ucAction = ATOM_LCD_BLOFF; @@ -120,6 +124,7 @@ atombios_set_backlight_level(struct radeon_encoder *radeon_encoder, u8 level) case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: + DRM_INFO("Setting UNIPHY backlight level to %u\n", level); if (dig->backlight_level == 0) atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_LCD_BLOFF, 0, 0); else { @@ -199,7 +204,7 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder, if (!rdev->is_atom_bios) return; - if (!(rdev->mode_info.firmware_flags & ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU)) + if (WARN_ON(!(rdev->mode_info.firmware_flags & ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU))) return; pdata = kmalloc(sizeof(struct radeon_backlight_privdata), GFP_KERNEL);
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel