RE: [PATCH] drm/amdgpu: add rcu_barrier after entity fini

2018-05-16 Thread Zhou, David(ChunMing)
Looks good, Acked-by: Chunming Zhou -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Emily Deng Sent: Thursday, May 17, 2018 11:05 AM To: amd-gfx@lists.freedesktop.org Cc: Deng, Emily Subject: [PATCH]

[PATCH] drm/amdgpu: add rcu_barrier after entity fini

2018-05-16 Thread Emily Deng
To free the fence from the amdgpu_fence_slab, need twice call_rcu, to avoid the amdgpu_fence_slab_fini call kmem_cache_destroy(amdgpu_fence_slab) before kmem_cache_free(amdgpu_fence_slab, fence), add rcu_barrier after drm_sched_entity_fini. The kmem_cache_free(amdgpu_fence_slab, fence)'s call

Re: [PATCH v2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread zhoucm1
Yes, every thing is clear, Acked-by: Chunming Zhou On 2018年05月16日 23:33, Andrey Grodzovsky wrote: This spinlock is superfluous, any call to drm_sched_entity_push_job should already be under a lock together with matching drm_sched_job_init to match the order of insertion

Re: [PATCH] drm/amdgpu/display: remove VEGAM config option

2018-05-16 Thread Harry Wentland
On 2018-05-16 10:12 AM, Alex Deucher wrote: > Leftover from bringup. No need to keep it around for > upstream. > > Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/Kconfig

Re: [PATCH 2/2] drm/amdgpu/display: fix vega12/20 handling in dal_asic_id.h

2018-05-16 Thread Harry Wentland
On 2018-05-16 04:37 PM, Alex Deucher wrote: > - Remove unused ASICREV_IS_VEGA12_p() macro > - Fix ASICREV_IS_VEGA12_P() macro to properly check against vega20 > > Signed-off-by: Alex Deucher Both patches are Reviewed-by: Harry Wentland Harry

Re: [PATCH] drm/amdgpu: conditionally compile amdgpu's amdkfd files

2018-05-16 Thread Felix Kuehling
Hi Oded, Thanks for working on this! The Makefile changes look good. Instead of checking and calling function pointers in amdgpu_amdkfd_... functions at runtime, couldn't you just define empty stub functions in amdgpu_amdkfd.h if KFD is not enabled? I think that would make the code shorter and

[PATCH 3/4] drm/amdgpu: add a df 1.7 implementation of enable_ecc_force_par_wr_rmw

2018-05-16 Thread Alex Deucher
Needed for proper memory setup depending on whether ECC is enabled on a particular board. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/df_v1_7.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/df_v1_7.c

[PATCH 2/4] drm/amdgpu: add new DF callback for ECC setup

2018-05-16 Thread Alex Deucher
The ForceParWrRMW setting needs to be enabled for ECC, but disabled when ECC is not enabled. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 4/4] drm/amdgpu/gmc9: disable partial wr rmw if ECC is not enabled

2018-05-16 Thread Alex Deucher
The vbios mistakenly sets this bit on some boards without ECC. This can lead to reduced performance in some workloads. Disable the bit if the board does not have ECC. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 + 1 file changed, 1

[PATCH 1/4] drm/amdgpu: add new DF 1.7 register defs

2018-05-16 Thread Alex Deucher
Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/asic_reg/df/df_1_7_offset.h | 4 drivers/gpu/drm/amd/include/asic_reg/df/df_1_7_sh_mask.h | 4 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/df/df_1_7_offset.h

[PATCH 1/2] drm/amdgpu/display: remove VEGA20 config option

2018-05-16 Thread Alex Deucher
Leftover from bringup. No need to keep it around for upstream. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/Kconfig| 8 - drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 - drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c|

[PATCH 2/2] drm/amdgpu/display: fix vega12/20 handling in dal_asic_id.h

2018-05-16 Thread Alex Deucher
- Remove unused ASICREV_IS_VEGA12_p() macro - Fix ASICREV_IS_VEGA12_P() macro to properly check against vega20 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/include/dal_asic_id.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git

Re: [PATCH] drm/amd/pp: Workaround flickering issue on RV

2018-05-16 Thread Harry Wentland
On 2018-05-14 09:17 AM, Alex Deucher wrote: > On Mon, May 14, 2018 at 4:06 AM, Rex Zhu wrote: >> Screen flickering observed while running 1080p video using >> MPV_VAAPI/VDPAU with 4x4K@60 monitors >> >> Need to set higher mclk in this configuration. >> >> Signed-off-by: Rex Zhu

Re: [PATCH xf86-video-amdgpu 10/13] Push staged color properties when DPMS state toggles On

