From: Paul Menzel Subject: Re: [PATCH] drm/i915: Handle request to map a very large buffer object Date: Tue, 28 Feb 2012 09:09:36 +0100 Message-ID: <1330416576.3899.8.camel@mattotaupa> References: <1330374538-8138-1-git-send-email-anuj.phogat@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0484698421==" Return-path: Received: from mail.gw90.de (mail.gw90.de [188.40.100.199]) by gabe.freedesktop.org (Postfix) with ESMTP id 823939E760 for ; Tue, 28 Feb 2012 00:09:39 -0800 (PST) In-Reply-To: <1330374538-8138-1-git-send-email-anuj.phogat@gmail.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: Anuj Phogat Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0484698421== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-y8ivVwzeBedLdcPkfLrF" --=-y8ivVwzeBedLdcPkfLrF Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Anuj, thank you for your patch with the great explanation in the commit message. I found one typo in the code comment and while at it point out some grammar issue in the commit message. Am Montag, den 27.02.2012, 12:28 -0800 schrieb Anuj Phogat: > This patch sets an upper limit on the size of buffer object which can be > mapped safely. Following bugs reported segmentation fault / assertion reported *a* segmentation fault / *an* assertion =E2=80=A6 > failure with large textures: >=20 > https://bugs.freedesktop.org/show_bug.cgi?id=3D44970 > https://bugs.freedesktop.org/show_bug.cgi?id=3D46303 >=20 > This patch along with another patch which I posted on mesa-dev > (intel: Fix a case when mapping large texture fails) [1] resolve You could add the URL. > above mentioned bugs. Recently posted piglit test case (large-textures) *The* recently =E2=80=A6 > also passes with these patches. [1] http://lists.freedesktop.org/archives/mesa-dev/2012-February/019488.htm= l > Signed-off-by: Anuj Phogat > --- > This fix doesn't limit developers to create very large texture but it > restricts them to map it. I am not very confident about this patch and > setting 128 MB as the upper limit on size of buffer object. So, please > provide your views. >=20 > Chris Wilson's views on this issue: > http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg08585.html >=20 > intel/intel_bufmgr_gem.c | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) >=20 > diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c > index 0f33b71..8b05de9 100644 > --- a/intel/intel_bufmgr_gem.c > +++ b/intel/intel_bufmgr_gem.c > @@ -1191,6 +1191,17 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo) > =20 > pthread_mutex_lock(&bufmgr_gem->lock); > =20 > + /* Set am upper limit on the size of buffer which can be mapped > + safely s/am/an/ Maybe add full stop =C2=BB.=C2=AB at the end of the sentence. > + */ > + if (bo->size > 128 * 1024 * 1024) { It seems strange for me that the upper buffer size is always the same and not dependent on the chipset(?). But I guess you have checked that. > + DBG("%s:%d: Reached buffer map limit.\n", > + __FILE__, __LINE__); > + bo->virtual =3D NULL; > + pthread_mutex_unlock(&bufmgr_gem->lock); > + return -1; > + } > + > if (bo_gem->map_count++ =3D=3D 0) > drm_intel_gem_bo_open_vma(bufmgr_gem, bo_gem); Reviewed-by: Paul Menzel Thanks, Paul --=-y8ivVwzeBedLdcPkfLrF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk9Mi8AACgkQPX1aK2wOHVhTIwCfSda4y+pKV/pcwqvjb2EcgkHC gPgAn3x0YJ6+hWb0UbL7SOeEIpPNMv+H =DM8O -----END PGP SIGNATURE----- --=-y8ivVwzeBedLdcPkfLrF-- --===============0484698421== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0484698421==--