All of lore.kernel.org
 help / color / mirror / Atom feed
* i915 native backlight never got merged
@ 2011-08-08 18:54 Kamal Mostafa
  2011-08-08 21:27 ` Keith Packard
  0 siblings, 1 reply; 26+ messages in thread
From: Kamal Mostafa @ 2011-08-08 18:54 UTC (permalink / raw)
  To: intel-gfx, Matthew Garrett; +Cc: Andrew Morton


[-- Attachment #1.1: Type: text/plain, Size: 706 bytes --]

Several months ago, Matthew Garrett submitted a set of backlight
patches[1], all but one of which landed in 2.6.39-rc1.  The one that
never did get merged is the bit that exposes the "intel_backlight"
interface:

        [PATCH 2/5] i915: Add native backlight control
        http://lists.freedesktop.org/archives/intel-gfx/2011-January/009207.html

So what happened to that patch?  Did it get lost or is it stuck
somewhere?  I humbly ask that it be re-reviewed and pushed upstream.

 -Kamal

[1] 
        [PATCH 1/5] Backlight: Add backlight type
        http://lists.freedesktop.org/archives/intel-gfx/2011-January/009208.html
        commit ef22f6a70c9186c8e25f757b0e8f7374b37f69bf



[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-08 18:54 i915 native backlight never got merged Kamal Mostafa
@ 2011-08-08 21:27 ` Keith Packard
  2011-08-08 21:31   ` Matthew Garrett
  0 siblings, 1 reply; 26+ messages in thread
From: Keith Packard @ 2011-08-08 21:27 UTC (permalink / raw)
  To: Kamal Mostafa, intel-gfx, Matthew Garrett; +Cc: Andrew Morton


[-- Attachment #1.1: Type: text/plain, Size: 320 bytes --]

On Mon, 08 Aug 2011 11:54:22 -0700, Kamal Mostafa <kamal@canonical.com> wrote:

> So what happened to that patch?  Did it get lost or is it stuck
> somewhere?  I humbly ask that it be re-reviewed and pushed upstream.

Afraid it was forgotten -- Matthew, is this patch still useful?

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-08 21:27 ` Keith Packard
@ 2011-08-08 21:31   ` Matthew Garrett
  2011-08-08 22:43     ` Keith Packard
  0 siblings, 1 reply; 26+ messages in thread
From: Matthew Garrett @ 2011-08-08 21:31 UTC (permalink / raw)
  To: Keith Packard; +Cc: intel-gfx, Andrew Morton

On Mon, Aug 08, 2011 at 02:27:46PM -0700, Keith Packard wrote:
> On Mon, 08 Aug 2011 11:54:22 -0700, Kamal Mostafa <kamal@canonical.com> wrote:
> 
> > So what happened to that patch?  Did it get lost or is it stuck
> > somewhere?  I humbly ask that it be re-reviewed and pushed upstream.
> 
> Afraid it was forgotten -- Matthew, is this patch still useful?

Yup. There's a small set of systems that appear to provide no firmware 
control mechanism.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-08 21:31   ` Matthew Garrett
@ 2011-08-08 22:43     ` Keith Packard
  2011-08-10 13:14       ` Michel Alexandre Salim
  0 siblings, 1 reply; 26+ messages in thread
From: Keith Packard @ 2011-08-08 22:43 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: intel-gfx, Andrew Morton


[-- Attachment #1.1: Type: text/plain, Size: 320 bytes --]

On Mon, 8 Aug 2011 22:31:40 +0100, Matthew Garrett <mjg59@srcf.ucam.org> wrote:

> Yup. There's a small set of systems that appear to provide no firmware 
> control mechanism.

There were a few comments in that old thread about the patch as
submitted; is there an updated version?

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-08 22:43     ` Keith Packard
@ 2011-08-10 13:14       ` Michel Alexandre Salim
  2011-08-10 14:53         ` Keith Packard
  0 siblings, 1 reply; 26+ messages in thread
From: Michel Alexandre Salim @ 2011-08-10 13:14 UTC (permalink / raw)
  To: Keith Packard; +Cc: intel-gfx, Andrew Morton

On 08/09/2011 12:43 AM, Keith Packard wrote:
> On Mon, 8 Aug 2011 22:31:40 +0100, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> 
>> Yup. There's a small set of systems that appear to provide no firmware 
>> control mechanism.
> 
> There were a few comments in that old thread about the patch as
> submitted; is there an updated version?
> 
The last patch I could find is in linux-next's next-20110726 tag; looks
like it disappeared from Matthew's git tree afterwards, and thus not in
any subsequent linux-next tags.

commit fa7419eee713b989e2c268c7b06ec9a544a2b647
Author: Matthew Garrett <mjg@redhat.com>
Date:   Sat Jul 16 23:31:01 2011 +1000

FYI, I'm using that on top of Linux 3.0 and 3.1-rc1 and it still works fine.

-- 
Michel Alexandre Salim
µblog:      http://identi.ca/hircus
            http://twitter.com/hircus
GPG key ID: 78884778

()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-10 13:14       ` Michel Alexandre Salim
@ 2011-08-10 14:53         ` Keith Packard
  2011-08-11  2:17           ` Andrew Morton
  0 siblings, 1 reply; 26+ messages in thread
From: Keith Packard @ 2011-08-10 14:53 UTC (permalink / raw)
  To: Michel Alexandre Salim; +Cc: intel-gfx, Andrew Morton


[-- Attachment #1.1: Type: text/plain, Size: 299 bytes --]

On Wed, 10 Aug 2011 15:14:09 +0200, Michel Alexandre Salim <salimma@fedoraproject.org> wrote:

> FYI, I'm using that on top of Linux 3.0 and 3.1-rc1 and it still works
> fine.

Matthew -- shall I just merge the old patch? Or did you want to make
some changes?

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-10 14:53         ` Keith Packard
@ 2011-08-11  2:17           ` Andrew Morton
  2011-08-11  4:22             ` Ali Gholami Rudi
  0 siblings, 1 reply; 26+ messages in thread
From: Andrew Morton @ 2011-08-11  2:17 UTC (permalink / raw)
  To: Keith Packard; +Cc: intel-gfx, Michel Alexandre Salim

On Wed, 10 Aug 2011 07:53:18 -0700 Keith Packard <keithp@keithp.com> wrote:

