From: "Michel Dänzer" <michel@daenzer.net>
To: "Alex Deucher" <alexdeucher@gmail.com>,
"Christian König" <deathsimple@vodafone.de>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/radeon: remove visible vram size limit on bo allocation
Date: Fri, 18 Jul 2014 09:41:33 +0900 [thread overview]
Message-ID: <53C86D3D.3080004@daenzer.net> (raw)
In-Reply-To: <CADnq5_PmAYYxbXW1=d_m56=Qqfxq1k2HSMJ_MG2cDYMS0Byp-w@mail.gmail.com>
On 18.07.2014 01:29, Alex Deucher wrote:
> @@ -55,10 +55,13 @@ int radeon_gem_object_create(struct radeon_device *rdev, int size,
> alignment = PAGE_SIZE;
> }
>
> - /* maximun bo size is the minimun btw visible vram and gtt size */
> - max_size = 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.
> + */
This comment needs updating: it's not the full GTT size anymore, and how
could we remove this check?
> @@ -331,6 +335,12 @@ int radeon_bo_unpin(struct radeon_bo *bo)
> for (i = 0; i < bo->placement.num_placement; i++)
> bo->placements[i] &= ~TTM_PL_FLAG_NO_EVICT;
> r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false);
> + if (likely(r == 0)) {
> + if (bo->tbo.mem.mem_type == TTM_PL_VRAM)
> + bo->rdev->vram_pin_size -= radeon_bo_size(bo);
> + else
> + bo->rdev->gart_pin_size -= radeon_bo_size(bo);
> + }
> if (unlikely(r != 0))
> dev_err(bo->rdev->dev, "%p validate failed for unpin\n", bo);
Might be better to convert the failure case to use else, no big deal though.
Other than that, the patches look good to me as well.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
next prev parent reply other threads:[~2014-07-18 0:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-16 17:26 [PATCH] drm/radeon: remove visible vram size limit on bo allocation Alex Deucher
2014-07-16 17:56 ` Christian König
2014-07-17 4:02 ` Michel Dänzer
2014-07-17 14:28 ` Christian König
2014-07-17 15:49 ` Alex Deucher
2014-07-17 16:29 ` Alex Deucher
2014-07-17 16:44 ` Christian König
2014-07-18 0:41 ` Michel Dänzer [this message]
2014-07-18 3:26 ` Alex Deucher
2014-07-18 3:30 ` Michel Dänzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53C86D3D.3080004@daenzer.net \
--to=michel@daenzer.net \
--cc=alexdeucher@gmail.com \
--cc=deathsimple@vodafone.de \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox