drm/i915: do not disable backlight on vgaswitcheroo switch off
Subsystems (2)
PATCH 1/1 drm/i915: do not disable backlight on vgaswitcheroo switch off
On muxed systems, the other vgaswitcheroo client may depend on i915 to handle the backlight. We began switching off the backlight since
commit a261b246ebd552fd5d5a8ed84cc931bb821c427f
Author: Daniel Vetter <[email protected]> Date: Thu Jul 26 19:21:47 2012 +0200
drm/i915: disable all crtcs at suspend time
breaking backlight on discreet graphics in (some) muxed systems.
Keep the backlight on when the state is changed through vgaswitcheroo.
Note: The alternative would be to add a quirk table to achieve the same based on system identifiers, but AFAICS it would asymptotically approach effectively the same as this patch as more IDs are added, but with the maintenance burden of the quirk table.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=55311
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59785
--- drivers/gpu/drm/i915/intel_panel.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/i915/intel_panel.c +11 -0
@@ -515,6 +515,17 @@ void intel_panel_disable_backlight(struct drm_device *dev)struct drm_i915_private *dev_priv = dev->dev_private;unsigned long flags; +/* +* Do not disable backlight on the vgaswitcheroo path. When switching +* away from i915, the other client may depend on i915 to handle the +* backlight. This will leave the backlight on unnecessarily when +* another client is not activated. +*/ +if (dev->switch_power_state ==DRM_SWITCH_POWER_CHANGING ) { +DRM_DEBUG_DRIVER ("Skipping backlight disable on vga switch\n" ); +return ; + } +spin_lock_irqsave (&dev_priv->backlight.lock, flags); dev_priv->backlight.enabled = false;
Signature · 1 line
1.7.9.5
Quoted 11 lines · Jani Nikula
On muxed systems, the other vgaswitcheroo client may depend on i915 to handle the backlight. We began switching off the backlight since
commit
a261b246ebd552fd5d5a8ed84cc931bb821c427fAuthor: Daniel Vetter <[email protected]> Date: Thu Jul 26 19:21:47 2012 +0200drm/i915: disable all crtcs at suspend time
breaking backlight on discreet graphics in (some) muxed systems.
Quoted 8 lines
Keep the backlight on when the state is changed through vgaswitcheroo.
Note: The alternative would be to add a quirk table to achieve the same based on system identifiers, but AFAICS it would asymptotically approach effectively the same as this patch as more IDs are added, but with the maintenance burden of the quirk table.
Quoted 1 line
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59785
Quoted 30 lines
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_panel.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/i915/intel_panel.c +11
-0@@ -515,6 +515,17 @@ void intel_panel_disable_backlight(struct drm_device *dev)struct drm_i915_private *dev_priv = dev->dev_private;unsigned long flags; +/* +* Do not disable backlight on the vgaswitcheroo path. When switching +* away from i915, the other client may depend on i915 to handle the +* backlight. This will leave the backlight on unnecessarily when +* another client is not activated. +*/ +if (dev->switch_power_state ==DRM_SWITCH_POWER_CHANGING ) { +DRM_DEBUG_DRIVER ("Skipping backlight disable on vga switch\n" ); +return ; + } +spin_lock_irqsave (&dev_priv->backlight.lock, flags); dev_priv->backlight.enabled = false;Signature · 1 line
1.7.9.5
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Daniel Vetter
AppliedQuoted 19 lines · Jani Nikula
Quoted 18 lines · Jani Nikula
On muxed systems, the other vgaswitcheroo client may depend on i915 to handle the backlight. We began switching off the backlight since
commit
a261b246ebd552fd5d5a8ed84cc931bb821c427fAuthor: Daniel Vetter <[email protected]> Date: Thu Jul 26 19:21:47 2012 +0200drm/i915: disable all crtcs at suspend time
breaking backlight on discreet graphics in (some) muxed systems.
Keep the backlight on when the state is changed through vgaswitcheroo.
Note: The alternative would be to add a quirk table to achieve the same based on system identifiers, but AFAICS it would asymptotically approach effectively the same as this patch as more IDs are added, but with the maintenance burden of the quirk table.
Quoted 8 lines
Quoted 1 line
Tested-by Fede <[email protected]>Tested-by Aximab <[email protected]>Quoted 1 line
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59785
Tested-by sfievet <[email protected]>
Picked up for -fixes (with a cc: stable), thanks for the patch. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch