Re: [PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset()

2020-01-07 Thread Felix Kuehling
On 2020-01-07 16:22, Yong Zhao wrote: The SOC15_REG_OFFSET() macro needs to dereference adev->reg_offset[IP] pointer, which is NULL when there are fewer than 8 sdma engines. Avoid that by not initializing the array regardless. Change-Id: Iabae9bff7546b344720905d5d4a5cfc066a79d25 Signed-off-by: Y

[PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset()

2020-01-07 Thread Yong Zhao
The SOC15_REG_OFFSET() macro needs to dereference adev->reg_offset[IP] pointer, which is NULL when there are fewer than 8 sdma engines. Avoid that by not initializing the array regardless. Change-Id: Iabae9bff7546b344720905d5d4a5cfc066a79d25 Signed-off-by: Yong Zhao --- .../drm/amd/amdgpu/amdgpu

Re: [PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset()

2019-12-16 Thread Christian König
Felix *Sent:* Monday, December 16, 2019 2:39 PM *To:* Zhao, Yong ; amd-gfx@lists.freedesktop.org *Subject:* Re: [PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset() On 2019-12-13 8:38, Yong Zhao wrote: > This prevents the NULL pointer access when there are fewer than 8 sdma > engine

Re: [PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset()

2019-12-16 Thread Felix Kuehling
. Regards,   Felix I will fix the default case in switch. Yong *From:* Kuehling, Felix *Sent:* Monday, December 16, 2019 2:39 PM *To:* Zhao, Yong ; amd-gfx@lists.freedesktop.org *Subject:* Re: [PATCH] drm/amdkfd: Improve

Re: [PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset()

2019-12-16 Thread Zhao, Yong
in switch. Yong From: Kuehling, Felix Sent: Monday, December 16, 2019 2:39 PM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset() On 2019-12-13 8:38, Yong Zhao wrote: > This prevents

Re: [PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset()

2019-12-16 Thread Felix Kuehling
On 2019-12-13 8:38, Yong Zhao wrote: This prevents the NULL pointer access when there are fewer than 8 sdma engines. I don't see where you got a NULL pointer in the old code. Also this change is in an Arcturus-specific source file. AFAIK Arcturus always has 8 SDMA engines. The new code is m

[PATCH] drm/amdkfd: Improve function get_sdma_rlc_reg_offset()

2019-12-13 Thread Yong Zhao
This prevents the NULL pointer access when there are fewer than 8 sdma engines. Change-Id: Iabae9bff7546b344720905d5d4a5cfc066a79d25 Signed-off-by: Yong Zhao --- .../drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 64 --- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git