diff mbox

drm/i915: fix non-DP-D eDP backlight cleanup and module reload

Message ID 1350027185-24922-1-git-send-email-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jani Nikula Oct. 12, 2012, 7:33 a.m. UTC
Backlight is initialized for eDP, but cleaned up only for eDP on DP-D
port. This leaves behind a dangling backlight interface on module unload on
machines that have eDP connected to something other than DP-D, and breaks
the backlight interface for subsequent module reloads. Fix the cleanup, and
thus module reload on affected machines.

Reported-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Mika Kuoppala Oct. 12, 2012, 7:48 a.m. UTC | #1
On Fri, 12 Oct 2012 10:33:05 +0300, Jani Nikula <jani.nikula@intel.com> wrote:
> Backlight is initialized for eDP, but cleaned up only for eDP on DP-D
> port. This leaves behind a dangling backlight interface on module unload on
> machines that have eDP connected to something other than DP-D, and breaks
> the backlight interface for subsequent module reloads. Fix the cleanup, and
> thus module reload on affected machines.
> 
> Reported-by: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
Imre Deak Oct. 12, 2012, 7:50 a.m. UTC | #2
On Fri, 2012-10-12 at 10:33 +0300, Jani Nikula wrote:
> Backlight is initialized for eDP, but cleaned up only for eDP on DP-D
> port. This leaves behind a dangling backlight interface on module unload on
> machines that have eDP connected to something other than DP-D, and breaks
> the backlight interface for subsequent module reloads. Fix the cleanup, and
> thus module reload on affected machines.
> 
> Reported-by: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Can't reproduce the problem with this:

Tested-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_dp.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index fcce392..6dfe5dd 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2386,8 +2386,9 @@ static void
>  intel_dp_destroy(struct drm_connector *connector)
>  {
>  	struct drm_device *dev = connector->dev;
> +	struct intel_dp *intel_dp = intel_attached_dp(connector);
>  
> -	if (intel_dpd_is_edp(dev))
> +	if (is_edp(intel_dp))
>  		intel_panel_destroy_backlight(dev);
>  
>  	drm_sysfs_connector_remove(connector);
Daniel Vetter Oct. 12, 2012, 8:25 a.m. UTC | #3
On Fri, Oct 12, 2012 at 10:48:20AM +0300, Mika Kuoppala wrote:
> On Fri, 12 Oct 2012 10:33:05 +0300, Jani Nikula <jani.nikula@intel.com> wrote:
> > Backlight is initialized for eDP, but cleaned up only for eDP on DP-D
> > port. This leaves behind a dangling backlight interface on module unload on
> > machines that have eDP connected to something other than DP-D, and breaks
> > the backlight interface for subsequent module reloads. Fix the cleanup, and
> > thus module reload on affected machines.
> > 
> > Reported-by: Imre Deak <imre.deak@intel.com>
> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Picked up for -fixes, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index fcce392..6dfe5dd 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2386,8 +2386,9 @@  static void
 intel_dp_destroy(struct drm_connector *connector)
 {
 	struct drm_device *dev = connector->dev;
+	struct intel_dp *intel_dp = intel_attached_dp(connector);
 
-	if (intel_dpd_is_edp(dev))
+	if (is_edp(intel_dp))
 		intel_panel_destroy_backlight(dev);
 
 	drm_sysfs_connector_remove(connector);