> On Wed, 10 Aug 2011 15:14:09 +0200, Michel Alexandre Salim <salimma@fedoraproject.org> wrote:
> 
> > FYI, I'm using that on top of Linux 3.0 and 3.1-rc1 and it still works
> > fine.
> 
> Matthew -- shall I just merge the old patch? Or did you want to make
> some changes?

I have a note here that Ali Gholami Rudi <aliqrudi@gmail.com> had issues with
the version I merged into -mm.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-11  2:17           ` Andrew Morton
@ 2011-08-11  4:22             ` Ali Gholami Rudi
       [not found]               ` <20112108160718@lilem.mirepesht>
  2011-08-11 19:36               ` i915 native backlight never got merged Michel Alexandre Salim
  0 siblings, 2 replies; 26+ messages in thread
From: Ali Gholami Rudi @ 2011-08-11  4:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: intel-gfx, Michel Alexandre Salim

Andrew Morton <akpm@linux-foundation.org> wrote:
> 
> On Wed, 10 Aug 2011 07:53:18 -0700 Keith Packard <keithp@keithp.com> wrote:
> > Matthew -- shall I just merge the old patch? Or did you want to make
> > some changes?
> 
> I have a note here that Ali Gholami Rudi <aliqrudi@gmail.com> had issues with
> the version I merged into -mm.

Actually the patch helped me cope with another annoying problem.
The problem is in some kernels the ACPI brightness control
disappears.  Matthew's patches made it possible to access the
native backlight control via sysfs, without which I couldn't
change the brightness of my screen.  So my problem has nothing
to do with Matthew's patches.

Anyhow, the problem is very annoying; it's not just being unable
to change the backlight level, the laptop won't be powered down
and I have to use hold the power to turn it off.  I'm not sure
about other ACPI functions which may be broken as well.  So it
is just possible that it is an ACPI issue.  The kernels I tried
were:

2.6.37		good
2.6.38-rc1	bad
2.6.38+		good
3.0		bad

I may bisect it...

	Ali

