From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: vlv/chv: fix DSI sideband register accessing Date: Mon, 19 May 2014 17:50:45 +0200 Message-ID: <20140519155045.GU8790@phenom.ffwll.local> References: <1400488878-23130-1-git-send-email-imre.deak@intel.com> <1400488878-23130-2-git-send-email-imre.deak@intel.com> <20140519080111.27f6cd65@jbarnes-desktop> <1400512218.1438.13.camel@intelbox> <20140519083316.2b9a4cb8@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f52.google.com (mail-ee0-f52.google.com [74.125.83.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 104A46E21E for ; Mon, 19 May 2014 08:50:50 -0700 (PDT) Received: by mail-ee0-f52.google.com with SMTP id e53so3703691eek.25 for ; Mon, 19 May 2014 08:50:49 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140519083316.2b9a4cb8@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, May 19, 2014 at 08:33:16AM -0700, Jesse Barnes wrote: > On Mon, 19 May 2014 18:10:18 +0300 > Imre Deak wrote: > > > On Mon, 2014-05-19 at 08:01 -0700, Jesse Barnes wrote: > > > On Mon, 19 May 2014 11:41:18 +0300 > > > Imre Deak wrote: > > > > > > > So far we used the wrong opcodes to access the DSI registers, so the > > > > register writes during DSI programming didn't actually succeed and left > > > > the registers unchanged. This wasn't a problem for the initial modeset, > > > > where the BIOS-programmed values happened to work, but after resuming > > > > from s0ix these registers are reset and failing to program them results > > > > in a blank screen. > > > > > > > > Signed-off-by: Imre Deak > > > > --- > > > > drivers/gpu/drm/i915/intel_sideband.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/gpu/drm/i915/intel_sideband.c b/drivers/gpu/drm/i915/intel_sideband.c > > > > index f3909d5..01d841e 100644 > > > > --- a/drivers/gpu/drm/i915/intel_sideband.c > > > > +++ b/drivers/gpu/drm/i915/intel_sideband.c > > > > @@ -270,13 +270,13 @@ void intel_sbi_write(struct drm_i915_private *dev_priv, u16 reg, u32 value, > > > > u32 vlv_flisdsi_read(struct drm_i915_private *dev_priv, u32 reg) > > > > { > > > > u32 val = 0; > > > > - vlv_sideband_rw(dev_priv, DPIO_DEVFN, IOSF_PORT_FLISDSI, SB_MRD_NP, > > > > + vlv_sideband_rw(dev_priv, DPIO_DEVFN, IOSF_PORT_FLISDSI, SB_CRRDDA_NP, > > > > reg, &val); > > > > return val; > > > > } > > > > > > > > void vlv_flisdsi_write(struct drm_i915_private *dev_priv, u32 reg, u32 val) > > > > { > > > > - vlv_sideband_rw(dev_priv, DPIO_DEVFN, IOSF_PORT_FLISDSI, SB_MWR_NP, > > > > + vlv_sideband_rw(dev_priv, DPIO_DEVFN, IOSF_PORT_FLISDSI, SB_CRWRDA_NP, > > > > reg, &val); > > > > } > > > > > > Nice find... is this documented somewhere so we can put a reference > > > in? Or is it in the Punit HAS somewhere already and we just missed it? > > > > I found it in the VLV2_SidebandMsg_HAS, there is already a comment in > > this file with a reference to it. > > Cool, this one has my > Reviewed-by: Jesse Barnes > then too. Both patches merged, thanks. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch