From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grigori Goronzy Subject: Re: [PATCH] drm/radeon: adjust default radeon_vm_block_size Date: Fri, 18 Jul 2014 22:03:48 +0200 Message-ID: <53C97DA4.4000107@chown.ath.cx> References: <1405676310-1699-1-git-send-email-deathsimple@vodafone.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2077411119==" Return-path: Received: from pygmy.kinoho.net (pygmy.kinoho.net [134.0.27.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 620E46E06B for ; Fri, 18 Jul 2014 13:03:51 -0700 (PDT) In-Reply-To: <1405676310-1699-1-git-send-email-deathsimple@vodafone.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: =?UTF-8?B?Q2hyaXN0aWFuIEvDtm5pZw==?= , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============2077411119== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7usrTJmf0baAA9bKbpned2M7WKiNrCmhA" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7usrTJmf0baAA9bKbpned2M7WKiNrCmhA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 18.07.2014 11:38, Christian K=C3=B6nig wrote: > From: Christian K=C3=B6nig >=20 > Signed-off-by: Christian K=C3=B6nig > --- > drivers/gpu/drm/radeon/radeon_device.c | 6 +++++- > drivers/gpu/drm/radeon/radeon_drv.c | 4 ++-- > 2 files changed, 7 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/r= adeon/radeon_device.c > index 03686fa..a2960db 100644 > --- a/drivers/gpu/drm/radeon/radeon_device.c > +++ b/drivers/gpu/drm/radeon/radeon_device.c > @@ -1077,7 +1077,11 @@ static void radeon_check_arguments(struct radeon= _device *rdev) > /* defines number of bits in page table versus page directory, > * a page is 4KB so we have 12 bits offset, minimum 9 bits in the > * page table and the remaining bits are in the page directory */ > - if (radeon_vm_block_size < 9) { > + if (radeon_vm_block_size =3D=3D -1) { > + radeon_vm_block_size =3D (ilog2(radeon_vm_size) + 10) / 2; > + radeon_vm_block_size =3D max(radeon_vm_block_size, 9); > + > + } else if (radeon_vm_block_size < 9) { Hm, that automatic calculation seems strange. Is there any particular reason why you haven chosen this? This will use vm_block_size=3D11 for 4096 MB VM space. I have used vm_block_size=3D12 with good results. This manages 16 MB of VM space per page table, which seems reasonable. I also see a noticeable CPU overhead reduction between 11 and 12. Grigori > dev_warn(rdev->dev, "VM page table size (%d) to small\n", > radeon_vm_block_size); > radeon_vm_block_size =3D 9; > diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/rade= on/radeon_drv.c > index cb14213..fef5320 100644 > --- a/drivers/gpu/drm/radeon/radeon_drv.c > +++ b/drivers/gpu/drm/radeon/radeon_drv.c > @@ -174,7 +174,7 @@ int radeon_aspm =3D -1; > int radeon_runtime_pm =3D -1; > int radeon_hard_reset =3D 0; > int radeon_vm_size =3D 4096; > -int radeon_vm_block_size =3D 9; > +int radeon_vm_block_size =3D -1; > int radeon_deep_color =3D 0; > =20 > MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers")= ; > @@ -246,7 +246,7 @@ module_param_named(hard_reset, radeon_hard_reset, i= nt, 0444); > MODULE_PARM_DESC(vm_size, "VM address space size in megabytes (default= 4GB)"); > module_param_named(vm_size, radeon_vm_size, int, 0444); > =20 > -MODULE_PARM_DESC(vm_block_size, "VM page table size in bits (default 9= )"); > +MODULE_PARM_DESC(vm_block_size, "VM page table size in bits (default d= epending on vm_size)"); > module_param_named(vm_block_size, radeon_vm_block_size, int, 0444); > =20 > MODULE_PARM_DESC(deep_color, "Deep Color support (1 =3D enable, 0 =3D = disable (default))"); >=20 --7usrTJmf0baAA9bKbpned2M7WKiNrCmhA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlPJfaQACgkQB4i2VYtEHqmyegCeOSAuLHW3f5shZ8hMGXBahZ6d FWoAn3rMfbY2/ytGG0EMDAEBBBQbvoY6 =LvAh -----END PGP SIGNATURE----- --7usrTJmf0baAA9bKbpned2M7WKiNrCmhA-- --===============2077411119== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============2077411119==--