2018-05-16 Thread Michel Dänzer
On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > This will persist color management properties on a CRTC across DPMS > state changes. > > Signed-off-by: Leo (Sunpeng) Li > --- > src/drmmode_display.c | 6 ++ > 1 file

Re: [PATCH xf86-video-amdgpu 08/13] Set driver-private CRTC's dpms mode on disable

2018-05-16 Thread Michel Dänzer
On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > The dpms_mode flag on the driver-private CRTC was not being set when > it's DPMS state is set to off. This causes some problems when toggling > it back on, as some conditionals check this flag. >

Re: [PATCH xf86-video-amdgpu 03/13] List disabled color properties on RandR outputs without a CRTC

2018-05-16 Thread Michel Dänzer
On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > The properties on an RandR output needs to stay consistent throughout > it's lifecycle. However, we cannot list color properties on an output if > there is no CRTC attached. > > Therefore,

Re: [PATCH xf86-video-amdgpu 02/13] Push color properties to kernel DRM on CRTC init

2018-05-16 Thread Michel Dänzer
On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > Push staged values on the driver-private CRTC, to kernel DRM when it's > initialized. This is to flush out any previous state that hardware was > in, and set them to their default values. > >

Re: [PATCH xf86-video-amdgpu 01/13] Add color management properties to driver-private CRTC object

2018-05-16 Thread Michel Dänzer
On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > Non-legacy color management consists of 3 properties on the CRTC: > Degamma LUT, Color Transformation Matrix (CTM), and Gamma LUT. > > Add these properties to the driver-private CRTC, and

Re: [PATCH xf86-video-amdgpu 00/13] Enabling Color Management - Round 2

2018-05-16 Thread Michel Dänzer
On 2018-05-03 08:31 PM, sunpeng...@amd.com wrote: > > 3. The three color management properties (Degamma LUT, Color Transform Matrix >(CTM), and Gamma LUT) are hard-coded into the DDX driver, to be listed (as >disabled) regardless of whether a CRTC is attached on the output, or > whether

Re: [PATCH 3/6] drm/amdgpu: Add CG/PG flags for VCN

2018-05-16 Thread Alex Deucher
On Wed, May 16, 2018 at 8:52 AM, Rex Zhu wrote: > Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/include/amd_shared.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH 2/6] drm/amd/pp: Add smu support for vcn cg/pg on RV

2018-05-16 Thread Alex Deucher
On Wed, May 16, 2018 at 8:52 AM, Rex Zhu wrote: > Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 25 > ++- > 1 file changed, 24 insertions(+), 1

Re: [PATCH 1/6] drm/amdgpu: skip CG for VCN when late_init/fini

2018-05-16 Thread Alex Deucher
On Wed, May 16, 2018 at 8:52 AM, Rex Zhu wrote: > Signed-off-by: Rex Zhu Please add a patch description. E.g., something like: VCN clockgating is handled manually like VCE and UVD. With that fixed: Reviewed-by: Alex Deucher > --- >

Re: [PATCH 4/6] drm/amdgpu: Add runtime vcn cg/pg enablement

2018-05-16 Thread Alex Deucher
On Wed, May 16, 2018 at 8:53 AM, Rex Zhu wrote: > Signed-off-by: Rex Zhu Please add a better patch description. E.g., drm/amdgpu: Add runtime vcn cg/pg enablement Enable support for dynamically powering up/down VCN on demand. Signed-off-by: Rex Zhu

Re: [PATCH 6/6] drm/amdgpu: Enable static pg feature on RV

2018-05-16 Thread Alex Deucher
On Wed, May 16, 2018 at 8:53 AM, Rex Zhu wrote: > Signed-off-by: Rex Zhu > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 11 ++ > drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +- > drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 183 >

Re: [PATCH 5/6] drm/amdgpu: Enable static cg for vcn on RV

2018-05-16 Thread Alex Deucher
On Wed, May 16, 2018 at 8:53 AM, Rex Zhu wrote: > Signed-off-by: Rex Zhu > --- > drivers/gpu/drm/amd/amdgpu/soc15.c| 3 ++- > drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 16 > 2 files changed, 10 insertions(+), 9 deletions(-) > > diff --git

Re: [PATCH xf86-video-amdgpu] Replace 'foo == NULL' with '!foo'

2018-05-16 Thread Alex Deucher
On Wed, May 16, 2018 at 10:51 AM, Michel Dänzer wrote: > From: Michel Dänzer > > Shorter and sweeter. :) > > Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher > --- > src/amdgpu_bo_helper.c

