[PATCH 3/7] drm/amd/powerplay: Use proper enums in smu_adjust_power_state_dynamic

2019-07-03 Thread Nathan Chancellor
clang warns: drivers/gpu/drm/amd/amdgpu/../powerplay/amdgpu_smu.c:1374:30: warning: implicit conversion from enumeration type 'enum pp_clock_type' to different enumeration type 'enum smu_clk_type' [-Wenum-conversion] smu_force_clk_levels(smu, PP_SCLK, 1 << sclk_mask);

[PATCH 0/7] amdgpu clang warning fixes on next-20190703

2019-07-03 Thread Nathan Chancellor
Hi all, I don't do threaded patches very often so if I have messed something up, please forgive me :) This series fixes all of the clang warnings that I saw added in next-20190703. The full list is visible in the gist linked below and each full individual warning can be seen in the GitHub link

[PATCH 6/7] drm/amd/powerplay: Use proper enums in vega20_print_clk_levels

2019-07-03 Thread Nathan Chancellor
clang warns: drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:995:39: warning: implicit conversion from enumeration type 'PPCLK_e' to different enumeration type 'enum smu_clk_type' [-Wenum-conversion] ret = smu_get_current_clk_freq(smu, PPCLK_SOCCLK, );

[PATCH 1/7] drm/amdgpu/mes10.1: Fix header guard

2019-07-03 Thread Nathan Chancellor
clang warns: In file included from drivers/gpu/drm/amd/amdgpu/nv.c:53: drivers/gpu/drm/amd/amdgpu/../amdgpu/mes_v10_1.h:24:9: warning: '__MES_V10_1_H__' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef __MES_V10_1_H__ ^~~

[PATCH 4/7] drm/amd/powerplay: Zero initialize freq in smu_v11_0_get_current_clk_freq

2019-07-03 Thread Nathan Chancellor
clang warns (trimmed for brevity): drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1098:10: warning: variable 'freq' is used uninitialized whenever '?:' condition is false [-Wsometimes-uninitialized] ret = smu_get_current_clk_freq_by_table(smu, clk_id, );

[PATCH 7/7] drm/amd/powerplay: Zero initialize current_rpm in vega20_get_fan_speed_percent

2019-07-03 Thread Nathan Chancellor
clang warns (trimmed for brevity): drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3023:8: warning: variable 'current_rpm' is used uninitialized whenever '?:' condition is false [-Wsometimes-uninitialized] ret = smu_get_current_rpm(smu, _rpm);

[PATCH 5/7] drm/amd/display: Use proper enum conversion functions

2019-07-03 Thread Nathan Chancellor
clang warns: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:336:8: warning: implicit conversion from enumeration type 'enum smu_clk_type' to different enumeration type 'enum amd_pp_clock_type' [-Wenum-conversion]

[PATCH 2/7] drm/amd/powerplay: Use memset to initialize metrics structs

2019-07-03 Thread Nathan Chancellor
clang warns: drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:601:33: warning: suggest braces around initialization of subobject [-Wmissing-braces] static SmuMetrics_t metrics = {0}; ^ {}

RE: [PATCH] drm/amd/powerplay: add baco smu reset function for smu11

2019-07-03 Thread Zhang, Hawking
Reviewed-by: Hawking Zhang From: Wang, Kevin(Yang) Sent: 2019年7月4日 11:13 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Xiao, Jack ; Huang, Ray ; Feng, Kenneth ; Quan, Evan Subject: Re: [PATCH] drm/amd/powerplay: add baco smu reset function for smu11 ping..., which one can help me

Re: [PATCH] drm/amd/powerplay: add baco smu reset function for smu11

2019-07-03 Thread Wang, Kevin(Yang)
ping..., which one can help me review this patch. thanks. Best Regards, Kevin From: Wang, Kevin(Yang) Sent: Wednesday, July 3, 2019 11:09:45 AM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking; Xiao, Jack; Huang, Ray; Wang, Kevin(Yang) Subject: [PATCH]

[PATCH] drm/amdgpu: Disable ras features on all IPs before gpu reset

2019-07-03 Thread Pan, Xinhui
Perform a ras_suspend to disable ras on all IPs to workaround some ROCm stability issue. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH 2/2] drm/amdgpu/navi10: add thermal sensor support for navi10

2019-07-03 Thread Wang, Kevin(Yang)
From: amd-gfx on behalf of Alex Deucher Sent: Thursday, July 4, 2019 10:58:22 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 2/2] drm/amdgpu/navi10: add thermal sensor support for navi10 This was dropped when the code was refactored. Re-add it for navi10.

RE: [PATCH v4] drm/amdgpu: fix scheduler timeout calc

2019-07-03 Thread Cui, Flora
Ping... -Original Message- From: Cui, Flora Sent: Monday, July 1, 2019 11:37 AM To: amd-gfx@lists.freedesktop.org Cc: Cui, Flora Subject: [PATCH v4] drm/amdgpu: fix scheduler timeout calc scheduler timeout is in jiffies v2: move timeout check to amdgpu_device_get_job_timeout_settings

[PATCH] drm/amd/powerplay: add temperature sensor support for navi10

2019-07-03 Thread Wang, Kevin(Yang)
the hwmon interface need temperature sensor type support. 1. SENSOR_HOTSPOT_TEMP 2. SENSOR_EDGE_TEMP(SENSOR_GPU_TEMP) 3. SENSOR_MEM_TEMP Change-Id: I3db762e4032072fae67c95b7ba6d62e20ae5bead Signed-off-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 42 ++ 1

[PATCH 2/2] drm/amdgpu/navi10: add thermal sensor support for navi10

2019-07-03 Thread Alex Deucher
This was dropped when the code was refactored. Re-add it for navi10. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c

[PATCH 1/2] drm/amdgpu/navi10: add uclk activity sensor

2019-07-03 Thread Alex Deucher
Query the metrics table for the current uclk activity. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c

RE: [PATCH] drm/amd/powerplay: increase waiting time for smu response

2019-07-03 Thread Zhang, Hawking
Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Xiao, Jack Sent: 2019年7月3日 12:18 To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Zhang, Hawking Cc: Xiao, Jack Subject: [PATCH] drm/amd/powerplay: increase waiting time for smu response We observed some

Re: [PATCH 1/1] drm/amdkfd: Consistently apply noretry setting

2019-07-03 Thread Yang, Philip
amdgpu_noretry default value is 0, this will generate VM fault storm because the vm fault is not recovered. It may slow down the machine and need reboot after application VM fault. Maybe change default value to 1? Other than that, this is reviewed by Philip Yang On 2019-07-02 3:05 p.m.,

Re: The problem "ring gfx timeout" are experienced yet another AMD GPU Vega 8 user

2019-07-03 Thread Marek Olšák
It looks like memory corruption. You can try to disable IOMMU in the BIOS. Marek On Tue, Jul 2, 2019 at 12:07 AM Mikhail Gavrilov < mikhail.v.gavri...@gmail.com> wrote: > On Wed, 27 Feb 2019 at 00:57, Marek Olšák wrote: > > > > Sadly, the logs don't contain any clue as to why it hangs. > > > >

[PATCH v2 07/35] drm/amdgpu: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use

Re: [PATCH v2 07/35] drm/amdgpu: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Koenig, Christian
Am 03.07.2019 18:27 schrieb Fuqian Huang : kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also

Re: [PATCH 06/30] drm/amdgpu: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Emil Velikov
On Wed, 3 Jul 2019 at 14:15, Fuqian Huang wrote: > > kmemdup is introduced to duplicate a region of memory in a neat way. > Rather than kmalloc/kzalloc + memset, which the programmer needs to > write the size twice (sometimes lead to mistakes), kmemdup improves > readability, leads to smaller

Re: [RFC] mm/hmm: pass mmu_notifier_range to sync_cpu_device_pagetables

2019-07-03 Thread Jason Gunthorpe
On Wed, Jul 03, 2019 at 02:27:22AM +, Kuehling, Felix wrote: > On 2019-07-02 6:59 p.m., Jason Gunthorpe wrote: > > On Wed, Jul 03, 2019 at 12:49:12AM +0200, Christoph Hellwig wrote: > >> On Tue, Jul 02, 2019 at 07:53:23PM +, Jason Gunthorpe wrote: > I'm sending this out now since we

Re: [PATCH 2/3] drm: introduce DRIVER_FORCE_AUTH

2019-07-03 Thread Emil Velikov
On Wed, 3 Jul 2019 at 15:58, Koenig, Christian wrote: > Am 03.07.2019 16:51 schrieb Emil Velikov : > > On Wed, 3 Jul 2019 at 15:33, Koenig, Christian > wrote: > > Am 03.07.2019 16:00 schrieb Emil Velikov : > > > > On Wed, 3 Jul 2019 at 14:48, Koenig, Christian > > wrote: > > > > > > Well this

[PATCH 1/2] drm/amdgpu: add missing documentation on new module parameters

2019-07-03 Thread Alex Deucher
New parameters added for navi lack documentation. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index

[PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

2019-07-03 Thread Alex Deucher
Use the IP discovery table rather than hardcoding the settings in the driver. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Re: [PATCH 2/3] drm: introduce DRIVER_FORCE_AUTH

2019-07-03 Thread Koenig, Christian
Am 03.07.2019 16:51 schrieb Emil Velikov : On Wed, 3 Jul 2019 at 15:33, Koenig, Christian wrote: > Am 03.07.2019 16:00 schrieb Emil Velikov : > > On Wed, 3 Jul 2019 at 14:48, Koenig, Christian > wrote: > > > > Well this is still a NAK. > > > > As stated previously please just don't remove

Re: [PATCH 2/3] drm: introduce DRIVER_FORCE_AUTH

2019-07-03 Thread Emil Velikov
On Wed, 3 Jul 2019 at 15:33, Koenig, Christian wrote: > Am 03.07.2019 16:00 schrieb Emil Velikov : > > On Wed, 3 Jul 2019 at 14:48, Koenig, Christian > wrote: > > > > Well this is still a NAK. > > > > As stated previously please just don't remove DRM_AUTH and keep the > > functionality as it

Re: [PATCH 2/3] drm: introduce DRIVER_FORCE_AUTH

2019-07-03 Thread Koenig, Christian
Am 03.07.2019 16:00 schrieb Emil Velikov : On Wed, 3 Jul 2019 at 14:48, Koenig, Christian wrote: > > Well this is still a NAK. > > As stated previously please just don't remove DRM_AUTH and keep the > functionality as it is. > AFAICT nobody was in favour of your suggestion to remove DRM_AUTH

Re: [PATCH 2/3] drm: introduce DRIVER_FORCE_AUTH

2019-07-03 Thread Emil Velikov
On Wed, 3 Jul 2019 at 14:48, Koenig, Christian wrote: > > Well this is still a NAK. > > As stated previously please just don't remove DRM_AUTH and keep the > functionality as it is. > AFAICT nobody was in favour of your suggestion to remove DRM_AUTH from the handle to/from fd ioclts. Thus this

Re: [PATCH 2/3] drm: introduce DRIVER_FORCE_AUTH

2019-07-03 Thread Koenig, Christian
Well this is still a NAK. As stated previously please just don't remove DRM_AUTH and keep the functionality as it is. I absolutely don't see the point to add a new flag to remove the same functionality a different flag provides. Christian. Am 03.07.2019 15:30 schrieb Emil Velikov : From:

[PATCH 2/3] drm: introduce DRIVER_FORCE_AUTH

2019-07-03 Thread Emil Velikov
From: Emil Velikov With earlier commits we've removed DRM_AUTH for driver ioctls annotated with DRM_AUTH | DRM_RENDER_ALLOW, as the protection it introduces is effectively not existent. With next commit, we'll effectively do the same for DRM core. Yet the AMD developers have voiced concerns

Re: [pull] amdgpu drm-fixes-5.2

2019-07-03 Thread Daniel Vetter
On Wed, Jul 3, 2019 at 3:10 PM Alex Deucher wrote: > > On Wed, Jul 3, 2019 at 5:54 AM Daniel Vetter wrote: > > > > On Tue, Jul 02, 2019 at 08:57:05PM -0500, Alex Deucher wrote: > > > Hi Dave, Daniel, > > > > > > 3 fixes all cc'ed to stable. Note that dim complains about the Fixes tag > > > in

Which changes in graphic stack could cause eye strain problems

2019-07-03 Thread Михаил Богданов
I've been using Ubuntu 14.4.0 (with updates) for many years and can't switch to any newer Linux distribution. Actually on attempt to upgrade to anything newer I got problems with eyes and head (actually problem feelings are started in muscle at my right head side and then in eyes - irritation,

[PATCH 06/30] drm/amdgpu: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use

Re: [pull] amdgpu drm-fixes-5.2

2019-07-03 Thread Alex Deucher
On Wed, Jul 3, 2019 at 5:54 AM Daniel Vetter wrote: > > On Tue, Jul 02, 2019 at 08:57:05PM -0500, Alex Deucher wrote: > > Hi Dave, Daniel, > > > > 3 fixes all cc'ed to stable. Note that dim complains about the Fixes tag > > in one of the patches. The patch has: > > Fixes: 921935dc6404

Re: [pull] amdgpu drm-fixes-5.2

2019-07-03 Thread Daniel Vetter
On Tue, Jul 02, 2019 at 08:57:05PM -0500, Alex Deucher wrote: > Hi Dave, Daniel, > > 3 fixes all cc'ed to stable. Note that dim complains about the Fixes tag > in one of the patches. The patch has: > Fixes: 921935dc6404 ("drm/amd/powerplay: enforce display related settings > only on needed") >