Re: Potential BUG: [PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function(v3)

2019-11-20 Thread Christian König
Hi Luben & Iago, no the code is completely correct and intentional like this. See the code path which takes the lock in amdgpu_mm_wreg() is a workaround when the rmmio_size doesn't allow access to the full register BAR. In this case the MM_INDEX/MM_DATA registers are used as side path and b

Re: Potential BUG: [PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function(v3)

2019-11-19 Thread Luben Tuikov
Hi Iago, Thank you for finding and reporting this potential double lock. Yes indeed, I see it--it can indeed happen. Now, since the primitives used--macros using "amdgpu_mm_(r|w)reg\(.*\)"--in "amdgpu_device_vram_access()" do use their own register-access spinlocks, it maybe wise to remove the s

Potential BUG: [PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function(v3)

2019-11-16 Thread Iago Abal
Hi, With the help of a static bug finder (EBA - https://github.com/IagoAbal/eba) I have found a potential double lock in Linux Next tag next-20191115, file drivers/gpu/drm/amd/amdgpu/amdgpu_device.c. This bug seems to be introduced by commit e35e2b117f4 ("drm/amdgpu: add a generic fb accessing he

[PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function(v3)

2019-10-13 Thread Tianci Yin
From: "Tianci.Yin" add a generic helper function for accessing framebuffer via MMIO Change-Id: I4baa0aa53c93a94c2eff98c6211a61f369239982 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function

2019-10-11 Thread Tuikov, Luben
On 2019-10-10 11:50 p.m., Tianci Yin wrote: > From: "Tianci.Yin" > > add a generic helper function for accessing framebuffer via MMIO > > Change-Id: I4baa0aa53c93a94c2eff98c6211a61f369239982 > Reviewed-by: Alex Deucher > Signed-off-by: Tianci.Yin > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function

2019-10-10 Thread Tianci Yin
From: "Tianci.Yin" add a generic helper function for accessing framebuffer via MMIO Change-Id: I4baa0aa53c93a94c2eff98c6211a61f369239982 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function

2019-10-09 Thread Yin, Tianci (Rico)
Ok, Thanks for your reviewing! Rico From: Christian K?nig Sent: Wednesday, October 9, 2019 16:25 To: Alex Deucher ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Yin, Tianci (Rico) Subject: Re: [PATCH 2/8] drm/amdgpu: add a generic fb accessing

Re: [PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function

2019-10-09 Thread Christian König
Am 08.10.19 um 21:29 schrieb Alex Deucher: From: "Tianci.Yin" add a generic helper function for accessing framebuffer via MMIO Change-Id: I4baa0aa53c93a94c2eff98c6211a61f369239982 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +

[PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function

2019-10-08 Thread Alex Deucher
From: "Tianci.Yin" add a generic helper function for accessing framebuffer via MMIO Change-Id: I4baa0aa53c93a94c2eff98c6211a61f369239982 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c