Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-02-02 Thread Lars Engels
On Sun, Feb 01, 2015 at 11:23:47AM +0100, Lars Engels wrote:
 On 1. Februar 2015 11:20:26 MEZ, Alexandr Krivulya shur...@shurik.kiev.ua 
 wrote:
 01.02.2015 12:12, Lars Engels пишет:
  On Sun, Feb 01, 2015 at 10:41:25AM +0100, Lars Engels wrote:
  On Sun, Feb 01, 2015 at 03:35:15AM -0600, Andrew Wilcox wrote:
  Lars Engels sent: 01 February 2015 03:18:
  With acpi_video I get some interesting sysctl:
  hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13
 14 15
  16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
 38 39
  40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
 62 63
  64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
 86 87
  88 89 90 91 92 93 94 95 96 97 98 99 100
 
  I guess it should not be 100 100 0 ... 100?
  Actually, the standard internal ACPI brightness level struct
 (BRTN in the DSDT) is laid out as:
 
  * Full power value (one byte, the value at which the brightness
 should be set on AC by default)
  * Economy value (one byte, the value at which the brightness
 should be set on battery by default)
  * Actual values (N bytes, up to Max but frequently not)
 
  So, no, that value indeed sounds correct.  On my laptop the value
 is:
  80 47 0 7 13 20 27 33 40 47 53 60 67 73 80 87 93 100
  Thank you for the explanation.
  FWIW, here is the full output from sysctl hw.acpi.video.lcd0:
 
  hw.acpi.video.lcd0.active: 1
  hw.acpi.video.lcd0.brightness: 11
  hw.acpi.video.lcd0.fullpower: 100
  hw.acpi.video.lcd0.economy: 100
  hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13
 14 15
  16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
 39
  40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
 63
  64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
 87
  88 89 90 91 92 93 94 95 96 97 98 99 100
  hw.acpi.video.crt0.active: 1
  hw.acpi.video.ext0.active: 1
  hw.acpi.video.ext1.active: 1
  hw.acpi.video.ext2.active: 1
  hw.acpi.video.ext3.active: 1
  hw.acpi.video.ext4.active: 1
  hw.acpi.video.ext5.active: 1
 
  What revision of -CURRENT are you running?  What is the outcome of
  trying the patch posted Saturday morning (UTC) from Elizabeth Myers
  (message ID 54cc5311.9070...@interlinked.me)?
 
  I'm currently running r277858 and haven't tried the patch, yet. But
 will
  do now and report back.
 
  So now I have a new sysctl hw.dri.0.i915_backlight. But no matter
 what
  value I pass to it, the brightness doesn't change.
 
  It's a Ivy Brigde notebook where drm shows some errors in dmesg.
 Please
  see: http://pastie.org/9877917
 
 
 
 Please try to boot with acpi_ibm and without acpi_video. This way all
 works for me.
 
 That‘s already what I do. Also tried it with acpi_video without luck.

For the records: With r278102 brightness controls are working again.
Thanks all for helping.


pgpRxf8xrTJKt.pgp
Description: PGP signature


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-02-01 Thread Alexandr Krivulya
01.02.2015 12:12, Lars Engels пишет:
 On Sun, Feb 01, 2015 at 10:41:25AM +0100, Lars Engels wrote:
 On Sun, Feb 01, 2015 at 03:35:15AM -0600, Andrew Wilcox wrote:
 Lars Engels sent: 01 February 2015 03:18:
 With acpi_video I get some interesting sysctl:
 hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
 88 89 90 91 92 93 94 95 96 97 98 99 100

 I guess it should not be 100 100 0 ... 100?
 Actually, the standard internal ACPI brightness level struct (BRTN in the 
 DSDT) is laid out as:

 * Full power value (one byte, the value at which the brightness should be 
 set on AC by default)
 * Economy value (one byte, the value at which the brightness should be 
 set on battery by default)
 * Actual values (N bytes, up to Max but frequently not)

 So, no, that value indeed sounds correct.  On my laptop the value is:
 80 47 0 7 13 20 27 33 40 47 53 60 67 73 80 87 93 100
 Thank you for the explanation.
 FWIW, here is the full output from sysctl hw.acpi.video.lcd0:

 hw.acpi.video.lcd0.active: 1
 hw.acpi.video.lcd0.brightness: 11
 hw.acpi.video.lcd0.fullpower: 100
 hw.acpi.video.lcd0.economy: 100
 hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
 88 89 90 91 92 93 94 95 96 97 98 99 100
 hw.acpi.video.crt0.active: 1
 hw.acpi.video.ext0.active: 1
 hw.acpi.video.ext1.active: 1
 hw.acpi.video.ext2.active: 1
 hw.acpi.video.ext3.active: 1
 hw.acpi.video.ext4.active: 1
 hw.acpi.video.ext5.active: 1

 What revision of -CURRENT are you running?  What is the outcome of
 trying the patch posted Saturday morning (UTC) from Elizabeth Myers
 (message ID 54cc5311.9070...@interlinked.me)?

 I'm currently running r277858 and haven't tried the patch, yet. But will
 do now and report back.

 So now I have a new sysctl hw.dri.0.i915_backlight. But no matter what
 value I pass to it, the brightness doesn't change.

 It's a Ivy Brigde notebook where drm shows some errors in dmesg. Please
 see: http://pastie.org/9877917



