[PATCH v2 2/2] drm/amd/pp: Unify the shared struct between pp and display

2018-06-20 Thread Rex Zhu
v2: not change the header file dm_service_types.h, as it was shared with other Os. PP need to include this header file and remove same data struct defines. 1. move shared struct dm_pp_wm_sets_with_clock_ranges_soc15 to dm_pp_interface.h. 2. delete the same struct define in powerplay, us

[PATCH] drm/amd/display: Missed to set some display requests to powerplay

2018-06-20 Thread Rex Zhu
Missed to set some clock requests and display info which were needed by powerplay. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c b/driv

RE: [PATCH 2/2] drm/amdgpu: Add parsing SQ_EDC_INFO to SQ IH.

2018-06-20 Thread Grodzovsky, Andrey
> -Original Message- > From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] > Sent: Wednesday, June 20, 2018 2:37 AM > To: Grodzovsky, Andrey ; amd- > g...@lists.freedesktop.org > Cc: Panariti, David ; Haehnle, Nicolai > > Subject: Re: [PATCH 2/2] drm/amdgpu: Add parsing SQ_ED

Re: [PATCH] drm/amdgpu: band aid validating VM PTs

2018-06-20 Thread Huang Rui
On Tue, Jun 19, 2018 at 02:57:00PM +0200, Christian König wrote: > Always validating the VM PTs takes to much time. Only always validate > the per VM BOs for now. Christian, you delete PTE BO instead of moving them into idle list. The intention is to avoid them do evction back when do vm_validate_

[PATCH] drm/amd/display: Fix a loop timeout in wait_for_fbc_state_changed()

2018-06-20 Thread Dan Carpenter
We changed this loop so now it loops 1000 times instead of 10. We need to make the counter larger because a uint8_t can't go up to 1000 and we need to update the test at the end to test for 1000 instead of 10. Fixes: 2b6199a1d1b7 ("drm/amd/display: replace msleep with udelay in fbc path") Signed-

[PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs

2018-06-20 Thread Tom St Denis
This adds what should be a stable interface to read GPU load from userspace. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/am

Re: [PATCH 2/5] dma-buf: remove kmap_atomic interface

2018-06-20 Thread Christian König
Am 19.06.2018 um 17:35 schrieb Daniel Vetter: On Tue, Jun 19, 2018 at 4:47 PM, Christian König wrote: Am 18.06.2018 um 10:18 schrieb Daniel Vetter: On Fri, Jun 01, 2018 at 02:00:17PM +0200, Christian König wrote: Neither used nor correctly implemented anywhere. Just completely remove the inte

Re: [PATCH 2/5] dma-buf: remove kmap_atomic interface

2018-06-20 Thread Daniel Vetter
On Wed, Jun 20, 2018 at 2:46 PM, Christian König wrote: > Am 19.06.2018 um 17:35 schrieb Daniel Vetter: >> >> On Tue, Jun 19, 2018 at 4:47 PM, Christian König >> wrote: >>> >>> Am 18.06.2018 um 10:18 schrieb Daniel Vetter: On Fri, Jun 01, 2018 at 02:00:17PM +0200, Christian König wrote:

Re: [PATCH 2/5] dma-buf: remove kmap_atomic interface

2018-06-20 Thread Christian König
Am 20.06.2018 um 14:52 schrieb Daniel Vetter: On Wed, Jun 20, 2018 at 2:46 PM, Christian König wrote: [SNIP] Go ahead, that's the point of commit rights. dim might complain if you cherry picked them and didn't pick them up using dim apply though ... I've fixed up the Link tags, but when I tr

Re: [PATCH 10/13] drm/amd/powerplay: apply clocks adjust rules on power state change

2018-06-20 Thread Deucher, Alexander
With your proposed changes patch is: Acked-by: Alex Deucher From: amd-gfx on behalf of Quan, Evan Sent: Wednesday, June 20, 2018 2:17:57 AM To: Alex Deucher Cc: amd-gfx list Subject: RE: [PATCH 10/13] drm/amd/powerplay: apply clocks adjust rules on power stat

Re: [PATCH] drm/amd/display: Fix a loop timeout in wait_for_fbc_state_changed()

2018-06-20 Thread Harry Wentland
On 2018-06-20 08:05 AM, Dan Carpenter wrote: > We changed this loop so now it loops 1000 times instead of 10. We need > to make the counter larger because a uint8_t can't go up to 1000 and > we need to update the test at the end to test for 1000 instead of 10. > > Fixes: 2b6199a1d1b7 ("drm/amd/di

Re: [PATCH 2/5] dma-buf: remove kmap_atomic interface

2018-06-20 Thread Christian König
Am 20.06.2018 um 16:04 schrieb Christian König: Am 20.06.2018 um 14:52 schrieb Daniel Vetter: On Wed, Jun 20, 2018 at 2:46 PM, Christian König wrote: [SNIP] Go ahead, that's the point of commit rights. dim might complain if you cherry picked them and didn't pick them up using dim apply though

Re: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs

2018-06-20 Thread Abramov, Slava
I see some functions in amdgpu_pm.c have function level documentation, so that it would be good to have this for newly added functions. Another comment is inline. >From: amd-gfx on behalf of Tom St >Denis >Sent: Wednesday, June 20, 2018 8:31 AM >To: amd-gfx@lists.freedesktop.org >Cc: StDen

Re: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs

2018-06-20 Thread Tom St Denis
On 06/20/2018 10:37 AM, Abramov, Slava wrote: I see some functions in amdgpu_pm.c have function level documentation, so that it would be good to have this for newly added functions. Sure I can add some comments/docs. Another comment is inline. From: amd-gfx on behalf of Tom St Denis

Re: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs

2018-06-20 Thread Abramov, Slava
Should the comment then say 'get the load' instead of 'get the temperature'? From: StDenis, Tom Sent: Wednesday, June 20, 2018 10:39:25 AM To: Abramov, Slava; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs On 06/

[PATCH v2 1/2] drm/amdgpu: Polish SQ IH.

2018-06-20 Thread Andrey Grodzovsky
Switch to using reg fields defines istead of magic values. Add SH_ID and PRIV fields reading for instr. and err cases. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 36 +++ 1 file changed, 20 insertions(+), 16 deletions(-) diff --gi

[PATCH v2 2/2] drm/amdgpu: Add parsing SQ_EDC_INFO to SQ IH v2.

2018-06-20 Thread Andrey Grodzovsky
Access to SQ_EDC_INFO requires selecting register instance and hence mutex lock when accessing GRBM_GFX_INDEX for which a work is schedueled from IH. But SQ interrupt can be raised on many instances at once which means queuing work will usually succeed for the first one but fail for the reset since

Re: [PATCH] drm/amdgpu: band aid validating VM PTs

2018-06-20 Thread Christian König
Am 20.06.2018 um 13:25 schrieb Huang Rui: On Tue, Jun 19, 2018 at 02:57:00PM +0200, Christian König wrote: Always validating the VM PTs takes to much time. Only always validate the per VM BOs for now. Christian, you delete PTE BO instead of moving them into idle list. The intention is to avoid

Re: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs

2018-06-20 Thread Tom St Denis
Hi Slava, Ah yes, I copied it from another function (because the struct path to the pp functions is annoying to look up hehehehe). Thanks! I'll submit a v2 in a bit. Cheers, Tom On 06/20/2018 10:41 AM, Abramov, Slava wrote: Should the comment then say 'get the load' instead of 'get the tem

Re: [PATCH v2 2/2] drm/amdgpu: Add parsing SQ_EDC_INFO to SQ IH v2.

2018-06-20 Thread Christian König
Am 20.06.2018 um 16:43 schrieb Andrey Grodzovsky: Access to SQ_EDC_INFO requires selecting register instance and hence mutex lock when accessing GRBM_GFX_INDEX for which a work is schedueled from IH. But SQ interrupt can be raised on many instances at once which means queuing work will usually su

Re: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs

2018-06-20 Thread Alex Deucher
On Wed, Jun 20, 2018 at 10:39 AM, Tom St Denis wrote: > > > On 06/20/2018 10:37 AM, Abramov, Slava wrote: >> >> I see some functions in amdgpu_pm.c have function level documentation, so >> that it would be good to have this for newly added functions. > > > Sure I can add some comments/docs. > > >>

Re: [PATCH 2/5] drm/amd/pp: Fix wrong clock-unit exported to Display

2018-06-20 Thread Zhu, Rex
Hi Alex, Mikita's patch was still not in drm-next. I reviewed the interfaces between powerplay and display. Most of them were still not implemented. so the services powerplay exported to dc will not be called. I tried to implement them. and then we can try to test the strutter mode on rave

Re: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs

2018-06-20 Thread Alex Deucher
On Wed, Jun 20, 2018 at 8:31 AM, Tom St Denis wrote: > This adds what should be a stable interface to read GPU > load from userspace. > > Signed-off-by: Tom St Denis > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 41 > ++ > 1 file changed, 41 insertions(+) > >

Re: [PATCH v2 2/2] drm/amdgpu: Add parsing SQ_EDC_INFO to SQ IH v2.

2018-06-20 Thread Andrey Grodzovsky
Are you referring to insert_work->smp_mb(); ? Andrey On 06/20/2018 10:50 AM, Christian König wrote: + * Try to submit work so SQ_EDC_INFO can be accessed from + * BH. If previous work submission hasn't finished yet + * just print whatever info is possible directly from the ISR. +  

Re: [PATCH 2/5] drm/amd/pp: Fix wrong clock-unit exported to Display

2018-06-20 Thread Alex Deucher
Yes, understood. I just wanted to make sure we didn't merge both and break things. Alex On Wed, Jun 20, 2018 at 10:51 AM, Zhu, Rex wrote: > Hi Alex, > > > Mikita's patch was still not in drm-next. > > I reviewed the interfaces between powerplay and display. > > Most of them were still not imp

Re: [PATCH] drm/amd/display: Fix a typo

2018-06-20 Thread Alex Deucher
On Wed, Jun 20, 2018 at 12:56 AM, Rex Zhu wrote: > change wm_min_memg_clk_in_khz -> wm_min_mem_clk_in_khz > > Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 8 > drivers/gpu/drm/amd/display/dc/dm_services_types.h

Re: [PATCH 1/2] drm/amd/pp: Remove duplicate code in vega12_hwmgr.c

2018-06-20 Thread Alex Deucher
On Wed, Jun 20, 2018 at 1:58 AM, Rex Zhu wrote: > use smu_helper function smu_set_watermarks_for_clocks_ranges > in vega12_set_watermarks_for_clocks_ranges. > > Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 43 > +---

Re: [PATCH] drm/amd/powerplay: initialize uvd/vce powergate status v3

2018-06-20 Thread Alex Deucher
On Wed, Jun 20, 2018 at 2:40 AM, Evan Quan wrote: > On UVD/VCE dpm enabled/disabled, the powergate status will be > set as false/true. So that we will not try to ungate/gate them( > enable/disable their dpm) again. > > v2: added check for uvd/vce powergate status before gating > v3: fix typo in de

Re: [PATCH v2 2/2] drm/amd/pp: Unify the shared struct between pp and display

2018-06-20 Thread Alex Deucher
On Wed, Jun 20, 2018 at 3:09 AM, Rex Zhu wrote: > v2: not change the header file dm_service_types.h, as it was > shared with other Os. PP need to include this header file and > remove same data struct defines. > > 1. move shared struct dm_pp_wm_sets_with_clock_ranges_soc15 to >dm_pp_in

Re: [PATCH] drm/amd/display: Missed to set some display requests to powerplay

2018-06-20 Thread Alex Deucher
On Wed, Jun 20, 2018 at 4:19 AM, Rex Zhu wrote: > Missed to set some clock requests and display info which were needed > by powerplay. > > Signed-off-by: Rex Zhu Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 9 + > 1 file changed, 9 insert

Re: [PATCH v2 2/2] drm/amdgpu: Add parsing SQ_EDC_INFO to SQ IH v2.

2018-06-20 Thread Andrey Grodzovsky
OK, according to https://www.kernel.org/doc/Documentation/memory-barriers.txt, SLEEP AND WAKE-UP FUNCTIONS sections implies that. Will respin the patch. Andrey On 06/20/2018 11:02 AM, Andrey Grodzovsky wrote: Are you referring to insert_work->smp_mb(); ? Andrey On 06/20/2018 10:50 AM, C

[PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs (v2)

2018-06-20 Thread Tom St Denis
This adds what should be a stable interface to read GPU load from userspace. (v2): Fix comments and name of file per recommendations. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 47 ++ 1 file changed, 47 insertions(+) diff --git a/dr

[PATCH v3 1/2] drm/amdgpu: Polish SQ IH.

2018-06-20 Thread Andrey Grodzovsky
Switch to using reg fields defines istead of magic values. Add SH_ID and PRIV fields reading for instr. and err cases. Signed-off-by: Andrey Grodzovsky Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 36 +++ 1 file changed, 20 insertions(+),

[PATCH v3 2/2] drm/amdgpu: Add parsing SQ_EDC_INFO to SQ IH.

2018-06-20 Thread Andrey Grodzovsky
Access to SQ_EDC_INFO requires selecting register instance and hence mutex lock when accessing GRBM_GFX_INDEX for which a work is schedueled from IH. But SQ interrupt can be raised on many instances at once which means queuing work will usually succeed for the first one but fail for the rest since

Re: [PATCH v3 1/2] drm/amdgpu: Polish SQ IH.

2018-06-20 Thread Deucher, Alexander
Series is: Acked-by: Alex Deucher From: amd-gfx on behalf of Andrey Grodzovsky Sent: Wednesday, June 20, 2018 2:17:22 PM To: amd-gfx@lists.freedesktop.org; ckoenig.leichtzumer...@gmail.com Cc: Panariti, David; Haehnle, Nicolai; Grodzovsky, Andrey Subject: [PAT

[PATCH] drm/amdgpu/pm: Remove VLA usage

2018-06-20 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the maximum sane buffer size and removes copy/paste code. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.

[pull] amdgpu drm-fixes-4.18

2018-06-20 Thread Alex Deucher
Hi Dave, A few fixes for amdgpu for 4.18, nothing major. Most going to stable. The following changes since commit ce397d215ccd07b8ae3f71db689aedb85d56ab40: Linux 4.18-rc1 (2018-06-17 08:04:49 +0900) are available in the git repository at: git://people.freedesktop.org/~agd5f/linux drm-fixe

Re: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs (v2)

2018-06-20 Thread Abramov, Slava
Acked-by: Slava Abramov From: amd-gfx on behalf of Tom St Denis Sent: Wednesday, June 20, 2018 12:48:52 PM To: amd-gfx@lists.freedesktop.org Cc: StDenis, Tom Subject: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs (v2) This adds what should be a stable

Re: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs (v2)

2018-06-20 Thread Alex Deucher
On Wed, Jun 20, 2018 at 12:48 PM, Tom St Denis wrote: > This adds what should be a stable interface to read GPU > load from userspace. > > (v2): Fix comments and name of file per recommendations. > > Signed-off-by: Tom St Denis > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 47 > +

Re: [PATCH 2/2] amdgpu: kfd: use modern ktime accessors

2018-06-20 Thread Felix Kuehling
On 2018-06-18 11:35 AM, Arnd Bergmann wrote: > getrawmonotonic64() and get_monotonic_boottime64() are deprecated > because of the nonstandard naming. > > The replacement functions ktime_get_raw_ns() and ktime_get_boot_ns() > also simplify the callers. > > Signed-off-by: Arnd Bergmann In case this

Re: [PATCH 2/5] dma-buf: remove kmap_atomic interface

2018-06-20 Thread Daniel Vetter
On Wed, Jun 20, 2018 at 4:21 PM, Christian König wrote: > Am 20.06.2018 um 16:04 schrieb Christian König: >> >> Am 20.06.2018 um 14:52 schrieb Daniel Vetter: >>> >>> On Wed, Jun 20, 2018 at 2:46 PM, Christian König >>> wrote: [SNIP] > > Go ahead, that's the point of commit right

Re: [PATCH 2/5] dma-buf: remove kmap_atomic interface

2018-06-20 Thread Daniel Vetter
On Thu, Jun 21, 2018 at 8:26 AM, Daniel Vetter wrote: > On Wed, Jun 20, 2018 at 4:21 PM, Christian König > wrote: >> Am 20.06.2018 um 16:04 schrieb Christian König: >>> >>> Am 20.06.2018 um 14:52 schrieb Daniel Vetter: On Wed, Jun 20, 2018 at 2:46 PM, Christian König wrote: >