projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a829f03
)
drm/nouveau: fix dma syncing for loops (v2)
author
Dave Airlie
<airlied@redhat.com>
Thu, 11 Mar 2021 04:35:27 +0000
(14:35 +1000)
committer
Dave Airlie
<airlied@redhat.com>
Fri, 12 Mar 2021 01:21:47 +0000
(11:21 +1000)
The index variable should only be increased in one place.
Noticed this while trying to track down another oops.
v2: use while loop.
Fixes:
f295c8cfec83
("drm/nouveau: fix dma syncing warning with debugging on.")
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20210311043527.5376-1-airlied@gmail.com
drivers/gpu/drm/nouveau/nouveau_bo.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nouveau_bo.c
b/drivers/gpu/drm/nouveau/nouveau_bo.c
index
2375711
..
fabb314
100644
(file)
--- a/
drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/
drivers/gpu/drm/nouveau/nouveau_bo.c
@@
-556,7
+556,8
@@
nouveau_bo_sync_for_device(struct nouveau_bo *nvbo)
if (nvbo->force_coherent)
return;
- for (i = 0; i < ttm_dma->num_pages; ++i) {
+ i = 0;
+ while (i < ttm_dma->num_pages) {
struct page *p = ttm_dma->pages[i];
size_t num_pages = 1;
@@
-587,7
+588,8
@@
nouveau_bo_sync_for_cpu(struct nouveau_bo *nvbo)
if (nvbo->force_coherent)
return;
- for (i = 0; i < ttm_dma->num_pages; ++i) {
+ i = 0;
+ while (i < ttm_dma->num_pages) {
struct page *p = ttm_dma->pages[i];
size_t num_pages = 1;