Please try to boot with acpi_ibm and without acpi_video. This way all
works for me.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-02-01 Thread Lars Engels
On Sun, Feb 01, 2015 at 10:41:25AM +0100, Lars Engels wrote:
 On Sun, Feb 01, 2015 at 03:35:15AM -0600, Andrew Wilcox wrote:
  Lars Engels sent: 01 February 2015 03:18:
   With acpi_video I get some interesting sysctl:
   hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
   16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
   40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
   64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
   88 89 90 91 92 93 94 95 96 97 98 99 100
   
   I guess it should not be 100 100 0 ... 100?
  
  Actually, the standard internal ACPI brightness level struct (BRTN in the 
  DSDT) is laid out as:
  
  * Full power value (one byte, the value at which the brightness should be 
  set on AC by default)
  * Economy value (one byte, the value at which the brightness should be 
  set on battery by default)
  * Actual values (N bytes, up to Max but frequently not)
  
  So, no, that value indeed sounds correct.  On my laptop the value is:
  80 47 0 7 13 20 27 33 40 47 53 60 67 73 80 87 93 100
 
 Thank you for the explanation.
 FWIW, here is the full output from sysctl hw.acpi.video.lcd0:
 
 hw.acpi.video.lcd0.active: 1
 hw.acpi.video.lcd0.brightness: 11
 hw.acpi.video.lcd0.fullpower: 100
 hw.acpi.video.lcd0.economy: 100
 hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
 88 89 90 91 92 93 94 95 96 97 98 99 100
 hw.acpi.video.crt0.active: 1
 hw.acpi.video.ext0.active: 1
 hw.acpi.video.ext1.active: 1
 hw.acpi.video.ext2.active: 1
 hw.acpi.video.ext3.active: 1
 hw.acpi.video.ext4.active: 1
 hw.acpi.video.ext5.active: 1
 
  
  What revision of -CURRENT are you running?  What is the outcome of
  trying the patch posted Saturday morning (UTC) from Elizabeth Myers
  (message ID 54cc5311.9070...@interlinked.me)?
  
 
 I'm currently running r277858 and haven't tried the patch, yet. But will
 do now and report back.
 

So now I have a new sysctl hw.dri.0.i915_backlight. But no matter what
value I pass to it, the brightness doesn't change.

It's a Ivy Brigde notebook where drm shows some errors in dmesg. Please
see: http://pastie.org/9877917




pgpfUaEvmaEn_.pgp
Description: PGP signature


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-02-01 Thread Lars Engels
On 1. Februar 2015 11:20:26 MEZ, Alexandr Krivulya shur...@shurik.kiev.ua 
wrote:
01.02.2015 12:12, Lars Engels пишет:
 On Sun, Feb 01, 2015 at 10:41:25AM +0100, Lars Engels wrote:
 On Sun, Feb 01, 2015 at 03:35:15AM -0600, Andrew Wilcox wrote:
 Lars Engels sent: 01 February 2015 03:18:
 With acpi_video I get some interesting sysctl:
 hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13
14 15
 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
38 39
 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
62 63
 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
86 87
 88 89 90 91 92 93 94 95 96 97 98 99 100

 I guess it should not be 100 100 0 ... 100?
 Actually, the standard internal ACPI brightness level struct
