[PATCH] drm/amdgpu: Fix fence timeout after gpu reset

2019-05-20 Thread Pan, Xinhui
late init work will do IB tests, there is a race between late_init_work and interrupt enablement. So call resume helper in advance. Otherwice hit rence timeout. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 +++ 1 file changed, 7 insertions(+), 4

Re: [PATCH] gpu: drm: use struct_size() in kmalloc()

2019-05-20 Thread Alex Deucher
On Mon, May 20, 2019 at 7:19 PM Pan, Xinhui wrote: > > Daniel, what you are talking about is totally wrong. > 1) AFAIK, only one zero-size array can be in the end of a struct. > 2) two struct_size will add up struct itself twice. the sum is wrong then. > > No offense. I can't help feeling lucky

Re: [PATCH v15 00/17] arm64: untag user pointers passed to the kernel

2019-05-20 Thread Evgenii Stepanov
On Fri, May 17, 2019 at 7:49 AM Catalin Marinas wrote: > > Hi Andrey, > > On Mon, May 06, 2019 at 06:30:46PM +0200, Andrey Konovalov wrote: > > One of the alternative approaches to untagging that was considered is to > > completely strip the pointer tag as the pointer enters the kernel with > >

回复: [PATCH] gpu: drm: use struct_size() in kmalloc()

2019-05-20 Thread Pan, Xinhui
Daniel, what you are talking about is totally wrong. 1) AFAIK, only one zero-size array can be in the end of a struct. 2) two struct_size will add up struct itself twice. the sum is wrong then. No offense. I can't help feeling lucky that you are in intel. 发件人: Daniel Vetter 代表 Daniel Vetter

Re: [PATCH] gpu: drm: use struct_size() in kmalloc()

2019-05-20 Thread Pan, Xinhui
Daniel, your idea is obviously and totally wrong. There can NOT be more than one zero-size array in a struct. Nack for them all. From: Daniel Vetter on behalf of Daniel Vetter Sent: Tuesday, May 21, 2019 12:28:07 AM To: Pan, Xinhui Cc: Deucher, Alexander;

Re: [PATCH] gpu: drm: use struct_size() in kmalloc()

2019-05-20 Thread Gustavo A. R. Silva
On 5/20/19 12:41 PM, Alex Deucher wrote: > On Fri, May 17, 2019 at 8:43 AM xiaolinkui wrote: >> >> Use struct_size() helper to keep code simple. >> Again, this is not the reason why this helper was created. >> Signed-off-by: xiaolinkui >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3

Re: [PATCH] gpu: drm: use struct_size() in kmalloc()

2019-05-20 Thread Alex Deucher
On Fri, May 17, 2019 at 8:43 AM xiaolinkui wrote: > > Use struct_size() helper to keep code simple. > > Signed-off-by: xiaolinkui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) This patch results in the following build error: DESCEND

Re: [PATCH] gpu: fix typos in code comments

2019-05-20 Thread Alex Deucher
On Mon, May 20, 2019 at 1:04 PM Weitao Hou wrote: > > fix eror to error > > Signed-off-by: Weitao Hou Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: How to get useful information other than "the whole system locks up"?

2019-05-20 Thread Braiam
Decided to simply contact the manufacturer and ask them for the latest vBIOS. Though it didn't crash the days before changing the bios, it hasn't crashed the days later. Plus points since opencl also seems to be working fine now, rather than making the card crash too (or refusing to work

Re: [PATCH] gpu: drm: use struct_size() in kmalloc()

2019-05-20 Thread Daniel Vetter
On Fri, May 17, 2019 at 04:44:30PM +, Pan, Xinhui wrote: > I am going to put more members which are also array after this struct, > not only obj[]. Looks like this struct_size did not help on multiple > array case. Thanks anyway. You can then add them up,

RE: [PATCH] drm/amdgpu: set correct vram_width for vega10 under sriov

2019-05-20 Thread Tao, Yintian
Hi Alex So sorry for my missing of you patch because the outlook on website didn’t show it. Your patch seems cleaner and better. Can you help submit it ? Thanks in advance. Reviewed-by: Yintian Tao Can From: Deucher, Alexander Sent: Saturday, May 18, 2019 1:07 AM To: Tao, Yintian ; Alex

RE: [PATCH] drm/amdgpu: no read DF register under SRIOV and set correct vram width

2019-05-20 Thread Tao, Yintian
Please ignore it. I miss the patch which Alex attached. -Original Message- From: amd-gfx On Behalf Of Yintian Tao Sent: Monday, May 20, 2019 5:21 PM To: amd-gfx@lists.freedesktop.org Cc: Huang, Trigger ; Liu, Monk ; Tao, Yintian Subject: [PATCH] drm/amdgpu: no read DF register under

[PATCH] drm/amdgpu: no read DF register under SRIOV and set correct vram width

2019-05-20 Thread Yintian Tao
PART1: Under SRIOV, reading DF register has chance to lead to AER error in host side, just skip reading it. PART2: For Vega10 SR-IOV, vram_width can't be read from ATOM as RAVEN, and DF related registers is not readable, seems hardcord is the only way to set the correct vram_width. Signed-off-by:

Re: lima_bo memory leak after drm_sched job destruction rework

2019-05-20 Thread Koenig, Christian
The problem is simply that we only delete the jobs when we were able to cancel the timeout handler. Now what happens is that the timeout handler was never started in the first place, so we can't cancel it. Just adding a simple "if (sched->timeout != MAX_SCHEDULE_TIMEOUT &&" should do the