Re: [PATCH] drm/amdgpu: re-validate per VM BOs if required

2018-03-21 Thread zhoucm1
On 2018年03月21日 20:00, Christian König wrote: Am 21.03.2018 um 11:31 schrieb zhoucm1: On 2018年03月20日 17:13, zhoucm1 wrote: On 2018年03月20日 15:49, zhoucm1 wrote: On 2018年03月19日 18:50, Christian König wrote: If a per VM BO ends up in a allowed domain it never moves back into the prefered

RE: [PATCH] drm/amdgpu: give more chance for tlb flush if failed

2018-03-21 Thread Deng, Emily
Hi Christian, I agree with that the patch will hide the real problem, it is just a workaround, I will change the patch as you suggest. as the sriov has lots of issues on the staging, maybe we could first submit the two workarounds, later, I will spend some time to find out the root cause.

RE: [PATCH] drm/amdgpu: Fix NULL ptr on driver unload due to init failure.

2018-03-21 Thread Zhu, Rex
kfree(adev->irq.client[i].sources); +adev->irq.client[i].sources = NULL; Set adev->irq.client[i].sources to NULL in amdgpu_irq_fini also can fix NULL ptr in amdgpu_irq_disable_all.. But I didn't check why amdgpu_device_fini was called twice. This patch looks good. Best Regards Rex -Ori

Re: [trivial PATCH V2] treewide: Align function definition open/close braces

2018-03-21 Thread Nicolin Chen
On Wed, Mar 21, 2018 at 03:09:32PM -0700, Joe Perches wrote: > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for the

[trivial PATCH V2] treewide: Align function definition open/close braces

2018-03-21 Thread Joe Perches
Some functions definitions have either the initial open brace and/or the closing brace outside of column 1. Move those braces to column 1. This allows various function analyzers like gnu complexity to work properly for these modified functions. Signed-off-by: Joe Perches Acked-by: Andy Shevchen

Re: [trivial PATCH V2] treewide: Align function definition open/close braces

2018-03-21 Thread Martin K. Petersen
Joe, > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. drivers/scsi and drivers/message/fusion parts look fine. Acked-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering __

[pull] radeon and amdgpu drm-fixes-4.16

2018-03-21 Thread Alex Deucher
Hi Dave, A few more fixes for 4.16. Mostly for displays: - A fix for DP handling on radeon - Fix banding on eDP panels - Fix HBR audio - Fix for disabling VGA mode on Raven that leads to a corrupt or blank display on some platforms The following changes since commit 67f1976665900c86989cfe99b8

Re: [trivial PATCH V2] treewide: Align function definition open/close braces

2018-03-21 Thread Rafael J. Wysocki
On Wed, Mar 21, 2018 at 11:09 PM, Joe Perches wrote: > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for these modifi

Re: [PATCH] drm/amd/pp: use mlck_table.count for array loop index limit

2018-03-21 Thread Joe Perches
On Wed, 2018-03-21 at 18:26 +, Colin King wrote: > From: Colin Ian King > > The for-loops process data in the mclk_table but use slck_table.count > as the loop index limit. I believe these are cut-n-paste errors from > the previous almost identical loops as indicated by static analysis. > Fi

[PATCH] drm/amd/pp: use mlck_table.count for array loop index limit

2018-03-21 Thread Colin King
From: Colin Ian King The for-loops process data in the mclk_table but use slck_table.count as the loop index limit. I believe these are cut-n-paste errors from the previous almost identical loops as indicated by static analysis. Fix these. Detected by CoverityScan, CID#1466001 ("Copy-paste erro

Re: [PATCH] drm/amdgpu: Fix NULL ptr on driver unload due to init failure.