(BRTN in the DSDT) is laid out as:

 * Full power value (one byte, the value at which the brightness
should be set on AC by default)
 * Economy value (one byte, the value at which the brightness
should be set on battery by default)
 * Actual values (N bytes, up to Max but frequently not)

 So, no, that value indeed sounds correct.  On my laptop the value
is:
 80 47 0 7 13 20 27 33 40 47 53 60 67 73 80 87 93 100
 Thank you for the explanation.
 FWIW, here is the full output from sysctl hw.acpi.video.lcd0:

 hw.acpi.video.lcd0.active: 1
 hw.acpi.video.lcd0.brightness: 11
 hw.acpi.video.lcd0.fullpower: 100
 hw.acpi.video.lcd0.economy: 100
 hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13
14 15
 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
39
 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
63
 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
87
 88 89 90 91 92 93 94 95 96 97 98 99 100
 hw.acpi.video.crt0.active: 1
 hw.acpi.video.ext0.active: 1
 hw.acpi.video.ext1.active: 1
 hw.acpi.video.ext2.active: 1
 hw.acpi.video.ext3.active: 1
 hw.acpi.video.ext4.active: 1
 hw.acpi.video.ext5.active: 1

 What revision of -CURRENT are you running?  What is the outcome of
 trying the patch posted Saturday morning (UTC) from Elizabeth Myers
 (message ID 54cc5311.9070...@interlinked.me)?

 I'm currently running r277858 and haven't tried the patch, yet. But
will
 do now and report back.

 So now I have a new sysctl hw.dri.0.i915_backlight. But no matter
what
 value I pass to it, the brightness doesn't change.

 It's a Ivy Brigde notebook where drm shows some errors in dmesg.
Please
 see: http://pastie.org/9877917



Please try to boot with acpi_ibm and without acpi_video. This way all
works for me.

That‘s already what I do. Also tried it with acpi_video without luck.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-02-01 Thread Lars Engels
On Sat, Jan 31, 2015 at 07:11:23AM +, Miguel Clara wrote:
 On the laptop I'm running current, if relevant
 
 Loading acpi_video doesn't do much  I don't see any sysctl related to
 lcd0 or birightness, this is one of those computers with hybrid
 graphics, intel + ATI card, so not sure if that's somewhat related.
 
 
 Anyway, I've just tested the drm patches (both) and intelbacklight (
 https://github.com/grembo/intel_backlight_fbsd) compiles, installs and runs
 fine!
 
 So thanks both for the patches.

On my X230 I also lost the ability to control brightness with Fn+F8 /
Fn+F9.
With acpi_video I get some interesting sysctl:
hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
88 89 90 91 92 93 94 95 96 97 98 99 100

I guess it should not be 100 100 0 ... 100?

Changing brightness with hw.acpi.video.lcd0.brightness doesn't work.


pgpimanfO7tsz.pgp
Description: PGP signature


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-02-01 Thread Lars Engels
On Sun, Feb 01, 2015 at 03:35:15AM -0600, Andrew Wilcox wrote:
 Lars Engels sent: 01 February 2015 03:18:
  With acpi_video I get some interesting sysctl:
  hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
  40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
  88 89 90 91 92 93 94 95 96 97 98 99 100
  
  I guess it should not be 100 100 0 ... 100?
 
 Actually, the standard internal ACPI brightness level struct (BRTN in the 
 DSDT) is laid out as:
 
 * Full power value (one byte, the value at which the brightness should be 
 set on AC by default)
 * Economy value (one byte, the value at which the brightness should be set 
 on battery by default)
 * Actual values (N bytes, up to Max but frequently not)
 
 So, no, that value indeed sounds correct.  On my laptop the value is:
 80 47 0 7 13 20 27 33 40 47 53 60 67 73 80 87 93 100

Thank you for the explanation.
FWIW, here is the full output from sysctl hw.acpi.video.lcd0:

