From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?windows-1252?Q?Michel_D=E4nzer?= Subject: Re: [PATCH] drm/radeon: remove visible vram size limit on bo allocation Date: Thu, 17 Jul 2014 13:02:47 +0900 Message-ID: <53C74AE7.30103@daenzer.net> References: <1405531594-25297-1-git-send-email-alexander.deucher@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail.gna.ch (darkcity.gna.ch [195.226.6.51]) by gabe.freedesktop.org (Postfix) with ESMTP id E65FD6E119 for ; Wed, 16 Jul 2014 21:02:52 -0700 (PDT) In-Reply-To: <1405531594-25297-1-git-send-email-alexander.deucher@amd.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Alex Deucher Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On 17.07.2014 02:26, Alex Deucher wrote: > Now that fallback to gtt is fixed for cpu access, we can > remove this limit. > = > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/radeon/radeon_gem.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > = > diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon= /radeon_gem.c > index fdd189b..07a13c9 100644 > --- a/drivers/gpu/drm/radeon/radeon_gem.c > +++ b/drivers/gpu/drm/radeon/radeon_gem.c > @@ -55,8 +55,11 @@ int radeon_gem_object_create(struct radeon_device *rde= v, int size, > alignment =3D PAGE_SIZE; > } > = > - /* maximun bo size is the minimun btw visible vram and gtt size */ > - max_size =3D min(rdev->mc.visible_vram_size, rdev->mc.gtt_size); > + /* Maximum bo size is the gtt size since we use the gtt to handle > + * vram to system pool migrations. We could probably remove this > + * check altogether with a little additional work. > + */ > + max_size =3D rdev->mc.gtt_size; > if (size > max_size) { > DRM_DEBUG("Allocation size %dMb bigger than %ldMb limit\n", > size >> 20, max_size >> 20); A BO of size rdev->mc.gtt_size can never actually be bound to GTT, because we have some pinned BOs in there. I think it's a bit disingenuous to let userspace allocate a BO that can never actually be used by the GPU. :) The hack I attached to https://bugs.freedesktop.org/show_bug.cgi?id=3D78717 has a start for dealing with that. I was running that patch for a while and didn't notice any bad effects from it. -- = Earthling Michel D=E4nzer | http://www.amd.com Libre software enthusiast | Mesa and X developer