2018-03-21 Thread Alex Deucher
On Wed, Mar 21, 2018 at 2:22 PM, Andrey Grodzovsky wrote: > Problem: > When unloading due to failure amdgpu_device_fini was called twice > which was leading to NULL ptr in amdgpu_irq_disable_all. > > Fix: > Call amdgpu_device_fini only once from amdgpu_driver_unload_kms. > > Signed-off-by: Andrey

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-21 Thread Christian König
Am 21.03.2018 um 19:23 schrieb Marek Olšák: On Wed, Mar 21, 2018 at 2:15 PM, Christian König mailto:christian.koe...@amd.com>> wrote: Am 21.03.2018 um 19:04 schrieb Marek Olšák: On Wed, Mar 21, 2018 at 10:07 AM, Christian König mailto:christian.koe...@amd.com>> wrote: Am 2

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-21 Thread Marek Olšák
On Wed, Mar 21, 2018 at 2:15 PM, Christian König wrote: > Am 21.03.2018 um 19:04 schrieb Marek Olšák: > > On Wed, Mar 21, 2018 at 10:07 AM, Christian König < > christian.koe...@amd.com> wrote: > >> Am 21.03.2018 um 14:57 schrieb Marek Olšák: >> >> On Wed, Mar 21, 2018 at 4:13 AM, Christian König

[PATCH] drm/amdgpu: Fix NULL ptr on driver unload due to init failure.

2018-03-21 Thread Andrey Grodzovsky
Problem: When unloading due to failure amdgpu_device_fini was called twice which was leading to NULL ptr in amdgpu_irq_disable_all. Fix: Call amdgpu_device_fini only once from amdgpu_driver_unload_kms. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - 1 file

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-21 Thread Christian König
Am 21.03.2018 um 19:04 schrieb Marek Olšák: On Wed, Mar 21, 2018 at 10:07 AM, Christian König mailto:christian.koe...@amd.com>> wrote: Am 21.03.2018 um 14:57 schrieb Marek Olšák: On Wed, Mar 21, 2018 at 4:13 AM, Christian König mailto:ckoenig.leichtzumer...@gmail.com>> wrote:

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-21 Thread Marek Olšák
On Wed, Mar 21, 2018 at 10:07 AM, Christian König wrote: > Am 21.03.2018 um 14:57 schrieb Marek Olšák: > > On Wed, Mar 21, 2018 at 4:13 AM, Christian König < > ckoenig.leichtzumer...@gmail.com> wrote: > >> Am 21.03.2018 um 06:08 schrieb Marek Olšák: >> >> On Tue, Mar 20, 2018 at 4:16 PM, Christia

Re: [PATCH 00/20] Add KFD GPUVM support for dGPUs v4

2018-03-21 Thread Felix Kuehling
On 2018-03-21 03:52 AM, Oded Gabbay wrote: > > Hi Felix, > I did a quick pass on the patch-set and didn't see anything scary. > Patches 1-14 are already applied to my -next tree. If I will send it > now to Dave I believe we would be ok from schedule POV. > I suggest we delay userptr support for the

RE: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-21 Thread Li, Samuel
Ø But we still have to support cases where we have 1GB stolen VRAM, and wasting those 1GB would suck a bit. Not really, since we only move display buffer here. Regards, Samuel Li From: Koenig, Christian Sent: Wednesday, March 21, 2018 10:07 AM To: Marek Olšák Cc: Deucher, Alexander ; Alex Deuc

Re: [PATCH] drm/amdgpu: fix "mitigate workaround for i915"

