RE: [PATCH] drm/amdgpu: Delete dead code when early init

2018-03-16 Thread Quan, Evan
Reviewed-by: Evan Quan -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Rex Zhu Sent: Friday, March 16, 2018 12:49 PM To: amd-gfx@lists.freedesktop.org Cc: Zhu, Rex Subject: [PATCH] drm/amdgpu: Delete dead code when early init Change-Id: I464

[PATCH 2/2] drm/amdgpu: validate fallback BOs

2018-03-16 Thread Chunming Zhou
issue: Game F1 performance drops 13% when per vm bo is enabled. root cause: if some BOs are fallback to allowed domain, they will never be validated if no eviction happens, that means they always exist in allowed domain. Fix: maintain a per vm allowed domain BOs list, then try to validated them

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

2018-03-16 Thread Chunming Zhou
Change-Id: I2cf672ad36b8b4cc1a6b2e704f786bf6a155d9ce Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 12 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amd

[PATCH 0/6] Refine powerplay code for vega10

2018-03-16 Thread Rex Zhu
Rex Zhu (6): drm/amd/pp: Remove dead functions in vega10_smumgr.c drm/amd/pp: Mark bunches of functins in vega10_smumgr.c static drm/amd/pp: Move functions to smu backend table for vega10 drm/amd/pp: Clean up header file for Vega10 drm/amd/pp: Delete get_xclk function in powerplay drm/

[PATCH 1/6] drm/amd/pp: Remove dead functions in vega10_smumgr.c

2018-03-16 Thread Rex Zhu
use smc_table_manager function to copy/save tables to/from smu. Change-Id: I94a43436dec9a71411fe5e8c2b888b306c9bbacd Signed-off-by: Rex Zhu --- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 38 -- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 2 -- 2 files chan

[PATCH 2/6] drm/amd/pp: Mark bunches of functins in vega10_smumgr.c static

2018-03-16 Thread Rex Zhu
Change-Id: I28b53e6312eaf995eb5091cf66d659a3022b3e84 --- drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 10 +- drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_s

[PATCH 3/6] drm/amd/pp: Move functions to smu backend table for vega10

2018-03-16 Thread Rex Zhu
Signed-off-by: Rex Zhu Change-Id: I12f61309036edbeb8d0f4c9a557778c7a227a58b --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 36 - .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 7 ++-- drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 8 drivers/gpu/drm/a

[PATCH 4/6] drm/amd/pp: Clean up header file for Vega10

2018-03-16 Thread Rex Zhu
Change-Id: If0c33c6277308d73d4ffa5134b67b1e22a90fe53 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 11 ++- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 2 ++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 1 - drivers/gpu/drm/a

[PATCH 5/6] drm/amd/pp: Delete get_xclk function in powerplay

2018-03-16 Thread Rex Zhu
use asic's callback function get_xclk Change-Id: Id4ed442e9832ab9d680dc709106a5b7cb67e94c4 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c| 5 +--- drivers/gpu/drm/amd/include/cgs_common.h | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 27 +

[PATCH 6/6] drm/amd/pp: Remove unneeded void * casts for Vega10

2018-03-16 Thread Rex Zhu
Removes unneeded void * casts for the following pointers: hwmgr->backend hwmgr->smu_backend Change-Id: I9887d39c27dadf953ab32e7ecd7e5b90c73f9a5f Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 184 - .../gpu/drm/amd/powerplay/hwmgr/vega10_power

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

2018-03-16 Thread Christian König
Am 16.03.2018 um 10:56 schrieb Chunming Zhou: Change-Id: I2cf672ad36b8b4cc1a6b2e704f786bf6a155d9ce Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 12 ++-- 2 files changed, 10 insertions(+), 7 deleti

RE: [PATCH 5/6] drm/amd/pp: Delete get_xclk function in powerplay

2018-03-16 Thread Quan, Evan
There seems one unnecessary change in vega10_fan_ctrl_set_fan_speed_rpm(). Other than that, the series is Reviewed-by: Evan Quan -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Rex Zhu Sent: Friday, March 16, 2018 5:40 PM To: amd-gfx@lists.fre

Re: [PATCH 5/6] drm/amd/pp: Delete get_xclk function in powerplay

2018-03-16 Thread Zhu, Rex
Yes, Thanks for pointing out this error. that is used for testing the ref clk value on vega10. Best Regards Rex From: Quan, Evan Sent: Friday, March 16, 2018 7:24:47 PM To: Zhu, Rex; amd-gfx@lists.freedesktop.org Cc: Zhu, Rex Subject: RE: [PATCH 5/6] drm

RFC: unpinned DMA-buf exporting v2

2018-03-16 Thread Christian König
Hi everybody, since I've got positive feedback from Daniel I continued working on this approach. A few issues are still open: 1. Daniel suggested that I make the invalidate_mappings callback a parameter of dma_buf_attach(). This approach unfortunately won't work because when the attachment is

[PATCH 5/5] drm/amdgpu: add independent DMA-buf import v2

