From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757862AbbJHNkr (ORCPT ); Thu, 8 Oct 2015 09:40:47 -0400 Received: from mga11.intel.com ([192.55.52.93]:41833 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757740AbbJHNkp (ORCPT ); Thu, 8 Oct 2015 09:40:45 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,654,1437462000"; d="scan'208";a="822308161" From: Jani Nikula To: Huang Ying Cc: kernel test robot , lkp@01.org, LKML , Clint Taylor , Daniel Vetter , "intel-gfx\@lists.freedesktop.org" Subject: Re: [PATCH] drm/i915: disable CPU PWM also on LPT/SPT backlight disable In-Reply-To: <87io6tie5w.fsf@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <87y4fpmyqi.fsf@yhuang-dev.intel.com> <1443530508-12112-1-git-send-email-jani.nikula@intel.com> <87io6tie5w.fsf@intel.com> User-Agent: Notmuch/0.20.2+101~gb57168b (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Thu, 08 Oct 2015 16:44:07 +0300 Message-ID: <87oag979w8.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Huang, please try this patch. BR, Jani. On Tue, 29 Sep 2015, Jani Nikula wrote: > Also adding Cc: intel-gfx, please include that in follow-ups. > > Thanks, > Jani. > > On Tue, 29 Sep 2015, Jani Nikula wrote: >> Although we don't support or enable CPU PWM with LPT/SPT based systems, >> it may have been enabled prior to loading the driver. Disable the CPU >> PWM on LPT/SPT backlight disable to avoid warnings on LCPLL disable. >> >> The issue has been present on BDW since BDW enabling, but was recently >> introduced on HSW with >> >> commit 437b15b8017e0d946453c10794b0c5d4591cf180 >> Author: Jani Nikula >> Date: Fri Sep 4 16:55:13 2015 +0300 >> >> drm/i915: use pch backlight override on hsw too >> >> Reference: http://mid.gmane.org/87y4frhwsn.fsf@yhuang-dev.intel.com >> Reported-by: kernel test robot >> Signed-off-by: Jani Nikula >> --- >> drivers/gpu/drm/i915/intel_panel.c | 14 ++++++++++++++ >> 1 file changed, 14 insertions(+) >> >> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c >> index dd71e7f139e3..c9c94d05f3dd 100644 >> --- a/drivers/gpu/drm/i915/intel_panel.c >> +++ b/drivers/gpu/drm/i915/intel_panel.c >> @@ -731,6 +731,20 @@ static void lpt_disable_backlight(struct intel_connector *connector) >> >> intel_panel_actually_set_backlight(connector, 0); >> >> + /* >> + * Although we don't support or enable CPU PWM with LPT/SPT based >> + * systems, it may have been enabled prior to loading the >> + * driver. Disable to avoid warnings on LCPLL disable. >> + * >> + * This needs rework if we need to add support for CPU PWM on PCH split >> + * platforms. >> + */ >> + tmp = I915_READ(BLC_PWM_CPU_CTL2); >> + if (tmp & BLM_PWM_ENABLE) { >> + DRM_DEBUG_KMS("cpu backlight was enabled, disabling\n"); >> + I915_WRITE(BLC_PWM_CPU_CTL2, tmp & ~BLM_PWM_ENABLE); >> + } >> + >> tmp = I915_READ(BLC_PWM_PCH_CTL1); >> I915_WRITE(BLC_PWM_PCH_CTL1, tmp & ~BLM_PCH_PWM_ENABLE); >> } >> -- >> 2.1.4 >> > > -- > Jani Nikula, Intel Open Source Technology Center -- Jani Nikula, Intel Open Source Technology Center