Bug 51394

Summary: [Regression IVB cpu eDP] eDP shows uncorrectly backlight after booting
Product: DRI Reporter: Guang Yang <guang.a.yang>
Component: DRM/IntelAssignee: Daniel Vetter <daniel>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: medium CC: ben, chris, daniel, jbarnes
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg info after booting
none
booting with bad commit 7cf4160148136deb31ee5f2802857dd935a38529 dmesg info
none
intel_reg_dumper info
none
dmesg info with -queued branch none

Description Guang Yang 2012-06-24 21:40:37 UTC
Created attachment 63421 [details]
dmesg info after booting

System Environment:
--------------------------
Platform:        IvyBridge(chiefriver)
(drm-intel-testing)af7c3e1256db0f0526f6176e68a14ddbe96fab63

Bug detailed description:
-------------------------
The eDP's backlight shows low brightness after grub selecting,I try the hotkey on keyboard and change the value of the "/sys/class/backlight/acpi_video0
/brightness",but all can't help the screen to show normal brightness.
Comment 1 Daniel Vetter 2012-06-25 00:06:36 UTC
Two quick questions:
- do any of the other backlight controls not work, either (especially the intel native one)?
- Can you please check whether this regression has been introduce in -fixes or in -next?
Comment 2 Guang Yang 2012-06-25 01:01:29 UTC
(In reply to comment #1)
> Two quick questions:
> - do any of the other backlight controls not work, either (especially the intel
> native one)?
 Yes,I think so。
> - Can you please check whether this regression has been introduce in -fixes or
> in -next?
 I try and find that -fixes can work well,but bad on -next.
Comment 3 Daniel Vetter 2012-06-25 01:44:43 UTC
Can you check whether reverting 24ded204429fa0f5501

commit 24ded204429fa0f5501d37c63ee35c555c0b75ee
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Jun 5 12:14:54 2012 +0200

    drm/i915: properly enable the blc controller on the right pipe

avoids this regression on ivb?
Comment 4 Guang Yang 2012-06-25 18:28:54 UTC
(In reply to comment #3)
> Can you check whether reverting 24ded204429fa0f5501
> 
> commit 24ded204429fa0f5501d37c63ee35c555c0b75ee
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Tue Jun 5 12:14:54 2012 +0200
> 
>     drm/i915: properly enable the blc controller on the right pipe
> 
> avoids this regression on ivb?
No,the issue still occurs while reverting this commit.
Comment 5 Daniel Vetter 2012-06-26 01:20:37 UTC
Hm, then I don't have an idea where this broke. Can you please run a bisect for this issue?
Comment 6 Daniel Vetter 2012-06-27 03:42:49 UTC
Hm, I see a similar issue on my eDP ivb machine here (asus prime zenbook). But for me the regression already happens on 3.5-rc4, i.e. -fixes ...
Comment 7 Guang Yang 2012-06-27 20:18:27 UTC
(In reply to comment #6)
> Hm, I see a similar issue on my eDP ivb machine here (asus prime zenbook). But
> for me the regression already happens on 3.5-rc4, i.e. -fixes ...
I bisect with -next branch,finally find the first bad commit is:
commit 7cf4160148136deb31ee5f2802857dd935a38529
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Jun 5 10:07:09 2012 +0200

    drm/i915: clear up backlight #define confusion on gen4+

    - Regroup definitions for BLC_PWM_CTL so that they're all together and
      and ordered according to the bitfields.

    - Add all missing definitions for BLC_PWM_CTL2.

    - Use the BLM_ (for backlight modulation) prefix consistently.

    - Note that combination mode (i.e. also taking the legacy backlight
      control value from pci config space into account) is gen4 only.

    - Move the new registers for PCH-split machines up, they're an almost
      match for the gen4 defitions.  Prefix the special PCH-only bits with
      BLM_PCH_. Also add the pipe C select bit for ivb.

    - Rip out the second pair of PCH polarity definitions - they're only
      valid on early (pre-production) ilk silicon.

    - Adapt the existing code to use the new definitions. This has the
      nice benefit of killing a magic (1 << 30) left behind be Jesse
      Barnes.

    No functional changes in this patch.

    Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

:040000 040000 80280715c68c6e6918448fb50bf930ecb871d5f6 

e09f7b173b983bcd40390c2604243a8612665c24 M      drivers
Comment 8 Daniel Vetter 2012-06-28 02:09:25 UTC
Can you please double-check whether the regression has really been introduce in 7cf4160148136deb31ee5f2802857dd935a38529?

I've looked at this commit again and it shouldn't change anything in the code (as the commit message claims).
Comment 9 Guang Yang 2012-06-28 18:48:47 UTC
Created attachment 63584 [details]
booting with bad commit 7cf4160148136deb31ee5f2802857dd935a38529 dmesg info

(In reply to comment #8)
> Can you please double-check whether the regression has really been introduce in
> 7cf4160148136deb31ee5f2802857dd935a38529?
> 
> I've looked at this commit again and it shouldn't change anything in the code
> (as the commit message claims).
Hmm,I have check the commit 7cf4160148136deb31ee5f2802857dd935a38529 and the commit before it ,then find that after the commit 7cf4160148136deb31ee5f2802857dd935a38529 the backlight have problem.I attach the dmesg booting with commit 7cf4160148136deb31ee5f2802857dd935a38529
Comment 10 Daniel Vetter 2012-07-06 02:14:50 UTC
Can you please test what happens when you switch the crtc (you might need to do that blindly or with remote desktop):

xrandr --output eDP1 --auto --crtc 1
xrandr --output eDP1 --auto --crtc 0

Also, please attach the output of intel_reg_dumper _after_ you've run these two commands above.
Comment 11 Guang Yang 2012-07-09 02:36:51 UTC
Created attachment 63994 [details]
intel_reg_dumper info

(In reply to comment #10)
> Can you please test what happens when you switch the crtc (you might need to do
> that blindly or with remote desktop):
> 
> xrandr --output eDP1 --auto --crtc 1
> xrandr --output eDP1 --auto --crtc 0
> 
> Also, please attach the output of intel_reg_dumper _after_ you've run these two
> commands above.
I try with the Kernel: (drm-intel-next-queued)4acf518626cdad5bbf7aac9869bd4accbbfb4ad3 ,the backlight still can't work well.
when I do the first command  xrandr --output eDP1 --auto --crtc 1,the screen turn to black; after doing the second command  xrandr --output eDP1 --auto --crtc 0, the screen turn to light up ,but the backlight can't work well,too. And I attach the info of  intel_reg_dumper after running the two commands.
Comment 12 Daniel Vetter 2012-07-12 09:54:49 UTC
Hm, bisect points at a know-bad commit. The following patch on -queued should fix this

commit b355e230422f0d06d0e34a042dfe33033244e22d
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Jul 11 00:31:06 2012 +0200

    drm/i915: fix up PCH backlight #define mixup

So yeah, the patch actually _did_ change something and your bisect result sounds much more valid - sorry for being this blind and not noticing it early. I'll close this as fixed, please reopen if I'm wrong.
Comment 13 Guang Yang 2012-07-13 01:49:58 UTC
Created attachment 64156 [details]
dmesg info with -queued branch

(In reply to comment #12)
> Hm, bisect points at a know-bad commit. The following patch on -queued should
> fix this
> 
> commit b355e230422f0d06d0e34a042dfe33033244e22d
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Wed Jul 11 00:31:06 2012 +0200
> 
>     drm/i915: fix up PCH backlight #define mixup
> 
> So yeah, the patch actually _did_ change something and your bisect result
> sounds much more valid - sorry for being this blind and not noticing it early.
> I'll close this as fixed, please reopen if I'm wrong.
I try the -queued branch,the issue is gone,so I change the status as verified and attach the dmesg info.
Comment 14 Elizabeth 2017-10-06 14:49:31 UTC
Closing old verified.

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.