[PATCH v2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Andrey Grodzovsky
This spinlock is superfluous, any call to drm_sched_entity_push_job should already be under a lock together with matching drm_sched_job_init to match the order of insertion into queue with job's fence seqence number. v2: Improve patch description. Add functions documentation describing the

[PATCH xf86-video-amdgpu] Replace 'foo == NULL' with '!foo'

2018-05-16 Thread Michel Dänzer
From: Michel Dänzer Shorter and sweeter. :) Signed-off-by: Michel Dänzer --- src/amdgpu_bo_helper.c | 10 -- src/amdgpu_dri2.c| 10 +- src/amdgpu_glamor.c | 2 +- src/amdgpu_glamor_wrappers.c | 2 +-

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Andrey Grodzovsky
On 05/16/2018 09:16 AM, Lucas Stach wrote: Am Mittwoch, den 16.05.2018, 15:10 +0200 schrieb Christian König: Am 16.05.2018 um 15:00 schrieb Lucas Stach: Am Mittwoch, den 16.05.2018, 14:32 +0200 schrieb Christian König: Am 16.05.2018 um 14:28 schrieb Lucas Stach: Am Mittwoch, den

Re: [PATCH] drm/amdgpu/display: remove VEGAM config option

2018-05-16 Thread Michel Dänzer
On 2018-05-16 04:12 PM, Alex Deucher wrote: > Leftover from bringup. No need to keep it around for > upstream. > > Signed-off-by: Alex Deucher Nice, thanks. Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer |

[PATCH] drm/amdgpu/display: remove VEGAM config option

2018-05-16 Thread Alex Deucher
Leftover from bringup. No need to keep it around for upstream. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/Kconfig | 7 --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Lucas Stach
Am Mittwoch, den 16.05.2018, 15:10 +0200 schrieb Christian König: > Am 16.05.2018 um 15:00 schrieb Lucas Stach: > > Am Mittwoch, den 16.05.2018, 14:32 +0200 schrieb Christian König: > > > Am 16.05.2018 um 14:28 schrieb Lucas Stach: > > > > Am Mittwoch, den 16.05.2018, 14:08 +0200 schrieb Christian

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Christian König
Am 16.05.2018 um 15:00 schrieb Lucas Stach: Am Mittwoch, den 16.05.2018, 14:32 +0200 schrieb Christian König: Am 16.05.2018 um 14:28 schrieb Lucas Stach: Am Mittwoch, den 16.05.2018, 14:08 +0200 schrieb Christian König: Yes, exactly. For normal user space command submission we should have

[PATCH umr] Introduction of Vega20.

2018-05-16 Thread Tom St Denis
Signed-off-by: Tom St Denis --- scripts/soc15_asic.sh | 3 +- src/lib/asic/CMakeLists.txt | 1 + src/lib/asic/vega20.c | 51 src/lib/asic/vega20.i | 189 src/lib/discover_by_did.c | 6 ++

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Lucas Stach
Am Mittwoch, den 16.05.2018, 14:32 +0200 schrieb Christian König: > Am 16.05.2018 um 14:28 schrieb Lucas Stach: > > Am Mittwoch, den 16.05.2018, 14:08 +0200 schrieb Christian König: > > > Yes, exactly. > > > > > > For normal user space command submission we should have tons of > > > locks > > >

[PATCH 6/6] drm/amdgpu: Enable static pg feature on RV

2018-05-16 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 11 ++ drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 183 ++-- 3 files changed, 187 insertions(+), 10 deletions(-) diff --git

[PATCH 4/6] drm/amdgpu: Add runtime vcn cg/pg enablement

2018-05-16 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index 58e4953..8b0d491 100644 ---

[PATCH 3/6] drm/amdgpu: Add CG/PG flags for VCN

2018-05-16 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/include/amd_shared.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h index 33de330..b178176 100644 ---

[PATCH 5/6] drm/amdgpu: Enable static cg for vcn on RV

2018-05-16 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/soc15.c| 3 ++- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 16 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index

[PATCH 2/6] drm/amd/pp: Add smu support for vcn cg/pg on RV

2018-05-16 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 25 ++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c index

[PATCH 1/6] drm/amdgpu: skip CG for VCN when late_init/fini

2018-05-16 Thread Rex Zhu
Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index fcd4bb2..25bee46 100644 ---

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Christian König
Am 16.05.2018 um 14:28 schrieb Lucas Stach: Am Mittwoch, den 16.05.2018, 14:08 +0200 schrieb Christian König: Yes, exactly. For normal user space command submission we should have tons of locks guaranteeing that (e.g. just the VM lock should do). For kernel moves we have the mutex for the GTT

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Lucas Stach
Am Mittwoch, den 16.05.2018, 14:08 +0200 schrieb Christian König: > Yes, exactly. > > For normal user space command submission we should have tons of > locks  > guaranteeing that (e.g. just the VM lock should do). > > For kernel moves we have the mutex for the GTT windows which protects > it. >

Re: [PATCH 27/57] drm/amdgpu: Add vega20 soc init sequence on emulator (v3)

