From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753699Ab1AFVD1 (ORCPT ); Thu, 6 Jan 2011 16:03:27 -0500 Received: from mga02.intel.com ([134.134.136.20]:20764 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753079Ab1AFVD0 (ORCPT ); Thu, 6 Jan 2011 16:03:26 -0500 Message-Id: <0d30dc$km57aq@orsmga001.jf.intel.com> X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.60,285,1291622400"; d="scan'208";a="694328666" Date: Thu, 06 Jan 2011 21:03:22 +0000 To: Alex Riesen Subject: Re: Linux 2.6.37 Cc: Linus Torvalds , Michal Hocko , Linux Kernel Mailing List , dri-devel@lists.freedesktop.org In-Reply-To: References: <20110106104816.GA4026@tiehlicka.suse.cz> <1bdc18$j6a1ns@fmsmga002.fm.intel.com> From: Chris Wilson Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 Jan 2011 21:55:23 +0100, Alex Riesen wrote: > On Thu, Jan 6, 2011 at 18:49, Chris Wilson wrote: > > > > My fear is that some machines have a dependency between the backlight > > and panel power status. The patch in question changed the timing between > > turning on the panel and adjusting the backlight which would be restore > > with: > > > > diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c > > index aa23070..0b40b4f 100644 > > --- a/drivers/gpu/drm/i915/intel_lvds.c > > +++ b/drivers/gpu/drm/i915/intel_lvds.c > > @@ -106,6 +106,12 @@ static void intel_lvds_enable(struct intel_lvds *intel_lvds) > >        I915_WRITE(ctl_reg, I915_READ(ctl_reg) | POWER_TARGET_ON); > >        POSTING_READ(lvds_reg); > > > > +       { > > +               u32 reg = HAS_PCH_SPLIT(dev) ? PCH_PP_STATUS : PPS_STATUS; > > +               if (wait_for(I915_READ(reg) & PP_ON, 1000)) > > +                       DRM_ERROR("timed out waiting for panel to power up\n"); > > +       } > > + > >        intel_panel_set_backlight(dev, dev_priv->backlight_level); > >  } > > FWIW it does not compile: > CC drivers/gpu/drm/i915/intel_lvds.o > drivers/gpu/drm/i915/intel_lvds.c: In function ‘intel_lvds_enable’: > drivers/gpu/drm/i915/intel_lvds.c:110: error: ‘PPS_STATUS’ undeclared > (first use in this function) > drivers/gpu/drm/i915/intel_lvds.c:110: error: (Each undeclared > identifier is reported only once > drivers/gpu/drm/i915/intel_lvds.c:110: error: for each function it appears in.) > make[4]: *** [drivers/gpu/drm/i915/intel_lvds.o] Error 1 Daniel quickly pointed out my typo: s/PPS_STATUS/PP_STATUS/ Apologies, -Chris -- Chris Wilson, Intel Open Source Technology Centre From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: Linux 2.6.37 Date: Thu, 06 Jan 2011 21:03:22 +0000 Message-ID: <0d30dc$km57aq@orsmga001.jf.intel.com> References: <20110106104816.GA4026@tiehlicka.suse.cz> <1bdc18$j6a1ns@fmsmga002.fm.intel.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Alex Riesen Cc: Linus Torvalds , Michal Hocko , Linux Kernel Mailing List , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Thu, 6 Jan 2011 21:55:23 +0100, Alex Riesen wro= te: > On Thu, Jan 6, 2011 at 18:49, Chris Wilson = wrote: > > > > My fear is that some machines have a dependency between the backlig= ht > > and panel power status. The patch in question changed the timing be= tween > > turning on the panel and adjusting the backlight which would be res= tore > > with: > > > > diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i9= 15/intel_lvds.c > > index aa23070..0b40b4f 100644 > > --- a/drivers/gpu/drm/i915/intel_lvds.c > > +++ b/drivers/gpu/drm/i915/intel_lvds.c > > @@ -106,6 +106,12 @@ static void intel_lvds_enable(struct intel_lvd= s *intel_lvds) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0I915_WRITE(ctl_reg, I915_READ(ctl_reg) |= POWER_TARGET_ON); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0POSTING_READ(lvds_reg); > > > > + =C2=A0 =C2=A0 =C2=A0 { > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 u32 reg =3D HAS_= PCH_SPLIT(dev) ? PCH_PP_STATUS : PPS_STATUS; > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (wait_for(I91= 5_READ(reg) & PP_ON, 1000)) > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 DRM_ERROR("timed out waiting for panel to power up\n"); > > + =C2=A0 =C2=A0 =C2=A0 } > > + > > =C2=A0 =C2=A0 =C2=A0 =C2=A0intel_panel_set_backlight(dev, dev_priv-= >backlight_level); > > =C2=A0} >=20 > FWIW it does not compile: > CC drivers/gpu/drm/i915/intel_lvds.o > drivers/gpu/drm/i915/intel_lvds.c: In function =E2=80=98intel_lvds_en= able=E2=80=99: > drivers/gpu/drm/i915/intel_lvds.c:110: error: =E2=80=98PPS_STATUS=E2=80= =99 undeclared > (first use in this function) > drivers/gpu/drm/i915/intel_lvds.c:110: error: (Each undeclared > identifier is reported only once > drivers/gpu/drm/i915/intel_lvds.c:110: error: for each function it ap= pears in.) > make[4]: *** [drivers/gpu/drm/i915/intel_lvds.o] Error 1 Daniel quickly pointed out my typo: s/PPS_STATUS/PP_STATUS/ Apologies, -Chris --=20 Chris Wilson, Intel Open Source Technology Centre