[PATCH 06/18] drm: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Also, it is not always useful to use a variable to store this constant calculated at compile time nor to re-invent the ARRAY_SIZE macro. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T;

[PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Jérémy Lefaure
Hi everyone, Using ARRAY_SIZE improves the code readability. I used coccinelle (I made a change to the array_size.cocci file [1]) to find several places where ARRAY_SIZE could be used instead of other macros or sizeof division. I tried to divide the changes into a patch per subsystem (excepted for

Re: [PATCH 1/2] drm/amd/powerplay: fix a logic error in pp_hw_init

2017-10-01 Thread Alex Deucher
On Fri, Sep 29, 2017 at 10:50 PM, Rex Zhu wrote: > Change-Id: I8607e51a0e4153b36268e2bcf4fe594c2bfbfe23 > Signed-off-by: Rex Zhu Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drive

Re: [PATCH] drm/amd/powerplay: fix a warning in pp_hw_init

2017-10-01 Thread Alex Deucher
On Fri, Sep 29, 2017 at 10:41 PM, Zhu, Rex wrote: > Hi Alex, > > Thanks for pointing out the logic error in pp_hw_init. > Please review the attached patch. Acked-by: Alex Deucher > > Best Regards > Rex > > > > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.

Re: [PATCH 12/12] drm/amdgpu/sriov:no shadow buffer recovery

2017-10-01 Thread Christian König
Am 30.09.2017 um 08:03 schrieb Monk Liu: 1, we have deadlock unresloved between shadow bo recovery and ctx_do_release, 2, for loose mode gpu reset we always assume VRAM not lost so there is no need to do that from begining Change-Id: I5259f9d943239bd1fa2e45eb446ef053299fbfb1 Signed-off-by: Monk

Re: [PATCH 12/12] drm/amdgpu/sriov:no shadow buffer recovery

2017-10-01 Thread Christian König
Am 30.09.2017 um 08:03 schrieb Monk Liu: 1, we have deadlock unresloved between shadow bo recovery and ctx_do_release, 2, for loose mode gpu reset we always assume VRAM not lost so there is no need to do that from begining Change-Id: I5259f9d943239bd1fa2e45eb446ef053299fbfb1 Signed-off-by: Monk

Re: [PATCH 00/12] *** SRIOV GPU RESET PATCHES ***

2017-10-01 Thread Christian König
Patches #1-#5 are Reviewed-by: Christian König . Need to take a look at the rest when I'm back from vacation. Regards, Christian. Am 30.09.2017 um 08:03 schrieb Monk Liu: implement strict mode gpu reset, and some changes for loose mode reset Monk Liu (12): drm/amdgpu/sriov:now must reinit

Re: [PATCH] drm/amdgpu: Reserve shared memory on VRAM for SR-IOV

2017-10-01 Thread Christian König
Am 30.09.2017 um 05:52 schrieb Horace Chen: SR-IOV need to reserve a piece of shared VRAM at the exact place to exchange data betweem PF and VF. The start address and size of the shared mem are passed to guest through VBIOS structure VRAM_UsageByFirmware. VRAM_UsageByFirmware is a general featur

Re: [PATCH] amdgpu: Add deadlock detection test suit.

2017-10-01 Thread Christian König
Am 29.09.2017 um 21:50 schrieb Andrey Grodzovsky: From: Andrey Grodzovsky Adding initial tests for locks detection when SW scheduler FIFO is full. The test works by submitting a batch of identical commands which make the CP stall waiting for condition to become true. The condition is later sat