2018-05-16 Thread Grazvydas Ignotas
On Wed, May 16, 2018 at 2:11 PM, Grazvydas Ignotas wrote: > On Tue, May 15, 2018 at 5:59 PM, Alex Deucher wrote: >> From: Shaoyun Liu >> >> v2: cleanups (Alex) >> v3: make it vega20 only (Alex) >> >> Signed-off-by: Shaoyun Liu

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Christian König
Yes, exactly. For normal user space command submission we should have tons of locks guaranteeing that (e.g. just the VM lock should do). For kernel moves we have the mutex for the GTT windows which protects it. The could be problems with the UVD/VCE queues to cleanup the handles when an

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Andrey Grodzovsky
So are you saying that you expect this to  be already in code for any usage of drm_sched_fence_create and drm_sched_entity_push_job ? lock() drm_sched_fence_create() ... (some code) drm_sched_entity_push_job() unlock() Andrey On 05/16/2018 07:23 AM, Christian König wrote:

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Christian König
drm_sched_fence_create() assigns a sequence number to the fence it creates. Now drm_sched_fence_create() is called by drm_sched_job_init() to initialize the jobs we want to push on the scheduler queue. When you now call drm_sched_entity_push_job() without a protecting lock it can happen that

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Andrey Grodzovsky
Can you please elaborate more, maybe give an example - I don't understand yet the problematic scenario. Andrey On 05/16/2018 02:50 AM, Christian König wrote: No, that spinlock is indeed incorrect. I See even when we protect the spsc queue with a spinlock that doesn't make it correct. It

Re: [PATCH 27/57] drm/amdgpu: Add vega20 soc init sequence on emulator (v3)

2018-05-16 Thread Grazvydas Ignotas
On Tue, May 15, 2018 at 5:59 PM, Alex Deucher wrote: > From: Shaoyun Liu > > v2: cleanups (Alex) > v3: make it vega20 only (Alex) > > Signed-off-by: Shaoyun Liu > Acked-by: Alex Deucher > Signed-off-by:

Re: [PATCH 29/57] drm/amdgpu: Add vega20 to dc support check

2018-05-16 Thread Grazvydas Ignotas
On Tue, May 15, 2018 at 5:59 PM, Alex Deucher wrote: > From: Feifei Xu > > Signed-off-by: Feifei Xu > Reviewed-by: Alex Deucher > Reviewed-by: Hawking Zhang > Signed-off-by: Alex

Re: [PATCH 30/57] drm/amd: Add dce-12.1 gpio aux registers

2018-05-16 Thread Grazvydas Ignotas
On Tue, May 15, 2018 at 5:59 PM, Alex Deucher wrote: > From: Roman Li > > Updating dce12 register headers by adding dc registers > required for potential DP LTTPR support. > > Signed-off-by: Roman Li > Acked-by: Alex Deucher

Re: [PATCH 04/21] drm/amdgpu: Add GFXv9 kfd2kgd interface functions

2018-05-16 Thread Oded Gabbay
On Wed, May 16, 2018 at 1:08 AM, Felix Kuehling wrote: > On 2018-05-15 05:41 AM, Dave Airlie wrote: >>> +static int kgd_hqd_load(struct kgd_dev *kgd, void *mqd, uint32_t pipe_id, >>> + uint32_t queue_id, uint32_t __user *wptr, >>> +

Re: [PATCH 1/2] drm/amdgpu: Skip drm_sched_entity realted ops for KIQ ring.

2018-05-16 Thread Christian König
Am 15.05.2018 um 21:42 schrieb Alex Deucher: On Tue, May 15, 2018 at 3:31 PM, Andrey Grodzovsky wrote: Follwoing change 75fbed2 we need to skip KIQ ring when iterating amdgpu_ctx's scheduler entites. Signed-off-by: Andrey Grodzovsky Typo

Re: [4.17-rc4+ regression] X server does not start anymore with segmentation fault in `r600_dri.so`

2018-05-16 Thread Paul Menzel
Dear Michel, Am 15.05.2018 um 10:41 schrieb Michel Dänzer: On 2018-05-15 08:38 AM, Paul Menzel wrote: On 2018-05-14 10:44, Michel Dänzer wrote: On 2018-05-13 11:01 AM, Paul Menzel wrote: There is a regression introduced by a commit after Linux 4.17-rc4 causing the X.Org X server start to

Re: [PATCH 2/2] drm/scheduler: Remove obsolete spinlock.

2018-05-16 Thread Christian König
No, that spinlock is indeed incorrect. See even when we protect the spsc queue with a spinlock that doesn't make it correct. It can happen that the jobs pushed to the queue are reversed in their sequence order and that can cause severe problems in the memory management. Christian. Am