From: Dave Airlie <airlied@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: christian.koenig@amd.com
Subject: [PATCH 2/5] drm/ttm: fix memcpy move bo size comparison
Date: Tue, 20 Oct 2020 08:22:54 +1000 [thread overview]
Message-ID: <20201019222257.1684769-3-airlied@gmail.com> (raw)
In-Reply-To: <20201019222257.1684769-1-airlied@gmail.com>
From: Dave Airlie <airlied@redhat.com>
start is in page units, so compare with pages.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 558e78ad82aa..b31be57884ba 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -268,7 +268,7 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
dir = 1;
if ((old_mem->mem_type == new_mem->mem_type) &&
- (new_mem->start < old_mem->start + old_mem->size)) {
+ (new_mem->start < old_mem->start + old_mem->num_pages)) {
dir = -1;
add = new_mem->num_pages - 1;
}
--
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 ` [PATCH 1/5] drm/ttm: fix eviction valuable range check Dave Airlie
2020-10-20 8:46 ` Christian König
2020-10-19 22:22 ` Dave Airlie [this message]
2020-10-20 8:51 ` [PATCH 2/5] drm/ttm: fix memcpy move bo size comparison 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-3-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