From: Thomas Hellstrom <thomas@shipmail.org>
To: "Christian König" <deathsimple@vodafone.de>, alexdeucher@gmail.com
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm/ttm: fix adding foreign BOs to the LRU during init v2
Date: Mon, 11 Jan 2016 16:06:23 +0100 [thread overview]
Message-ID: <5693C4EF.7070006@shipmail.org> (raw)
In-Reply-To: <1452522922-2614-1-git-send-email-deathsimple@vodafone.de>
LGTM, minor nitpick below.
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
On 01/11/2016 03:35 PM, Christian König wrote:
> From: Christian König <christian.koenig@amd.com>
>
> If we import a BO with an external reservation object we don't
> reserve/unreserve it. So we never add it to the LRU causing a possible
> deny of service.
s/deny/denial/
>
> v2: fix typo in commit message
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/ttm/ttm_bo.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 745e996..a98a5d5 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -1170,9 +1170,15 @@ int ttm_bo_init(struct ttm_bo_device *bdev,
> if (likely(!ret))
> ret = ttm_bo_validate(bo, placement, interruptible, false);
>
> - if (!resv)
> + if (!resv) {
> ttm_bo_unreserve(bo);
>
> + } else if (!(bo->mem.placement & TTM_PL_FLAG_NO_EVICT)) {
> + spin_lock(&bo->glob->lru_lock);
> + ttm_bo_add_to_lru(bo);
> + spin_unlock(&bo->glob->lru_lock);
> + }
> +
> if (unlikely(ret))
> ttm_bo_unref(&bo);
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2016-01-11 15:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 14:35 [PATCH 1/5] drm/ttm: fix adding foreign BOs to the LRU during init v2 Christian König
2016-01-11 14:35 ` [PATCH 2/5] drm/ttm: fix adding foreign BOs to the swap LRU Christian König
2016-01-11 15:14 ` Thomas Hellstrom
2016-01-11 14:35 ` [PATCH 3/5] drm/ttm: add ttm_bo_move_to_lru_tail function v2 Christian König
2016-01-11 15:29 ` Thomas Hellstrom
2016-01-11 14:35 ` [PATCH 4/5] drm/amdgpu: move VM page tables to the LRU end on CS v2 Christian König
2016-01-11 14:35 ` [PATCH 5/5] drm/amdgpu: validate duplicates first Christian König
2016-01-13 17:23 ` Alex Deucher
2016-01-11 15:06 ` Thomas Hellstrom [this message]
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=5693C4EF.7070006@shipmail.org \
--to=thomas@shipmail.org \
--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