2018-03-16 Thread Christian König
Instead of relying on the DRM functions just implement our own import functions. This adds support for taking care of unpinned DMA-buf. v2: enable for all exporters, not just amdgpu, fix invalidation handling, lock reservation object while setting callback Signed-off-by: Christian König ---

[PATCH 2/5] drm/ttm: keep a reference to transfer pipelined BOs

2018-03-16 Thread Christian König
Make sure the transfered BO is never destroy before the transfer BO. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_util.c | 50 +++ 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu

[PATCH 4/5] drm/amdgpu: add independent DMA-buf export v2

2018-03-16 Thread Christian König
Instead of relying on the DRM functions just implement our own export functions. This adds support for taking care of unpinned DMA-buf. v2: fix unintended recursion, remove debugging leftovers Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 - drivers/gpu/drm

[PATCH 3/5] drm/ttm: remove the backing store if no placement is given

2018-03-16 Thread Christian König
Pipeline removal of the BOs backing store when the placement is given during validation. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 98e06f8bf23

[PATCH 1/5] dma-buf: add optional invalidate_mappings callback v2

2018-03-16 Thread Christian König
Each importer can now provide an invalidate_mappings callback. This allows the exporter to provide the mappings without the need to pin the backing store. v2: don't try to invalidate mappings when the callback is NULL, lock the reservation obj while using the attachments, add helper to se

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

2018-03-16 Thread Chris Wilson
Quoting Christian König (2018-03-16 13:20:45) > @@ -326,6 +338,29 @@ struct dma_buf_attachment { > struct device *dev; > struct list_head node; > void *priv; > + > + /** > +* @invalidate_mappings: > +* > +* Optional callback provided by the impo

Re: [PATCH v2 1/2] drm/amdgpu: Improve documentation of bo_ptr in amdgpu_bo_create_kernel

2018-03-16 Thread Andrey Grodzovsky
NP, makes sense what you did. Andrey On 03/16/2018 01:44 AM, Zhu, Rex wrote: Hi Andrey, Sorry for the confusion. I just need to push a bunch of patches that conflict with  your patch. So apply your patch first. Best Regards Rex *From:*amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.o

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

2018-03-16 Thread Christian König
Am 16.03.2018 um 14:51 schrieb Chris Wilson: Quoting Christian König (2018-03-16 13:20:45) @@ -326,6 +338,29 @@ struct dma_buf_attachment { struct device *dev; struct list_head node; void *priv; + + /** +* @invalidate_mappings: +* +* Optio

[PATCH] drm/amdgpu: add VCN to firmware query interface

2018-03-16 Thread Alex Deucher
Need to be able to query the VCN firmware version from userspace to determine supported features, etc. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 12 include/uapi/drm/amdgpu_drm.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/drive

Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues

2018-03-16 Thread Deucher, Alexander
Since GPU reset is not enabled yet anyway, a timeout will just print a message, can we just change amdgpu_lockup_timeout to MAX_SCHEDULE_TIMEOUT until we enable GPU reset? Alex From: Evan Quan Sent: Friday, March 16, 2018 12:52:32 AM To: amd-gfx@lists.freedesk

Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues

2018-03-16 Thread Michel Dänzer
On 2018-03-16 05:14 PM, Deucher, Alexander wrote: > Since GPU reset is not enabled yet anyway, a timeout will just print a > message, can we just change amdgpu_lockup_timeout to > MAX_SCHEDULE_TIMEOUT until we enable GPU reset? Wouldn't that be rather surprising for somebody who sets amdgpu.gpu_re

Re: [PATCH] drm/amdgpu: no job timeout setting on compute queues

2018-03-16 Thread Deucher, Alexander
How about something like this: /* Disable timeout when GPU reset is disabled to avoid confusing timeout messages in the kernel log */ If (amdgpu_gpu_recovery == 0 || amdgpu_gpu_recovery == -1) amdgpu_lockup_timeout = MAX_SCHEDULE_TIMEOUT; Alex From: Miche

Re: [PATCH 6/6] drm/amd/pp: Remove unneeded void * casts for Vega10

2018-03-16 Thread Alex Deucher
On Fri, Mar 16, 2018 at 5:39 AM, Rex Zhu wrote: > Removes unneeded void * casts for the following pointers: > hwmgr->backend > hwmgr->smu_backend > > Change-Id: I9887d39c27dadf953ab32e7ecd7e5b90c73f9a5f > Signed-off-by: Rex Zhu With Evan's comment on patch 5 addressed, the series is: Reviewed-by

[PATCH] drm/amdgpu: add documentation for amdgpu_device.c

2018-03-16 Thread Alex Deucher
Add kernel doc for the functions in amdgpu_device.c Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 439 - 1 file changed, 427 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/a

[pull] radeon, amdgpu, amd ttm drm-next-4.17

2018-03-16 Thread Alex Deucher
Hi Dave, Updates for 4.17. Highlights: - Continued cleanup and restructuring of powerplay - Fetch VRAM type from vbios rather than hardcoding for SOC15 asics - Allow ttm to drop its backing store when drivers don't need it - DC bandwidth calc updates - Enable DC backlight control pre-DCE11 asics