From: "Souza, Jose" Subject: Re: [PATCH 2/2] drm/i915: Just use icl+ definition for PLANE_WM blocks field Date: Wed, 6 Feb 2019 01:04:19 +0000 Message-ID: <8f3d01ea525025c2613bfbb8207e11daf216d3c5.camel@intel.com> References: <20190205205056.30081-1-ville.syrjala@linux.intel.com> <20190205205056.30081-2-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0463647785==" Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id B18256E222 for ; Wed, 6 Feb 2019 01:04:21 +0000 (UTC) In-Reply-To: <20190205205056.30081-2-ville.syrjala@linux.intel.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "ville.syrjala@linux.intel.com" , "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org --===============0463647785== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-QSZOk00IZkiDIedv6Y3R" --=-QSZOk00IZkiDIedv6Y3R Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2019-02-05 at 22:50 +0200, Ville Syrjala wrote: > From: Ville Syrj=C3=A4l=C3=A4 >=20 > The unused bits on PLANE_WM & co. are hardwired to zero. So no > need to worry about reading the extra bit on pre-icl. >=20 Reviewed-by: Jos=C3=A9 Roberto de Souza > Signed-off-by: Ville Syrj=C3=A4l=C3=A4 > --- > drivers/gpu/drm/i915/i915_reg.h | 3 +-- > drivers/gpu/drm/i915/intel_pm.c | 9 ++------- > 2 files changed, 3 insertions(+), 9 deletions(-) >=20 > diff --git a/drivers/gpu/drm/i915/i915_reg.h > b/drivers/gpu/drm/i915/i915_reg.h > index 2be34e13af78..638a586469f9 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -6784,8 +6784,7 @@ enum { > =20 > #define _PLANE_BUF_CFG_1_B 0x7127c > #define _PLANE_BUF_CFG_2_B 0x7137c > -#define SKL_DDB_ENTRY_MASK 0x3FF > -#define ICL_DDB_ENTRY_MASK 0x7FF > +#define DDB_ENTRY_MASK 0x7FF /* skl+: > 10 bits, icl+ 11 bits */ > #define DDB_ENTRY_END_SHIFT 16 > #define _PLANE_BUF_CFG_1(pipe) \ > _PIPE(pipe, _PLANE_BUF_CFG_1_A, _PLANE_BUF_CFG_1_B) > diff --git a/drivers/gpu/drm/i915/intel_pm.c > b/drivers/gpu/drm/i915/intel_pm.c > index 737005bf6816..0f15685529a0 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -3927,14 +3927,9 @@ static unsigned int skl_cursor_allocation(int > num_active) > static void skl_ddb_entry_init_from_hw(struct drm_i915_private > *dev_priv, > struct skl_ddb_entry *entry, u32 > reg) > { > - u16 mask; > =20 > - if (INTEL_GEN(dev_priv) >=3D 11) > - mask =3D ICL_DDB_ENTRY_MASK; > - else > - mask =3D SKL_DDB_ENTRY_MASK; > - entry->start =3D reg & mask; > - entry->end =3D (reg >> DDB_ENTRY_END_SHIFT) & mask; > + entry->start =3D reg & DDB_ENTRY_MASK; > + entry->end =3D (reg >> DDB_ENTRY_END_SHIFT) & DDB_ENTRY_MASK; > =20 > if (entry->end) > entry->end +=3D 1; --=-QSZOk00IZkiDIedv6Y3R Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEVNG051EijGa0MiaQVenbO/mOWkkFAlxaMpIACgkQVenbO/mO Wklqtwf/fnlHPP3TrtsL8/l7c97JOR7Zb63KPcN3pEYcHn0W7o4K/rHtdQC2SKw6 EL4Jofnr3yJ59I4iyFDRcXjKH2IJCS31wKYtOTuZdAh/WUVouhhdoDQ5hJIG1/M1 honZAqbWslgePOYAB8mPbYFsPWV41daQMED3NJ4VTCN42rMkxWKeivE1doKEWgNc RSXeVTxglN1XQknEd0sIzSlvbR8sUkecWX0T6lssmyyZuOOqIIwexStmI6kEIZ16 wf4mWZObJ9sw+BE3uN9+SLgIHsiqVeU4rR1A7nclEBSLWg+TSAckFXUam9M8UA0h SKp+mSyvzO518Bb6qwey+rweBY1Nhw== =fGj3 -----END PGP SIGNATURE----- --=-QSZOk00IZkiDIedv6Y3R-- --===============0463647785== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0463647785==--