Re: [PATCH v3 2/2] radeon: use memcpy_to/fromio for UVD fw upload

2021-06-05 Thread 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: > > 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

[PATCH v4 1/2] radeon: fix coding issues reported from sparse

2021-06-05 Thread Chen Li
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

[PATCH v4 0/2] use memcpy_to/fromio for UVD fw upload

2021-06-05 Thread Chen Li
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

[PATCH v3 2/2] radeon: use memcpy_to/fromio for UVD fw upload

2021-06-05 Thread Chen Li
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

[PATCH v3 1/2] radeon: fix coding issues reported from sparse

2021-06-05 Thread Chen Li
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

[PATCH v4 2/2] radeon: use memcpy_to/fromio for UVD fw upload

2021-06-05 Thread Chen Li
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

[PATCH v3 0/2] use memcpy_to/fromio for UVD fw upload

2021-06-05 Thread Chen Li
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.

Re: [PATCH v3 2/2] radeon: use memcpy_to/fromio for UVD fw upload

2021-06-05 Thread Chen Li
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

[PATCH v2 0/2] use memcpy_to/fromio for UVD fw upload

2021-06-04 Thread Chen Li
changelog: v1->v2: split sparse and memcp/memset fix 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.c | 30 - 1 file changed, 17 insertions(+), 13 deleti

[PATCH v2 2/2] radeon: use memcpy_to/fromio for UVD fw upload

2021-06-04 Thread Chen Li
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

[PATCH v2 1/2] radeon: fix coding issues reported from sparse

2021-06-04 Thread Chen Li
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

[PATCH] radeon: use memcpy_to/fromio for UVD fw upload

2021-06-03 Thread Chen Li
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_

[PATCH v2 2/2] drm/amdgpu: use GTT for uvd_get_create/destory_msg

2020-12-25 Thread Chen Li
On modern gpus, GTT (system memory) works as well here, and this may also be a workaround for platforms which cannot map vram correctly. Signed-off-by: chenli Reviewed-by: Christian König --- v1->v2: no change --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++-- 1 file changed, 2

[PATCH v2 1/2] drm/radeon: use writel to avoid gcc optimization

2020-12-25 Thread Chen Li
When using e8860(gcn1) on arm64, the kernel crashed on drm/radeon: [ 11.240414] pc : __memset+0x4c/0x188 [ 11.244101] lr : radeon_uvd_get_create_msg+0x114/0x1d0 [radeon] [ 11.249995] sp : 0d7eb700 [ 11.253295] x29: 0d7eb700 x28: 8001f632a868 [ 11.258585] x27:

[PATCH 2/2] drm/amdgpu: use GTT for uvd_get_create/destory_msg

2020-12-21 Thread Chen Li
On modern gpus, GTT (system memory) works as well here, and this may also be a workaround for platforms which cannot map vram correctly. Signed-off-by: chenli --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 1/2] drm/radeon: use writel to avoid gcc optimization

2020-12-21 Thread Chen Li
When using e8860(gcn1) on arm64, the kernel crashed on drm/radeon: [ 11.240414] pc : __memset+0x4c/0x188 [ 11.244101] lr : radeon_uvd_get_create_msg+0x114/0x1d0 [radeon] [ 11.249995] sp : 0d7eb700 [ 11.253295] x29: 0d7eb700 x28: 8001f632a868 [ 11.258585] x27:

Re: [PATCH] drm/[amdgpu|radeon]: fix memset on io mem

2020-12-20 Thread Chen Li
On Fri, 18 Dec 2020 16:10:12 +0800, Christian König wrote: > > Am 18.12.20 um 04:51 schrieb Chen Li: > > [SNIP] > >>>> If your ARM base board can't do that for some then you can't use the > >>>> hardware > >>>> with that board. > >&

Re: [PATCH] drm/[amdgpu|radeon]: fix memset on io mem

2020-12-18 Thread Chen Li
On Thu, 17 Dec 2020 22:16:59 +0800, Christian König wrote: > > Am 17.12.20 um 14:37 schrieb Chen Li: > > On Thu, 17 Dec 2020 18:25:11 +0800, > > Christian König wrote: > >> Am 17.12.20 um 02:07 schrieb Chen Li: > >>> On Wed, 16 Dec 2020 22:19:11 +0800,

Re: [PATCH] drm/[amdgpu|radeon]: fix memset on io mem

2020-12-18 Thread Chen Li
On Thu, 17 Dec 2020 21:45:06 +0800, Robin Murphy wrote: > > On 2020-12-17 10:25, Christian König wrote: > > Am 17.12.20 um 02:07 schrieb Chen Li: > >> On Wed, 16 Dec 2020 22:19:11 +0800, > >> Christian König wrote: > >>> Am 16.12.20 um 14:48 schrieb Ch

Re: [PATCH] drm/[amdgpu|radeon]: fix memset on io mem

2020-12-18 Thread Chen Li
On Thu, 17 Dec 2020 18:25:11 +0800, Christian König wrote: > > Am 17.12.20 um 02:07 schrieb Chen Li: > > On Wed, 16 Dec 2020 22:19:11 +0800, > > Christian König wrote: > >> Am 16.12.20 um 14:48 schrieb Chen Li: > >>> On Wed, 16 Dec 2020 15:59:37 +0800, &g

Re: [PATCH] drm/[amdgpu|radeon]: fix memset on io mem

2020-12-17 Thread Chen Li
On Wed, 16 Dec 2020 15:59:37 +0800, Christian König wrote: > > Am 16.12.20 um 06:41 schrieb Chen Li: > > When using e8860(gcn1) on arm64, the kernel crashed on drm/radeon: > > > > [ 11.240414] pc : __memset+0x4c/0x188 > > [ 11.244101] lr : radeon_uvd_get_

Re: [PATCH] drm/[amdgpu|radeon]: fix memset on io mem

2020-12-17 Thread Chen Li
On Wed, 16 Dec 2020 22:19:11 +0800, Christian König wrote: > > Am 16.12.20 um 14:48 schrieb Chen Li: > > On Wed, 16 Dec 2020 15:59:37 +0800, > > Christian König wrote: > >> Am 16.12.20 um 06:41 schrieb Chen Li: > >>> When using e8860(gcn1) on arm64, the ke

[PATCH] drm/[amdgpu|radeon]: fix memset on io mem

2020-12-16 Thread Chen Li
When using e8860(gcn1) on arm64, the kernel crashed on drm/radeon: [ 11.240414] pc : __memset+0x4c/0x188 [ 11.244101] lr : radeon_uvd_get_create_msg+0x114/0x1d0 [radeon] [ 11.249995] sp : 0d7eb700 [ 11.253295] x29: 0d7eb700 x28: 8001f632a868 [ 11.258585] x27: