Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value

2018-03-30 Thread Eric Huang
Please confirm this with SMU team about your assumption. Regards, Eric On 03/30/2018 08:28 PM, Zhu, Rex wrote: when PPSMC_MSG_PmStatusLogSample sent, firmware will clean the temp sampling date, and add the sample task to dpm loop. but firmware not  clean the registers.  if firmware not

Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value

2018-03-30 Thread Zhu, Rex
when PPSMC_MSG_PmStatusLogSample sent, firmware will clean the temp sampling date, and add the sample task to dpm loop. but firmware not clean the registers. if firmware not update the registers, we will read out the original value. Best Regards Rex

[PATCH 1/2] drm/amdgpu: Fix memory leaks at amdgpu_init() error path

2018-03-30 Thread Takashi Iwai
amdgpu driver checks vgacon_text_force() after some initializations but without cleaning up. This will result in leaks. Move the check of vgacon_text_force() to the beginning of amdgpu_init() for fixing it and also for optimization. Signed-off-by: Takashi Iwai ---

[PATCH 2/2] drm/amdgpu: Add modeset module option

2018-03-30 Thread Takashi Iwai
amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten. This patch adds the missing

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-30 Thread Logan Gunthorpe
On 29/03/18 07:58 PM, Jerome Glisse wrote: > On Thu, Mar 29, 2018 at 10:25:52AM -0600, Logan Gunthorpe wrote: >> >> >> On 29/03/18 10:10 AM, Christian König wrote: >>> Why not? I mean the dma_map_resource() function is for P2P while other >>> dma_map_* functions are only for system memory. >>

[PATCH] drm/amdgpu/si: implement get/set pcie_lanes asic callback

2018-03-30 Thread Alex Deucher
Required for dpm setup on some asics. Fixes a NULL dereference on asics that require it. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102553 Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/si.c | 67

[PATCH] drm/amd/display: fix spelling mistake: "Usupported" -> "Unsupported"

2018-03-30 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in DRM_ERROR error message text Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-30 Thread Jerome Glisse
On Thu, Mar 29, 2018 at 11:33:34PM -0700, Christoph Hellwig wrote: > On Thu, Mar 29, 2018 at 09:58:54PM -0400, Jerome Glisse wrote: > > dma_map_resource() is the right API (thought its current implementation > > is fill with x86 assumptions). So i would argue that arch can decide to > > implement

[PATCH] drm/amdgpu/powerplay: whitespace cleanup

2018-03-30 Thread Alex Deucher
Fix confusing indentation. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c

Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value

2018-03-30 Thread Eric Huang
On 03/30/2018 10:36 AM, Eric Huang wrote: It is not necessary to do that. The register will reset to 0 after reading. The register is not reset after reading. Actually after PPSMC_MSG_PmStatusLogSample sent, the register will be updated. So it is still not necessary to do that. Eric Eric

Re: [PATCH] drm/amd/powerply: fix power reading on Fiji

2018-03-30 Thread Eric Huang
I reproduced the issue reported by customer. When running a HSA test, repeating to read power via AGT and rocm-smi (driver). We set power limit of 175w to a Fiji. The results from AGT are all below 175w and the results from driver have a lot of value over 175, some are almost double of 175. So

Re: [PATCH 00/24] drm_framebuffer boilerplate removal

2018-03-30 Thread Alex Deucher
On Fri, Mar 30, 2018 at 11:00 AM, Daniel Stone wrote: > Hi Alex, > > On 30 March 2018 at 15:47, Alex Deucher wrote: >> On Fri, Mar 30, 2018 at 10:11 AM, Daniel Stone wrote: >>> I intend to remove create_handle when all drivers

Re: [PATCH 00/24] drm_framebuffer boilerplate removal

2018-03-30 Thread Daniel Stone
Hi Alex, On 30 March 2018 at 15:47, Alex Deucher wrote: > On Fri, Mar 30, 2018 at 10:11 AM, Daniel Stone wrote: >> I intend to remove create_handle when all drivers are converted over >> to placing BOs directly inside drm_framebuffer. For most

Re: [PATCH 00/24] drm_framebuffer boilerplate removal

2018-03-30 Thread Alex Deucher
On Fri, Mar 30, 2018 at 10:11 AM, Daniel Stone wrote: > Hi, > I've been working on a getfb2[0] ioctl, which amongst other things > supports multi-planar framebuffers as well as modifiers. getfb > currently calls the framebuffer's handle_create hook, which doesn't > support

Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value

2018-03-30 Thread Eric Huang
It is not necessary to do that. The register will reset to 0 after reading. Eric On 03/30/2018 03:33 AM, Rex Zhu wrote: Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 13 + 1 file changed, 13 insertions(+) diff --git

