Re: [PATCH 3/3] locking/selftests: Add testcases for fs_reclaim

2020-11-20 Thread Peter Zijlstra
On Fri, Nov 20, 2020 at 10:54:44AM +0100, Daniel Vetter wrote: > Since I butchered this I figured better to make sure we have testcases > for this now. Since we only have a locking context for __GFP_FS that's > the only thing we're testing right now. > > Cc: linux-fsde...@vger.kernel.org > Cc: Dav

Re: [PATCH 6/8] drm/vc4: kms: Wait on previous FIFO users before a commit

2020-11-20 Thread Thomas Zimmermann
Hi Am 13.11.20 um 16:29 schrieb Maxime Ripard: If we're having two subsequent, non-blocking, commits on two different CRTCs that share no resources, there's no guarantee on the order of execution of both commits. Can there only ever be two commits that flip order? However, the second one wi

Re: [PATCH v4 19/21] drm/tegra: Implement new UAPI

2020-11-20 Thread kernel test robot
Hi Mikko, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tegra/for-next] [also build test WARNING on linus/master v5.10-rc4] [cannot apply to tegra-drm/drm/tegra/for-next next-20201120] [If your patch is applied to the wrong git tree, kindly drop us a note

Re: [PATCH v4 19/21] drm/tegra: Implement new UAPI

2020-11-20 Thread kernel test robot
Hi Mikko, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tegra/for-next] [also build test WARNING on linus/master v5.10-rc4] [cannot apply to tegra-drm/drm/tegra/for-next next-20201120] [If your patch is applied to the wrong git tree, kindly drop us a note

Re: Linux 5.10-rc4; graphics alignment

2020-11-20 Thread Thomas Zimmermann
Hi Am 20.11.20 um 13:53 schrieb David Laight: From: Thomas Zimmermann Sent: 20 November 2020 12:30 Am 20.11.20 um 12:45 schrieb David Laight: From: Thomas Zimmermann Sent: 20 November 2020 11:27 ... You can use drm-tip for testing, where many of the DRM patches go through. https://c

Re: [PATCH 7/8] drm/vc4: kms: Remove async modeset semaphore

2020-11-20 Thread Thomas Zimmermann
Am 13.11.20 um 16:29 schrieb Maxime Ripard: Now that we have proper ordering guaranteed by the previous patch, the semaphore is redundant and can be removed. Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann --- drivers/gpu/drm/vc4/vc4_crtc.c | 13 - drivers/gpu/drm

Re: [PATCH 8/8] drm/vc4: kms: Convert to atomic helpers

2020-11-20 Thread Thomas Zimmermann
Am 13.11.20 um 16:29 schrieb Maxime Ripard: Now that the semaphore is gone, our atomic_commit implementation is basically drm_atomic_helper_commit with a somewhat custom commit_tail, the main difference being that we're using wait_for_flip_done instead of wait_for_vblanks used in the drm_atomic

Re: [PATCH 5/8] drm/imx: Introduce i.MX8qxp DPU DRM

2020-11-20 Thread Laurentiu Palcu
Hi Liu Ying, I gave this a first look but, since this is a huge piece of code and I'm not very familiar with DPU, I'll probably give it another pass next week. Anyway, some comments/questions inline. On Thu, Nov 19, 2020 at 11:22:22AM +0200, Liu Ying wrote: > This patch introduces i.MX8qxp Displ

Re: [PATCH 1/8] drm: Introduce an atomic_commit_setup function

2020-11-20 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 2:34 PM Maxime Ripard wrote: > > Hi Daniel, > > Thanks for your review > > On Fri, Nov 13, 2020 at 10:02:40PM +0100, Daniel Vetter wrote: > > > +* is not used by the atomic helpers. > > > +* > > > +* This function is called at the end of > > > +* drm_atomic_

Re: [PATCH] drm/vboxvideo: Unmap iomem on probe-failure and remove

2020-11-20 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 02:00:55PM +0300, Dan Carpenter wrote: > On Fri, Nov 20, 2020 at 10:39:45AM +0100, Daniel Vetter wrote: > > On Fri, Nov 20, 2020 at 8:58 AM Dan Carpenter > > wrote: > > > > > > On Thu, Nov 19, 2020 at 08:30:59PM +0100, Daniel Vetter wrote: > > > > On Thu, Nov 19, 2020 at 6

Re: [PATCH] drm/ttm: don't set page->mapping

2020-11-20 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 11:08:31AM +0100, Christian König wrote: > Am 20.11.20 um 11:05 schrieb Daniel Vetter: > > On Fri, Nov 20, 2020 at 11:04 AM Christian König > > wrote: > > > Am 20.11.20 um 10:54 schrieb Daniel Vetter: > > > > Random observation while trying to review Christian's patch serie

Re: [PATCH v6 16/17] RFC: kvm: pass kvm argument to follow_pfn callsites

2020-11-20 Thread Paolo Bonzini
On 19/11/20 15:41, Daniel Vetter wrote: Both Christoph Hellwig and Jason Gunthorpe suggested that usage of follow_pfn by modules should be locked down more. To do so callers need to be able to pass the mmu_notifier subscription corresponding to the mm_struct to follow_pfn(). This patch does the

Re: [PATCH v6 16/17] RFC: kvm: pass kvm argument to follow_pfn callsites

2020-11-20 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 4:33 PM Paolo Bonzini wrote: > > On 19/11/20 15:41, Daniel Vetter wrote: > > Both Christoph Hellwig and Jason Gunthorpe suggested that usage of > > follow_pfn by modules should be locked down more. To do so callers > > need to be able to pass the mmu_notifier subscription c

Re: [PATCH v6 16/17] RFC: kvm: pass kvm argument to follow_pfn callsites

2020-11-20 Thread Paolo Bonzini
On 20/11/20 16:44, Daniel Vetter wrote: It's a bit of a pity, it's making an API more complex (the point of gfn_to_pfn_memslot vs gfn_to_pfn is exactly that you don't need a "struct kvm*" and it's clear that you've already done the lookup into that struct kvm. Yeah I noticed that, I think pushi

Re: [PATCH v2] drm: Pass the full state to connectors atomic functions

2020-11-20 Thread Ville Syrjälä
On Fri, Nov 20, 2020 at 12:25:57PM +0100, Maxime Ripard wrote: > Hi, > > On Thu, Nov 19, 2020 at 05:21:48PM +0200, Ville Syrjälä wrote: > > On Wed, Nov 18, 2020 at 10:47:58AM +0100, Maxime Ripard wrote: > > > The current atomic helpers have either their object state being passed as > > > an argume

RE: [PATCH] drm/kmb: Remove an unnecessary NULL check

2020-11-20 Thread Chrisanthus, Anitha
> -Original Message- > From: Thomas Zimmermann > Sent: Friday, November 20, 2020 12:34 AM > To: Sam Ravnborg ; Chrisanthus, Anitha > > Cc: David Airlie ; Dea, Edmund J ; > kernel-janit...@vger.kernel.org; dri-devel@lists.freedesktop.org; Dan > Carpenter > Subject: Re: [PATCH] drm/kmb:

Re: [PATCH 2/3] mm: Extract might_alloc() debug check

2020-11-20 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 6:20 PM Randy Dunlap wrote: > > Hi, > > On 11/20/20 1:54 AM, Daniel Vetter wrote: > > diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h > > index d5ece7a9a403..f94405d43fd1 100644 > > --- a/include/linux/sched/mm.h > > +++ b/include/linux/sched/mm.h > > @@ -1

[PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
Hi all, This series aims to fix almost all remaining fall-through warnings in order to enable -Wimplicit-fallthrough for Clang. In preparation to enable -Wimplicit-fallthrough for Clang, explicitly add multiple break/goto/return/fallthrough statements instead of just letting the code fall through

[PATCH 005/141] drm/radeon: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple fallthrough pseudo-keyword macros, as replacement for /* fall through */ comments. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link

[PATCH 004/141] drm/amdgpu: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/am

[PATCH 028/141] drm/amd/display: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/am

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Joe Perches
On Fri, 2020-11-20 at 12:21 -0600, Gustavo A. R. Silva wrote: > Hi all, > > This series aims to fix almost all remaining fall-through warnings in > order to enable -Wimplicit-fallthrough for Clang. > > In preparation to enable -Wimplicit-fallthrough for Clang, explicitly > add multiple break/goto

[PATCH 078/141] drm/amd/pm: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a break statement instead of letting the code fall through to the next case, and a fallthrough pseudo-keyword as a replacement for a /* fall through */ comment, Notice that Clang doesn't recogn

[PATCH 082/141] drm/nouveau: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a couple of break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/n

[PATCH 083/141] drm/nouveau/therm: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/subdev/the

[PATCH 079/141] drm: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/drm_bufs.c | 1 + 1 fil

[PATCH 080/141] drm/i915/gem: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a return statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/i915/gem/i915_gem_shri

[PATCH 084/141] drm/via: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/via/via_irq.c | 1 + 1

[PATCH 081/141] drm/nouveau/clk: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/subdev/clk

Re: [git pull] drm fixes for v5.10-rc5

2020-11-20 Thread pr-tracker-bot
The pull request you sent on Fri, 20 Nov 2020 11:55:49 +1000: > git://anongit.freedesktop.org/drm/drm tags/drm-fixes-2020-11-20-2 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/46cbc18ed85219d534b4fbb4a39058fe66766e83 Thank you! -- Deet-doot-dot, I am a bot. https:/

[PATCH 134/141] video: fbdev: lxfb_ops: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/video/fbdev/geode/lxfb_ops.c |

[PATCH 135/141] video: fbdev: pm2fb: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/video/fbdev/pm2fb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driver

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Jakub Kicinski
On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: > This series aims to fix almost all remaining fall-through warnings in > order to enable -Wimplicit-fallthrough for Clang. > > In preparation to enable -Wimplicit-fallthrough for Clang, explicitly > add multiple break/goto/return/fallt

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Kees Cook
On Fri, Nov 20, 2020 at 10:53:44AM -0800, Jakub Kicinski wrote: > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: > > This series aims to fix almost all remaining fall-through warnings in > > order to enable -Wimplicit-fallthrough for Clang. > > > > In preparation to enable -Wimplici

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
On 11/20/20 12:28, Joe Perches wrote: > On Fri, 2020-11-20 at 12:21 -0600, Gustavo A. R. Silva wrote: >> Hi all, >> >> This series aims to fix almost all remaining fall-through warnings in >> order to enable -Wimplicit-fallthrough for Clang. >> >> In preparation to enable -Wimplicit-fallthrough

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
Hi, On 11/20/20 12:53, Jakub Kicinski wrote: > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: >> This series aims to fix almost all remaining fall-through warnings in >> order to enable -Wimplicit-fallthrough for Clang. >> >> In preparation to enable -Wimplicit-fallthrough for Cla

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Jakub Kicinski
On Fri, 20 Nov 2020 11:30:40 -0800 Kees Cook wrote: > On Fri, Nov 20, 2020 at 10:53:44AM -0800, Jakub Kicinski wrote: > > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: > > > This series aims to fix almost all remaining fall-through warnings in > > > order to enable -Wimplicit-fall

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Kees Cook
On Fri, Nov 20, 2020 at 11:51:42AM -0800, Jakub Kicinski wrote: > On Fri, 20 Nov 2020 11:30:40 -0800 Kees Cook wrote: > > On Fri, Nov 20, 2020 at 10:53:44AM -0800, Jakub Kicinski wrote: > > > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: > > > > This series aims to fix almost all

[PATCH] drm: mxsfb: fix fence synchronization

2020-11-20 Thread Lucas Stach
The conversion away from the simple display pipeline helper missed to convert the prepare_fb plane callback, so no fences are attached to the atomic state, breaking synchronization with other devices. Fix this by plugging in the drm_gem_fb_prepare_fb helper function. Fixes: ae1ed009328 (drm: mxsfb

RE: [PATCH v2] drm/kmb: Fix possible oops in probe error handling

2020-11-20 Thread Chrisanthus, Anitha
Hi Dan, I see the problem now, thanks for the patch. > -Original Message- > From: Dan Carpenter > Sent: Friday, November 20, 2020 12:11 AM > To: Chrisanthus, Anitha > Cc: Dea, Edmund J ; David Airlie ; > Daniel Vetter ; Sam Ravnborg ; dri- > de...@lists.freedesktop.org; kernel-janit...@v

Re: [PATCH 004/141] drm/amdgpu: Fix fall-through warnings for Clang

2020-11-20 Thread Alex Deucher
On Fri, Nov 20, 2020 at 1:24 PM Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding multiple break statements instead of just > letting the code fall through to the next case. > > Link: https://github.com/KSPP/linux

Re: [PATCH 005/141] drm/radeon: Fix fall-through warnings for Clang

2020-11-20 Thread Alex Deucher
On Fri, Nov 20, 2020 at 1:24 PM Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding multiple fallthrough pseudo-keyword macros, > as replacement for /* fall through */ comments. > > Notice that Clang doesn't recogni

Re: [PATCH 028/141] drm/amd/display: Fix fall-through warnings for Clang

2020-11-20 Thread Alex Deucher
On Fri, Nov 20, 2020 at 1:28 PM Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding multiple break statements instead of just > letting the code fall through to the next case. > > Link: https://github.com/KSPP/linux

Re: [PATCH 078/141] drm/amd/pm: Fix fall-through warnings for Clang

2020-11-20 Thread Alex Deucher
On Fri, Nov 20, 2020 at 1:35 PM Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple > of warnings by explicitly adding a break statement instead of letting > the code fall through to the next case, and a fallthrough pseudo-keyword > as a replaceme

[radeon-alex:amd-20.45 630/2417] drivers/gpu/drm/amd/include/navi10_ip_offset.h:269:52: warning: initialized field overwritten

2020-11-20 Thread kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-20.45 head: 1807abbb3a7f17fc931a15d7fd4365ea148c6bb1 commit: 4978452e875a60112754d1247480cd76321e3ff9 [630/2417] drm/amdkcl: generate config.h config: i386-randconfig-a003-20201120 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15

Re: [PATCH v5 1/1] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2020-11-20 Thread Sergey Senozhatsky
On (20/11/20 16:57), Petr Mladek wrote: > On Fri 2020-11-13 12:54:41, Sakari Ailus wrote: > > Add a printk modifier %p4cc (for pixel format) for printing V4L2 and DRM > > pixel formats denoted by fourccs. The fourcc encoding is the same for both > > so the same implementation can be used. > > > >

[radeon-alex:amd-20.45 1587/2417] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c:882:6: warning: no previous prototype for function 'kgd_gfx_v10_set_address_watch'

2020-11-20 Thread kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-20.45 head: 1807abbb3a7f17fc931a15d7fd4365ea148c6bb1 commit: abdc393ab8265df9db5d9d64eb33ed1c33e9d95c [1587/2417] drm/amdkfd: Add gfx10 address watch support config: x86_64-randconfig-a011-20201120 (attached as .config) compiler: clang

[PATCH v6 0/5] dma-buf: Code rework and performance improvements for system heap

2020-11-20 Thread John Stultz
Hey All, So just wanted to send another revision of my patch series of performance optimizations to the dma-buf system heap, this time against drm-misc-next. This series reworks the system heap to use sgtables, and then consolidates the pagelist method from the heap-helpers into the CMA heap. Af

[PATCH v6 2/5] dma-buf: heaps: Move heap-helper logic into the cma_heap implementation

2020-11-20 Thread John Stultz
Since the heap-helpers logic ended up not being as generic as hoped, move the heap-helpers dma_buf_ops implementations into the cma_heap directly. This will allow us to remove the heap_helpers code in a following patch. Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hri

[PATCH v6 1/5] dma-buf: system_heap: Rework system heap to use sgtables instead of pagelists

2020-11-20 Thread John Stultz
In preparation for some patches to optmize the system heap code, rework the dmabuf exporter to utilize sgtables rather then pageslists for tracking the associated pages. This will allow for large order page allocations, as well as more efficient page pooling. In doing so, the system heap stops us

[PATCH v6 4/5] dma-buf: heaps: Skip sync if not mapped

2020-11-20 Thread John Stultz
This patch is basically a port of Ørjan Eide's similar patch for ION https://lore.kernel.org/lkml/20200414134629.54567-1-orjan.e...@arm.com/ Only sync the sg-list of dma-buf heap attachment when the attachment is actually mapped on the device. dma-bufs may be synced at any time. It can be reache

[PATCH v6 5/5] dma-buf: system_heap: Allocate higher order pages if available

2020-11-20 Thread John Stultz
While the system heap can return non-contiguous pages, try to allocate larger order pages if possible. This will allow slight performance gains and make implementing page pooling easier. Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasa

[PATCH v6 3/5] dma-buf: heaps: Remove heap-helpers code

2020-11-20 Thread John Stultz
The heap-helpers code was not as generic as initially hoped and it is now not being used, so remove it from the tree. Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc:

[PATCH v3 01/12] drm: Add dummy page per device or GEM object

2020-11-20 Thread Andrey Grodzovsky
Will be used to reroute CPU mapped BO's page faults once device is removed. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/drm_file.c | 8 drivers/gpu/drm/drm_prime.c | 10 ++ include/drm/drm_file.h | 2 ++ include/drm/drm_gem.h | 2 ++ 4 files changed, 22 i

[PATCH v3 02/12] drm: Unamp the entire device address space on device unplug

2020-11-20 Thread Andrey Grodzovsky
Invalidate all BOs CPU mappings once device is removed. v3: Move the code from TTM into drm_dev_unplug Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/drm_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 13068fd..d550f

[PATCH v3 00/12] RFC Support hot device unplug in amdgpu

2020-11-20 Thread Andrey Grodzovsky
Until now extracting a card either by physical extraction (e.g. eGPU with thunderbolt connection or by emulation through syfs -> /sys/bus/pci/devices/device_id/remove) would cause random crashes in user apps. The random crashes in apps were mostly due to the app having mapped a device backed B

[PATCH v3 05/12] drm/ttm: Expose ttm_tt_unpopulate for driver use

2020-11-20 Thread Andrey Grodzovsky
It's needed to drop iommu backed pages on device unplug before device's IOMMU group is released. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/ttm/ttm_tt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index 1ccf1ef..29248a

[PATCH v3 04/12] drm/ttm: Set dma addr to null after freee

2020-11-20 Thread Andrey Grodzovsky
Fixes oops. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index b40a467..b0df328 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/

[PATCH v3 03/12] drm/ttm: Remap all page faults to per process dummy page.

2020-11-20 Thread Andrey Grodzovsky
On device removal reroute all CPU mappings to dummy page per drm_file instance or imported GEM object. v3: Remove loop to find DRM file and instead access it by vma->vm_file->private_data. Move dummy page installation into a separate function. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/dr

[PATCH v3 06/12] drm/sched: Cancel and flush all oustatdning jobs before finish.

2020-11-20 Thread Andrey Grodzovsky
To avoid any possible use after free. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/scheduler/sched_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index da24c4e..c3f0bd0 100644 --- a/drivers/gp

[PATCH v3 08/12] drm/amdgpu: Split amdgpu_device_fini into early and late

2020-11-20 Thread Andrey Grodzovsky
Some of the stuff in amdgpu_device_fini such as HW interrupts disable and pending fences finilization must be done right away on pci_remove while most of the stuff which relates to finilizing and releasing driver data structures can be kept until drm_driver.release hook is called, i.e. when the las

[PATCH v3 07/12] drm/sched: Prevent any job recoveries after device is unplugged.

2020-11-20 Thread Andrey Grodzovsky
No point to try recovery if device is gone, it's meaningless. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 3 ++- drivers/gpu/drm/lima/lima_sched.c | 3 ++- drivers/gpu/drm/panfrost/panfrost_job.c

[PATCH v3 09/12] drm/amdgpu: Add early fini callback

2020-11-20 Thread Andrey Grodzovsky
Use it to call disply code dependent on device->drv_data before it's set to NULL on device unplug Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 20 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++-- drivers/gpu/drm

[PATCH v3 10/12] drm/amdgpu: Avoid sysfs dirs removal post device unplug

2020-11-20 Thread Andrey Grodzovsky
Avoids NULL ptr due to kobj->sd being unset on device removal. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/am

[PATCH v3 11/12] drm/amdgpu: Register IOMMU topology notifier per device.

2020-11-20 Thread Andrey Grodzovsky
Handle all DMA IOMMU gropup related dependencies before the group is removed. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 5 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 46 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 2

[PATCH v3 12/12] drm/amdgpu: Fix a bunch of sdma code crash post device unplug

2020-11-20 Thread Andrey Grodzovsky
We can't allocate and submit IBs post device unplug. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index fdbe7

[radeon-alex:amd-20.45 2387/2417] drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1284:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute

2020-11-20 Thread kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-20.45 head: 1807abbb3a7f17fc931a15d7fd4365ea148c6bb1 commit: cf13e50dea28cde351fa32767e36135afb30386d [2387/2417] drm/amdgpu: clean up ras sysfs creation (v2) config: x86_64-randconfig-a011-20201120 (attached as .config) compiler: clang

<    1   2