Skip to contentSkip to conversation

i915 native backlight never got merged

DISCUSSION Kamal Mostafa 8 participants 22 messages Aug 8, 2011 – Aug 15, 2011 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 6 lines · Keith Packard
Quoted 2 lines · Kamal Mostafa

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.

Signature · 1 line
Matthew Garrett | [email protected]
#4 lore raw
Quoted 8 lines · Keith Packard
Quoted 2 lines · Matthew Garrett

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 <[email protected]>
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.

Signature · 7 lines
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
#6 lore raw
Quoted 7 lines · On Wed, 10 Aug 2011 07:53:18 -0700 Keith Packard <[email protected]> wrote:
Quoted 2 lines · Michel Alexandre Salim

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 <[email protected]> had issues with the version I merged into -mm.

#7 lore raw
Quoted 7 lines · Andrew Morton
Quoted 2 lines · On Wed, 10 Aug 2011 07:53:18 -0700 Keith Packard <[email protected]> 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 <[email protected]> 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)

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Re: missing acpi backlight bisected to 9661e92c10

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

Signature · 1 line
Matthew Garrett | [email protected]
#10 lore raw

Re: missing acpi backlight bisected to 9661e92c10

Quoted 1 line · Matthew Garrett

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:

acpidump2 renamed from acpidump1 +0 -18
@@ -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

#11 lore raw

Re: missing acpi backlight bisected to 9661e92c10

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?

Signature · 1 line
Matthew Garrett | [email protected]
#12 lore raw

Re: missing acpi backlight bisected to 9661e92c10

Quoted 4 lines · Matthew Garrett

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#14 lore raw

Re: missing acpi backlight bisected to 9661e92c10

Quoted 3 lines · Ali Gholami Rudi

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 ?

Signature · 1 line
Matthew Garrett | [email protected]
#15 lore raw

Re: missing acpi backlight bisected to 9661e92c10

Quoted 9 lines · Matthew Garrett
Quoted 3 lines · Ali Gholami Rudi

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

#16 lore raw
In reply to Ali Gholami Rudi
Quoted 9 lines · Ali Gholami Rudi
Quoted 7 lines · Andrew Morton
Quoted 2 lines · On Wed, 10 Aug 2011 07:53:18 -0700 Keith Packard <[email protected]> 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 <[email protected]> had issues with the version I merged into -mm.

Quoted 7 lines

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 <[email protected]>'

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,

Signature · 8 lines
Michel Alexandre Salim
Fedora Project Contributor: http://fedoraproject.org/

Email:  [email protected]  | GPG key ID: 78884778
Jabber: [email protected]       | IRC: [email protected]

()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
Tested-by Michel Alexandre Salim
#17 lore raw
Quoted 2 lines · Michel Alexandre Salim

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 <[email protected]>
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.

---
 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(-)
drivers/gpu/drm/i915/i915_drv.h +3 -0
index 303e4b3..cfcf3c2 100644
@@ -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 {
drivers/gpu/drm/i915/intel_dp.c +7 -0
index 0feae90..44fef5e 100644
@@ -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);
drivers/gpu/drm/i915/intel_drv.h +2 -1
index 7b330e7..6d55d94 100644
@@ -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);
drivers/gpu/drm/i915/intel_lvds.c +5 -0
index 8b521a2..31da77f 100644
@@ -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:
drivers/gpu/drm/i915/intel_opregion.c +0 -1
index b7c5ddb..b8e8158b 100644
@@ -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;
drivers/gpu/drm/i915/intel_panel.c +71 -1

81 lines not on this page · raw message

Signature · 6 lines
1.7.5.4



-- 
[email protected]

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

author Tested-by
#18 lore raw
Quoted 3 lines · Keith Packard

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!

-Kamal

Quoted 5 lines

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

Quoted 7 lines

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

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Tested-by Sedat Dilek Tested-by
#19 lore raw
In reply to Keith Packard

Hi Keith & all,

Quoted 9 lines · Keith Packard
Quoted 2 lines · Michel Alexandre Salim

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)

Quoted 1 line

From fa7419eee713b989e2c268c7b06ec9a544a2b647 Mon Sep 17 00:00:00 2001

From: Matthew Garrett <[email protected]>
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.

---
 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(-)
drivers/gpu/drm/i915/i915_drv.h +4 -0
index 6867e19..886bd29 100644
@@ -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;
 
drivers/gpu/drm/i915/intel_dp.c +7 -0
index f797fb5..2cde606 100644
@@ -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);
drivers/gpu/drm/i915/intel_drv.h +2 -1
index 6e990f9..057e2bc 100644
@@ -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);
drivers/gpu/drm/i915/intel_lvds.c +5 -0
index b28f7bd..9104496 100644
@@ -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:
drivers/gpu/drm/i915/intel_opregion.c +0 -1
index b7c5ddb..b8e8158b 100644
@@ -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;
drivers/gpu/drm/i915/intel_panel.c +71 -1

81 lines not on this page · raw message

Signature · 1 line
1.7.6
#20 lore raw
Quoted 3 lines · Michel Alexandre Salim

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.

Quoted 4 lines

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!

Signature · 1 line
[email protected]

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

author Tested-by
#21 lore raw
Quoted 9 lines · Keith Packard
Quoted 3 lines · Michel Alexandre Salim

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.

-Kamal

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#22 lore raw

Keith,

Quoted 7 lines · Kamal Mostafa
Quoted 6 lines · Keith Packard
Quoted 3 lines · Michel Alexandre Salim

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

Quoted 6 lines
Quoted 3 lines

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,

Signature · 1 line
Michel
#23 lore raw
Quoted 1 line · Michel Alexandre Salim

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.

Signature · 1 line
[email protected]

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx