Re: [RFC PATCH 0/3] Propose new struct drm_mem_region

2019-07-30 Thread Koenig, Christian
Am 31.07.19 um 02:51 schrieb Brian Welty: [SNIP] >> +/* >> + * Memory types for drm_mem_region >> + */ > #define DRM_MEM_SWAP? btw what did you have in mind for this? Since we use shmem we kinda don't know whether the BO is actually swapped out or not, at least on the

Re: [PATCH 2/2] drm/amdkfd: enable KFD support for navi14

2019-07-30 Thread Yuan, Xiaojie
Reviewed-by: Xiaojie Yuan BR, Xiaojie From: amd-gfx on behalf of Alex Deucher Sent: Saturday, July 27, 2019 3:16 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 2/2] drm/amdkfd: enable KFD support for navi14 Same as navi10.

Re: [PATCH 1/2] drm/amd/powerplay: support power profile retrieval and setting on arcturus

2019-07-30 Thread Kevin Wang
On 7/31/19 11:39 AM, Evan Quan wrote: > Enable arcturus power profile retrieval and setting. > > Change-Id: I85447ba9ca7de8e197840f76ce3745363c4133a6 > Signed-off-by: Evan Quan > --- > drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 69 > 1 file changed, 69 insertions(+) >

Re: [PATCH 2/2] drm/amd/powerplay: enable SW SMU power profile switch support in KFD

2019-07-30 Thread Kevin Wang
Reviewed-by: Kevin Wang BR Kevin On 7/31/19 11:39 AM, Evan Quan wrote: > Hook up the SW SMU power profile switch in KFD routine. > > Change-Id: I41e53762cdc7504285de89f30e3e6e2bb396b953 > Signed-off-by: Evan Quan > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 8 +++-- > drivers/gpu

[PATCH 3/3] drm/amdgpu: fix double ucode load by PSP

2019-07-30 Thread Monk Liu
previously the ucode loading of PSP was repreated, one executed in phase_1 init/re-init/resume and the other in fw_loading routine Avoid this double loading by clearing ip_blocks.status.hw in suspend or reset prior to the FW loading and any block's hw_init/resume Signed-off-by: Monk Liu --- dri

Re: [PATCH 2/2] drm/amdkfd: enable KFD support for navi14

2019-07-30 Thread Alex Deucher
Ping? On Fri, Jul 26, 2019 at 3:16 PM Alex Deucher wrote: > > Same as navi10. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c > b/drivers/gpu/drm/amd/amdgpu/am

[PATCH 1/3] drm/amdgpu: cleanup vega10 SRIOV code path

2019-07-30 Thread Monk Liu
we can simplify all those unnecessary function under SRIOV for vega10 since: 1) PSP L1 policy is by force enabled in SRIOV 2) original logic always set all flags which make itself a dummy step besides, 1) the ih_doorbell_range set should also be skipped for VEGA10 SRIOV. 2) the gfx_common regis

[PATCH 2/3] drm/amdgpu: fix incorrect judge on sos fw version

2019-07-30 Thread Monk Liu
for SRIOV the SOS fw of PSP is loaded in hypervisor thus guest won't tell the version of it, and judging feature by reading the sos fw version in guest side is completely wrong Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 18/30] drm/amd/powerplay: init arcturus SMU metrics table on bootup

2019-07-30 Thread Alex Deucher
On Mon, Jul 29, 2019 at 10:43 PM Kevin Wang wrote: > > > On 7/30/19 4:14 AM, Alex Deucher wrote: > > From: Evan Quan > > > > Initialize arcturus SMU metrics table. > > > > Signed-off-by: Evan Quan > > Reviewed-by: Kevin Wang > > Reviewed-by: Alex Deucher > > Signed-off-by: Alex Deucher > > --

RE: [PATCH] drm/amdgpu/powerplay: return success if set_mp1_state is not set

2019-07-30 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Wednesday, July 31, 2019 10:31 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH] drm/amdgpu/powerplay: return success if set_mp1_state > is not set > > Some

[PATCH 1/2] drm/amd/powerplay: support power profile retrieval and setting on arcturus

2019-07-30 Thread Evan Quan
Enable arcturus power profile retrieval and setting. Change-Id: I85447ba9ca7de8e197840f76ce3745363c4133a6 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 69 1 file changed, 69 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt

[PATCH 2/2] drm/amd/powerplay: enable SW SMU power profile switch support in KFD

2019-07-30 Thread Evan Quan
Hook up the SW SMU power profile switch in KFD routine. Change-Id: I41e53762cdc7504285de89f30e3e6e2bb396b953 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 8 +++-- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c| 36 +++ .../gpu/drm/amd/powerplay/in

libdrm patch merge request

2019-07-30 Thread Ma, Le
Hi Alex, Could you help to merge following 2 reviewed patches on https://gitlab.freedesktop.org/lema1/drm/commits/lema1/drm into drm master branch ? 1. tests/amdgpu: disable reset test for now 2. te

[PATCH] drm/amdgpu/powerplay: return success if set_mp1_state is not set

2019-07-30 Thread Alex Deucher
Some asics (APUs) don't have this callback so we want to return success. Avoids spurious error messages on APUs. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/powerpla

Re: [RFC PATCH 0/3] Propose new struct drm_mem_region

2019-07-30 Thread Brian Welty
On 7/30/2019 2:34 AM, Daniel Vetter wrote: > On Tue, Jul 30, 2019 at 08:45:57AM +, Koenig, Christian wrote: >> Yeah, that looks like a good start. Just a couple of random design >> comments/requirements. >> >> First of all please restructure the changes so that you more or less >> have the f

Re: [PATCH 08/13] mm: remove the mask variable in hmm_vma_walk_hugetlb_entry

2019-07-30 Thread Ralph Campbell
On 7/29/19 10:51 PM, Christoph Hellwig wrote: The pagewalk code already passes the value as the hmask parameter. Signed-off-by: Christoph Hellwig --- mm/hmm.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index f26d6abc4ed2..88b77a4a6a1e 1006

Re: [RFC PATCH 0/3] Propose new struct drm_mem_region

2019-07-30 Thread Brian Welty
On 7/30/2019 3:45 AM, Daniel Vetter wrote: > On Tue, Jul 30, 2019 at 12:24 PM Koenig, Christian > wrote: >> >> Am 30.07.19 um 11:38 schrieb Daniel Vetter: >>> On Tue, Jul 30, 2019 at 08:45:57AM +, Koenig, Christian wrote: Snipped the feedback on struct drm_mem_region. Will be easier to have

Re: [PATCH 06/13] mm: remove superflous arguments from hmm_range_register

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:51:56AM +0300, Christoph Hellwig wrote: > The start, end and page_shift values are all saved in the range > structure, so we might as well use that for argument passing. > > Signed-off-by: Christoph Hellwig > --- > Documentation/vm/hmm.rst| 2 +- > dri

Re: [PATCH 03/13] nouveau: pass struct nouveau_svmm to nouveau_range_fault

2019-07-30 Thread Christoph Hellwig
On Tue, Jul 30, 2019 at 01:14:58PM +, Jason Gunthorpe wrote: > I have a patch deleting hmm->mm, so using svmm seems cleaner churn > here, we could defer and I can fold this into that patch? Sounds good. If I don't need to resend feel fee to fold it, otherwise I'll fix it up. _

Re: [PATCH 13/13] mm: allow HMM_MIRROR on all architectures with MMU

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 03:03:46PM -0300, Jason Gunthorpe wrote: > On Tue, Jul 30, 2019 at 08:52:03AM +0300, Christoph Hellwig wrote: > > There isn't really any architecture specific code in this page table > > walk implementation, so drop the dependencies. > > > > Signed-off-by: Christoph Hellwig

Re: [PATCH 07/13] mm: remove the page_shift member from struct hmm_range

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 03:14:30PM +0200, Christoph Hellwig wrote: > On Tue, Jul 30, 2019 at 12:55:17PM +, Jason Gunthorpe wrote: > > I suspect this was added for the ODP conversion that does use both > > page sizes. I think the ODP code for this is kind of broken, but I > > haven't delved into

Re: [PATCH v5 13/29] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-07-30 Thread Dan Williams
On Tue, Jul 30, 2019 at 12:59 PM Arnd Bergmann wrote: > > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architecture, wh

Re: [PATCH 08/13] mm: remove the mask variable in hmm_vma_walk_hugetlb_entry

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:51:58AM +0300, Christoph Hellwig wrote: > The pagewalk code already passes the value as the hmask parameter. > > Signed-off-by: Christoph Hellwig > mm/hmm.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/mm/hmm.c b/mm/hmm.c > index f26

Re: [PATCH 12/13] mm: cleanup the hmm_vma_walk_hugetlb_entry stub

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:52:02AM +0300, Christoph Hellwig wrote: > Stub out the whole function and assign NULL to the .hugetlb_entry method > if CONFIG_HUGETLB_PAGE is not set, as the method won't ever be called in > that case. > > Signed-off-by: Christoph Hellwig > --- > mm/hmm.c | 8

[PATCH v5 13/29] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-07-30 Thread Arnd Bergmann
The .ioctl and .compat_ioctl file operations have the same prototype so they can both point to the same function, which works great almost all the time when all the commands are compatible. One exception is the s390 architecture, where a compat pointer is only 31 bit wide, and converting it into a

Re: [PATCH 13/13] mm: allow HMM_MIRROR on all architectures with MMU

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:52:03AM +0300, Christoph Hellwig wrote: > There isn't really any architecture specific code in this page table > walk implementation, so drop the dependencies. > > Signed-off-by: Christoph Hellwig > mm/Kconfig | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-)

Re: [PATCH 10/13] mm: only define hmm_vma_walk_pud if needed

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:52:00AM +0300, Christoph Hellwig wrote: > We only need the special pud_entry walker if PUD-sized hugepages and > pte mappings are supported, else the common pagewalk code will take > care of the iteration. Not implementing this callback reduced the > amount of code compi

Re: [PATCH 11/13] mm: cleanup the hmm_vma_handle_pmd stub

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:52:01AM +0300, Christoph Hellwig wrote: > Stub out the whole function when CONFIG_TRANSPARENT_HUGEPAGE is not set > to make the function easier to read. > > Signed-off-by: Christoph Hellwig > mm/hmm.c | 18 +- > 1 file changed, 9 insertions(+), 9 deleti

Re: [GIT PULL] Please pull hmm changes

2019-07-30 Thread pr-tracker-bot
The pull request you sent on Tue, 30 Jul 2019 11:58:37 +: > git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git tags/for-linus-hmm has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/515f12b9eeed35250d793b7c874707c33f7f6e05 Thank you! -- Deet-doot-dot, I am a

Re: between commits d7d170a8e357 and 22051d9c4a57 begins issue page allocation failure in gnome-shell process