2018-03-21 Thread Mike Lothian
On 21 March 2018 at 13:08, Christian König wrote: > Mixed up exporter and importer here. E.g. while mapping the BO we need > to check the importer not the exporter. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 8 +--- > 1 file changed, 5 insertions(+

Re: [PATCH 16/42] drm/amdgpu/gmc9: fix vega12's athub&mmhub golden setting.

2018-03-21 Thread Alex Deucher
On Wed, Mar 21, 2018 at 10:19 AM, Christian König wrote: > Am 21.03.2018 um 14:46 schrieb Alex Deucher: >> >> From: Feifei Xu >> >> The athub&mmhub's golden setting is for vega10 only now. >> Remove this from vega12, which is introduced by branch merge. >> >> Signed-off-by: Feifei Xu >> Reviewed

Re: [PATCH 00/42] Add vega12 support

2018-03-21 Thread Christian König
Apart from patch #16 Acked-by: Christian König for the series. Christian. Am 21.03.2018 um 14:45 schrieb Alex Deucher: Vega12 is a new GPU from AMD. This adds support for it. Patch 1 just adds new register headers and is pretty big, so I haven't sent it to the mailing list. The entire seri

Re: [PATCH 16/42] drm/amdgpu/gmc9: fix vega12's athub&mmhub golden setting.

2018-03-21 Thread Christian König
Am 21.03.2018 um 14:46 schrieb Alex Deucher: From: Feifei Xu The athub&mmhub's golden setting is for vega10 only now. Remove this from vega12, which is introduced by branch merge. Signed-off-by: Feifei Xu Reviewed-by: Ken Wang Signed-off-by: Alex Deucher Shouldn't that one be squashed int

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-21 Thread Christian König
Am 21.03.2018 um 14:57 schrieb Marek Olšák: On Wed, Mar 21, 2018 at 4:13 AM, Christian König > wrote: Am 21.03.2018 um 06:08 schrieb Marek Olšák: On Tue, Mar 20, 2018 at 4:16 PM, Christian König mailto:christian.koe...@amd.com>> wrote:

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-21 Thread Marek Olšák
On Wed, Mar 21, 2018 at 4:13 AM, Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 21.03.2018 um 06:08 schrieb Marek Olšák: > > On Tue, Mar 20, 2018 at 4:16 PM, Christian König > wrote: > >> That's what I meant with use up the otherwise unused VRAM. I don't see >> any disadvantage o

Re: [PATCH] drm/amdgpu: fix "mitigate workaround for i915"

2018-03-21 Thread Deucher, Alexander
Acked-by: Alex Deucher From: amd-gfx on behalf of Christian König Sent: Wednesday, March 21, 2018 9:08:18 AM To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: fix "mitigate workaround for i915" Mixed up exporter and importer here. E.g. while mappi

[PATCH 42/42] drm/amdgpu: add vega12 pci ids (v2)

2018-03-21 Thread Alex Deucher
v2: add additional pci ids Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index e6709362994a..1bfce79bc074 100644 --- a/drivers/gp

[PATCH 40/42] drm/amd/powerplay: add the smu manager for vega12 (v4)

2018-03-21 Thread Alex Deucher
From: Evan Quan handles the driver interaction with the smu firmware v2: squash in: - s3 fix for firmware loading - smu loading through the psp - unecessary calls to is_smc_ram_running() - smu table cleanups v3: rebase v4: rebase, smu bo allocation fixes, add dpm running callback Signed-off-by:

[PATCH 38/42] drm/amd/powerplay: update ppatomfwctl (v2)

2018-03-21 Thread Alex Deucher
From: Evan Quan Add new get_smc_dpm_information api to fetch the smu dpm info from the vbios. v2: deal with updated table format. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 87 ++

[PATCH 35/42] drm/amd/powerplay: add new smu9_driver_if.h for vega12 (v2)

2018-03-21 Thread Alex Deucher
From: Evan Quan Add driver firmware interface header. v2: squash in interface updates. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- .../drm/amd/powerplay/inc/vega12/smu9_driver_if.h | 758 + 1 file changed, 758 insertions(+) create

[PATCH 33/42] drm/amd/powerplay: add vega12_inc.h

2018-03-21 Thread Alex Deucher
From: Evan Quan Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_inc.h | 39 1 file changed, 39 insertions(+) create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_inc.h diff --git

[PATCH 30/42] drm/amdgpu/soc15: update vega12 cg_flags

2018-03-21 Thread Alex Deucher
From: Evan Quan Add the appropriate clockgating flags for vega12 Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdg

[PATCH 34/42] drm/amd/powerplay: update atomfirmware.h (v2)

2018-03-21 Thread Alex Deucher
From: Evan Quan Add new smu_info table. v2: update table format. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/atomfirmware.h | 82 +- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/d

[PATCH 32/42] drm/amdgpu/soc15: initialize reg base for vega12

2018-03-21 Thread Alex Deucher
From: Hawking Zhang Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index e308c3c6ca4f..51cf8a

[PATCH 39/42] drm/amd/powerplay: add new pp_psm infrastructure for vega12 (v2)

2018-03-21 Thread Alex Deucher
From: Evan Quan New psm infrastructure for vega12. v2: rebase (Alex) Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 244 +++ ...

[PATCH 37/42] drm/amd/powerplay: add vega12_pptable.h

2018-03-21 Thread Alex Deucher
From: Evan Quan Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- .../gpu/drm/amd/powerplay/hwmgr/vega12_pptable.h | 109 + 1 file changed, 109 insertions(+) create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/vega12_pptable.h diff -

[PATCH 36/42] drm/amd/powerplay: add vega12_ppsmc.h

2018-03-21 Thread Alex Deucher
From: Evan Quan Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/inc/vega12_ppsmc.h | 123 +++ 1 file changed, 123 insertions(+) create mode 100644 drivers/gpu/drm/amd/powerplay/inc/vega12_ppsmc.h diff --git

[PATCH 28/42] drm/amdgpu/gfx9: add golden setting for vega12 (v3)

2018-03-21 Thread Alex Deucher
From: Hawking Zhang Add gfx9_2_1 golden setting. v2: switch to soc15_program_register_sequence for golden setting programming v3: squash in additional golden updates Signed-off-by: Feifei Xu Reviewed-by: Ken Wang Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/

[PATCH 26/42] drm/amdgpu/gfx9: add support for vega12

2018-03-21 Thread Alex Deucher
Same as vega10 and raven. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 5f6113ebfc3f..673b81841500 100644 ---

[PATCH 29/42] drm/amdgpu/soc15: add support for vega12

2018-03-21 Thread Alex Deucher
Add the IP blocks, clock and powergating flags, and common clockgating support. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/soc15.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/s

[PATCH 31/42] drm/amd/soc15: Add external_rev_id for vega12.

2018-03-21 Thread Alex Deucher
From: Feifei Xu Add external_rev_id for vega12. Signed-off-by: Feifei Xu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index 0ad927

[PATCH 25/42] drm/amdgpu/gfx9: add gfx config for vega12

2018-03-21 Thread Alex Deucher
Just a place holder for now. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 5eb609d455a8..5f6113ebfc3f

[PATCH 27/42] drm/amdgpu/gfx9: add clockgating support for vega12

2018-03-21 Thread Alex Deucher
Same as vega10 and raven. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 673b81841500..9ce1e9e552d9 100644 --- a

[PATCH 22/42] drm/amdgpu/sdma4: Update vega12 sdma golden setting.

2018-03-21 Thread Alex Deucher
From: Feifei Xu Update vega12 sdma golden setting. Signed-off-by: Feifei Xu Reviewed-by: Ken Wang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drive

[PATCH 20/42] drm/amdgpu/sdma4: add clockgating support for vega12

2018-03-21 Thread Alex Deucher
Same as vega10 for now. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index 4eddd850b72d..3d059ecd8758 100644 ---

[PATCH 12/42] drm/amd/display/dm: add vega12 support

2018-03-21 Thread Alex Deucher
Add support for vega12 to the display manager. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu

[PATCH 24/42] drm/amdgpu/gfx9: Add placeholder for vega12 golden settings

2018-03-21 Thread Alex Deucher
Fill these in when we get them. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index b91ff70bbee8..5eb609d455a8 100

[PATCH 23/42] drm/amdgpu/gfx9: add support for vega12 firmware

2018-03-21 Thread Alex Deucher
Declare and fetch the appriopriate files. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index d1d2c27156b

[PATCH 19/42] drm/amdgpu/sdma4: Add placeholder for vega12 golden settings

2018-03-21 Thread Alex Deucher
Fill these in when we get them. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index e00b6ff566f6..4eddd850b72d

[PATCH 16/42] drm/amdgpu/gmc9: fix vega12's athub&mmhub golden setting.

2018-03-21 Thread Alex Deucher
From: Feifei Xu The athub&mmhub's golden setting is for vega10 only now. Remove this from vega12, which is introduced by branch merge. Signed-off-by: Feifei Xu Reviewed-by: Ken Wang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++- 1 file changed, 2 insertions(+)

[PATCH 15/42] drm/amdgpu/gmc9: add vega12 support

2018-03-21 Thread Alex Deucher
Same as vega10. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index a70cbc45c4c1..c4467742badd 100644 --- a/driver

[PATCH 21/42] drm/amdgpu/sdma4: add sdma4_0_1 support for vega12 (v3)

2018-03-21 Thread Alex Deucher
From: Hawking Zhang Add sdma golden setting for vega12. v2: switch to soc15_program_register_sequence for golden register programming v3: squash in unused declaration fix Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Hawking Zhang Signed-off-

[PATCH 18/42] drm/amdgpu/sdma4: specify vega12 firmware

2018-03-21 Thread Alex Deucher
Declare the firmware and fetch the proper file. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index 9448c45d1

[PATCH 13/42] drm/amd/display: Add bios firmware info version for VG12

2018-03-21 Thread Alex Deucher
From: "Jerry (Fangzhi) Zuo" VG12 shows minor revision version of 2 which is not handled in bios_parser_get_firmware_info() routine. Signed-off-by: Jerry (Fangzhi) Zuo Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH 17/42] drm/amdgpu/mmhub: add clockgating support for vega12

2018-03-21 Thread Alex Deucher
Treat it the same as vega10 for now. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c index 3dd5816495a5..43f92577

[PATCH 10/42] drm/amdgpu: specify vega12 vce firmware

2018-03-21 Thread Alex Deucher
Declare firmware and add support for the file. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH 11/42] drm/amdgpu/virtual_dce: add vega12 support

2018-03-21 Thread Alex Deucher
Add virtual dce support for vega12. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 8201a0929ca2..b51f05

[PATCH 14/42] drm/amdgpu: add vega12 to dc support check

2018-03-21 Thread Alex Deucher
DC is used for modesetting on vega12. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 781ea7dc09c0

[PATCH 09/42] drm/amdgpu: specify vega12 uvd firmware

2018-03-21 Thread Alex Deucher
Declare firmware and add support for the file. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH 06/42] drm/amdgpu/psp: initial vega12 support

2018-03-21 Thread Alex Deucher
Same as vega10 for now. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 1 + drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdg

[PATCH 03/42] drm/amdgpu: add gpu_info firmware for vega12

2018-03-21 Thread Alex Deucher
Stores gpu configuration details. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- 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 b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 8f4e2d13545f

[PATCH 08/42] drm/amdgpu: add vega12 ucode loading method

2018-03-21 Thread Alex Deucher
From: Feifei Xu Same as vega10. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uco