hw.acpi.video.lcd0.active: 1
hw.acpi.video.lcd0.brightness: 11
hw.acpi.video.lcd0.fullpower: 100
hw.acpi.video.lcd0.economy: 100
hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
88 89 90 91 92 93 94 95 96 97 98 99 100
hw.acpi.video.crt0.active: 1
hw.acpi.video.ext0.active: 1
hw.acpi.video.ext1.active: 1
hw.acpi.video.ext2.active: 1
hw.acpi.video.ext3.active: 1
hw.acpi.video.ext4.active: 1
hw.acpi.video.ext5.active: 1

 
 What revision of -CURRENT are you running?  What is the outcome of
 trying the patch posted Saturday morning (UTC) from Elizabeth Myers
 (message ID 54cc5311.9070...@interlinked.me)?
 

I'm currently running r277858 and haven't tried the patch, yet. But will
do now and report back.




pgpb9IVfFB_TI.pgp
Description: PGP signature


RE: drm2 regression: backlight adjustment on ivybridge no longer works

2015-02-01 Thread Andrew Wilcox
Lars Engels sent: 01 February 2015 03:18:
 With acpi_video I get some interesting sysctl:
 hw.acpi.video.lcd0.levels: 100 100 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
 88 89 90 91 92 93 94 95 96 97 98 99 100
 
 I guess it should not be 100 100 0 ... 100?

Actually, the standard internal ACPI brightness level struct (BRTN in the 
DSDT) is laid out as:

* Full power value (one byte, the value at which the brightness should be set 
on AC by default)
* Economy value (one byte, the value at which the brightness should be set on 
battery by default)
* Actual values (N bytes, up to Max but frequently not)

So, no, that value indeed sounds correct.  On my laptop the value is:
80 47 0 7 13 20 27 33 40 47 53 60 67 73 80 87 93 100

What revision of -CURRENT are you running?  What is the outcome of trying the 
patch posted Saturday morning (UTC) from Elizabeth Myers (message ID 
54cc5311.9070...@interlinked.me)?

Andrew
--
Andrew Wilcox, C/C++/Python developer, kernel hacker
Blog:   http://blog.foxkit.us/  WWW: http://foxkit.us/
GitHub: https://github.com/awilfox


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-31 Thread Miguel Clara
I had to patch manually, for some reason the diff was rejected, but I t
compiled and I've instead on 10/stable... problem is this is the laptop
where I am typing this :D

Its also upgrading some ports, so not a good time to reboot, but I'll post
results in the other thread, as for the HP, works perfect (for me at
least... far better then what I had :) )


% intel_backlight 50
current backlight value: 100% (4882/4882)
set backlight to 50% (2441/4882)
% sysctl -a | grep backlig
hw.dri.0.i915_backlight: 50
% kldstat |grep acpi
 91 0x81fb1000 8708 acpi_video.ko
% sudo sysctl hw.dri.0.i915_backlight=100
hw.dri.0.i915_backlight: 50 - 100
% intel_backlight
current backlight value: 100% (4882/4882




Melhores Cumprimentos // Best Regards
---
*Miguel Clara*
*IT - Sys Admin  Developer*
*E-mail:*miguelmcl...@gmail.com
 www.linkedin.com/in/miguelmclara/

On Sat, Jan 31, 2015 at 7:40 AM, Elizabeth Myers elizab...@interlinked.me
wrote:

 On 01/31/15 01:28, Miguel Clara wrote:
  I saw the discussion about how to approach the issue, but totally missed
  the patch :D
 
  Thanks, I'll try that... I'm assuming it will make no difference on
  10/stable yet? only current?

 Excellent question! I have absolutely no idea. I don't even think it
 applies cleanly. If you can get it to apply and it builds, it just might
 work.

 --
 Cheers,
 Elizabeth

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-31 Thread Elizabeth Myers
On 01/31/15 02:00, Miguel Clara wrote:
 I had to patch manually, for some reason the diff was rejected, but I t
 compiled and I've instead on 10/stable... problem is this is the laptop
 where I am typing this :D
 
 Its also upgrading some ports, so not a good time to reboot, but I'll
 post results in the other thread, as for the HP, works perfect (for me
 at least... far better then what I had :) )

Good to know! If this gets merged (even in modified form), you could ask
about an MFC. I'm not the person to ask about this though, I'm just a
humble peon.

--
Cheers,
Elizabeth

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-30 Thread Miguel Clara
I saw the discussion about how to approach the issue, but totally missed
the patch :D

Thanks, I'll try that... I'm assuming it will make no difference on
10/stable yet? only current?


