From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: Add additional pipe parameter for vlv_dpio_read and vlv_dpio_write. Date: Thu, 5 Sep 2013 11:56:07 +0300 Message-ID: <20130905085607.GV11428@intel.com> References: <1378359217-24026-1-git-send-email-chon.ming.lee@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 659C4E6BEF for ; Thu, 5 Sep 2013 01:56:11 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1378359217-24026-1-git-send-email-chon.ming.lee@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: Chon Ming Lee Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Sep 05, 2013 at 01:33:37PM +0800, Chon Ming Lee wrote: > The additional pipe parameter will use to select which phy to target > for. > = > Signed-off-by: Chon Ming Lee > --- > drivers/gpu/drm/i915/i915_debugfs.c | 18 ++++++------ > drivers/gpu/drm/i915/i915_drv.h | 4 +- > drivers/gpu/drm/i915/intel_display.c | 51 +++++++++++++++++----------= ------ > drivers/gpu/drm/i915/intel_dp.c | 38 ++++++++++++++---------- > drivers/gpu/drm/i915/intel_hdmi.c | 48 +++++++++++++++++----------= --- > drivers/gpu/drm/i915/intel_sideband.c | 20 +++++++++--- > 6 files changed, 101 insertions(+), 78 deletions(-) > = > diff --git a/drivers/gpu/drm/i915/intel_sideband.c b/drivers/gpu/drm/i915= /intel_sideband.c > index 0a41670..12bbc28 100644 > --- a/drivers/gpu/drm/i915/intel_sideband.c > +++ b/drivers/gpu/drm/i915/intel_sideband.c > @@ -157,19 +157,29 @@ void vlv_gps_core_write(struct drm_i915_private *de= v_priv, u32 reg, u32 val) > PUNIT_OPCODE_REG_WRITE, reg, &val); > } > = > -u32 vlv_dpio_read(struct drm_i915_private *dev_priv, int reg) > +u32 vlv_get_phy_port(enum pipe pipe) This thing isn't used elsewhere, so it should be static. I think sparse would complain about such things, so it's a good idea to run it over any patches you're about to send out. > +{ > + u32 port =3D IOSF_PORT_DPIO; > + > + if (!((pipe =3D=3D PIPE_A) || (pipe =3D=3D PIPE_B))) { > + DRM_ERROR("Invalid pipe detected\n"); > + } Could just be something like WARN_ON(pipe !=3D PIPE_A && pipe !=3D PIPE_B) Though I'm not entirely sure the check is actually useful. But anyway the rest of the patch looks OK to me, and I'm assuming gcc reviewed it for you in detail already, so: Acked-by: Ville Syrj=E4l=E4 > + > + return port; > +} > + > +u32 vlv_dpio_read(struct drm_i915_private *dev_priv, enum pipe pipe, int= reg) > { > u32 val =3D 0; > = > - vlv_sideband_rw(dev_priv, DPIO_DEVFN, IOSF_PORT_DPIO, > + vlv_sideband_rw(dev_priv, DPIO_DEVFN, vlv_get_phy_port(pipe), > DPIO_OPCODE_REG_READ, reg, &val); > - > return val; > } > = > -void vlv_dpio_write(struct drm_i915_private *dev_priv, int reg, u32 val) > +void vlv_dpio_write(struct drm_i915_private *dev_priv, enum pipe pipe, i= nt reg, u32 val) > { > - vlv_sideband_rw(dev_priv, DPIO_DEVFN, IOSF_PORT_DPIO, > + vlv_sideband_rw(dev_priv, DPIO_DEVFN, vlv_get_phy_port(pipe), > DPIO_OPCODE_REG_WRITE, reg, &val); > } > = > -- = > 1.7.7.6 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel OTC