[PATCH 04/42] drm/amdgpu: set asic family and ip blocks for vega12

2018-03-21 Thread Alex Deucher
soc15 just like vega10 and raven. Signed-off-by: Alex Deucher Reviewed-by: Feifei Xu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c i

[PATCH 07/42] drm/amdgpu: initilize vega12 psp firmwares

2018-03-21 Thread Alex Deucher
From: Evan Quan Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Acked-by: Huang Rui Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c inde

[PATCH 02/42] drm/amdgpu: add vega12 to asic_type enum

2018-03-21 Thread Alex Deucher
From: Feifei Xu Add vega12 to amd_asic_type enum and amdgpu_asic_name[]. Signed-off-by: Alex Deucher Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + include/drm/amd_asic_type.h| 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/

[PATCH 00/42] Add vega12 support

2018-03-21 Thread Alex Deucher
Vega12 is a new GPU from AMD. This adds support for it. Patch 1 just adds new register headers and is pretty big, so I haven't sent it to the mailing list. The entire series can be viewed here: https://cgit.freedesktop.org/~agd5f/linux/log/?h=amd-staging-drm-next-vega12 Alex Deucher (20): drm

[PATCH 05/42] drm/amdgpu: vega12 to smu firmware

2018-03-21 Thread Alex Deucher
From: Hawking Zhang Add the cgs interface to query the smu firmware for vega12 and declare the firmware. Signed-off-by: Alex Deucher Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 +++ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 1 + 2 files changed, 4

Re: [PATCH] drm/amd/pp: Add new asic(vega12) support in pp_psm.c

2018-03-21 Thread Deucher, Alexander
Acked-by: Alex Deucher From: amd-gfx on behalf of Rex Zhu Sent: Wednesday, March 21, 2018 7:34:34 AM To: amd-gfx@lists.freedesktop.org Cc: Zhu, Rex Subject: [PATCH] drm/amd/pp: Add new asic(vega12) support in pp_psm.c In new asics, no power state management in

Re: [PATCH] drm/amd/pp: Clean up powerplay code on Vega12

2018-03-21 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Rex Zhu Sent: Wednesday, March 21, 2018 5:46:34 AM To: amd-gfx@lists.freedesktop.org Cc: Zhu, Rex Subject: [PATCH] drm/amd/pp: Clean up powerplay code on Vega12 Change-Id: I792a0c6170115867b99d7112d8eba9ff2f

Re: [PATCH] drm/amd/pp: Fix set wrong temperature range on smu7

2018-03-21 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Rex Zhu Sent: Wednesday, March 21, 2018 3:56:19 AM To: amd-gfx@lists.freedesktop.org Cc: Zhu, Rex Subject: [PATCH] drm/amd/pp: Fix set wrong temperature range on smu7 Fix the issue thermal irq was always tri

[PATCH] drm/amdgpu: fix "mitigate workaround for i915"

2018-03-21 Thread Christian König
Mixed up exporter and importer here. E.g. while mapping the BO we need to check the importer not the exporter. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgp

Re: [PATCH] drm/amdgpu: re-validate per VM BOs if required

2018-03-21 Thread Christian König
Am 21.03.2018 um 11:31 schrieb zhoucm1: On 2018年03月20日 17:13, zhoucm1 wrote: On 2018年03月20日 15:49, zhoucm1 wrote: On 2018年03月19日 18:50, Christian König wrote: If a per VM BO ends up in a allowed domain it never moves back into the prefered domain. Signed-off-by: Christian König Yeah,

Re: [Linaro-mm-sig] [PATCH 1/5] dma-buf: add optional invalidate_mappings callback v2

2018-03-21 Thread Christian König
Am 21.03.2018 um 09:28 schrieb Daniel Vetter: On Tue, Mar 20, 2018 at 06:47:57PM +0100, Christian König wrote: Am 20.03.2018 um 15:08 schrieb Daniel Vetter: [SNIP] For the in-driver reservation path (CS) having a slow-path that grabs a temporary reference, drops the vram lock and then locks the

[PATCH] drm/amd/pp: Add new asic(vega12) support in pp_psm.c

2018-03-21 Thread Rex Zhu
In new asics, no power state management in driver, no need to implement related callback functions. add some ps checks in pp_psm.c Revert "drm/amd/powerplay: add new pp_psm infrastructure for vega12 (v2)" This reverts commit 7d1a63f3aa331b853e41f92d0e7890ed31de8c13. Change-Id: Ic31d3f475f94399d31

Re: [PATCH] drm/amdgpu: Don't change preferred domian when fallback GTT v5

2018-03-21 Thread Christian König
Am 21.03.2018 um 11:27 schrieb Chunming Zhou: v2: add sanity checking v3: make code open v4: also handle visible to invisible fallback v5: Since two fallback cases, re-use goto retry Change-Id: I2cf672ad36b8b4cc1a6b2e704f786bf6a155d9ce Signed-off-by: Chunming Zhou Reviewed-by: Christian König

Re: [PATCH] drm/amdgpu: re-validate per VM BOs if required

2018-03-21 Thread zhoucm1
On 2018年03月20日 17:13, zhoucm1 wrote: On 2018年03月20日 15:49, zhoucm1 wrote: On 2018年03月19日 18:50, Christian König wrote: If a per VM BO ends up in a allowed domain it never moves back into the prefered domain. Signed-off-by: Christian König Yeah, it's better than mine, Reviewed-by: Chunmi

[PATCH] drm/amdgpu: Don't change preferred domian when fallback GTT v5