On Sat, Jan 31, 2015 at 7:22 AM, Elizabeth Myers elizab...@interlinked.me
wrote:

 On 01/31/15 01:11, Miguel Clara wrote:
  On the laptop I'm running current, if relevant
 
  Loading acpi_video doesn't do much  I don't see any sysctl related to
  lcd0 or birightness, this is one of those computers with hybrid
  graphics, intel + ATI card, so not sure if that's somewhat related.
 
 
  Anyway, I've just tested the drm patches (both) and intelbacklight (
  https://github.com/grembo/intel_backlight_fbsd) compiles, installs and
 runs
  fine!
 
  So thanks both for the patches.

 You might be interested in my newest patch to add backlight control to
 sysctl. It's probably better for everyone (imo) that backlight control
 is integrated into the driver and accessible via sysctl, so it works the
 same way for everyone.

 Look for the subject Re: Questions on adding backlight support for the
 i915 driver from me and you'll find the patch. I am curious if it works
 for you.

 --
 Cheers,
 Elizabeth

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-30 Thread Miguel Clara
On the laptop I'm running current, if relevant

Loading acpi_video doesn't do much  I don't see any sysctl related to
lcd0 or birightness, this is one of those computers with hybrid
graphics, intel + ATI card, so not sure if that's somewhat related.


Anyway, I've just tested the drm patches (both) and intelbacklight (
https://github.com/grembo/intel_backlight_fbsd) compiles, installs and runs
fine!

So thanks both for the patches.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-30 Thread Elizabeth Myers
On 01/31/15 01:11, Miguel Clara wrote:
 On the laptop I'm running current, if relevant
 
 Loading acpi_video doesn't do much  I don't see any sysctl related to
 lcd0 or birightness, this is one of those computers with hybrid
 graphics, intel + ATI card, so not sure if that's somewhat related.
 
 
 Anyway, I've just tested the drm patches (both) and intelbacklight (
 https://github.com/grembo/intel_backlight_fbsd) compiles, installs and runs
 fine!
 
 So thanks both for the patches.

You might be interested in my newest patch to add backlight control to
sysctl. It's probably better for everyone (imo) that backlight control
is integrated into the driver and accessible via sysctl, so it works the
same way for everyone.

Look for the subject Re: Questions on adding backlight support for the
i915 driver from me and you'll find the patch. I am curious if it works
for you.

--
Cheers,
Elizabeth
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-30 Thread Elizabeth Myers
On 01/31/15 01:28, Miguel Clara wrote:
 I saw the discussion about how to approach the issue, but totally missed
 the patch :D
 
 Thanks, I'll try that... I'm assuming it will make no difference on
 10/stable yet? only current?

Excellent question! I have absolutely no idea. I don't even think it
applies cleanly. If you can get it to apply and it builds, it just might
work.

--
Cheers,
Elizabeth
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-29 Thread Ranjan1018 .
2015-01-28 10:11 GMT+01:00 Adrian Chadd adr...@freebsd.org:

 ugh, so because i can't sleep, I read the Linux i915 history for
 backlight changes.

 Turns out if I disable bit 30 in ivb_pch_pwm_override() to register
 BLC_PWM_PCH_CTL1, the acpi video setting works. The keyboard settings
 still don't, but I'll worry about that later.

 Bit 30 in the linux drm code is:

 #define   BLM_PCH_OVERRIDE_ENABLE   (1  30)

 The linux dri code doesn't set that for ivybridge - only for broadwell.

 (also, the linux driver has POSTING_READ() which I'm guessing is to
 ensure things made it out to the device and have been flushed before
 doing another IO operation.)

 I have my (via sysctl) panel backlight control working again.



 -adrian


Thank you guys,
the backlight control works again on my laptop with this patch, suggested
by Adrian :

--- sys/dev/drm2/i915/intel_display.c.orig   (revision 277487)
+++ sys/dev/drm2/i915/intel_display.c(working copy)
@@ -6995,7 +6995,7 @@
  */
 I915_WRITE(BLC_PWM_CPU_CTL2, PWM_ENABLE);
 I915_WRITE(BLC_PWM_CPU_CTL, 0);
-I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE | (130));
+I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE);
 }

 void intel_modeset_init_hw(struct drm_device *dev)

but the patch by Andrew does not hurts:
http://foxkit.us/FreeBSD/i915-uninitialised-var-fix.diff

I am running r277871 with both patches applied.

Regards,
Maurizio
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-29 Thread Alexandr Krivulya
29.01.2015 12:46, Ranjan1018 . пишет:
 2015-01-28 10:11 GMT+01:00 Adrian Chadd adr...@freebsd.org:

 ugh, so because i can't sleep, I read the Linux i915 history for
 backlight changes.

 Turns out if I disable bit 30 in ivb_pch_pwm_override() to register
 BLC_PWM_PCH_CTL1, the acpi video setting works. The keyboard settings
 still don't, but I'll worry about that later.

 Bit 30 in the linux drm code is:

 #define   BLM_PCH_OVERRIDE_ENABLE   (1  30)

 The linux dri code doesn't set that for ivybridge - only for broadwell.

 (also, the linux driver has POSTING_READ() which I'm guessing is to
 ensure things made it out to the device and have been flushed before
 doing another IO operation.)

 I have my (via sysctl) panel backlight control working again.



 -adrian

 Thank you guys,
 the backlight control works again on my laptop with this patch, suggested
 by Adrian :

 --- sys/dev/drm2/i915/intel_display.c.orig   (revision 277487)
 +++ sys/dev/drm2/i915/intel_display.c(working copy)
 @@ -6995,7 +6995,7 @@
   */
  I915_WRITE(BLC_PWM_CPU_CTL2, PWM_ENABLE);
  I915_WRITE(BLC_PWM_CPU_CTL, 0);
 -I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE | (130));
 +I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE);
  }

  void intel_modeset_init_hw(struct drm_device *dev)


This patch fixes problem for me too, but only when acpi_video module is
not loaded. With acpi_video loaded I still see this errors (but it's
probably another topic):

Jan 29 19:02:27 thinkpad kernel: ACPI Exception: AE_AML_PACKAGE_LIMIT,
Index (0x000FF) is beyond end of object (length 0x16)
(20140926/exoparg2-452)
Jan 29 19:02:27 thinkpad kernel: ACPI Error: Method parse/execution
failed [\_SB_.PCI0.LPCB.EC0_.BRNS] (Node 0xf80007541b00),
AE_AML_PACKAGE_LIMIT (20140926/psparse-552)
Jan 29 19:02:27 thinkpad kernel: ACPI Error: Method parse/execution
failed [\_SB_.PCI0.VID_.LCD0._BCM] (Node 0xf80007550280),
AE_AML_PACKAGE_LIMIT (20140926/psparse-552)
Jan 29 19:02:27 thinkpad kernel: can't evaluate
\_SB_.PCI0.VID_.LCD0._BCM - AE_AML_PACKAGE_LIMIT
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-28 Thread Adrian Chadd
ugh, so because i can't sleep, I read the Linux i915 history for
backlight changes.

Turns out if I disable bit 30 in ivb_pch_pwm_override() to register
BLC_PWM_PCH_CTL1, the acpi video setting works. The keyboard settings
still don't, but I'll worry about that later.

Bit 30 in the linux drm code is:

#define   BLM_PCH_OVERRIDE_ENABLE   (1  30)

The linux dri code doesn't set that for ivybridge - only for broadwell.

(also, the linux driver has POSTING_READ() which I'm guessing is to
ensure things made it out to the device and have been flushed before
doing another IO operation.)

I have my (via sysctl) panel backlight control working again.



-adrian
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-28 Thread Adrian Chadd
Hi!

Good catch! But nope, didn't fix it.



-adrian


On 27 January 2015 at 23:23, Andrew Wilcox awil...@wilcox-tech.com wrote:
 Ranjan1018 . sent: 27 January 2015 23:42:
 The regression was introduced in r277487.

 Looking closer at this revision, I believe I may see the issue.  Most of the 
 new tunables introduced in dev/drm2/i915/i915_drv.c are uninitialised and 
 thus probably contain junk.  It likely works for me because the firmware of 
 my laptop 0s memory on EFI boot.

 I have uploaded a diff here that I believe may fix this.  Please test and let 
 me know:

 http://foxkit.us/FreeBSD/i915-uninitialised-var-fix.diff

 Best,
 Andrew

 --
 Andrew Wilcox, C/C++/Python developer, kernel hacker
 Blog:   http://blog.foxkit.us/  WWW: http://foxkit.us/
 GitHub:  https://github.com/awilfox



 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-28 Thread Adrian Chadd
