On Fri, 04 Jun 2021 16:31:28 +0800,
Christian König wrote:
>
>
>
> Am 04.06.21 um 10:28 schrieb Chen Li:
> > On Fri, 04 Jun 2021 16:08:26 +0800,
> > Christian König wrote:
> >>
> >>
> >> Am 04.06.21 um 09:53 schrieb Chen Li:
> >>&g
On Fri, 04 Jun 2021 16:08:26 +0800,
Christian König wrote:
>
>
>
> Am 04.06.21 um 09:53 schrieb Chen Li:
> > I met a gpu addr bug recently and the kernel log
> > tells me the pc is memcpy/memset and link register is
> > radeon_uvd_resume.
> >
> > As
done it in:
commit ba0b2275a678 ("drm/amdgpu: use memcpy_to/fromio for UVD fw upload"),
that's why it has no this issue on the same gpu and platform.
Signed-off-by: Chen Li
Reviewed-by: Christian König
---
drivers/gpu/drm/radeon/radeon_uvd.c | 4 ++--
1 file changed, 2 insertions(+), 2
Also fix some coding issues reported from sparse.
Signed-off-by: Chen Li
Acked-by: Christian König
---
drivers/gpu/drm/radeon/radeon_uvd.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c
b/drivers/gpu/drm
changelog:
v1->v2: split sparse and memcp/memset fix
v2->v3: fix coding issue and misuse of le32_to_cpu
Chen Li (2):
radeon: fix coding issues reported from sparse
radeon: use memcpy_to/fromio for UVD fw upload
drivers/gpu/drm/radeon/radeon_uvd.
Also fix some coding issues reported from sparse.
Signed-off-by: Chen Li
Acked-by: Christian König
---
drivers/gpu/drm/radeon/radeon_uvd.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c
b/drivers/gpu/drm
done it in:
commit ba0b2275a678 ("drm/amdgpu: use memcpy_to/fromio for UVD fw upload"),
that's why it has no this issue on the same gpu and platform.
Signed-off-by: Chen Li
---
drivers/gpu/drm/radeon/radeon_uvd.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/d
changelog:
v1->v2: split sparse and memcp/memset fix
v2->v3: fix coding issue and misuse of le32_to_cpu
v3->v4: merge memcpy_toio's arguments to one line
Chen Li (2):
radeon: fix coding issues reported from sparse
radeon: use memcpy_to/fromio for UVD fw upload
driver
Also fix some coding issue reported from sparse.
Signed-off-by: Chen Li
---
drivers/gpu/drm/radeon/radeon_uvd.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c
b/drivers/gpu/drm/radeon/radeon_uvd.c
index
done it in:
commit ba0b2275a678 ("drm/amdgpu: use memcpy_to/fromio for UVD fw upload"),
that's why it has no this issue on the same gpu and platform.
Signed-off-by: Chen Li
---
drivers/gpu/drm/radeon/radeon_uvd.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/d
done it in:
commit ba0b2275a678 ("drm/amdgpu: use memcpy_to/fromio for UVD fw upload"),
that's why it has no this issue on the same gpu and platform.
Also fix some coding issues reported from sparse.
Signed-off-by: Chen Li
---
drivers/gpu/drm/radeon/radeon_
chunks")
Signed-off-by: Chen Li
---
changelog:
v1->v2: add Fixes: tag
drivers/gpu/drm/radeon/radeon_cs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c
b/drivers/gpu/drm/radeon/radeon_cs.c
index fb736ef9f9aa..059431689c2d
On Wed, 17 Mar 2021 17:19:11 +0800,
Chen Li wrote:
>
> On Wed, 17 Mar 2021 15:55:47 +0800,
> Christian König wrote:
> >
> > Am 17.03.21 um 07:22 schrieb Chen Li:
> > > kvmalloc_array + __GFP_ZERO is the same with kvcalloc.
> > >
On Wed, 17 Mar 2021 15:55:47 +0800,
Christian König wrote:
>
> Am 17.03.21 um 07:22 schrieb Chen Li:
> > kvmalloc_array + __GFP_ZERO is the same with kvcalloc.
> >
> > As for p->chunks, it will be used in:
> > ```
> > if (ib_chunk->kdata)
> >
here else,
e.g.,
```
Unable to handle kernel paging request at virtual address 0001
...
pc is at memcpy+0x84/0x250
ra is at radeon_cs_ioctl+0x368/0xb90 [radeon]
```
after allocating chunks with __GFP_KERNEL/kvcalloc, this bug is fixed.
Signed-off-by: Chen Li
---
drivers/gpu/drm/radeon/
This may avoid debug confusion.
Signed-off-by: Chen Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index d9ae2cb86bc7..b5c766998045 100644
The number of chunks/chunks_array may be passed in
by userspace and can be large.
Signed-off-by: Chen Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
b/drivers/gpu/drm/amd
The number of chunks/chunks_array may be passed in
by userspace and can be large.
Signed-off-by: Chen Li
---
drivers/gpu/drm/radeon/radeon_cs.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c
b/drivers/gpu/drm/radeon/radeon_cs.c
When testing kernel with trinity, the kernel turned to tainted in that radeon
CS require large memory and order is over MAX_ORDER.
kvmalloc/kvmalloc_array should be used here in that it will fallback to vmalloc
if necessary.
Chen Li (3):
drm/radeon: Use kvmalloc for CS chunks
drm/amdgpu
On Wed, 03 Mar 2021 10:23:01 +0800,
Alex Deucher wrote:
>
> On Tue, Mar 2, 2021 at 9:16 PM Chen Li wrote:
> >
> >
> > The number of chunks/chunks_array may be passed in
> > by userspace and can be large.
> >
>
> We also need to kvfree these.
Thanks fo
This may avoid debug confusion.
Signed-off-by: Chen Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index aefb7e68977d..a1df980864a6 100644
On Tue, 02 Mar 2021 22:13:11 +0800,
Christian König wrote:
>
> Am 02.03.21 um 07:42 schrieb Chen Li:
> > The number of chunks/chunks_array may be passed in
> > by userspace and can be large.
>
> I'm wondering if we shouldn't rather restrict the number of chunks.
I
When testing kernel with trinity, the kernel turned to tainted in that radeon
CS require large memory and order is over MAX_ORDER.
kvmalloc/kvmalloc_array should be used here in that it will fallback to vmalloc
if necessary.
Chen Li (3):
drm/radeon: Use kvmalloc for CS chunks
drm/amdgpu
The number of chunks/chunks_array may be passed in
by userspace and can be large.
Signed-off-by: Chen Li
---
drivers/gpu/drm/radeon/radeon_cs.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c
b/drivers/gpu/drm/radeon/radeon_cs.c
The number of chunks/chunks_array may be passed in
by userspace and can be large.
Signed-off-by: Chen Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
b/drivers/gpu/drm/amd/amdgpu
/0x140
do_vfs_ioctl+0xe4/0x990
ksys_ioctl+0xdc/0x110
ksys_ioctl+0x78/0x110
sys_ioctl+0x2c/0x50
entSys+0xa0/0xc0
```
Obviously, the required order in this case is larger than MAX_ORDER.
So, just use kvmalloc instead.
Signed-off-by: Chen Li
---
drivers/gpu/drm/radeon/radeon_cs.c | 8
1
26 matches
Mail list logo