2018-03-21 Thread Chunming Zhou
v2: add sanity checking v3: make code open v4: also handle visible to invisible fallback v5: Since two fallback cases, re-use goto retry Change-Id: I2cf672ad36b8b4cc1a6b2e704f786bf6a155d9ce Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 16 ++-- drivers

Re: [PATCH] drm/amdgpu: Don't change preferred domian when fallback GTT v4

2018-03-21 Thread Christian König
Am 20.03.2018 um 08:55 schrieb Chunming Zhou: v2: add sanity checking v3: make code open v4: also handle visible to invisible fallback Change-Id: I2cf672ad36b8b4cc1a6b2e704f786bf6a155d9ce Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 16 ++-- drive

[PATCH] drm/amd/pp: Clean up powerplay code on Vega12

2018-03-21 Thread Rex Zhu
Change-Id: I792a0c6170115867b99d7112d8eba9ff2faf39d7 --- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 482 + drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.h | 32 -- 2 files changed, 1 insertion(+), 513 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/

Re: [Linaro-mm-sig] [PATCH 1/5] dma-buf: add optional invalidate_mappings callback v2

2018-03-21 Thread Christian König
Am 21.03.2018 um 09:18 schrieb Daniel Vetter: [SNIP] They're both in i915_gem_userptr.c, somewhat interleaved. Would be interesting if you could show what you think is going wrong in there compared to amdgpu_mn.c. i915 implements only one callback: static const struct mmu_notifier_ops i915_gem

Re: [Linaro-mm-sig] [PATCH 1/5] dma-buf: add optional invalidate_mappings callback v2

2018-03-21 Thread Daniel Vetter
On Tue, Mar 20, 2018 at 06:47:57PM +0100, Christian König wrote: > Am 20.03.2018 um 15:08 schrieb Daniel Vetter: > > [SNIP] > > For the in-driver reservation path (CS) having a slow-path that grabs a > > temporary reference, drops the vram lock and then locks the reservation > > normally (using the

Re: [Linaro-mm-sig] [PATCH 1/5] dma-buf: add optional invalidate_mappings callback v2

2018-03-21 Thread Daniel Vetter
On Tue, Mar 20, 2018 at 06:47:57PM +0100, Christian König wrote: > Am 20.03.2018 um 15:08 schrieb Daniel Vetter: > > [SNIP] > > For the in-driver reservation path (CS) having a slow-path that grabs a > > temporary reference, drops the vram lock and then locks the reservation > > normally (using the

[PATCH] drm/amd/pp: Fix set wrong temperature range on smu7

2018-03-21 Thread Rex Zhu
Fix the issue thermal irq was always triggered for GPU under temperature range detected The low temp in default thermal policy was set to -273. so need to use int type for the low temp. Change-Id: I1141b2698233ecd1e984b80eaf371966ab1aeef0 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-21 Thread Christian König
Am 21.03.2018 um 06:08 schrieb Marek Olšák: On Tue, Mar 20, 2018 at 4:16 PM, Christian König mailto:christian.koe...@amd.com>> wrote: That's what I meant with use up the otherwise unused VRAM. I don't see any disadvantage of always setting GTT as second domain on APUs. My assumptio

Re: [PATCH 1/2] drm/amdgpu: Enable scatter gather display support

2018-03-21 Thread Christian König
But for CZ/ST, due to hardware limitation as discussed before, we either use VRAM or GTT, not both. That is actually not correct, as far as I read up on that the issue for switching between VRAM and GTT placement is minimal. We should just make sure that we don't do this on every page flip, e.g

Re: [PATCH 00/20] Add KFD GPUVM support for dGPUs v4

2018-03-21 Thread Oded Gabbay
On Mon, Mar 19, 2018 at 9:05 PM, Felix Kuehling wrote: > On 2018-03-19 12:39 PM, Christian König wrote: >> So coming back to this series once more. >> >> Patch #1, #3 are Reviewed-by: Christian König . >> >> Patch #2, #4 - #13 and #18-#19 are Acked-by: Christian König >> . >> >> Patch #14: What's