From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenneth Graunke Subject: Re: [PATCH] i965: Embrace "unlimited" GTT mmap support Date: Thu, 25 Aug 2016 00:26:32 -0700 Message-ID: <1557865.uaZ02Zo1co@eiger> References: <20160824194244.27583-1-chris@chris-wilson.co.uk> <20160824194244.27583-2-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1007381442==" Return-path: In-Reply-To: <20160824194244.27583-2-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: mesa-dev-bounces@lists.freedesktop.org Sender: "mesa-dev" To: Chris Wilson Cc: mesa-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1007381442== Content-Type: multipart/signed; boundary="nextPart1827542.YOhhO8THZW"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPart1827542.YOhhO8THZW Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Wednesday, August 24, 2016 8:42:44 PM PDT Chris Wilson wrote: > From about kernel 4.9, GTT mmaps are virtually unlimited. A new > parameter, I915_PARAM_MMAP_GTT_VERSION, is added to advertise the > feature so query it and use it to avoid limiting tiled allocations to > only fit within the mappable aperture. > > Signed-off-by: Chris Wilson > Cc: Kenneth Graunke Cool! I didn't realize we could do page faulting here, since it's CPU-related. It's definitely nice to be able to map an unlimited amount of space, at least as a fallback, even if other methods end up being more efficient and we prefer those. [snip] > diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c > index 98f1c76..62eacba 100644 > --- a/src/mesa/drivers/dri/i965/intel_screen.c > +++ b/src/mesa/drivers/dri/i965/intel_screen.c > @@ -1006,6 +1006,17 @@ intel_get_boolean(struct intel_screen *screen, int param) > return (intel_get_param(screen, param, &value) == 0) && value; > } > > +static int > +intel_get_integer(struct intel_screen *screen, int param) > +{ > + int value = -1; > + > + if (intel_get_param(screen, param, &value) == 0) > + return value; Indentation is a bit off here (spaces only, 3 space indent). > + > + return -1; > +} > + > static void > intelDestroyScreen(__DRIscreen * sPriv) > { > @@ -1576,6 +1587,27 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp) > if (INTEL_DEBUG & DEBUG_AUB) > drm_intel_bufmgr_gem_set_aub_dump(intelScreen->bufmgr, true); > > +#define I915_PARAM_MMAP_GTT_VERSION 40 /* XXX delete me with new libdrm */ Lately some other developers have been getting grumpy about requiring new libdrm versions not in their distros. Maybe for now, we should do: #ifndef I915_PARAM_MMAP_GTT_VERSION #define I915_PARAM_MMAP_GTT_VERSION 40 /* XXX delete me with new libdrm */ #endif and we can leave it for a little while. Thanks for doing this, Chris! Reviewed-by: Kenneth Graunke --nextPart1827542.YOhhO8THZW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJXvp2oAAoJEFtb2gcdScw4I3QQAIUYorDIA7biGgzQDP+gyNF3 5p1Amje7o7PDMUYcOLGWgOgo/4sKHcdZ3rlLYncaWWnudM7cpHNBV1UoS7cAsym/ v6cdGMoPPiHWcSKUshpWeDg9PcoU5zaY60AI49IjcT93wzkRgXrsY8CfRYI8ZhZh MVD/ZOTHC29pLko5TcW7Onf5hviW6b1xy6DcWO9FfCnNlLcHnAIE0R1cUwIfF90k 5GkedQn4JBX8FVstOIL1vQFA383mu7nbe+6izqEcINjTiRHbBjuiyyvi+9FyJIDS WFEDgpDJtWLrICC079m7hljziLrtjVZ8gHLddXXt2L9ZGVsFkfEjIo2MG/jYm8pQ Vme9pRYyO07N62rhX4B9yj48CCdVraOkCyqHc+SYs2fxrm2uag8a2GMV5r0gfVRu NpOWBGy0Z5w9VXNRF9Gsh9nZ5KJCMD0ZGKn25iQx2GCiN1JQ3viQrVAeHVjci5Vm 3lIfwj6F+0u2Szmeo5uBLKan/D89DW/fBM6F/aL1a/qMFWdeBKw6TZVboLXmpqpK ptyB//eubPFvocU1hUpu9tftPfQ2WhfWgkTg05fLpOFrvIOiZOjxjOnCwd9hmsGi Gxv7Sb/Da4ghvu5xmq3QigTMb7sY9N7KocTGnelV4ZB2qefAnXdC4m+3bIVKPuoA 9FPeg9ky3P0YLRZrYKYn =Mh9u -----END PGP SIGNATURE----- --nextPart1827542.YOhhO8THZW-- --===============1007381442== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbWVzYS1kZXYg bWFpbGluZyBsaXN0Cm1lc2EtZGV2QGxpc3RzLmZyZWVkZXNrdG9wLm9yZwpodHRwczovL2xpc3Rz LmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL21lc2EtZGV2Cg== --===============1007381442==--