2019-07-30 Thread Mikhail Gavrilov
Is anyone here? Is everyone so busy what is wrong? RC2 is still affected by this issue and unusable for every day because opening a video in totem player cause DE a hang with a lot of messages: [ 1072.283518] amdgpu :0b:00.0: [gfxhub] retry page fault (src_id:0 ring:0 vmid:3 pasid:32769, for p

Re: [PATCH v4 19/23] drm/bridge: dw-hdmi: Provide ddc symlink in connector sysfs directory

2019-07-30 Thread Sam Ravnborg
Hi Neil. > > Signed-off-by: Andrzej Pietrasiewicz > > --- > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 40 +++ > > 1 file changed, 20 insertions(+), 20 deletions(-) > > ... > > Reviewed-by: Neil Armstrong There is now a much simpler v6 of this patch. Care to take a loo

Re: [PATCH v6 00/24] Associate ddc adapters with connectors

2019-07-30 Thread Emil Velikov
On 2019/07/26, Andrzej Pietrasiewicz wrote: > It is difficult for a user to know which of the i2c adapters is for which > drm connector. This series addresses this problem. > > The idea is to have a symbolic link in connector's sysfs directory, e.g.: > > ls -l /sys/class/drm/card0-HDMI-A-1/ddc >

Re: [RFC PATCH 0/3] Propose new struct drm_mem_region

2019-07-30 Thread Daniel Vetter
On Tue, Jul 30, 2019 at 4:30 PM Michel Dänzer wrote: > On 2019-07-30 12:45 p.m., Daniel Vetter wrote: > > On Tue, Jul 30, 2019 at 12:24 PM Koenig, Christian > > wrote: > >> Am 30.07.19 um 11:38 schrieb Daniel Vetter: > >>> On Tue, Jul 30, 2019 at 08:45:57AM +, Koenig, Christian wrote: > > > >

Re: [RFC PATCH 0/3] Propose new struct drm_mem_region

2019-07-30 Thread Michel Dänzer
On 2019-07-30 12:45 p.m., Daniel Vetter wrote: > On Tue, Jul 30, 2019 at 12:24 PM Koenig, Christian > wrote: >> Am 30.07.19 um 11:38 schrieb Daniel Vetter: >>> On Tue, Jul 30, 2019 at 08:45:57AM +, Koenig, Christian wrote: > > +#define DRM_MEM_SYSTEM 0 > +#define DRM_MEM_STOLEN

Re: [PATCH 1/2] drm/amd/display: Embed DCN2 SOC bounding box

2019-07-30 Thread Ernst Sjöstrand
Isn't NV10 a family of chips in Nouveau? Regards //Ernst Den tis 30 juli 2019 kl 15:57 skrev Nicholas Kazlauskas : > > [Why] > In order to support uclk switching on NV10 the SOC bounding box > needs to be updated. > > [How] > We currently read the constants from the gpu info FW, but supporting >

Re: [PATCH 2/2] drm/amd/display: Support uclk switching for DCN2

2019-07-30 Thread Harry Wentland
On 2019-07-30 9:57 a.m., Nicholas Kazlauskas wrote: > [Why] > We were previously forcing the uclk for every state to max and reducing > the switch time to prevent uclk switching from occuring. This workaround > was previously needed in order to avoid hangs + underflow under certain > display config

Re: [PATCH 2/2] drm/amd/display: Support uclk switching for DCN2

2019-07-30 Thread Alex Deucher
Series is: Acked-by: Alex Deucher On Tue, Jul 30, 2019 at 9:58 AM Nicholas Kazlauskas wrote: > > [Why] > We were previously forcing the uclk for every state to max and reducing > the switch time to prevent uclk switching from occuring. This workaround > was previously needed in order to avoid ha

[PATCH 1/2] drm/amd/display: Embed DCN2 SOC bounding box

2019-07-30 Thread Nicholas Kazlauskas
[Why] In order to support uclk switching on NV10 the SOC bounding box needs to be updated. [How] We currently read the constants from the gpu info FW, but supporting workarounds in DC for different versions of the FW adds additional complexity to the codebase. NV10 has been released so it's clean

[PATCH 2/2] drm/amd/display: Support uclk switching for DCN2

2019-07-30 Thread Nicholas Kazlauskas
[Why] We were previously forcing the uclk for every state to max and reducing the switch time to prevent uclk switching from occuring. This workaround was previously needed in order to avoid hangs + underflow under certain display configurations. Now that DC has the proper fix complete we can drop

AMDPU breaks suspend after kernel 5.0

2019-07-30 Thread Paul Gover
Hi Likun, Sorry if you don't want emails like this. I added info. to https://bugs.freedesktop.org/show_bug.cgi?id=110258 but people on Gentoo forums said email would be better. Git bisect lead me to you: --- 106c7d6148e5aadd394e6701f7e498df49b869d1 is the first bad commit commit 106c

Re: [PATCH 01/13] amdgpu: remove -EAGAIN handling for hmm_range_fault

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:51:51AM +0300, Christoph Hellwig wrote: > hmm_range_fault can only return -EAGAIN if called with the block > argument set to false, so remove the special handling for it. > > Signed-off-by: Christoph Hellwig > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 23 +++---

Re: [PATCH 07/13] mm: remove the page_shift member from struct hmm_range

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:51:57AM +0300, Christoph Hellwig wrote: > All users pass PAGE_SIZE here, and if we wanted to support single > entries for huge pages we should really just add a HMM_FAULT_HUGEPAGE > flag instead that uses the huge page size instead of having the > caller calculate that si

Re: [PATCH 05/13] mm: remove the unused vma argument to hmm_range_dma_unmap

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:51:55AM +0300, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > include/linux/hmm.h | 1 - > mm/hmm.c| 2 -- > 2 files changed, 3 deletions(-) Reviewed-by: Jason Gunthorpe Unclear what this was intended for, but I think if we need to carry in

Re: [PATCH 03/13] nouveau: pass struct nouveau_svmm to nouveau_range_fault

2019-07-30 Thread Christoph Hellwig
On Tue, Jul 30, 2019 at 12:35:59PM +, Jason Gunthorpe wrote: > On Tue, Jul 30, 2019 at 08:51:53AM +0300, Christoph Hellwig wrote: > > This avoid having to abuse the vma field in struct hmm_range to unlock > > the mmap_sem. > > I think the change inside hmm_range_fault got lost on rebase, it is

Re: [PATCH 03/13] nouveau: pass struct nouveau_svmm to nouveau_range_fault

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 03:10:38PM +0200, Christoph Hellwig wrote: > On Tue, Jul 30, 2019 at 12:35:59PM +, Jason Gunthorpe wrote: > > On Tue, Jul 30, 2019 at 08:51:53AM +0300, Christoph Hellwig wrote: > > > This avoid having to abuse the vma field in struct hmm_range to unlock > > > the mmap_se

Re: [PATCH 07/13] mm: remove the page_shift member from struct hmm_range

2019-07-30 Thread Christoph Hellwig
On Tue, Jul 30, 2019 at 12:55:17PM +, Jason Gunthorpe wrote: > I suspect this was added for the ODP conversion that does use both > page sizes. I think the ODP code for this is kind of broken, but I > haven't delved into that.. > > The challenge is that the driver needs to know what page size

amdgpf: BUG: NULL pointer dereference and memory leak

2019-07-30 Thread 亿一
Hi alll, While analyzing the source code, I notice that function amdgpu_cs_process_fence_dep() may exist NULL pointer dereference and memory leak in the following code fragments: fence = amdgpu_ctx_get_fence(ctx, entity, deps[i].handle); if (chunk->chunk_id == AMDGPU_CHUNK_ID_SCHED

Re: [PATCH 03/13] nouveau: pass struct nouveau_svmm to nouveau_range_fault

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:51:53AM +0300, Christoph Hellwig wrote: > This avoid having to abuse the vma field in struct hmm_range to unlock > the mmap_sem. I think the change inside hmm_range_fault got lost on rebase, it is now using: up_read(&range->hmm->mm->mmap_sem); But, yes,

Re: [PATCH 02/13] amdgpu: don't initialize range->list in amdgpu_hmm_init_range

2019-07-30 Thread Jason Gunthorpe
On Tue, Jul 30, 2019 at 08:51:52AM +0300, Christoph Hellwig wrote: > The list is used to add the range to another list as an entry in the > core hmm code, so there is no need to initialize it in a driver. > > Signed-off-by: Christoph Hellwig > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 1 - >

Re: [PATCH v6 16/24] drm: sti: Provide ddc symlink in hdmi connector sysfs directory

2019-07-30 Thread Benjamin Gaignard
Le ven. 26 juil. 2019 à 19:27, Andrzej Pietrasiewicz a écrit : > > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Benjamin Gaignard > --- > drivers/gpu/drm/sti/sti_hdmi.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-

Re: [PATCH v6 21/24] drm/bridge: ti-tfp410: Provide ddc symlink in connector sysfs directory

2019-07-30 Thread Neil Armstrong
On 26/07/2019 19:23, Andrzej Pietrasiewicz wrote: > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz > --- > drivers/gpu/drm/bridge/ti-tfp410.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/ti

Re: [PATCH v6 19/24] drm/bridge: dumb-vga-dac: Provide ddc symlink in connector sysfs directory

2019-07-30 Thread Neil Armstrong
On 26/07/2019 19:23, Andrzej Pietrasiewicz wrote: > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz > --- > drivers/gpu/drm/bridge/dumb-vga-dac.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/bridge

Re: [PATCH v4 20/23] drm/bridge: ti-tfp410: Provide ddc symlink in connector sysfs directory

2019-07-30 Thread Neil Armstrong
On 11/07/2019 13:26, Andrzej Pietrasiewicz wrote: > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz > --- > drivers/gpu/drm/bridge/ti-tfp410.c | 19 +-- > 1 file changed, 9 insertions(+), 10 deletions(-) > > diff --git a/drivers/gp

Re: [PATCH v4 19/23] drm/bridge: dw-hdmi: Provide ddc symlink in connector sysfs directory

2019-07-30 Thread Neil Armstrong
On 11/07/2019 13:26, Andrzej Pietrasiewicz wrote: > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 40 +++ > 1 file changed, 20 insertions(+), 20 deletions(-) > > diff --git

Re: [PATCH v4 18/23] drm/bridge: dumb-vga-dac: Provide ddc symlink in connector sysfs directory

2019-07-30 Thread Neil Armstrong
On 11/07/2019 13:26, Andrzej Pietrasiewicz wrote: > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz > --- > drivers/gpu/drm/bridge/dumb-vga-dac.c | 19 +-- > 1 file changed, 9 insertions(+), 10 deletions(-) > > diff --git a/drivers

[GIT PULL] Please pull hmm changes

2019-07-30 Thread Jason Gunthorpe
Hi Linus, Locking fix for nouveau's use of HMM This small series was posted by Christoph before the merge window, but didn't make it in time for the PR. It fixes various locking errors in the nouveau driver's use of the hmm_range_* functions. The diffstat is a bit big as Christoph did a comprehe

Re: [PATCH] drm/amdgpu: fix a potential information leaking bug

2019-07-30 Thread Christian König
Am 27.07.19 um 11:37 schrieb Chunming Zhou: 在 2019/7/27 17:30, Wang Xiayang 写道: Coccinelle reports a path that the array "data" is never initialized. The path skips the checks in the conditional branches when either of callback functions, read_wave_vgprs and read_wave_sgprs, is not registered. L

Re: [RFC PATCH 0/3] Propose new struct drm_mem_region

2019-07-30 Thread Daniel Vetter
On Tue, Jul 30, 2019 at 12:24 PM Koenig, Christian wrote: > > Am 30.07.19 um 11:38 schrieb Daniel Vetter: > > On Tue, Jul 30, 2019 at 08:45:57AM +, Koenig, Christian wrote: > >> Yeah, that looks like a good start. Just a couple of random design > >> comments/requirements. > >> > >> First of al

Re: [RFC PATCH 0/3] Propose new struct drm_mem_region

2019-07-30 Thread Koenig, Christian
Am 30.07.19 um 11:38 schrieb Daniel Vetter: > On Tue, Jul 30, 2019 at 08:45:57AM +, Koenig, Christian wrote: >> Yeah, that looks like a good start. Just a couple of random design >> comments/requirements. >> >> First of all please restructure the changes so that you more or less >> have the fol

Re: [RFC PATCH 0/3] Propose new struct drm_mem_region

2019-07-30 Thread Daniel Vetter
On Tue, Jul 30, 2019 at 08:45:57AM +, Koenig, Christian wrote: > Yeah, that looks like a good start. Just a couple of random design > comments/requirements. > > First of all please restructure the changes so that you more or less > have the following: > 1. Adding of the new structures and fu

Re: [RFC PATCH 0/3] Propose new struct drm_mem_region

2019-07-30 Thread Daniel Vetter
On Tue, Jul 30, 2019 at 08:45:57AM +, Koenig, Christian wrote: > Yeah, that looks like a good start. Just a couple of random design > comments/requirements. > > First of all please restructure the changes so that you more or less > have the following: > 1. Adding of the new structures and fu

Re: [PATCH] drm/amdgpu: fix error handling in amdgpu_cs_process_fence_dep

2019-07-30 Thread zhoucm1
Looks very clean, Reviewed-by: Chunming Zhou On 2019年07月30日 17:18, Christian König wrote: We always need to drop the ctx reference and should check for errors first and then dereference the fence pointer. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 26 ++

Re: amdgpf: BUG: NULL pointer dereference and memory leak

2019-07-30 Thread Koenig, Christian
Am 30.07.19 um 11:14 schrieb zhoucm1: > > > On 2019年07月30日 17:04, Koenig, Christian wrote: >> Am 30.07.19 um 10:47 schrieb 亿一: >>> Hi  alll, >>>    While analyzing the source code, I notice that function >>> amdgpu_cs_process_fence_dep() may exist NULL pointer dereference and >>> memory lea

[PATCH] drm/amdgpu: fix error handling in amdgpu_cs_process_fence_dep

2019-07-30 Thread Christian König
We always need to drop the ctx reference and should check for errors first and then dereference the fence pointer. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/gp

RE: [PATCH] drm/amd/powerplay: guard consistency between CPU copy and local VRAM

2019-07-30 Thread Feng, Kenneth
Reviewed-by: Kenneth Feng -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Evan Quan Sent: Tuesday, July 30, 2019 4:59 PM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH] drm/amd/powerplay: guard consistency between CPU copy

Re: amdgpf: BUG: NULL pointer dereference and memory leak

2019-07-30 Thread zhoucm1
On 2019年07月30日 17:04, Koenig, Christian wrote: Am 30.07.19 um 10:47 schrieb 亿一: Hi alll, While analyzing the source code, I notice that function amdgpu_cs_process_fence_dep() may exist NULL pointer dereference and memory leak in the following code fragments: fence = amdgpu_ctx_ge

Re: amdgpf: BUG: NULL pointer dereference and memory leak

2019-07-30 Thread Koenig, Christian
Am 30.07.19 um 10:47 schrieb 亿一: > Hi alll, > While analyzing the source code, I notice that function > amdgpu_cs_process_fence_dep() may exist NULL pointer dereference and > memory leak in the following code fragments: > > > fence = amdgpu_ctx_get_fence(ctx, entity, > deps[i].handl

[PATCH] drm/amd/powerplay: guard consistency between CPU copy and local VRAM

2019-07-30 Thread Evan Quan
This can prevent CPU to use the out-dated copy. Change-Id: Ia18e89a923e3522e01717aa4d5ba35f8f4f20763 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c | 4 drivers/gpu/drm/amd/powerplay/smumgr/veg

Re: [RFC PATCH 0/3] Propose new struct drm_mem_region

2019-07-30 Thread Koenig, Christian
Yeah, that looks like a good start. Just a couple of random design comments/requirements. First of all please restructure the changes so that you more or less have the following: 1. Adding of the new structures and functionality without any change to existing code. 2. Replacing the existing fun

[PATCH 12/13] mm: cleanup the hmm_vma_walk_hugetlb_entry stub

2019-07-30 Thread Christoph Hellwig
Stub out the whole function and assign NULL to the .hugetlb_entry method if CONFIG_HUGETLB_PAGE is not set, as the method won't ever be called in that case. Signed-off-by: Christoph Hellwig --- mm/hmm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/hmm.c b/mm/hmm

hmm_range_fault related fixes and legacy API removal v3

2019-07-30 Thread Christoph Hellwig
Hi Jérôme, Ben, Felxi and Jason, below is a series against the hmm tree which cleans up various minor bits and allows HMM_MIRROR to be built on all architectures. Diffstat: 7 files changed, 81 insertions(+), 171 deletions(-) A git tree is also available at: git://git.infradead.org/use

[PATCH 09/13] mm: don't abuse pte_index() in hmm_vma_handle_pmd

2019-07-30 Thread Christoph Hellwig
pte_index is an internal arch helper in various architectures, without consistent semantics. Open code that calculation of a PMD index based on the virtual address instead. Signed-off-by: Christoph Hellwig --- mm/hmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hmm.c

[PATCH 03/13] nouveau: pass struct nouveau_svmm to nouveau_range_fault

2019-07-30 Thread Christoph Hellwig
This avoid having to abuse the vma field in struct hmm_range to unlock the mmap_sem. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/nouveau/nouveau_svm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouve

[PATCH 07/13] mm: remove the page_shift member from struct hmm_range

2019-07-30 Thread Christoph Hellwig
All users pass PAGE_SIZE here, and if we wanted to support single entries for huge pages we should really just add a HMM_FAULT_HUGEPAGE flag instead that uses the huge page size instead of having the caller calculate that size once, just for the hmm code to verify it. Signed-off-by: Christoph Hell

[PATCH 05/13] mm: remove the unused vma argument to hmm_range_dma_unmap

2019-07-30 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/linux/hmm.h | 1 - mm/hmm.c| 2 -- 2 files changed, 3 deletions(-) diff --git a/include/linux/hmm.h b/include/linux/hmm.h index 82265118d94a..59be0aa2476d 100644 --- a/include/linux/hmm.h +++ b/include/linux/hmm.h @@ -422,7 +422,6 @@ long

[PATCH 06/13] mm: remove superflous arguments from hmm_range_register

2019-07-30 Thread Christoph Hellwig
The start, end and page_shift values are all saved in the range structure, so we might as well use that for argument passing. Signed-off-by: Christoph Hellwig --- Documentation/vm/hmm.rst| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +-- drivers/gpu/drm/nouveau/nouvea

[PATCH 02/13] amdgpu: don't initialize range->list in amdgpu_hmm_init_range

2019-07-30 Thread Christoph Hellwig
The list is used to add the range to another list as an entry in the core hmm code, so there is no need to initialize it in a driver. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_m

[PATCH 08/13] mm: remove the mask variable in hmm_vma_walk_hugetlb_entry

2019-07-30 Thread Christoph Hellwig
The pagewalk code already passes the value as the hmask parameter. Signed-off-by: Christoph Hellwig --- mm/hmm.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index f26d6abc4ed2..88b77a4a6a1e 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -771,19 +771,16

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

2019-07-30 Thread Christoph Hellwig
There is only a single place where the pgmap is passed over a function call, so replace it with local variables in the places where we deal with the pgmap. Signed-off-by: Christoph Hellwig --- mm/hmm.c | 62 1 file changed, 27 insertions(+

[PATCH 13/13] mm: allow HMM_MIRROR on all architectures with MMU

2019-07-30 Thread Christoph Hellwig
There isn't really any architecture specific code in this page table walk implementation, so drop the dependencies. Signed-off-by: Christoph Hellwig --- mm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/Kconfig b/mm/Kconfig index 56cec636a1fc..b18782be969c 10064

[PATCH 01/13] amdgpu: remove -EAGAIN handling for hmm_range_fault

2019-07-30 Thread Christoph Hellwig
hmm_range_fault can only return -EAGAIN if called with the block argument set to false, so remove the special handling for it. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a

[PATCH 10/13] mm: only define hmm_vma_walk_pud if needed

2019-07-30 Thread Christoph Hellwig
We only need the special pud_entry walker if PUD-sized hugepages and pte mappings are supported, else the common pagewalk code will take care of the iteration. Not implementing this callback reduced the amount of code compiled for non-x86 platforms, and also fixes compile failures with other archi

[PATCH 11/13] mm: cleanup the hmm_vma_handle_pmd stub

2019-07-30 Thread Christoph Hellwig
Stub out the whole function when CONFIG_TRANSPARENT_HUGEPAGE is not set to make the function easier to read. Signed-off-by: Christoph Hellwig --- mm/hmm.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index 4d3bd41b6522..f4e90ea5779f 1