[PATCH] drm/amd/display: release spinlock before committing updates to stream

2018-06-26 Thread Shirish S
Currently, amdgpu_do_flip() spinlocks crtc->dev->event_lock and releases it only after committing updates to the stream. dc_commit_updates_for_stream() should be moved out of spinlock for the below reasons: 1. event_lock is supposed to protect access to acrct->pflip_status _only_ 2.

Re: [PATCH 2/3] drm/amdgpu: allocate gart memory when it's required (v2)

2018-06-26 Thread Zhang, Jerry (Junwei)
On 06/26/2018 11:53 PM, Felix Kuehling wrote: Comments inline [FK] On 2018-06-26 04:35 AM, Junwei Zhang wrote: Instead of calling gart memory on every bo pin, allocates it on demand v2: fix error handling Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c|

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-26 Thread Harry Wentland
On 2018-06-26 11:46 AM, Michel Dänzer wrote: > On 2018-06-22 03:41 PM, Leo Li wrote: >> >> Ping! >> >> FYI, all the new patches are v2, with the exception of 6/7, which is a >> v3. (On second thought, should have started a new thread :) ) > > I've pushed the changes (with some minor fix-ups),

[PATCH 4/8] drm/amdgpu: Use drm_for_each_connector_encoder_ids()

2018-06-26 Thread Ville Syrjala
From: Ville Syrjälä Use drm_for_each_connector_encoder_ids() for iterating connector->encoder_ids[]. A bit more convenient not having to deal with the implementation details. Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: Harry Wentland Cc:

[PATCH 7/8] drm/radeon: Use drm_for_each_connector_encoder_ids()

2018-06-26 Thread Ville Syrjala
From: Ville Syrjälä Use drm_for_each_connector_encoder_ids() for iterating connector->encoder_ids[]. A bit more convenient not having to deal with the implementation details. Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: Harry Wentland Cc:

Re: [PATCH] drm/amdgpu: fix UBSAN: Undefined behaviour for amdgpu_fence.c

2018-06-26 Thread Alex Deucher
On Tue, Jun 26, 2018 at 8:29 AM, Leo Liu wrote: > > > On 06/25/2018 04:42 PM, Alex Deucher wrote: >> >> On Mon, Jun 25, 2018 at 4:37 PM, James Zhu wrote: >>> >>> >>> On 2018-06-25 04:32 PM, Alex Deucher wrote: On Mon, Jun 25, 2018 at 4:26 PM, James Zhu wrote: > > > On

[PATCH xf86-video-amdgpu] Don't apply gamma to HW cursor data if colour management is enabled

2018-06-26 Thread Michel Dänzer
From: Michel Dänzer In that case, the display hardware applies gamma to the HW cursor. Bugzilla: https://bugs.freedesktop.org/106578 Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 2/3] drm/amdgpu: allocate gart memory when it's required (v2)

2018-06-26 Thread Felix Kuehling
Comments inline [FK] On 2018-06-26 04:35 AM, Junwei Zhang wrote: > Instead of calling gart memory on every bo pin, > allocates it on demand > > v2: fix error handling > > Signed-off-by: Junwei Zhang > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 6 ++ >

Re: [PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

2018-06-26 Thread Michel Dänzer
On 2018-06-22 03:41 PM, Leo Li wrote: > > Ping! > > FYI, all the new patches are v2, with the exception of 6/7, which is a > v3. (On second thought, should have started a new thread :) ) I've pushed the changes (with some minor fix-ups), thanks and sorry it took so long! -- Earthling Michel

Re: [PATCH] drm: Pass crtc to .best_encoder()

2018-06-26 Thread Harry Wentland
On 2018-06-26 11:01 AM, Harry Wentland wrote: > On 2018-06-15 03:52 PM, Ville Syrjala wrote: >> From: Ville Syrjälä >> >> To pick the correct MST encoder i915 wants to know which crtc is going >> to be feeding us. To that end let's pass the crtc to the .best_encoder() >> hook. The atomic variant

Re: [PATCH] drm: Pass crtc to .best_encoder()

2018-06-26 Thread Ville Syrjälä
On Tue, Jun 26, 2018 at 05:23:25PM +0200, Daniel Vetter wrote: > On Fri, Jun 15, 2018 at 10:52:21PM +0300, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > To pick the correct MST encoder i915 wants to know which crtc is going > > to be feeding us. To that end let's pass the crtc to the

Re: [PATCH] drm: Pass crtc to .best_encoder()

2018-06-26 Thread Daniel Vetter
On Fri, Jun 15, 2018 at 10:52:21PM +0300, Ville Syrjala wrote: > From: Ville Syrjälä > > To pick the correct MST encoder i915 wants to know which crtc is going > to be feeding us. To that end let's pass the crtc to the .best_encoder() > hook. The atomic variant already knows the crtc via the

RE: [PATCH] drm/amdgpu:Support new VCN FW version naming convention

2018-06-26 Thread Fang, Peter
Reviewed-by: Fang, Peter -Original Message- From: James Zhu [mailto:jzh...@gmail.com] Sent: Friday, June 22, 2018 3:33 PM To: amd-gfx@lists.freedesktop.org; Fang, Peter Cc: Zhu, James Subject: [PATCH] drm/amdgpu:Support new VCN FW version naming convention Support new VCN FW version

Re: [PATCH] drm: Pass crtc to .best_encoder()

2018-06-26 Thread Harry Wentland
On 2018-06-15 03:52 PM, Ville Syrjala wrote: > From: Ville Syrjälä > > To pick the correct MST encoder i915 wants to know which crtc is going > to be feeding us. To that end let's pass the crtc to the .best_encoder() > hook. The atomic variant already knows the crtc via the connector state, >

Re: [PATCH 2/2] drm/amd/display: Fix dm-pp clks type convert error

2018-06-26 Thread Harry Wentland
On 2018-06-26 01:53 AM, rex zhu wrote: > fix a typo when convert displayphyclk type. > > Signed-off-by: Rex Zhu Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git

Re: [PATCH 1/2] drm/amd/display: Drop unnecessary header file

2018-06-26 Thread Harry Wentland
On 2018-06-26 01:53 AM, rex zhu wrote: > powerplay implement hwmgr_function table for all supported asics in > order to conceal the asic's detail infomation. so no need to include > the smu10_hwmgr.h > > Signed-off-by: Rex Zhu > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 1

Re: [PATCH 1/2] drm/amdgpu: Add module parameter stutter_mode

2018-06-26 Thread Harry Wentland
Stutter can lead to a fair bit of instability so an option to disable/enable to debug is quite important. I don't have a strong preference on how this option should look. ppfeaturemask should work well. Harry On 2018-06-26 10:26 AM, Deucher, Alexander wrote: > I was going to say the same

[PATCH] dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace

2018-06-26 Thread Michel Dänzer
From: Michel Dänzer Fixes the BUG_ON spuriously triggering under the following circumstances: * ttm_eu_reserve_buffers processes a list containing multiple BOs using the same reservation object, so it calls reservation_object_reserve_shared with that reservation object once for each such

Re: [PATCH 1/2] drm/amdgpu: Add module parameter stutter_mode

2018-06-26 Thread Deucher, Alexander
I was going to say the same thing. I think it would be better to add it to the ppfeature mask for consistency. Alex From: amd-gfx on behalf of Zhu, Rex Sent: Tuesday, June 26, 2018 7:10:52 AM To: Michel Dänzer Cc: amd-gfx@lists.freedesktop.org Subject: Re:

Re: [PATCH] drm/amd/display: don't initialize result

2018-06-26 Thread Harry Wentland
On 2018-06-17 04:53 AM, Stefan Agner wrote: > The wrong enum type is used to initialize the result, leading to a > warning when using clang: > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:1998:26: warning: > implicit conversion from enumeration type 'enum ddc_result' to

Re: DCN/PP regression

2018-06-26 Thread Tom St Denis
On 06/26/2018 05:09 AM, Michel Dänzer wrote: On 2018-06-26 10:39 AM, Michel Dänzer wrote: On 2018-06-25 03:58 PM, Tom St Denis wrote: With a Tonga dGPU installed in a Raven1 system I see (attached) dmesg warning from init. Also, every warm reboot results in my Tonga failing to init (also

Re: [PATCH 2/2] drm/amd/display: Fix dm-pp clks type convert error

2018-06-26 Thread Deucher, Alexander
Series is: Reviewed-by: Alex Deucher From: amd-gfx on behalf of rex zhu Sent: Tuesday, June 26, 2018 1:53:15 AM To: amd-gfx@lists.freedesktop.org Cc: Zhu, Rex; Zhu, Rex Subject: [PATCH 2/2] drm/amd/display: Fix dm-pp clks type convert error fix a typo when

Re: [PATCH 1/2] drm/amdgpu: Add module parameter stutter_mode

2018-06-26 Thread Michel Dänzer
On 2018-06-26 01:10 PM, Zhu, Rex wrote: > Evev when enabled this feature by default,we still need a way to disable it > easily for triage issue maybe related to stutter mode. > > as this feature is related to power saving. so we may add a bit mask in > parameter ppfeaturemask. That would be

Re: [PATCH] drm/amdgpu: fix UBSAN: Undefined behaviour for amdgpu_fence.c

2018-06-26 Thread Leo Liu
On 06/25/2018 04:42 PM, Alex Deucher wrote: On Mon, Jun 25, 2018 at 4:37 PM, James Zhu wrote: On 2018-06-25 04:32 PM, Alex Deucher wrote: On Mon, Jun 25, 2018 at 4:26 PM, James Zhu wrote: On 2018-06-25 04:02 PM, Alex Deucher wrote: On Mon, Jun 25, 2018 at 3:17 PM, Leo Liu wrote: [

Re: [PATCH 1/2] drm/amdgpu: Add module parameter stutter_mode

2018-06-26 Thread Zhu, Rex
Evev when enabled this feature by default,we still need a way to disable it easily for triage issue maybe related to stutter mode. as this feature is related to power saving. so we may add a bit mask in parameter ppfeaturemask. Best Regards Rex ?? Outlook for Android

Re: DCN/PP regression

2018-06-26 Thread Michel Dänzer
On 2018-06-26 11:09 AM, Michel Dänzer wrote: > On 2018-06-26 10:39 AM, Michel Dänzer wrote: >> On 2018-06-25 03:58 PM, Tom St Denis wrote: >>> With a Tonga dGPU installed in a Raven1 system I see (attached) dmesg >>> warning from init. >>> >>> Also, every warm reboot results in my Tonga failing to

Re: [PATCH 1/2] drm/amdgpu: Add module parameter stutter_mode

2018-06-26 Thread Michel Dänzer
On 2018-06-26 12:23 PM, rex zhu wrote: > Add new parameter to control stutter mode enable/disable. > > Enable stutter mode can save power in low DRAM use cases > including but not limited to productivity application use, > web browsing, and video playback. We already have too many module

[PATCH 2/2] drm/amd/display: Ctrl stutter mode through module parameter

2018-06-26 Thread rex zhu
User can enable/disable stutter mode through module parameter stutter_mode. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

[PATCH 1/2] drm/amdgpu: Add module parameter stutter_mode

2018-06-26 Thread rex zhu
Add new parameter to control stutter mode enable/disable. Enable stutter mode can save power in low DRAM use cases including but not limited to productivity application use, web browsing, and video playback. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +

Re: DCN/PP regression

2018-06-26 Thread Michel Dänzer
On 2018-06-26 10:39 AM, Michel Dänzer wrote: > On 2018-06-25 03:58 PM, Tom St Denis wrote: >> With a Tonga dGPU installed in a Raven1 system I see (attached) dmesg >> warning from init. >> >> Also, every warm reboot results in my Tonga failing to init (also >> attached).  If I cold reboot (hit the

Re: GPU hang trying to run OpenCL kernels on x86_64

2018-06-26 Thread Luís Mendes
I've tested Ubuntu 18.04 with kernel 4.17.2 using libdrm-2.4.92 and mesa-18.1.0 and AMD RX 550 4GB is still hanging when running the identified OpenCL kernels. [ 548.704916] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring sdma0 timeout, last signaled seq=30, last emitted seq=33 [ 548.704988]

Re: DCN/PP regression

2018-06-26 Thread Michel Dänzer
On 2018-06-25 03:58 PM, Tom St Denis wrote: > With a Tonga dGPU installed in a Raven1 system I see (attached) dmesg > warning from init. > > Also, every warm reboot results in my Tonga failing to init (also > attached).  If I cold reboot (hit the reset button) it works fine. FWIW, I'm not seeing

Re: [PATCH 1/2] drm/amdgpu: separate gpu address from bo pin

2018-06-26 Thread Zhang, Jerry (Junwei)
On 06/26/2018 04:35 PM, Michel Dänzer wrote: On 2018-06-26 10:28 AM, Zhang, Jerry (Junwei) wrote: On 06/26/2018 03:46 PM, Michel Dänzer wrote: On 2018-06-26 08:00 AM, Junwei Zhang wrote: It could be got by amdgpu_bo_gpu_offset() if need Signed-off-by: Junwei Zhang [...] @@ -931,7 +928,6

[PATCH 3/3] drm/amdgpu: fix kmap error handling for bo creations

2018-06-26 Thread Junwei Zhang
kmap happens after bo pin, so unpin is required on error Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index

[PATCH 1/3] drm/amdgpu: separate gpu address from bo pin

2018-06-26 Thread Junwei Zhang
It could be got by amdgpu_bo_gpu_offset() if need Signed-off-by: Junwei Zhang Reviewed-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 6 --

Re: [PATCH 1/2] drm/amdgpu: separate gpu address from bo pin

2018-06-26 Thread Michel Dänzer
On 2018-06-26 10:28 AM, Zhang, Jerry (Junwei) wrote: > On 06/26/2018 03:46 PM, Michel Dänzer wrote: >> On 2018-06-26 08:00 AM, Junwei Zhang wrote: >>> It could be got by amdgpu_bo_gpu_offset() if need >>> >>> Signed-off-by: Junwei Zhang >>> >>> [...] >>> >>> @@ -931,7 +928,6 @@ int

[PATCH 2/3] drm/amdgpu: allocate gart memory when it's required (v2)

2018-06-26 Thread Junwei Zhang
Instead of calling gart memory on every bo pin, allocates it on demand v2: fix error handling Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ++

Re: [PATCH 2/2] drm/amdgpu: allocate gart memory when it's required

2018-06-26 Thread Zhang, Jerry (Junwei)
On 06/26/2018 03:42 PM, Michel Dänzer wrote: On 2018-06-26 08:00 AM, Junwei Zhang wrote: Instead of calling gart memory on every bo pin, allocates it on demand Signed-off-by: Junwei Zhang [...] diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

Re: [PATCH 1/2] drm/amdgpu: separate gpu address from bo pin

2018-06-26 Thread Zhang, Jerry (Junwei)
On 06/26/2018 03:46 PM, Michel Dänzer wrote: On 2018-06-26 08:00 AM, Junwei Zhang wrote: It could be got by amdgpu_bo_gpu_offset() if need Signed-off-by: Junwei Zhang [...] @@ -931,7 +928,6 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain, * amdgpu_bo_pin - pin an _bo

Re: [PATCH 1/2] drm/amdgpu: separate gpu address from bo pin

2018-06-26 Thread Michel Dänzer
On 2018-06-26 08:00 AM, Junwei Zhang wrote: > It could be got by amdgpu_bo_gpu_offset() if need > > Signed-off-by: Junwei Zhang > > [...] > > @@ -931,7 +928,6 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 > domain, > * amdgpu_bo_pin - pin an _bo buffer object > * @bo: _bo

Re: [PATCH 2/2] drm/amdgpu: allocate gart memory when it's required

2018-06-26 Thread Michel Dänzer
On 2018-06-26 08:00 AM, Junwei Zhang wrote: > Instead of calling gart memory on every bo pin, > allocates it on demand > > Signed-off-by: Junwei Zhang > > [...] > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c > index

答复: [PATCH 2/4] drm/amdgpu: s/disp_detetion_ports/disp_detection_ports/

2018-06-26 Thread Qu, Jim
Reviewed-by: Jim Qu Thanks JimQu 发件人: amd-gfx 代表 Lyude Paul 发送时间: 2018年6月26日 9:09:05 收件人: amd-gfx@lists.freedesktop.org 抄送: Zhou, David(ChunMing); David Airlie; Huang, Ray; linux-ker...@vger.kernel.org; dri-de...@lists.freedesktop.org; Kai-Heng Feng;

[PATCH] drm/amdgpu: Refine the variable name

2018-06-26 Thread rex zhu
rename clocks_in_khz to clocks_in_10khz Just follow commit 90f132cf443f ("drm/amd/display: Convert 10kHz clks from PPLib into kHz") 1. clock-unit in smu is 10KHz on legacy asics. 2. dal transfer the clock value read from powerplay by *10. so change the variable name to avoid confuse.

[PATCH 2/2] drm/amdgpu: allocate gart memory when it's required

2018-06-26 Thread Junwei Zhang
Instead of calling gart memory on every bo pin, allocates it on demand Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 10 --

[PATCH 1/2] drm/amdgpu: separate gpu address from bo pin

2018-06-26 Thread Junwei Zhang
It could be got by amdgpu_bo_gpu_offset() if need Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 6 --