[PATCH 24/24] drm/amdgpu: Move GEM BO to drm_framebuffer

2018-03-30 Thread Daniel Stone
Since drm_framebuffer can now store GEM objects directly, place them there rather than in our own subclass. As this makes the framebuffer create_handle and destroy functions the same as the GEM framebuffer helper, we can reuse those. Signed-off-by: Daniel Stone Cc: Alex

[PATCH 22/24] drm/radeon: Move GEM BO to drm_framebuffer

2018-03-30 Thread Daniel Stone
Since drm_framebuffer can now store GEM objects directly, place them there rather than in our own subclass. As this makes the framebuffer create_handle and destroy functions the same as the GEM framebuffer helper, we can reuse those. Signed-off-by: Daniel Stone Cc: Alex

[PATCH 23/24] drm/radeon: radeon_framebuffer -> drm_framebuffer

2018-03-30 Thread Daniel Stone
Since drm_framebuffer can now store GEM objects directly, place them there rather than in our own subclass. As this makes the framebuffer create_handle and destroy functions the same as the GEM framebuffer helper, we can reuse those. Signed-off-by: Daniel Stone Cc: Alex

[PATCH 00/24] drm_framebuffer boilerplate removal

2018-03-30 Thread Daniel Stone
Hi, I've been working on a getfb2[0] ioctl, which amongst other things supports multi-planar framebuffers as well as modifiers. getfb currently calls the framebuffer's handle_create hook, which doesn't support multiple planes. Thanks to Noralf's recent work, drivers can just store GEM objects

Re: [PATCH libdrm] headers: sync up amdgpu_drm.h with drm-next

2018-03-30 Thread Alex Deucher
Chunming submitted it: https://cgit.freedesktop.org/mesa/drm/commit/include/drm/amdgpu_drm.h?id=2fa58c77fb9e563219f8ec647b9ddf52f3390ed2 Alex On Thu, Mar 29, 2018 at 10:04 PM, Yu, Qiang wrote: > Hi, Can anyone submit it? > > Thanks, > Qiang > >

[PATCH -next] drm/amdkfd: Make function kfd_dev_is_large_bar() static

2018-03-30 Thread Wei Yongjun
Fixes the following sparse warning: drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:1150:6: warning: symbol 'kfd_dev_is_large_bar' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- 1 file changed, 1

[PATCH -next] drm/amdkfd: Fix the error return code in kfd_ioctl_unmap_memory_from_gpu()

2018-03-30 Thread Wei Yongjun
Passing NULL pointer to PTR_ERR will result in return value of 0 indicating success which is clearly not what it is intended here. This patch returns -EINVAL instead. Fixes: 5ec7e02854b3 ("drm/amdkfd: Add ioctls for GPUVM memory management") Signed-off-by: Wei Yongjun ---

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-30 Thread Jerome Glisse
On Thu, Mar 29, 2018 at 10:25:52AM -0600, Logan Gunthorpe wrote: > > > On 29/03/18 10:10 AM, Christian König wrote: > > Why not? I mean the dma_map_resource() function is for P2P while other > > dma_map_* functions are only for system memory. > > Oh, hmm, I wasn't aware dma_map_resource was

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-30 Thread Christoph Hellwig
On Thu, Mar 29, 2018 at 09:58:54PM -0400, Jerome Glisse wrote: > dma_map_resource() is the right API (thought its current implementation > is fill with x86 assumptions). So i would argue that arch can decide to > implement it or simply return dma error address which trigger fallback > path into

Re: [PATCH] drm/amdgpu/sdma4:fix sdma engine hang

2018-03-30 Thread Deucher, Alexander
The spec claims it does and we use it for HDP flush... Acked-by: Alex Deucher From: amd-gfx on behalf of Emily Deng Sent: Friday, March 30, 2018 4:24:08 AM To:

Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value

2018-03-30 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Rex Zhu Sent: Friday, March 30, 2018 3:33:26 AM To: amd-gfx@lists.freedesktop.org Cc: Zhu, Rex Subject: [PATCH] drm/amd/pp:

[PATCH] drm/amdgpu/sdma4:fix sdma engine hang

2018-03-30 Thread Emily Deng
The sdma doesn't support register write and wait in one command. Use this will make sdma engine hang. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git

RE: [PATCH] drm/amd/powerply: fix power reading on Fiji

2018-03-30 Thread Zhu, Rex
>> Power value is wrong reported by customer. Hi Eric, What is the wrong value customer reported? In my end, there is no big difference between 20ms and 200ms or 2s. I tested on Fiji/Tonga when gpu idle or running fullscreen glxgears. why need 50 ms? How long does the SMU core take to

[PATCH] drm/amd/pp: Clean register first to avoid read original value

2018-03-30 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c index aaa9f5b..38cf3a1 100644 ---