From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [PATCH] drm/i915: fix non-DP-D eDP backlight cleanup and module reload Date: Fri, 12 Oct 2012 10:50:52 +0300 Message-ID: <1350028252.3226.0.camel@localhost> References: <1350027185-24922-1-git-send-email-jani.nikula@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id B9C62A0DCD for ; Fri, 12 Oct 2012 00:50:54 -0700 (PDT) In-Reply-To: <1350027185-24922-1-git-send-email-jani.nikula@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jani Nikula Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 > Signed-off-by: Jani Nikula Can't reproduce the problem with this: Tested-by: Imre Deak > --- > 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);