and the commit from linux:

commit 7aa1e7f06d6ea1bce3b27630d50769d13da28b1a
Author: Daniel Vetter daniel.vet...@ffwll.ch
Date:   Wed Jun 27 16:43:36 2012 +0200

Revert drm/i915: allow PCH PWM override on IVB

This reverts commit f82cfb6bcda164ef3a66b8c3fc549b1f9bdd09ad.

This breaks the backlight controls on my IVB asus zenbook with an eDP
panel.

I guess the right fix would be to read this bit and use either the pch
or the cpu register to frob the backlight values. But that is stuff
for -next.

Cc: Jesse Barnes jbar...@virtuousgeek.org
Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch



On 28 January 2015 at 01:11, Adrian Chadd adr...@freebsd.org wrote:
 ugh, so because i can't sleep, I read the Linux i915 history for
 backlight changes.

 Turns out if I disable bit 30 in ivb_pch_pwm_override() to register
 BLC_PWM_PCH_CTL1, the acpi video setting works. The keyboard settings
 still don't, but I'll worry about that later.

 Bit 30 in the linux drm code is:

 #define   BLM_PCH_OVERRIDE_ENABLE   (1  30)

 The linux dri code doesn't set that for ivybridge - only for broadwell.

 (also, the linux driver has POSTING_READ() which I'm guessing is to
 ensure things made it out to the device and have been flushed before
 doing another IO operation.)

 I have my (via sysctl) panel backlight control working again.



 -adrian
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


RE: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-27 Thread Andrew Wilcox
Ranjan1018 . sent: 27 January 2015 23:42:
 The regression was introduced in r277487.

Looking closer at this revision, I believe I may see the issue.  Most of the 
new tunables introduced in dev/drm2/i915/i915_drv.c are uninitialised and thus 
probably contain junk.  It likely works for me because the firmware of my 
laptop 0s memory on EFI boot.

I have uploaded a diff here that I believe may fix this.  Please test and let 
me know:

http://foxkit.us/FreeBSD/i915-uninitialised-var-fix.diff

Best,
Andrew

--
Andrew Wilcox, C/C++/Python developer, kernel hacker
Blog:   http://blog.foxkit.us/  WWW: http://foxkit.us/
GitHub:  https://github.com/awilfox



___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


RE: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-27 Thread Andrew Wilcox
Ranjan1018 . sent: 27 January 2015 23:42:
 my Samsung laptop has an Intel IvyBridge: [snip]
 The regression was introduced in r277487.
 The backlight adjustment works in FreeBSD 11.0-CURRENT r277395, r277486
 but not in r277487, r277534 and r277639.

Hrm.  That is interesting.  A few questions I have then.

- What happens if you set drm.i915.invert_brightness to -1 in kenv(1) or 
/boot/loader.conf?

- What happens if you set drm.i915.invert_brightness to 1 in kenv(1) or 
/boot/loader.conf?

- What version of graphics/libdrm do you have installed?  Did you rebuild it 
after installing the new kernel?  (This shouldn't be necessary, but I am trying 
to gather all details.)

Let's start there and see if we can pin down a cause.

Best,
Andrew
--
Andrew Wilcox, C/C++/Python developer, kernel hacker
Blog:   http://blog.foxkit.us/  WWW: http://foxkit.us/
GitHub:  https://github.com/awilfox

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-27 Thread Ranjan1018 .
2015-01-27 7:38 GMT+01:00 Andrew Wilcox awil...@wilcox-tech.com:

 Ranjan1018 . sent: 26 January 2015 06:19:
  2015-01-24 23:25 GMT+01:00 Adrian Chadd adr...@freebsd.org:
   The backlight adjustment doesn't work on my ivybridge mobile laptop
   (Lenovo X230) after the dri update.
  
  I have the same issue on my Samsung Ativ 2 laptop.

 I have a Sandy Bridge laptop (Apple MacBook Pro 8,2) - HD 3000:

 vgapci0@pci0:0:2:0: class=0x03 card=0x00db106b chip=0x01268086
 rev=0x09 hdr=0x00
 vendor = 'Intel Corporation'
 device = '2nd Generation Core Processor Family Integrated Graphics
 Controller'
 class  = display
 subclass   = VGA

 It is running:  FreeBSD pwyll.foxkit.us 11.0-CURRENT #1 r277781M: Mon Jan
 26 18:41:15 CST 2015 r...@pwyll.foxkit.us:/usr/obj/usr/src/sys/GENERIC
 amd64

 I have no issues using acpi_video's sysctls
 (hw.acpi.video.lcd0.brightness) to adjust backlight, though it does not
 have good granularity.  The stepping is about 7, so it goes as
 13%..20%..27%..35%..etc.

   The intel_backlight program from intel-gpu-tools also no longer
   changes the backlight value.

 This program works fine for me on both an older kernel (r277523) and this
 kernel (r277781), after applying some patches to allow the library to build
 on FreeBSD.  It also has better granularity (the stepping is 2-3).

 If there is anything I can do/run to aide in debugging why it works for me
 but not others, let me know.

 Best,
 Andrew
 --
 Andrew Wilcox, C/C++/Python developer, kernel hacker
 Blog:   http://blog.foxkit.us/  WWW: http://foxkit.us/
 GitHub:  https://github.com/awilfox

 Hi,
my Samsung laptop has an Intel IvyBridge:
vgapci0@pci0:0:2:0: class=0x03 card=0xc708144d chip=0x01668086
rev=0x09 hdr=0x00
vendor = 'Intel Corporation'
device = '3rd Gen Core processor Graphics Controller'
class  = display
subclass   = VGA

The regression was introduced in r277487.
The backlight adjustment works in FreeBSD 11.0-CURRENT r277395, r277486 but
not in r277487, r277534 and r277639.

Regards,
Maurizio
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-26 Thread Ranjan1018 .
2015-01-24 23:25 GMT+01:00 Adrian Chadd adr...@freebsd.org:

 Hi,

 I've just found a regression.

 The backlight adjustment doesn't work on my ivybridge mobile laptop
 (Lenovo X230) after the dri update.

 I've added debugging. It's making it all the way to the pch backlight
 panel update routine in intel_panel.c, but it's not changing the
 backlight appearance itself.

 The intel_backlight program from intel-gpu-tools also no longer
 changes the backlight value.

 I'm going to finish rebuilding -HEAD on the sandy bridge laptop here
 and try it out.

 Thanks,



 -adrian


Hi,
I have the same issue on my Samsung Ativ 2 laptop.

Regards,
Maurizio
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


RE: drm2 regression: backlight adjustment on ivybridge no longer works

2015-01-26 Thread Andrew Wilcox
Ranjan1018 . sent: 26 January 2015 06:19:
 2015-01-24 23:25 GMT+01:00 Adrian Chadd adr...@freebsd.org:
  The backlight adjustment doesn't work on my ivybridge mobile laptop 
  (Lenovo X230) after the dri update.
 
 I have the same issue on my Samsung Ativ 2 laptop.

I have a Sandy Bridge laptop (Apple MacBook Pro 8,2) - HD 3000:

vgapci0@pci0:0:2:0: class=0x03 card=0x00db106b chip=0x01268086 rev=0x09 
hdr=0x00
vendor = 'Intel Corporation'
device = '2nd Generation Core Processor Family Integrated Graphics 
Controller'
class  = display
subclass   = VGA

It is running:  FreeBSD pwyll.foxkit.us 11.0-CURRENT #1 r277781M: Mon Jan 26 
18:41:15 CST 2015 r...@pwyll.foxkit.us:/usr/obj/usr/src/sys/GENERIC amd64

I have no issues using acpi_video's sysctls (hw.acpi.video.lcd0.brightness) to 
adjust backlight, though it does not have good granularity.  The stepping is 
about 7, so it goes as 13%..20%..27%..35%..etc.

  The intel_backlight program from intel-gpu-tools also no longer 
  changes the backlight value.

This program works fine for me on both an older kernel (r277523) and this 
kernel (r277781), after applying some patches to allow the library to build on 
FreeBSD.  It also has better granularity (the stepping is 2-3).

If there is anything I can do/run to aide in debugging why it works for me but 
not others, let me know.

Best,
Andrew
--
Andrew Wilcox, C/C++/Python developer, kernel hacker
Blog:   http://blog.foxkit.us/  WWW: http://foxkit.us/ 
GitHub:  https://github.com/awilfox

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org