From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 23/40] drm/i915: Fix drain latency precision multipler for VLV Date: Thu, 31 Jul 2014 20:13:03 +0300 Message-ID: <20140731171303.GS4193@intel.com> References: <1403910271-24984-1-git-send-email-ville.syrjala@linux.intel.com> <1403910271-24984-24-git-send-email-ville.syrjala@linux.intel.com> <20140731151654.GP4193@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 8339D6E692 for ; Thu, 31 Jul 2014 10:13:08 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Paulo Zanoni Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Thu, Jul 31, 2014 at 02:05:49PM -0300, Paulo Zanoni wrote: > 2014-07-31 12:16 GMT-03:00 Ville Syrj=E4l=E4 : > > On Thu, Jul 31, 2014 at 12:08:09PM -0300, Paulo Zanoni wrote: > >> 2014-06-27 20:04 GMT-03:00 : > >> > From: Zhenyu Wang > >> > > >> > >> I guess this affects both VLV and CHV, but my CHV docs still contain > >> 16/32 instead of 32/64. I didn't check any VLV docs. Any pointers, or > >> an explanation on the commit message? > > > > I added a FIXME about that in patch 26. > > > > According to this http://patchwork.freedesktop.org/patch/29860/ > > CHV has been confirmed to use the 32/64 values too. Hopefully > > we'll get the spec updated too... > = > Ok, but on this case it's quite hard to give a reviewed-by stamp to > the patch, since there's no way to review. I guess this is one of the > cases where we just have to believe the authors and merge the patch? The VLV docs have the new 32/64 values. > = > > > >> > >> > >> > Signed-off-by: Zhenyu Wang > >> > --- > >> > drivers/gpu/drm/i915/i915_reg.h | 50 ++++++++++++++++++++----------= ----------- > >> > drivers/gpu/drm/i915/intel_pm.c | 12 +++++----- > >> > 2 files changed, 31 insertions(+), 31 deletions(-) > >> > > >> > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/= i915_reg.h > >> > index 191df9e..7ab5a03 100644 > >> > --- a/drivers/gpu/drm/i915/i915_reg.h > >> > +++ b/drivers/gpu/drm/i915/i915_reg.h > >> > @@ -3909,47 +3909,47 @@ enum punit_power_well { > >> > > >> > /* drain latency register values*/ > >> > #define DRAIN_LATENCY_PRECISION_32 32 > >> > -#define DRAIN_LATENCY_PRECISION_16 16 > >> > +#define DRAIN_LATENCY_PRECISION_64 64 > >> > #define VLV_DDL1 (VLV_DISPLAY_BASE + 0x70050) > >> > -#define DDL_CURSORA_PRECISION_32 (1<<31) > >> > -#define DDL_CURSORA_PRECISION_16 (0<<31) > >> > +#define DDL_CURSORA_PRECISION_64 (1<<31) > >> > +#define DDL_CURSORA_PRECISION_32 (0<<31) > >> > #define DDL_CURSORA_SHIFT 24 > >> > -#define DDL_SPRITEB_PRECISION_32 (1<<23) > >> > -#define DDL_SPRITEB_PRECISION_16 (0<<23) > >> > +#define DDL_SPRITEB_PRECISION_64 (1<<23) > >> > +#define DDL_SPRITEB_PRECISION_32 (0<<23) > >> > #define DDL_SPRITEB_SHIFT 16 > >> > -#define DDL_SPRITEA_PRECISION_32 (1<<15) > >> > -#define DDL_SPRITEA_PRECISION_16 (0<<15) > >> > +#define DDL_SPRITEA_PRECISION_64 (1<<15) > >> > +#define DDL_SPRITEA_PRECISION_32 (0<<15) > >> > #define DDL_SPRITEA_SHIFT 8 > >> > -#define DDL_PLANEA_PRECISION_32 (1<<7) > >> > -#define DDL_PLANEA_PRECISION_16 (0<<7) > >> > +#define DDL_PLANEA_PRECISION_64 (1<<7) > >> > +#define DDL_PLANEA_PRECISION_32 (0<<7) > >> > #define DDL_PLANEA_SHIFT 0 > >> > > >> > #define VLV_DDL2 (VLV_DISPLAY_BASE + 0x70054) > >> > -#define DDL_CURSORB_PRECISION_32 (1<<31) > >> > -#define DDL_CURSORB_PRECISION_16 (0<<31) > >> > +#define DDL_CURSORB_PRECISION_64 (1<<31) > >> > +#define DDL_CURSORB_PRECISION_32 (0<<31) > >> > #define DDL_CURSORB_SHIFT 24 > >> > -#define DDL_SPRITED_PRECISION_32 (1<<23) > >> > -#define DDL_SPRITED_PRECISION_16 (0<<23) > >> > +#define DDL_SPRITED_PRECISION_64 (1<<23) > >> > +#define DDL_SPRITED_PRECISION_32 (0<<23) > >> > #define DDL_SPRITED_SHIFT 16 > >> > -#define DDL_SPRITEC_PRECISION_32 (1<<15) > >> > -#define DDL_SPRITEC_PRECISION_16 (0<<15) > >> > +#define DDL_SPRITEC_PRECISION_64 (1<<15) > >> > +#define DDL_SPRITEC_PRECISION_32 (0<<15) > >> > #define DDL_SPRITEC_SHIFT 8 > >> > -#define DDL_PLANEB_PRECISION_32 (1<<7) > >> > -#define DDL_PLANEB_PRECISION_16 (0<<7) > >> > +#define DDL_PLANEB_PRECISION_64 (1<<7) > >> > +#define DDL_PLANEB_PRECISION_32 (0<<7) > >> > #define DDL_PLANEB_SHIFT 0 > >> > > >> > #define VLV_DDL3 (VLV_DISPLAY_BASE + 0x70058) > >> > -#define DDL_CURSORC_PRECISION_32 (1<<31) > >> > -#define DDL_CURSORC_PRECISION_16 (0<<31) > >> > +#define DDL_CURSORC_PRECISION_64 (1<<31) > >> > +#define DDL_CURSORC_PRECISION_32 (0<<31) > >> > #define DDL_CURSORC_SHIFT 24 > >> > -#define DDL_SPRITEF_PRECISION_32 (1<<23) > >> > -#define DDL_SPRITEF_PRECISION_16 (0<<23) > >> > +#define DDL_SPRITEF_PRECISION_64 (1<<23) > >> > +#define DDL_SPRITEF_PRECISION_32 (0<<23) > >> > #define DDL_SPRITEF_SHIFT 16 > >> > -#define DDL_SPRITEE_PRECISION_32 (1<<15) > >> > -#define DDL_SPRITEE_PRECISION_16 (0<<15) > >> > +#define DDL_SPRITEE_PRECISION_64 (1<<15) > >> > +#define DDL_SPRITEE_PRECISION_32 (0<<15) > >> > #define DDL_SPRITEE_SHIFT 8 > >> > -#define DDL_PLANEC_PRECISION_32 (1<<7) > >> > -#define DDL_PLANEC_PRECISION_16 (0<<7) > >> > +#define DDL_PLANEC_PRECISION_64 (1<<7) > >> > +#define DDL_PLANEC_PRECISION_32 (0<<7) > >> > #define DDL_PLANEC_SHIFT 0 > >> > > >> > /* FIFO watermark sizes etc */ > >> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/= intel_pm.c > >> > index 55f3e6b..9413184 100644 > >> > --- a/drivers/gpu/drm/i915/intel_pm.c > >> > +++ b/drivers/gpu/drm/i915/intel_pm.c > >> > @@ -1253,13 +1253,13 @@ static bool vlv_compute_drain_latency(struct= drm_device *dev, > >> > > >> > entries =3D (clock / 1000) * pixel_size; > >> > *plane_prec_mult =3D (entries > 256) ? > >> > - DRAIN_LATENCY_PRECISION_32 : DRAIN_LATENCY_PRECISION= _16; > >> > + DRAIN_LATENCY_PRECISION_64 : DRAIN_LATENCY_PRECISION= _32; > >> > *plane_dl =3D (64 * (*plane_prec_mult) * 4) / ((clock / 1000= ) * > >> > pixel_size); > >> > > >> > entries =3D (clock / 1000) * 4; /* BPP is always 4 for cur= sor */ > >> > *cursor_prec_mult =3D (entries > 256) ? > >> > - DRAIN_LATENCY_PRECISION_32 : DRAIN_LATENCY_PRECISION= _16; > >> > + DRAIN_LATENCY_PRECISION_64 : DRAIN_LATENCY_PRECISION= _32; > >> > *cursor_dl =3D (64 * (*cursor_prec_mult) * 4) / ((clock / 10= 00) * 4); > >> > > >> > return true; > >> > @@ -1285,9 +1285,9 @@ static void vlv_update_drain_latency(struct dr= m_device *dev) > >> > if (vlv_compute_drain_latency(dev, 0, &plane_prec_mult, &pla= nea_dl, > >> > &cursor_prec_mult, &cursora_dl= )) { > >> > cursora_prec =3D (cursor_prec_mult =3D=3D DRAIN_LATE= NCY_PRECISION_32) ? > >> > - DDL_CURSORA_PRECISION_32 : DDL_CURSORA_PRECI= SION_16; > >> > + DDL_CURSORA_PRECISION_32 : DDL_CURSORA_PRECI= SION_64; > >> > planea_prec =3D (plane_prec_mult =3D=3D DRAIN_LATENC= Y_PRECISION_32) ? > >> > - DDL_PLANEA_PRECISION_32 : DDL_PLANEA_PRECISI= ON_16; > >> > + DDL_PLANEA_PRECISION_32 : DDL_PLANEA_PRECISI= ON_64; > >> > > >> > I915_WRITE(VLV_DDL1, cursora_prec | > >> > (cursora_dl << DDL_CURSORA_SHIFT) | > >> > @@ -1298,9 +1298,9 @@ static void vlv_update_drain_latency(struct dr= m_device *dev) > >> > if (vlv_compute_drain_latency(dev, 1, &plane_prec_mult, &pla= neb_dl, > >> > &cursor_prec_mult, &cursorb_dl= )) { > >> > cursorb_prec =3D (cursor_prec_mult =3D=3D DRAIN_LATE= NCY_PRECISION_32) ? > >> > - DDL_CURSORB_PRECISION_32 : DDL_CURSORB_PRECI= SION_16; > >> > + DDL_CURSORB_PRECISION_32 : DDL_CURSORB_PRECI= SION_64; > >> > planeb_prec =3D (plane_prec_mult =3D=3D DRAIN_LATENC= Y_PRECISION_32) ? > >> > - DDL_PLANEB_PRECISION_32 : DDL_PLANEB_PRECISI= ON_16; > >> > + DDL_PLANEB_PRECISION_32 : DDL_PLANEB_PRECISI= ON_64; > >> > > >> > I915_WRITE(VLV_DDL2, cursorb_prec | > >> > (cursorb_dl << DDL_CURSORB_SHIFT) | > >> > -- > >> > 1.8.5.5 > >> > > >> > _______________________________________________ > >> > Intel-gfx mailing list > >> > Intel-gfx@lists.freedesktop.org > >> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > >> > >> > >> > >> -- > >> Paulo Zanoni > > > > -- > > Ville Syrj=E4l=E4 > > Intel OTC > = > = > = > -- = > Paulo Zanoni -- = Ville Syrj=E4l=E4 Intel OTC