From: Dave Airlie <airlied@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: christian.koenig@amd.com
Subject: [PATCH 1/5] drm/ttm: fix eviction valuable range check.
Date: Tue, 20 Oct 2020 08:22:53 +1000 [thread overview]
Message-ID: <20201019222257.1684769-2-airlied@gmail.com> (raw)
In-Reply-To: <20201019222257.1684769-1-airlied@gmail.com>
From: Dave Airlie <airlied@redhat.com>
This was adding size to start, but pfn and start are in pages,
so it should be using num_pages.
Not sure this fixes anything in the real world, just noticed it
during refactoring.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index cbc74a320db2..3101650c01b4 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -620,7 +620,7 @@ bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
/* Don't evict this BO if it's outside of the
* requested placement range
*/
- if (place->fpfn >= (bo->mem.start + bo->mem.size) ||
+ if (place->fpfn >= (bo->mem.start + bo->mem.num_pages) ||
(place->lpfn && place->lpfn <= bo->mem.start))
return false;
--
2.27.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-10-19 22:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 22:22 [PATCH 0/5] ttm fix range checks + drop some fields Dave Airlie
2020-10-19 22:22 ` Dave Airlie [this message]
2020-10-20 8:46 ` [PATCH 1/5] drm/ttm: fix eviction valuable range check Christian König
2020-10-19 22:22 ` [PATCH 2/5] drm/ttm: fix memcpy move bo size comparison Dave Airlie
2020-10-20 8:51 ` Christian König
2020-10-19 22:22 ` [PATCH 3/5] drm/ttm: drop bo->num_pages Dave Airlie
2020-10-20 3:15 ` Dave Airlie
2020-10-20 8:57 ` Christian König
2020-10-19 22:22 ` [PATCH 4/5] drm/ttm: add bo size in bytes wrapper Dave Airlie
2020-10-19 22:22 ` [PATCH 5/5] drm/ttm: get rid of storing size in ttm_resource Dave Airlie
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=20201019222257.1684769-2-airlied@gmail.com \
--to=airlied@gmail.com \
--cc=christian.koenig@amd.com \
--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