[PATCH][drm-next] drm/amd/display: fix a potential null pointer dereference

2019-08-16 Thread Colin King
From: Colin Ian King Currently the pointer init_data is dereferenced on the assignment of fw_info before init_data is sanity checked to see if it is null. Fix te potential null pointer dereference on init_data by only performing dereference after it is null checked. Addresses-Coverity:

Re: [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/connector: Allow max possible encoders to attach to a connector (rev2)

2019-08-16 Thread Souza, Jose
On Fri, 2019-08-16 at 21:29 +, Patchwork wrote: > == Series Details == > > Series: drm/connector: Allow max possible encoders to attach to a > connector (rev2) > URL : https://patchwork.freedesktop.org/series/62743/ > State : warning > > == Summary == > > $ dim sparse origin/drm-tip >

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-16 Thread Ralph Campbell
On 8/16/19 10:28 AM, Jason Gunthorpe wrote: On Fri, Aug 16, 2019 at 10:21:41AM -0700, Dan Williams wrote: We can do a get_dev_pagemap inside the page_walk and touch the pgmap, or we can do the 'device mutex && retry' pattern and touch the pgmap in the driver, under that lock. However in all

[PATCH] drm/connector: Allow max possible encoders to attach to a connector

2019-08-16 Thread José Roberto de Souza
From: Dhinakaran Pandiyan Currently we restrict the number of encoders that can be linked to a connector to 3, increase it to match the maximum number of encoders that can be initialized(32). To more effiently do that lets switch from an array of encoder ids to bitmask. Also removing the

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-16 Thread Jason Gunthorpe
On Fri, Aug 16, 2019 at 10:21:41AM -0700, Dan Williams wrote: > > We can do a get_dev_pagemap inside the page_walk and touch the pgmap, > > or we can do the 'device mutex && retry' pattern and touch the pgmap > > in the driver, under that lock. > > > > However in all cases the current

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-16 Thread Dan Williams
On Fri, Aug 16, 2019 at 5:24 AM Jason Gunthorpe wrote: > > On Thu, Aug 15, 2019 at 08:54:46PM -0700, Dan Williams wrote: > > > > However, this means we cannot do any processing of ZONE_DEVICE pages > > > outside the driver lock, so eg, doing any DMA map that might rely on > > >

Re: [PATCH v3 hmm 00/11] Add mmu_notifier_get/put for managing mmu notifier registrations

2019-08-16 Thread Jason Gunthorpe
On Tue, Aug 06, 2019 at 08:15:37PM -0300, Jason Gunthorpe wrote: > This series is already entangled with patches in the hmm & RDMA tree and > will require some git topic branches for the RDMA ODP stuff. I intend for > it to go through the hmm tree. > Jason Gunthorpe (11): > mm/mmu_notifiers:

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-16 Thread Christoph Hellwig
On Fri, Aug 16, 2019 at 12:30:41PM +, Jason Gunthorpe wrote: > > For instance, a system may have multiple DEVICE_PRIVATE map's owned by > the same driver - but multiple physical devices using that driver. > > Each physical device's driver should only ever get DEVICE_PRIVATE > pages for it's

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-16 Thread Jason Gunthorpe
On Fri, Aug 16, 2019 at 06:44:48AM +0200, Christoph Hellwig wrote: > On Fri, Aug 16, 2019 at 12:43:07AM +, Jason Gunthorpe wrote: > > On Thu, Aug 15, 2019 at 04:51:33PM -0400, Jerome Glisse wrote: > > > > > struct page. In this case any way we can update the > > > nouveau_dmem_page() to check

Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk

2019-08-16 Thread Jason Gunthorpe
On Thu, Aug 15, 2019 at 08:54:46PM -0700, Dan Williams wrote: > > However, this means we cannot do any processing of ZONE_DEVICE pages > > outside the driver lock, so eg, doing any DMA map that might rely on > > MEMORY_DEVICE_PCI_P2PDMA has to be done in the driver lock, which is > > a bit

[PATCH] drm/amd/amdgpu: Disable GFX_PG on laptop raven part

2019-08-16 Thread StDenis, Tom
GFX_PG causes visual (and likely memory) corruption on laptop raven parts. Until it's fully diagnosed let's disable it to ensure stable operation. Tested on a Dell Latitude 5495. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/soc15.c | 5 + 1 file changed, 5 insertions(+)

Re: [PATCH] mm/hmm: hmm_range_fault handle pages swapped out

2019-08-16 Thread Yang, Philip
On 2019-08-15 8:54 p.m., Jason Gunthorpe wrote: > On Thu, Aug 15, 2019 at 08:52:56PM +, Yang, Philip wrote: >> hmm_range_fault may return NULL pages because some of pfns are equal to >> HMM_PFN_NONE. This happens randomly under memory pressure. The reason is >> for swapped out page pte path,

Re: [PATCH] drm/amdkfd: Fill the name field in node topology with asic name v2

2019-08-16 Thread Zhao, Yong
Pushed. Will work on the market name later. Yong From: Kuehling, Felix Sent: Thursday, August 15, 2019 8:45 PM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdkfd: Fill the name field in node topology with asic name v2 On 2019-08-13

Re: [PATCH] drm/amdgpu: fix dma_fence_wait without reference

2019-08-16 Thread Chunming Zhou
Reviewed-by: Chunming Zhou 在 2019/8/16 21:21, Christian König 写道: > We need to grab a reference to the fence we wait for. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 27 ++--- > 1 file changed, 15 insertions(+), 12 deletions(-) > >

[PATCH] drm/amdgpu: fix dma_fence_wait without reference

2019-08-16 Thread Christian König
We need to grab a reference to the fence we wait for. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 27 ++--- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

Re: [PATCH libdrm] amdgpu: add mmhub ras inject unit test

2019-08-16 Thread Christian König
Well this doesn't look like C to me. Did we added a configuration file for the ras unit tests or something like that? Christian. Am 16.08.19 um 13:04 schrieb Guchun Chen: Change-Id: Ia76b95162f5f6f419f70b53ef443bceaf2e092e0 Signed-off-by: Guchun Chen --- data/amdgpu_ras.json | 10

[PATCH libdrm] amdgpu: add mmhub ras inject unit test

2019-08-16 Thread Guchun Chen
Change-Id: Ia76b95162f5f6f419f70b53ef443bceaf2e092e0 Signed-off-by: Guchun Chen --- data/amdgpu_ras.json | 10 ++ 1 file changed, 10 insertions(+) diff --git a/data/amdgpu_ras.json b/data/amdgpu_ras.json index 26fd9465..484f12f2 100644 --- a/data/amdgpu_ras.json +++

Re: [PATCH] drm/amd/powerplay: correct SW smu11 thermal range settings

2019-08-16 Thread Wang, Kevin(Yang)
Hi Evan, the temperature min value should be 0, not -273 on smu11. you can refrence window driver code or register spec. output_ptr->operating_temperature_min_Limit = 0; output_ptr->operating_temperature_max_Limit = ppt_info->software_shutdown_temp; and in smu11, the thermal

[PATCH libdrm] tests: bypass amdgpu test build without lib-jsonc

2019-08-16 Thread Guchun Chen
Without lib-jsonc, one build error happens. So this patch is to fix this. ras_tests.c:33:10: fatal error: json.h: No such file or directory #include "json.h" ^~~~ compilation terminated. Makefile:636: recipe for target 'amdgpu_test-ras_tests.o' failed Change-Id:

RE: [PATCH] drm/amdgpu: correct return type of amdgpu_ras_query_error_count

2019-08-16 Thread Chen, Guchun
In ras unit test tool, we have already used "unsigned long" to record the ce and ue error count. Regards, Guchun -Original Message- From: Zhou1, Tao Sent: Friday, August 16, 2019 5:59 PM To: Chen, Guchun ; amd-gfx@lists.freedesktop.org; Zhang, Hawking ; Li, Dennis ; Pan, Xinhui Cc:

[PATCH] drm/amdgpu: remove redundant argument for psp_funcs::cmd_submit callback

2019-08-16 Thread Yuan, Xiaojie
Signed-off-by: Xiaojie Yuan --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 5 ++--- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 1 - drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 1 - drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 1 -

RE: [PATCH] drm/amdgpu: correct return type of amdgpu_ras_query_error_count

2019-08-16 Thread Zhou1, Tao
The change is reasonable, but I also check the function's caller, a uint32_t ras_counter stores the value in amdgpu_ctx_query2. How about ras test tool? Can we get rid of all the chaos about the counter's type? Tao > -Original Message- > From: amd-gfx On Behalf Of > Guchun Chen >

[PATCH] drm/amd/powerplay: correct SW smu11 thermal range settings

2019-08-16 Thread Evan Quan
Problems with current settings: 1. The min value was overrided to 0 on Vega20 & Navi10. While the expected should be -273.15 C. 2. The thermal min/max threshold was output in wrong unit on Navi10 & Arcturus. As TEMP_RANGE_MIN/MAX is already in millicelsius. And "*1000" in

[PATCH 2/3] amd/amdkfd: add Arcturus vf DID support

2019-08-16 Thread Frank . Min
Change-Id: I842cc31ab040b17dcc5765e275e5402df785b34a Signed-off-by: Frank.Min --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 3b9fe62..32b1cfa 100644 ---

[PATCH 3/3] amd/amdgpu: seperate sriov fb aperture setting

2019-08-16 Thread Frank . Min
sriov would not use agp, so seperate the fb aperture setting. Change-Id: I1372cd355326731a31361bff13d79e12121b8651 Signed-off-by: Frank.Min --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 39 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c| 12 +-

[PATCH 1/3] amd/amdgpu: add Arcturus vf DID support

2019-08-16 Thread Frank . Min
Change-Id: I7153153785fdd54a10ebc47e778e06982edc79d7 Signed-off-by: Frank.Min --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 0e8c165..3890ba2 100644 ---

Re: [PATCH 2/4] drm/amd/powerplay: expose supported clock domains only through sysfs

2019-08-16 Thread Kevin Wang
sure, i know, I feel this is not a good way to do code when other asics have similar problems. we'd better add a helper function to check which sysfs interface is supported for each asic. or move these sysfs interface to asic file to create. anyway, we can optimize this logic later.

RE: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value

2019-08-16 Thread Quan, Evan
Since smu_get_atom_data_table() was already used in smu_v11_0_get_vbios_bootup_values(). We should get all our needed information at once. Also, what smu_get_atom_data_table() does is to get the data table from vbios. It's a time and resource cost job. I do not think it's a good idea to call it

RE: [PATCH 2/4] drm/amd/powerplay: expose supported clock domains only through sysfs

2019-08-16 Thread Quan, Evan
Bascially, we should not expose the sysfs interface for those features not supported by the ASIC. As, there are some tools/tests which judges whether the feature is supported by the existence of the file. This can fix some test failure in rocm test suit. Regards, Evan From: Wang, Kevin(Yang)

RE: [PATCH] drm/amd/powerplay: add smu_smc_read_sensor support for arcturus

2019-08-16 Thread Quan, Evan
Without this patch, there will be missing many sensor support on arcturus. Better to declare this in descriptions or patch header. With that fixed, the patch is reviewed-by: Evan Quan Regards, Evan > -Original Message- > From: Wang, Kevin(Yang) > Sent: Friday, August 16, 2019 3:22 PM >

[PATCH] drm/amd/powerplay: add smu_smc_read_sensor support for arcturus

2019-08-16 Thread Wang, Kevin(Yang)
the bellow patch refine the sensor read sequence, but missed to add arcuturs support. (arcuturs_ppt.c) drm/amd/powerplay: change smu_read_sensor sequence in smu Signed-off-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

Re: [PATCH 2/4] drm/amd/powerplay: expose supported clock domains only through sysfs

2019-08-16 Thread Wang, Kevin(Yang)
I don't recommend it. What's the problem if we keep it the way it is? maybe other asic also has same problems, if do it, the other asic should add a condition in there too. eg: navi10 don't support sensor of "pp_dpm_pcie". Best Regards, Kevin From: amd-gfx on

Re: [PATCH 4/4] drm/amd/powerplay: set Arcturus default fclk as bootup value on dpm disabled

2019-08-16 Thread Wang, Kevin(Yang)
Reviewed-by: Kevin Wang Best Regards, Kevin From: amd-gfx on behalf of Evan Quan Sent: Friday, August 16, 2019 2:08 PM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH 4/4] drm/amd/powerplay: set Arcturus default fclk as bootup value on dpm