$ lspci
00:00.0 Host bridge: Intel Corporation Mobile GME965/GLE960 Memory Controller Hub (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation Mobile GME965/GLE960 Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GME965/GLE960 Integrated Graphics Controller (rev 0c)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
30:00.0 Ethernet controller: Marvell Technology Group Ltd. Device 4357 (rev 10)

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: missing acpi backlight bisected to 9661e92c10
       [not found]               ` <20112108160718@lilem.mirepesht>
@ 2011-08-11 12:39                 ` Matthew Garrett
  2011-08-21 13:52                     ` Ali Gholami Rudi
  0 siblings, 1 reply; 26+ messages in thread
From: Matthew Garrett @ 2011-08-11 12:39 UTC (permalink / raw)
  To: Ali Gholami Rudi
  Cc: Andrew Morton, Keith Packard, Michel Alexandre Salim, intel-gfx,
	Ali Gholami Rudi, Richard Purdie, Chris Wilson, David Airlie,
	Alex Deucher, Ben Skeggs, Zhang Rui, Len Brown, Jesse Barnes,
	Sedat Dilek, Linus Torvalds, linux-kernel

Sigh. Could you provide the output of lspci and acpidump?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: missing acpi backlight bisected to 9661e92c10
  2011-08-11 12:39                 ` missing acpi backlight bisected to 9661e92c10 Matthew Garrett
@ 2011-08-21 13:52                     ` Ali Gholami Rudi
  0 siblings, 0 replies; 26+ messages in thread
From: Ali Gholami Rudi @ 2011-08-11 13:53 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Andrew Morton, Keith Packard, Michel Alexandre Salim, intel-gfx,
	Ali Gholami Rudi, Richard Purdie, Chris Wilson, David Airlie,
	Alex Deucher, Ben Skeggs, Zhang Rui, Len Brown, Jesse Barnes,
	Sedat Dilek, Linus Torvalds, linux-kernel

Matthew Garrett <mjg@redhat.com> wrote:
> Sigh. Could you provide the output of lspci and acpidump?

acpidump: https://bugzilla.kernel.org/attachment.cgi?id=24674

$ lspci
00:00.0 Host bridge: Intel Corporation Mobile GME965/GLE960 Memory Controller Hub (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation Mobile GME965/GLE960 Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GME965/GLE960 Integrated Graphics Controller (rev 0c)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
30:00.0 Ethernet controller: Marvell Technology Group Ltd. Device 4357 (rev 10)

I don't know much about ACPI, but is acpidump's output supposed to
change?  The above dump has been taken almost a year ago (for
another ACPI bug) and now that I compare it with my current dump, I
get:

--- acpidump1	2011-08-11 18:16:37.509899444 +0430
+++ acpidump2	2011-08-11 18:03:33.778749912 +0430
@@ -5143,24 +5143,6 @@
   0060: 00 00 00 00 88 c4 7d 3f 00 00 00 00 2e c5 7d 3f  ......}?......}?
   0070: 00 00 00 00                                      ....
 
-FACP @ 0x3f7c8000
-  0000: 46 41 43 50 84 00 00 00 02 ff 48 50 20 20 20 20  FACP......HP    
-  0010: 33 30 38 41 20 20 20 20 02 00 00 00 48 50 20 20  308A    ....HP  
-  0020: 01 00 00 00 80 7d 7e 3f 48 83 7c 3f 00 00 09 00  .....}~?H.|?....
-  0030: b2 00 00 00 f1 f0 f2 80 00 10 00 00 00 00 00 00  ................
-  0040: 04 10 00 00 00 00 00 00 20 10 00 00 08 10 00 00  ........ .......
-  0050: 28 10 00 00 00 00 00 00 04 02 01 04 08 00 00 00  (...............
-  0060: 02 00 87 00 00 00 00 00 01 03 0d 00 32 13 00 00  ............2...
-  0070: a5 80 00 00 01 08 00 00 00 00 00 00 00 00 00 00  ................
-  0080: 00 00 00 00                                      ....
-
-RSDT @ 0x3f7c8178
-  0000: 52 53 44 54 4c 00 00 00 01 68 48 50 20 20 20 20  RSDTL....hHP    
-  0010: 33 30 38 41 20 20 20 20 20 09 07 28 48 50 20 20  308A     ..(HP  
-  0020: 01 00 00 00 00 80 7c 3f 38 82 7c 3f 70 82 7c 3f  ......|?8.|?p.|?
-  0030: d8 82 7c 3f 14 83 7c 3f 9f b3 7d 3f c7 b6 7d 3f  ..|?..|?..}?..}?
-  0040: 29 c2 7d 3f 88 c4 7d 3f 2e c5 7d 3f              ).}?..}?..}?
-
 RSD PTR @ 0xf6f60
   0000: 52 53 44 20 50 54 52 20 13 48 50 20 20 20 20 02  RSD PTR .HP    .
   0010: 78 81 7c 3f 24 00 00 00 c4 81 7c 3f 00 00 00 00  x.|?$.....|?....

	Ali

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: missing acpi backlight bisected to 9661e92c10
  2011-08-21 13:52                     ` Ali Gholami Rudi
@ 2011-08-11 14:16                       ` Matthew Garrett
  -1 siblings, 0 replies; 26+ messages in thread
From: Matthew Garrett @ 2011-08-11 14:16 UTC (permalink / raw)
  To: Ali Gholami Rudi
  Cc: Andrew Morton, Keith Packard, Michel Alexandre Salim, intel-gfx,
	Ali Gholami Rudi, Richard Purdie, Chris Wilson, David Airlie,
	Alex Deucher, Ben Skeggs, Zhang Rui, Len Brown, Jesse Barnes,
	Sedat Dilek, Linus Torvalds, linux-kernel

Well, that all looks fine. And I also can't see any way that this commit
could cause the backlight not to appear - all it does is set the parent 
if it's present. There's no new path that could cause it to return 
early. Does reverting this patch really make things work?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: missing acpi backlight bisected to 9661e92c10
@ 2011-08-11 14:16                       ` Matthew Garrett
  0 siblings, 0 replies; 26+ messages in thread
From: Matthew Garrett @ 2011-08-11 14:16 UTC (permalink / raw)
  To: Ali Gholami Rudi
  Cc: David Airlie, linux-kernel, intel-gfx, Sedat Dilek,
	Richard Purdie, Ben Skeggs, Michel Alexandre Salim, Alex Deucher,
	Andrew Morton, Linus Torvalds, Len Brown

Well, that all looks fine. And I also can't see any way that this commit
could cause the backlight not to appear - all it does is set the parent 
if it's present. There's no new path that could cause it to return 
early. Does reverting this patch really make things work?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: missing acpi backlight bisected to 9661e92c10
  2011-08-11 14:16                       ` Matthew Garrett
@ 2011-08-21 14:21                         ` Ali Gholami Rudi
  -1 siblings, 0 replies; 26+ messages in thread
From: Ali Gholami Rudi @ 2011-08-11 14:27 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Andrew Morton, Keith Packard, Michel Alexandre Salim, intel-gfx,
	Ali Gholami Rudi, Richard Purdie, Chris Wilson, David Airlie,
	Alex Deucher, Ben Skeggs, Zhang Rui, Len Brown, Jesse Barnes,
	Sedat Dilek, Linus Torvalds, linux-kernel

Matthew Garrett <mjg@redhat.com> wrote:
> Well, that all looks fine. And I also can't see any way that this commit
> could cause the backlight not to appear - all it does is set the parent 
> if it's present. There's no new path that could cause it to return 
> early. Does reverting this patch really make things work?

Yes.  I'm running the patched kernel right now.

I can apply a debug patch on the unchanged kernel, if it helps?

	Ali

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-11  4:22             ` Ali Gholami Rudi
       [not found]               ` <20112108160718@lilem.mirepesht>
@ 2011-08-11 19:36               ` Michel Alexandre Salim
  2011-08-11 22:28                 ` Keith Packard
  1 sibling, 1 reply; 26+ messages in thread
From: Michel Alexandre Salim @ 2011-08-11 19:36 UTC (permalink / raw)
  To: Ali Gholami Rudi; +Cc: Andrew Morton, intel-gfx

On Sun, Aug 21, 2011 at 6:00 AM, Ali Gholami Rudi <aliqrudi@gmail.com> wrote:
> Andrew Morton <akpm@linux-foundation.org> wrote:
>>
>> On Wed, 10 Aug 2011 07:53:18 -0700 Keith Packard <keithp@keithp.com> wrote:
>> > Matthew -- shall I just merge the old patch? Or did you want to make
>> > some changes?
>>
>> I have a note here that Ali Gholami Rudi <aliqrudi@gmail.com> had issues with
>> the version I merged into -mm.
>
> Actually the patch helped me cope with another annoying problem.
> The problem is in some kernels the ACPI brightness control
> disappears.  Matthew's patches made it possible to access the
> native backlight control via sysfs, without which I couldn't
> change the brightness of my screen.  So my problem has nothing
> to do with Matthew's patches.
>
Since there's no known regression introduced by Matthew's patch, could
it be merged? Feel free to add a

  'Tested-by: Michel Alexandre Salim <salimma@fedoraproject.org>'

line to it. I've had to run my own kernels since I got my Sony Vaio Y2
last December, and from reports on notebookreview.com's forum, it's
affecting other Linux users of this laptop (most of them using Kamal
Mostafa's PPA)

Thanks,

-- 
Michel Alexandre Salim
Fedora Project Contributor: http://fedoraproject.org/

Email:  salimma@fedoraproject.org  | GPG key ID: 78884778
Jabber: hircus@jabber.ccc.de       | IRC: hircus@irc.freenode.net

()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-11 19:36               ` i915 native backlight never got merged Michel Alexandre Salim
@ 2011-08-11 22:28                 ` Keith Packard
  2011-08-12  4:21                   ` Kamal Mostafa
  2011-08-12 10:11                   ` Michel Alexandre Salim
  0 siblings, 2 replies; 26+ messages in thread
From: Keith Packard @ 2011-08-11 22:28 UTC (permalink / raw)
  To: Michel Alexandre Salim, Ali Gholami Rudi; +Cc: Andrew Morton, intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 7839 bytes --]

On Thu, 11 Aug 2011 21:36:38 +0200, Michel Alexandre Salim <salimma@fedoraproject.org> wrote:

> Since there's no known regression introduced by Matthew's patch, could
> it be merged? Feel free to add a

I've had to amend the patch a bit to get it to apply on top of
drm-intel-fixes; anyone care to take a look and see if it still looks
reasonable (and/or actually works?)

From 2c17b1ae587289501029daa5c0692818b88d21a6 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Fri, 14 Jan 2011 14:24:22 -0500
Subject: [PATCH] i915: Add native backlight control

Not all systems expose a firmware or platform mechanism for changing the
backlight intensity on i915, so add native driver support.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Tested-by: Michel Alexandre Salim <salimma@fedoraproject.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
---
 drivers/gpu/drm/i915/i915_drv.h       |    3 +
 drivers/gpu/drm/i915/intel_dp.c       |    7 +++
 drivers/gpu/drm/i915/intel_drv.h      |    3 +-
 drivers/gpu/drm/i915/intel_lvds.c     |    5 ++
 drivers/gpu/drm/i915/intel_opregion.c |    1 -
 drivers/gpu/drm/i915/intel_panel.c    |   72 ++++++++++++++++++++++++++++++++-
 6 files changed, 88 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 303e4b3..cfcf3c2 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -36,6 +36,7 @@
 #include <linux/io-mapping.h>
 #include <linux/i2c.h>
 #include <drm/intel-gtt.h>
+#include <linux/backlight.h>
 
 /* General customization:
  */
@@ -691,6 +692,7 @@ typedef struct drm_i915_private {
 	int child_dev_num;
 	struct child_device_config *child_dev;
 	struct drm_connector *int_lvds_connector;
+	struct drm_connector *int_edp_connector;
 
 	bool mchbar_need_disable;
 
@@ -728,6 +730,7 @@ typedef struct drm_i915_private {
 	struct drm_property *force_audio_property;
 
 	atomic_t forcewake_count;
+	struct backlight_device *backlight;
 } drm_i915_private_t;
 
 enum i915_cache_level {
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 0feae90..44fef5e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1841,6 +1841,11 @@ done:
 static void
 intel_dp_destroy (struct drm_connector *connector)
 {
+	struct drm_device *dev = connector->dev;
+
+	if (intel_dpd_is_edp(dev))
+		intel_panel_destroy_backlight(dev);
+
 	drm_sysfs_connector_remove(connector);
 	drm_connector_cleanup(connector);
 	kfree(connector);
@@ -2072,6 +2077,8 @@ intel_dp_init(struct drm_device *dev, int output_reg)
 					DRM_MODE_TYPE_PREFERRED;
 			}
 		}
+		dev_priv->int_edp_connector = connector;
+		intel_panel_setup_backlight(dev);
 	}
 
 	intel_dp_add_properties(intel_dp, connector);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 7b330e7..6d55d94 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -297,10 +297,11 @@ extern void intel_pch_panel_fitting(struct drm_device *dev,
 extern u32 intel_panel_get_max_backlight(struct drm_device *dev);
 extern u32 intel_panel_get_backlight(struct drm_device *dev);
 extern void intel_panel_set_backlight(struct drm_device *dev, u32 level);
-extern void intel_panel_setup_backlight(struct drm_device *dev);
+extern int intel_panel_setup_backlight(struct drm_device *dev);
 extern void intel_panel_enable_backlight(struct drm_device *dev);
 extern void intel_panel_disable_backlight(struct drm_device *dev);
 extern enum drm_connector_status intel_panel_detect(struct drm_device *dev);
+extern void intel_panel_destroy_backlight(struct drm_device *dev);
 
 extern void intel_crtc_load_lut(struct drm_crtc *crtc);
 extern void intel_encoder_prepare (struct drm_encoder *encoder);
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 8b521a2..31da77f 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -552,6 +552,8 @@ static void intel_lvds_destroy(struct drm_connector *connector)
 	struct drm_device *dev = connector->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
+	intel_panel_destroy_backlight(dev);
+
 	if (dev_priv->lid_notifier.notifier_call)
 		acpi_lid_notifier_unregister(&dev_priv->lid_notifier);
 	drm_sysfs_connector_remove(connector);
@@ -1032,6 +1034,9 @@ out:
 	/* keep the LVDS connector */
 	dev_priv->int_lvds_connector = connector;
 	drm_sysfs_connector_add(connector);
+
+	intel_panel_setup_backlight(dev);
+
 	return true;
 
 failed:
diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index b7c5ddb..b8e8158b 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -227,7 +227,6 @@ void intel_opregion_asle_intr(struct drm_device *dev)
 	asle->aslc = asle_stat;
 }
 
-/* Only present on Ironlake+ */
 void intel_opregion_gse_intr(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 05f500c..a9e0c7b 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -277,7 +277,7 @@ void intel_panel_enable_backlight(struct drm_device *dev)
 	dev_priv->backlight_enabled = true;
 }
 
-void intel_panel_setup_backlight(struct drm_device *dev)
+static void intel_panel_init_backlight(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
@@ -309,3 +309,73 @@ intel_panel_detect(struct drm_device *dev)
 
 	return connector_status_unknown;
 }
+
+#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
+static int intel_panel_update_status(struct backlight_device *bd)
+{
+	struct drm_device *dev = bl_get_data(bd);
+	intel_panel_set_backlight(dev, bd->props.brightness);
+	return 0;
+}
+
+static int intel_panel_get_brightness(struct backlight_device *bd)
+{
+	struct drm_device *dev = bl_get_data(bd);
+	return intel_panel_get_backlight(dev);
+}
+
+static const struct backlight_ops intel_panel_bl_ops = {
+	.update_status = intel_panel_update_status,
+	.get_brightness = intel_panel_get_brightness,
+};
+
+int intel_panel_setup_backlight(struct drm_device *dev)
+{
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct backlight_properties props;
+	struct drm_connector *connector;
+
+	intel_panel_init_backlight(dev);
+
+	if (dev_priv->int_lvds_connector)
+		connector = dev_priv->int_lvds_connector;
+	else if (dev_priv->int_edp_connector)
+		connector = dev_priv->int_edp_connector;
+	else
+		return -ENODEV;
+
+	props.type = BACKLIGHT_RAW;
+	props.max_brightness = intel_panel_get_max_backlight(dev);
+	dev_priv->backlight =
+		backlight_device_register("intel_backlight",
+					  &connector->kdev, dev,
+					  &intel_panel_bl_ops, &props);
+
+	if (IS_ERR(dev_priv->backlight)) {
+		DRM_ERROR("Failed to register backlight: %ld\n",
+			  PTR_ERR(dev_priv->backlight));
+		dev_priv->backlight = NULL;
+		return -ENODEV;
+	}
+	dev_priv->backlight->props.brightness = intel_panel_get_backlight(dev);
+	return 0;
+}
+
+void intel_panel_destroy_backlight(struct drm_device *dev)
+{
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	if (dev_priv->backlight)
+		backlight_device_unregister(dev_priv->backlight);
+}
+#else
+int intel_panel_setup_backlight(struct drm_device *dev)
+{
+	intel_panel_init_backlight(dev);
+	return 0;
+}
+
+void intel_panel_destroy_backlight(struct drm_device *dev)
+{
+	return;
+}
+#endif
-- 
1.7.5.4



-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-11 22:28                 ` Keith Packard
@ 2011-08-12  4:21                   ` Kamal Mostafa
  2011-08-12 10:11                   ` Michel Alexandre Salim
  1 sibling, 0 replies; 26+ messages in thread
From: Kamal Mostafa @ 2011-08-12  4:21 UTC (permalink / raw)
  To: Keith Packard, Matthew Garrett
  Cc: intel-gfx, Andrew Morton, Michel Alexandre Salim


[-- Attachment #1.1: Type: text/plain, Size: 988 bytes --]

On Thu, 2011-08-11 at 15:28 -0700, Keith Packard wrote:
> I've had to amend the patch a bit to get it to apply on top of
> drm-intel-fixes; anyone care to take a look and see if it still looks
> reasonable (and/or actually works?)

Hi Keith-

I confirm that this does indeed work (Dell Studio 1558).  My thanks to
you and Matthew!

Tested-by: Kamal Mostafa <kamal@canonical.com>

 -Kamal

> From 2c17b1ae587289501029daa5c0692818b88d21a6 Mon Sep 17 00:00:00 2001
> From: Matthew Garrett <mjg@redhat.com>
> Date: Fri, 14 Jan 2011 14:24:22 -0500
> Subject: [PATCH] i915: Add native backlight control
> 
> Not all systems expose a firmware or platform mechanism for changing the
> backlight intensity on i915, so add native driver support.
> 
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
> Tested-by: Michel Alexandre Salim <salimma@fedoraproject.org>
> Signed-off-by: Keith Packard <keithp@keithp.com>





[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-11 22:28                 ` Keith Packard
  2011-08-12  4:21                   ` Kamal Mostafa
@ 2011-08-12 10:11                   ` Michel Alexandre Salim
  2011-08-12 13:52                     ` Keith Packard
  1 sibling, 1 reply; 26+ messages in thread
From: Michel Alexandre Salim @ 2011-08-12 10:11 UTC (permalink / raw)
  To: Keith Packard; +Cc: intel-gfx, Andrew Morton

Hi Keith & all,
On Thu, 2011-08-11 at 15:28 -0700, Keith Packard wrote:
> On Thu, 11 Aug 2011 21:36:38 +0200, Michel Alexandre Salim <salimma@fedoraproject.org> wrote:
> 
> > Since there's no known regression introduced by Matthew's patch, could
> > it be merged? Feel free to add a
> 
> I've had to amend the patch a bit to get it to apply on top of
> drm-intel-fixes; anyone care to take a look and see if it still looks
> reasonable (and/or actually works?)
> 
Matthew's last patch from July 16th applies without modification on top
of Linux 3.0 and 3.1-rc1, and applies with some offsets on top of
drm-intel-fixes.

I've eyeballed the code and they look identical apart from some lines
struct changes being transposed a bit, and intel_panel_init_backlight is
no longer static; please find the patch attached below (with my
Tested-by: added)

>From fa7419eee713b989e2c268c7b06ec9a544a2b647 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Sat, 16 Jul 2011 23:31:01 +1000
Subject: [PATCH] Not all systems expose a firmware or platform mechanism for
 changing the backlight intensity on i915, so add native
 driver support.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com>
Tested-by: Michel Alexandre Salim <salimma@fedoraproject.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
 drivers/gpu/drm/i915/i915_drv.h       |    4 ++
 drivers/gpu/drm/i915/intel_dp.c       |    7 +++
 drivers/gpu/drm/i915/intel_drv.h      |    3 +-
 drivers/gpu/drm/i915/intel_lvds.c     |    5 ++
 drivers/gpu/drm/i915/intel_opregion.c |    1 -
 drivers/gpu/drm/i915/intel_panel.c    |   72 ++++++++++++++++++++++++++++++++-
 6 files changed, 89 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 6867e19..886bd29 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -36,6 +36,7 @@
 #include <linux/io-mapping.h>
 #include <linux/i2c.h>
 #include <drm/intel-gtt.h>
+#include <linux/backlight.h>
 
 /* General customization:
  */
@@ -689,6 +690,7 @@ typedef struct drm_i915_private {
 	int child_dev_num;
 	struct child_device_config *child_dev;
 	struct drm_connector *int_lvds_connector;
+	struct drm_connector *int_edp_connector;
 
 	bool mchbar_need_disable;
 
@@ -722,6 +724,8 @@ typedef struct drm_i915_private {
 	/* list of fbdev register on this device */
 	struct intel_fbdev *fbdev;
 
+	struct backlight_device *backlight;
+
 	struct drm_property *broadcast_rgb_property;
 	struct drm_property *force_audio_property;
 
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index f797fb5..2cde606 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1811,6 +1811,11 @@ done:
 static void
 intel_dp_destroy (struct drm_connector *connector)
 {
+	struct drm_device *dev = connector->dev;
+
+	if (intel_dpd_is_edp(dev))
+		intel_panel_destroy_backlight(dev);
+
 	drm_sysfs_connector_remove(connector);
 	drm_connector_cleanup(connector);
 	kfree(connector);
@@ -2043,6 +2048,8 @@ intel_dp_init(struct drm_device *dev, int output_reg)
 					DRM_MODE_TYPE_PREFERRED;
 			}
 		}
+		dev_priv->int_edp_connector = connector;
+		intel_panel_setup_backlight(dev);
 	}
 
 	intel_dp_add_properties(intel_dp, connector);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 6e990f9..057e2bc 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -274,9 +274,10 @@ extern void intel_pch_panel_fitting(struct drm_device *dev,
 extern u32 intel_panel_get_max_backlight(struct drm_device *dev);
 extern u32 intel_panel_get_backlight(struct drm_device *dev);
 extern void intel_panel_set_backlight(struct drm_device *dev, u32 level);
-extern void intel_panel_setup_backlight(struct drm_device *dev);
+extern int intel_panel_setup_backlight(struct drm_device *dev);
 extern void intel_panel_enable_backlight(struct drm_device *dev);
 extern void intel_panel_disable_backlight(struct drm_device *dev);
+extern void intel_panel_destroy_backlight(struct drm_device *dev);
 extern enum drm_connector_status intel_panel_detect(struct drm_device *dev);
 
 extern void intel_crtc_load_lut(struct drm_crtc *crtc);
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index b28f7bd..9104496 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -582,6 +582,8 @@ static void intel_lvds_destroy(struct drm_connector *connector)
 	struct drm_device *dev = connector->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
+	intel_panel_destroy_backlight(dev);
+
 	if (dev_priv->lid_notifier.notifier_call)
 		acpi_lid_notifier_unregister(&dev_priv->lid_notifier);
 	drm_sysfs_connector_remove(connector);
@@ -1041,6 +1043,9 @@ out:
 	/* keep the LVDS connector */
 	dev_priv->int_lvds_connector = connector;
 	drm_sysfs_connector_add(connector);
+
+	intel_panel_setup_backlight(dev);
+
 	return true;
 
 failed:
diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index b7c5ddb..b8e8158b 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -227,7 +227,6 @@ void intel_opregion_asle_intr(struct drm_device *dev)
 	asle->aslc = asle_stat;
 }
 
-/* Only present on Ironlake+ */
 void intel_opregion_gse_intr(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index a06ff07..49528c6 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -273,7 +273,7 @@ void intel_panel_enable_backlight(struct drm_device *dev)
 	dev_priv->backlight_enabled = true;
 }
 
-void intel_panel_setup_backlight(struct drm_device *dev)
+void intel_panel_init_backlight(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
@@ -305,3 +305,73 @@ intel_panel_detect(struct drm_device *dev)
 
 	return connector_status_unknown;
 }
+
+#ifdef CONFIG_BACKLIGHT_CLASS_DEVICE
+static int intel_panel_update_status(struct backlight_device *bd)
+{
+	struct drm_device *dev = bl_get_data(bd);
+	intel_panel_set_backlight(dev, bd->props.brightness);
+	return 0;
+}
+
+static int intel_panel_get_brightness(struct backlight_device *bd)
+{
+	struct drm_device *dev = bl_get_data(bd);
+	return intel_panel_get_backlight(dev);
+}
+
+static const struct backlight_ops intel_panel_bl_ops = {
+	.update_status = intel_panel_update_status,
+	.get_brightness = intel_panel_get_brightness,
+};
+
+int intel_panel_setup_backlight(struct drm_device *dev)
+{
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct backlight_properties props;
+	struct drm_connector *connector;
+
+	intel_panel_init_backlight(dev);
+
+	if (dev_priv->int_lvds_connector)
+		connector = dev_priv->int_lvds_connector;
+	else if (dev_priv->int_edp_connector)
+		connector = dev_priv->int_edp_connector;
+	else
+		return -ENODEV;
+
+	props.type = BACKLIGHT_RAW;
+	props.max_brightness = intel_panel_get_max_backlight(dev);
+	dev_priv->backlight =
+		backlight_device_register("intel_backlight",
+					  &connector->kdev, dev,
+					  &intel_panel_bl_ops, &props);
+
+	if (IS_ERR(dev_priv->backlight)) {
+		DRM_ERROR("Failed to register backlight: %ld\n",
+			  PTR_ERR(dev_priv->backlight));
+		dev_priv->backlight = NULL;
+		return -ENODEV;
+	}
+	dev_priv->backlight->props.brightness = intel_panel_get_backlight(dev);
+	return 0;
+}
+
+void intel_panel_destroy_backlight(struct drm_device *dev)
+{
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	if (dev_priv->backlight)
+		backlight_device_unregister(dev_priv->backlight);
+}
+#else
+int intel_panel_setup_backlight(struct drm_device *dev)
+{
+	intel_panel_init_backlight(dev);
+	return 0;
+}
+
+void intel_panel_destroy_backlight(struct drm_device *dev)
+{
+	return;
+}
+#endif
-- 
1.7.6

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: missing acpi backlight bisected to 9661e92c10
       [not found]                         ` <20112208102524@lilem.mirepesht>
@ 2011-08-12 12:18                           ` Matthew Garrett
  2011-08-22 12:40                               ` Ali Gholami Rudi
  0 siblings, 1 reply; 26+ messages in thread
From: Matthew Garrett @ 2011-08-12 12:18 UTC (permalink / raw)
  To: Ali Gholami Rudi
  Cc: Andrew Morton, Keith Packard, Michel Alexandre Salim, intel-gfx,
	Ali Gholami Rudi, Richard Purdie, Chris Wilson, David Airlie,
	Alex Deucher, Ben Skeggs, Zhang Rui, Len Brown, Jesse Barnes,
	Sedat Dilek, Linus Torvalds, linux-kernel

On Mon, Aug 22, 2011 at 10:25:24AM +0430, Ali Gholami Rudi wrote:

> Yet, /sys/devices/virtual/backlight/acpi_video0/brightness only
> appears after the revert.  Seems something changes its behavior
> if new_bd->dev.parent is not NULL in backlight_device_register().

Well, yes, if it has a parent it won't be under /sys/devices/virtual. 
Does it appear under /sys/class/backlight ?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: missing acpi backlight bisected to 9661e92c10
  2011-08-12 12:18                           ` Matthew Garrett
@ 2011-08-22 12:40                               ` Ali Gholami Rudi
  0 siblings, 0 replies; 26+ messages in thread
From: Ali Gholami Rudi @ 2011-08-12 12:49 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Andrew Morton, Keith Packard, Michel Alexandre Salim, intel-gfx,
	Richard Purdie, Chris Wilson, David Airlie, Alex Deucher,
	Ben Skeggs, Zhang Rui, Len Brown, Jesse Barnes, Sedat Dilek,
	Linus Torvalds, linux-kernel

Matthew Garrett <mjg@redhat.com> wrote:
> 
> On Mon, Aug 22, 2011 at 10:25:24AM +0430, Ali Gholami Rudi wrote:
> 
> > Yet, /sys/devices/virtual/backlight/acpi_video0/brightness only
> > appears after the revert.  Seems something changes its behavior
> > if new_bd->dev.parent is not NULL in backlight_device_register().
> 
> Well, yes, if it has a parent it won't be under /sys/devices/virtual. 
> Does it appear under /sys/class/backlight ?

Yep!  Thought this is the 2.6.38-rc1 issue coming back (I really
thought I had searched /sys...).  Sorry for the noise.

Thanks,
Ali

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-12 10:11                   ` Michel Alexandre Salim
@ 2011-08-12 13:52                     ` Keith Packard
  2011-08-12 16:34                       ` Kamal Mostafa
  0 siblings, 1 reply; 26+ messages in thread
From: Keith Packard @ 2011-08-12 13:52 UTC (permalink / raw)
  To: Michel Alexandre Salim; +Cc: intel-gfx, Andrew Morton


[-- Attachment #1.1: Type: text/plain, Size: 776 bytes --]

On Fri, 12 Aug 2011 12:11:33 +0200, Michel Alexandre Salim <salimma@fedoraproject.org> wrote:

> Matthew's last patch from July 16th applies without modification on top
> of Linux 3.0 and 3.1-rc1, and applies with some offsets on top of
> drm-intel-fixes.

I must have skipped right over it somehow.

> I've eyeballed the code and they look identical apart from some lines
> struct changes being transposed a bit, and intel_panel_init_backlight is
> no longer static; please find the patch attached below (with my
> Tested-by: added)

I'll merge this version, with the change to make
intel_panel_init_backlight static (it's not declared in a header, and
isn't used outside of intel_panel.c).

Thanks for finding this version!

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-12 13:52                     ` Keith Packard
@ 2011-08-12 16:34                       ` Kamal Mostafa
  2011-08-15 17:38                         ` Michel Alexandre Salim
  0 siblings, 1 reply; 26+ messages in thread
From: Kamal Mostafa @ 2011-08-12 16:34 UTC (permalink / raw)
  To: Keith Packard; +Cc: intel-gfx, Andrew Morton, Michel Alexandre Salim


[-- Attachment #1.1: Type: text/plain, Size: 625 bytes --]

On Fri, 2011-08-12 at 06:52 -0700, Keith Packard wrote:
> On Fri, 12 Aug 2011 12:11:33 +0200, Michel Alexandre Salim <salimma@fedoraproject.org> wrote:
> 
> > Matthew's last patch from July 16th applies without modification on top
> > of Linux 3.0 and 3.1-rc1 [...]
>> From fa7419eee713b989e2c268c7b06ec9a544a2b647 Mon Sep 17 00:00:00 2001
> 
> I'll merge this version, with the change to make
> intel_panel_init_backlight static (it's not declared in a header, and
> isn't used outside of intel_panel.c).

That version works also works fine for me.

Tested-by: Kamal Mostafa <kamal@canonical.com>

 -Kamal


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-12 16:34                       ` Kamal Mostafa
@ 2011-08-15 17:38                         ` Michel Alexandre Salim
  2011-08-15 18:03                           ` Keith Packard
  0 siblings, 1 reply; 26+ messages in thread
From: Michel Alexandre Salim @ 2011-08-15 17:38 UTC (permalink / raw)
  To: Kamal Mostafa; +Cc: intel-gfx, Andrew Morton

Keith,

On Fri, 2011-08-12 at 09:34 -0700, Kamal Mostafa wrote:
> On Fri, 2011-08-12 at 06:52 -0700, Keith Packard wrote:
> > On Fri, 12 Aug 2011 12:11:33 +0200, Michel Alexandre Salim <salimma@fedoraproject.org> wrote:
> > 
> > > Matthew's last patch from July 16th applies without modification on top
> > > of Linux 3.0 and 3.1-rc1 [...]
> >> From fa7419eee713b989e2c268c7b06ec9a544a2b647 Mon Sep 17 00:00:00 2001
> > 
> > I'll merge this version, with the change to make
> > intel_panel_init_backlight static (it's not declared in a header, and
> > isn't used outside of intel_panel.c).
> 
> That version works also works fine for me.
> 
any update on the merge? I've not seen it anywhere on

  git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6

Thanks,

-- 
Michel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: i915 native backlight never got merged
  2011-08-15 17:38                         ` Michel Alexandre Salim
@ 2011-08-15 18:03                           ` Keith Packard
  0 siblings, 0 replies; 26+ messages in thread
From: Keith Packard @ 2011-08-15 18:03 UTC (permalink / raw)
  To: Michel Alexandre Salim, Kamal Mostafa; +Cc: intel-gfx, Andrew Morton


[-- Attachment #1.1: Type: text/plain, Size: 389 bytes --]

On Mon, 15 Aug 2011 19:38:34 +0200, Michel Alexandre Salim <salimma@fedoraproject.org> wrote:

> any update on the merge? I've not seen it anywhere on

It's merged locally; I'm struggling with an SSC bug that's sitting on
top of drm-intel-fixes and needs to either be fixed or reverted. In any
case, the backlight fix will head off to Linus shortly.

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: missing acpi backlight bisected to 9661e92c10
@ 2011-08-21 13:52                     ` Ali Gholami Rudi
  0 siblings, 0 replies; 26+ messages in thread
From: Ali Gholami Rudi @ 2011-08-21 13:52 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Andrew Morton, Keith Packard, Michel Alexandre Salim, intel-gfx,
	Ali Gholami Rudi, Richard Purdie, Chris Wilson, David Airlie,
	Alex Deucher, Ben Skeggs, Zhang Rui, Len Brown, Jesse Barnes,
	Sedat Dilek, Linus Torvalds, linux-kernel

Matthew Garrett <mjg@redhat.com> wrote:
> Sigh. Could you provide the output of lspci and acpidump?

acpidump: https://bugzilla.kernel.org/attachment.cgi?id=24674

$ lspci
00:00.0 Host bridge: Intel Corporation Mobile GME965/GLE960 Memory Controller Hub (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation Mobile GME965/GLE960 Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GME965/GLE960 Integrated Graphics Controller (rev 0c)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
30:00.0 Ethernet controller: Marvell Technology Group Ltd. Device 4357 (rev 10)

I don't know much about ACPI, but is acpidump's output supposed to
change?  The above dump has been taken almost a year ago (for
another ACPI bug) and now that I compare it with my current dump, I
get:

--- acpidump1	2011-08-11 18:16:37.509899444 +0430
+++ acpidump2	2011-08-11 18:03:33.778749912 +0430
@@ -5143,24 +5143,6 @@
   0060: 00 00 00 00 88 c4 7d 3f 00 00 00 00 2e c5 7d 3f  ......}?......}?
   0070: 00 00 00 00                                      ....
 
-FACP @ 0x3f7c8000
-  0000: 46 41 43 50 84 00 00 00 02 ff 48 50 20 20 20 20  FACP......HP    
-  0010: 33 30 38 41 20 20 20 20 02 00 00 00 48 50 20 20  308A    ....HP  
-  0020: 01 00 00 00 80 7d 7e 3f 48 83 7c 3f 00 00 09 00  .....}~?H.|?....
-  0030: b2 00 00 00 f1 f0 f2 80 00 10 00 00 00 00 00 00  ................
-  0040: 04 10 00 00 00 00 00 00 20 10 00 00 08 10 00 00  ........ .......
-  0050: 28 10 00 00 00 00 00 00 04 02 01 04 08 00 00 00  (...............
-  0060: 02 00 87 00 00 00 00 00 01 03 0d 00 32 13 00 00  ............2...
-  0070: a5 80 00 00 01 08 00 00 00 00 00 00 00 00 00 00  ................
-  0080: 00 00 00 00                                      ....
-
-RSDT @ 0x3f7c8178
-  0000: 52 53 44 54 4c 00 00 00 01 68 48 50 20 20 20 20  RSDTL....hHP    
-  0010: 33 30 38 41 20 20 20 20 20 09 07 28 48 50 20 20  308A     ..(HP  
-  0020: 01 00 00 00 00 80 7c 3f 38 82 7c 3f 70 82 7c 3f  ......|?8.|?p.|?
-  0030: d8 82 7c 3f 14 83 7c 3f 9f b3 7d 3f c7 b6 7d 3f  ..|?..|?..}?..}?
-  0040: 29 c2 7d 3f 88 c4 7d 3f 2e c5 7d 3f              ).}?..}?..}?
-
 RSD PTR @ 0xf6f60
   0000: 52 53 44 20 50 54 52 20 13 48 50 20 20 20 20 02  RSD PTR .HP    .
   0010: 78 81 7c 3f 24 00 00 00 c4 81 7c 3f 00 00 00 00  x.|?$.....|?....

	Ali


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: missing acpi backlight bisected to 9661e92c10
@ 2011-08-21 14:21                         ` Ali Gholami Rudi
  0 siblings, 0 replies; 26+ messages in thread
From: Ali Gholami Rudi @ 2011-08-21 14:21 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Andrew Morton, Keith Packard, Michel Alexandre Salim, intel-gfx,
	Ali Gholami Rudi, Richard Purdie, Chris Wilson, David Airlie,
	Alex Deucher, Ben Skeggs, Zhang Rui, Len Brown, Jesse Barnes,
	Sedat Dilek, Linus Torvalds, linux-kernel

Matthew Garrett <mjg@redhat.com> wrote:
> Well, that all looks fine. And I also can't see any way that this commit
> could cause the backlight not to appear - all it does is set the parent 
> if it's present. There's no new path that could cause it to return 
> early. Does reverting this patch really make things work?

Yes.  I'm running the patched kernel right now.

I can apply a debug patch on the unchanged kernel, if it helps?

	Ali


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: missing acpi backlight bisected to 9661e92c10
@ 2011-08-22 12:40                               ` Ali Gholami Rudi
  0 siblings, 0 replies; 26+ messages in thread