[PATCH] drm/amdgpu: correct return type of amdgpu_ras_query_error_count

2019-08-16 Thread Guchun Chen
The return value type of amdgpu_ras_query_error_count should be unsigned long, not int. Change-Id: I011406d81bad69a65433b63960e1691c4959bbc5 Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 +- 2 files changed, 4

Re: [PATCH 3/4] drm/amd/powerplay: get bootup fclk value

2019-08-16 Thread Wang, Kevin(Yang)
i think we can use a function to retrieve this information without storing it separately. likes: ret = smu_get_atom_data_table(smu, index, , , , (uint8_t **)); because these information is a generic information from atom_common_table_header. and other

Re: [PATCH 1/4] drm/amd/powerplay: update Arcturus smc fw and driver interface header

2019-08-16 Thread Wang, Kevin(Yang)
Reviewed-by: Kevin Wang Best Regards, Kevin From: amd-gfx on behalf of Evan Quan Sent: Friday, August 16, 2019 2:08 PM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH 1/4] drm/amd/powerplay: update Arcturus smc fw and driver interface

[PATCH] drm/amdgpu: remove redundant NULL ptr check

2019-08-16 Thread Guchun Chen
The corresponding pointer has been checked at the early stage of each function. Change-Id: Id8e264b4ba3734f91a33b6f0f408884453ea74fa Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

[PATCH 3/4] drm/amd/powerplay: get bootup fclk value

2019-08-16 Thread Evan Quan
This is available with firmwareinfo table v3.2 or later. Change-Id: I223edf3c616b9e3e2527c752214fef5ab53d1cea Signed-off-by: Evan Quan --- .../gpu/drm/amd/powerplay/inc/amdgpu_smu.h| 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 21 +++ 2 files changed, 24

[PATCH 4/4] drm/amd/powerplay: set Arcturus default fclk as bootup value on dpm disabled

2019-08-16 Thread Evan Quan
On fclk dpm disabled, the default dpm table will be setup with only one level and clock frequency as bootup value. Change-Id: Iecf74aa5bd10c9aa7839bc32877cfa99bcbef4b3 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH 1/4] drm/amd/powerplay: update Arcturus smc fw and driver interface header

2019-08-16 Thread Evan Quan
Update smc fw and driver interface header. Change-Id: If4ac09c41b1309f746b757f78880fffb491d50f8 Signed-off-by: Evan Quan --- .../powerplay/inc/smu11_driver_if_arcturus.h| 17 +++-- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- 2 files changed, 12 insertions(+), 7

[PATCH 2/4] drm/amd/powerplay: expose supported clock domains only through sysfs

2019-08-16 Thread Evan Quan
Do not expose those unsupported clock domains through sysfs on Arcturus. Change-Id: I526e7bd457fdcd8c79d4581bb9b77e5cb57f5844 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git