From: Ali Gholami Rudi @ 2011-08-22 12:40 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Andrew Morton, Keith Packard, Michel Alexandre Salim, intel-gfx,
	Richard Purdie, Chris Wilson, David Airlie, Alex Deucher,
	Ben Skeggs, Zhang Rui, Len Brown, Jesse Barnes, Sedat Dilek,
	Linus Torvalds, linux-kernel

Matthew Garrett <mjg@redhat.com> wrote:
> 
> On Mon, Aug 22, 2011 at 10:25:24AM +0430, Ali Gholami Rudi wrote:
> 
> > Yet, /sys/devices/virtual/backlight/acpi_video0/brightness only
> > appears after the revert.  Seems something changes its behavior
> > if new_bd->dev.parent is not NULL in backlight_device_register().
> 
> Well, yes, if it has a parent it won't be under /sys/devices/virtual. 
> Does it appear under /sys/class/backlight ?

Yep!  Thought this is the 2.6.38-rc1 issue coming back (I really
thought I had searched /sys...).  Sorry for the noise.

Thanks,
Ali


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2011-08-15 18:03 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-08 18:54 i915 native backlight never got merged Kamal Mostafa
2011-08-08 21:27 ` Keith Packard
2011-08-08 21:31   ` Matthew Garrett
2011-08-08 22:43     ` Keith Packard
2011-08-10 13:14       ` Michel Alexandre Salim
2011-08-10 14:53         ` Keith Packard
2011-08-11  2:17           ` Andrew Morton
2011-08-11  4:22             ` Ali Gholami Rudi
     [not found]               ` <20112108160718@lilem.mirepesht>
2011-08-11 12:39                 ` missing acpi backlight bisected to 9661e92c10 Matthew Garrett
2011-08-11 13:53                   ` Ali Gholami Rudi
2011-08-21 13:52                     ` Ali Gholami Rudi
2011-08-11 14:16                     ` Matthew Garrett
2011-08-11 14:16                       ` Matthew Garrett
2011-08-11 14:27                       ` Ali Gholami Rudi
2011-08-21 14:21                         ` Ali Gholami Rudi
     [not found]                         ` <20112208102524@lilem.mirepesht>
2011-08-12 12:18                           ` Matthew Garrett
2011-08-12 12:49                             ` Ali Gholami Rudi
2011-08-22 12:40                               ` Ali Gholami Rudi
2011-08-11 19:36               ` i915 native backlight never got merged Michel Alexandre Salim
2011-08-11 22:28                 ` Keith Packard
2011-08-12  4:21                   ` Kamal Mostafa
2011-08-12 10:11                   ` Michel Alexandre Salim
2011-08-12 13:52                     ` Keith Packard
2011-08-12 16:34                       ` Kamal Mostafa
2011-08-15 17:38                         ` Michel Alexandre Salim
2011-08-15 18:03                           ` Keith Packard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.