Re: [PATCH v8 5/8] mm: Device exclusive memory access

2021-05-19 Thread Peter Xu
On Wed, May 19, 2021 at 08:49:01PM +1000, Alistair Popple wrote: > On Wednesday, 19 May 2021 7:16:38 AM AEST Peter Xu wrote: > > External email: Use caution opening links or attachments > > > > > > On Wed, Apr 07, 2021 at 06:42:35PM +1000, Alistair Popple wrote: > > > > [...] > > > > > +static

Re: [PATCH v8 5/8] mm: Device exclusive memory access

2021-05-19 Thread Peter Xu
On Wed, May 19, 2021 at 09:35:10PM +1000, Alistair Popple wrote: > I think the approach you are describing is similar to what > migrate_vma_collect()/migrate_vma_unamp() does now and I think it could be > made to work. I ended up going with the GUP+unmap approach in part because > Christoph

Re: [PATCH] drivers/video/fbdev/core/fbmem.c: add pointer judgment

2021-05-19 Thread Matthew Wilcox
On Wed, May 19, 2021 at 08:00:28PM +0800, songqiang wrote: > Signed-off-by: songqiang > --- You need to explain: - Why you think this patch is needed - Did you observe a problem at runtime? - Is this the output from some checking tool? - Why this is the right way to address the problem

Re: [PATCH v8 5/8] mm: Device exclusive memory access

2021-05-19 Thread Peter Xu
On Wed, May 19, 2021 at 09:04:53PM +1000, Alistair Popple wrote: > Failing fork() because we couldn't take a lock doesn't seem like the right > approach though, especially as there is already existing code that retries. I > get this adds complexity though, so would be happy to take a look at

Re: [PATCH 1/2] drm/doc: document how userspace should find out CRTC index

2021-05-19 Thread Leandro Ribeiro
On 5/12/21 10:04 AM, Pekka Paalanen wrote: > On Wed, 12 May 2021 09:50:14 -0300 > Leandro Ribeiro wrote: > >> On 5/6/21 5:50 AM, Pekka Paalanen wrote: >>> On Wed, 28 Apr 2021 18:36:50 -0300 >>> Leandro Ribeiro wrote: >>> In this patch we add a section to document what userspace

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-19 Thread Christian König
Am 19.05.21 um 13:51 schrieb Andrey Grodzovsky: On 2021-05-19 7:46 a.m., Christian König wrote: Am 19.05.21 um 13:03 schrieb Andrey Grodzovsky: On 2021-05-19 6:57 a.m., Christian König wrote: Am 18.05.21 um 20:48 schrieb Andrey Grodzovsky: [SNIP] Would this be the right way to do it ?

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-19 Thread Andrey Grodzovsky
On 2021-05-19 7:46 a.m., Christian König wrote: Am 19.05.21 um 13:03 schrieb Andrey Grodzovsky: On 2021-05-19 6:57 a.m., Christian König wrote: Am 18.05.21 um 20:48 schrieb Andrey Grodzovsky: [SNIP] Would this be the right way to do it ? Yes, it is at least a start. Question is if we

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-19 Thread Christian König
Am 19.05.21 um 13:03 schrieb Andrey Grodzovsky: On 2021-05-19 6:57 a.m., Christian König wrote: Am 18.05.21 um 20:48 schrieb Andrey Grodzovsky: [SNIP] Would this be the right way to do it ? Yes, it is at least a start. Question is if we can wait blocking here or not. We install a

Re: [Mesa-dev] [RFC 2/2] drm/doc/rfc: i915 new parallel submission uAPI plan

2021-05-19 Thread Christian König
Oh, yeah we call that gang submit on the AMD side. Had already some internal discussions how to implement this, but so far couldn't figure out how to cleanly introduce that into the DRM scheduler. Can you briefly describe in a few words how that is supposed to work on the Intel side?

Re: [RFC] Add DMA_RESV_USAGE flags

2021-05-19 Thread Christian König
Am 19.05.21 um 00:06 schrieb Jason Ekstrand: [SNIP] E.g. we can't add a fence which doesn't wait for the exclusive one as shared. Ok I think that's a real problem, and guess it's also related to all the ttm privatization tricks and all that. So essentially we'd need the opposite of

Re: [PATCH v8 5/8] mm: Device exclusive memory access

2021-05-19 Thread Alistair Popple
On Wednesday, 19 May 2021 3:27:42 AM AEST Peter Xu wrote: > > > The odd part is the remote GUP should have walked the page table > > > already, so since the target here is the vaddr to replace, the 1st page > > > table walk should be able to both trylock/lock the page, then modify > > > the pte

Re: [Intel-gfx] [PATCH v2 10/15] drm/i915/ttm: Introduce a TTM i915 gem object backend

2021-05-19 Thread Thomas Hellström
Thanks a lot for reviewing, Matthew! On 5/19/21 11:53 AM, Matthew Auld wrote: On Tue, 18 May 2021 at 09:28, Thomas Hellström wrote: Most logical place to introduce TTM buffer objects is as an i915 gem object backend. We need to add some ops to account for added functionality like delayed

Re: [RFC] Add DMA_RESV_USAGE flags

2021-05-19 Thread Christian König
Am 18.05.21 um 23:17 schrieb Daniel Vetter: [SNIP] The problem in this case is not starting a new CS, but synchronizing to the existing ones. See a heavy TLB flush is made completely out of sync. E.g. it doesn't want to wait for any previous operation. In other words imagine the following

Re: [V2][PATCH 2/2] drm: xlnx: consolidate the functions which programming AUDIO_VIDEO_SELECT register

2021-05-19 Thread Paul Cercueil
Hi, Le mar., mai 18 2021 at 17:50:19 +0800, quanyang.w...@windriver.com a écrit : From: Quanyang Wang For now, the functions zynqmp_disp_avbuf_enable/disable_audio and zynqmp_disp_avbuf_enable/disable_video are all programming the register AV_BUF_OUTPUT_AUDIO_VIDEO_SELECT to select the

Re: [GIT PULL] drm/imx: fixes, dma-fence annotation, and color encoding/range plane properties

2021-05-19 Thread Philipp Zabel
On Wed, 2021-05-19 at 09:19 +1000, Dave Airlie wrote: > On Wed, 12 May 2021 at 23:33, Philipp Zabel wrote: > > Hi Dave, Daniel, > > > > The following changes since commit 6efb943b8616ec53a5e444193dccf1af9ad627b5: > > > > Linux 5.13-rc1 (2021-05-09 14:17:44 -0700) > > > > are available in the

Re: [Intel-gfx] [RFC 2/2] drm/doc/rfc: i915 new parallel submission uAPI plan

2021-05-19 Thread Daniel Vetter
On Tue, May 18, 2021 at 04:58:30PM -0700, Matthew Brost wrote: > Add entry fpr i915 new parallel submission uAPI plan. > > v2: > (Daniel Vetter): > - Expand logical order explaination > - Add dummy header > - Only allow N BBs in execbuf IOCTL > - Configure parallel submission per slot

Re: [PATCH v8 5/8] mm: Device exclusive memory access

2021-05-19 Thread Alistair Popple
On Wednesday, 19 May 2021 9:45:05 AM AEST Peter Xu wrote: > External email: Use caution opening links or attachments > > On Tue, May 18, 2021 at 08:03:27PM -0300, Jason Gunthorpe wrote: > > Logically during fork all these device exclusive pages should be > > reverted back to their CPU pages,

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-19 Thread Andrey Grodzovsky
On 2021-05-19 6:57 a.m., Christian König wrote: Am 18.05.21 um 20:48 schrieb Andrey Grodzovsky: [SNIP] Would this be the right way to do it ? Yes, it is at least a start. Question is if we can wait blocking here or not. We install a callback a bit lower to avoid blocking, so I'm

[PATCH v2] backlight: Kconfig whitespace and indentation cleanups

2021-05-19 Thread Juerg Haefliger
Remove leading whitespaces, replace multi spaces with tabs, and fix help text indentation. Signed-off-by: Juerg Haefliger --- drivers/video/backlight/Kconfig | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/video/backlight/Kconfig

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-19 Thread Christian König
Am 18.05.21 um 20:48 schrieb Andrey Grodzovsky: [SNIP] Would this be the right way to do it ? Yes, it is at least a start. Question is if we can wait blocking here or not. We install a callback a bit lower to avoid blocking, so I'm pretty sure that won't work as expected. Christian.

Re: [PATCH] drm/ttm: Explain why ttm_bo_add_move_fence uses a shared slot

2021-05-19 Thread Huang Rui
On Wed, May 19, 2021 at 04:24:09PM +0800, Daniel Vetter wrote: > Motivated because I got confused and Christian confirmed why this > works. I think this is non-obvious enough that it merits a slightly > longer comment. > > Cc: Christian König > Cc: Christian Koenig > Cc: Huang Rui > Cc: Thomas

Re: [RFC] Add DMA_RESV_USAGE flags

2021-05-19 Thread Michel Dänzer
On 2021-05-19 12:06 a.m., Jason Ekstrand wrote: > On Tue, May 18, 2021 at 4:17 PM Daniel Vetter wrote: >> >> On Tue, May 18, 2021 at 7:40 PM Christian König >> wrote: >>> >>> Am 18.05.21 um 18:48 schrieb Daniel Vetter: On Tue, May 18, 2021 at 2:49 PM Christian König wrote: >

Re: [PATCH v8 5/8] mm: Device exclusive memory access

2021-05-19 Thread Alistair Popple
On Wednesday, 19 May 2021 7:16:38 AM AEST Peter Xu wrote: > External email: Use caution opening links or attachments > > > On Wed, Apr 07, 2021 at 06:42:35PM +1000, Alistair Popple wrote: > > [...] > > > +static bool try_to_protect(struct page *page, struct mm_struct *mm, > > +

Re: [PATCH] drm/ttm: Explain why ttm_bo_add_move_fence uses a shared slot

2021-05-19 Thread Christian König
Am 19.05.21 um 10:24 schrieb Daniel Vetter: Motivated because I got confused and Christian confirmed why this works. I think this is non-obvious enough that it merits a slightly longer comment. Cc: Christian König Cc: Christian Koenig Cc: Huang Rui Cc: Thomas Hellström Signed-off-by: Daniel

Re: [PATCH v2 09/15] drm/ttm, drm/amdgpu: Allow the driver some control over swapping

2021-05-19 Thread Christian König
Am 19.05.21 um 08:27 schrieb Thomas Hellström: On 5/18/21 6:30 PM, Christian König wrote: Am 18.05.21 um 18:07 schrieb Thomas Hellström: On 5/18/21 5:42 PM, Christian König wrote: Am 18.05.21 um 17:38 schrieb Thomas Hellström: On 5/18/21 5:28 PM, Christian König wrote: Am 18.05.21 um

Re: [PATCH 3/3] drm: document minimum kernel version for DRM_CLIENT_CAP_*

2021-05-19 Thread Daniel Stone
Hi Simon, On Tue, 18 May 2021 at 12:15, Simon Ser wrote: > The kernel versions including the following commits are referenced: > [...] Thanks a lot for writing this up! I trust your ability to drive git log/blame/describe so didn't bother double-checking the version numbers. So this is:

Re: [PATCH -next] drm: Fix missing unlock and free on error in drm_legacy_addbufs_pci()

2021-05-19 Thread Daniel Vetter
On Tue, May 18, 2021 at 08:35:02PM +0800, Zou Wei wrote: > Add the missing unlock and free before return from function > drm_legacy_addbufs_pci() in the error handling case. > > Fixes: 70556e24e18e ("drm: remove usage of drm_pci_alloc/free") > Reported-by: Hulk Robot > Signed-off-by: Zou Wei

Re: [PATCH 3/3] drm: document minimum kernel version for DRM_CLIENT_CAP_*

2021-05-19 Thread Daniel Vetter
On Tue, May 18, 2021 at 11:14:52AM +, Simon Ser wrote: > The kernel versions including the following commits are referenced: > > DRM_CLIENT_CAP_STEREO_3D > 61d8e3282541 ("drm: Add a STEREO_3D capability to the SET_CLIENT_CAP ioctl") > > DRM_CLIENT_CAP_UNIVERSAL_PLANES > 681e7ec73044 ("drm:

[PATCH] Revert "drm/i915: Propagate errors on awaiting already signaled fences"

2021-05-19 Thread Daniel Vetter
From: Jason Ekstrand This reverts commit 9e31c1fe45d555a948ff66f1f0e3fe1f83ca63f7. Ever since that commit, we've been having issues where a hang in one client can propagate to another. In particular, a hang in an app can propagate to the X server which causes the whole desktop to lock up.

Re: [drm-rerere PATCH] nightly.conf: drop amd branches from drm-tip

2021-05-19 Thread Daniel Vetter
On Wed, May 19, 2021 at 11:49:32AM +0300, Jani Nikula wrote: > We've had a stale repo for amd in drm-tip since around v4.15 i.e. for > more than three years. Nobody seems to notice or care. Drop the amd > branches from drm-tip. > > Having the current amd branches in drm-tip would be nice to have,

Re: [Intel-gfx] [PATCH v2 11/15] drm/i915/lmem: Verify checks for lmem residency

2021-05-19 Thread Matthew Auld
On Tue, 18 May 2021 at 09:28, Thomas Hellström wrote: > > Since objects can be migrated or evicted when not pinned or locked, > update the checks for lmem residency or future residency so that > the value returned is not immediately stale. > > Signed-off-by: Thomas Hellström Reviewed-by: Matthew

Re: [RFC PATCH 0/3] A drm_plane API to support HDR planes

2021-05-19 Thread Pekka Paalanen
On Wed, 19 May 2021 11:53:37 +0300 Pekka Paalanen wrote: ... > TL;DR: > > I would summarise my comments so far into these: > > - Telling the kernel the color spaces and letting it come up with > whatever color transformation formula from those is not enough, > because it puts the render

Re: 回复: [RFC PATCH 1/2] drm/amdgpu: Fix memory corruption due to swapout and swapin

2021-05-19 Thread Christian König
I'm scratching my head how that is even possible. See when a BO is created in the system domain it is just an empty hull, e.g. without backing store and allocated pages. So the swapout function will just ignore it. Christian. Am 19.05.21 um 07:07 schrieb Pan, Xinhui: [AMD Official Use

Re: [Intel-gfx] [PATCH v2 10/15] drm/i915/ttm: Introduce a TTM i915 gem object backend

2021-05-19 Thread Matthew Auld
On Tue, 18 May 2021 at 09:28, Thomas Hellström wrote: > > Most logical place to introduce TTM buffer objects is as an i915 > gem object backend. We need to add some ops to account for added > functionality like delayed delete and LRU list manipulation. > > Initially we support only LMEM and

Re: New uAPI for color management proposal and feedback request

2021-05-19 Thread Pekka Paalanen
On Wed, 12 May 2021 16:04:16 +0300 Ville Syrjälä wrote: > On Wed, May 12, 2021 at 02:06:56PM +0200, Werner Sembach wrote: > > Hello, > > > > In addition to the existing "max bpc", and "Broadcast RGB/output_csc" drm > > properties I propose 4 new properties: > > "preferred pixel encoding",

Re: [RFC PATCH 0/3] A drm_plane API to support HDR planes

2021-05-19 Thread Pekka Paalanen
On Tue, 18 May 2021 10:19:25 -0400 Harry Wentland wrote: > On 2021-05-18 3:56 a.m., Pekka Paalanen wrote: > > On Mon, 17 May 2021 15:39:03 -0400 > > Vitaly Prosyak wrote: > > > >> On 2021-05-17 12:48 p.m., Sebastian Wick wrote: ... > >>> I suspect that this is not about tone mapping at

[PATCH 00/10] Documentation build warning fixes

2021-05-19 Thread Mauro Carvalho Chehab
Hi Jon, This small series contain a series of fixes for the documentation. it is against your docs-next branch. Three of the patches fix duplicated symbols at the ABI documents. There are still some ABI warnings from IIO, but all but one were already fixed at linux-next. So, hopefully, after

[PATCH 08/10] docs: ABI: sysfs-class-backlight: unify ambient light zone nodes

2021-05-19 Thread Mauro Carvalho Chehab
./scripts/get_abi.pl is warning about duplicated symbol definition: Warning: /sys/class/backlight//l1_daylight_max is defined 2 times: ./Documentation/ABI/testing/sysfs-class-backlight-driver-adp8870:4 ./Documentation/ABI/testing/sysfs-class-backlight-adp8860:12 What happens is that

[drm-rerere PATCH] nightly.conf: drop amd branches from drm-tip

2021-05-19 Thread Jani Nikula
We've had a stale repo for amd in drm-tip since around v4.15 i.e. for more than three years. Nobody seems to notice or care. Drop the amd branches from drm-tip. Having the current amd branches in drm-tip would be nice to have, if only to have a common drm integration tree. However, maintaining

Re: [PATCH] drm/i915/gvt: remove local storage of debugfs file

2021-05-19 Thread Zhenyu Wang
On 2021.05.19 10:31:18 +0200, Greg Kroah-Hartman wrote: > On Wed, May 19, 2021 at 04:03:13PM +0800, Zhenyu Wang wrote: > > On 2021.05.18 18:28:53 +0200, Greg Kroah-Hartman wrote: > > > On Tue, May 18, 2021 at 06:17:05PM +0200, Greg Kroah-Hartman wrote: > > > > There is no need to keep the dentry

Re: [PATCH] drm/i915/gvt: remove local storage of debugfs file

2021-05-19 Thread Greg Kroah-Hartman
On Wed, May 19, 2021 at 04:03:13PM +0800, Zhenyu Wang wrote: > On 2021.05.18 18:28:53 +0200, Greg Kroah-Hartman wrote: > > On Tue, May 18, 2021 at 06:17:05PM +0200, Greg Kroah-Hartman wrote: > > > There is no need to keep the dentry around for the debugfs kvmgt cache > > > file, as we can just

[PATCH] drm/ttm: Explain why ttm_bo_add_move_fence uses a shared slot

2021-05-19 Thread Daniel Vetter
Motivated because I got confused and Christian confirmed why this works. I think this is non-obvious enough that it merits a slightly longer comment. Cc: Christian König Cc: Christian Koenig Cc: Huang Rui Cc: Thomas Hellström Signed-off-by: Daniel Vetter --- drivers/gpu/drm/ttm/ttm_bo.c | 4

Re: [PATCH] drm/i915/gvt: remove local storage of debugfs file

2021-05-19 Thread Zhenyu Wang
On 2021.05.18 18:28:53 +0200, Greg Kroah-Hartman wrote: > On Tue, May 18, 2021 at 06:17:05PM +0200, Greg Kroah-Hartman wrote: > > There is no need to keep the dentry around for the debugfs kvmgt cache > > file, as we can just look it up when we want to remove it later on. > > Simplify the

[PATCH 1/3] gpu: drm: replace occurrences of invalid character

2021-05-19 Thread Mauro Carvalho Chehab
There are some places at drm that ended receiving a REPLACEMENT CHARACTER U+fffd ('�'), probably because of some bad charset conversion. Fix them by using what it seems to be the proper character. Signed-off-by: Mauro Carvalho Chehab --- drivers/gpu/drm/amd/include/atombios.h | 10

Re: [RFC PATCH 1/3] drm/color: Add RGB Color encodings

2021-05-19 Thread Pekka Paalanen
On Tue, 18 May 2021 10:32:48 -0400 Harry Wentland wrote: > On 2021-05-17 4:34 a.m., Pekka Paalanen wrote: > > On Fri, 14 May 2021 17:04:51 -0400 > > Harry Wentland wrote: > > > >> On 2021-04-30 8:53 p.m., Sebastian Wick wrote: > >>> On 2021-04-26 20:56, Harry Wentland wrote: > > > >

[PATCH 1/2] drm/i915/cmdparser: No-op failed batches on all platforms

2021-05-19 Thread Daniel Vetter
On gen9 for blt cmd parser we relied on the magic fence error propagation which: - doesn't work on gen7, because there's no scheduler with ringbuffers there yet - fence error propagation can be weaponized to attack other things, so not a good design idea Instead of magic, do the same thing on

[PATCH 2/2] Revert "drm/i915: Propagate errors on awaiting already signaled fences"

2021-05-19 Thread Daniel Vetter
From: Jason Ekstrand This reverts commit 9e31c1fe45d555a948ff66f1f0e3fe1f83ca63f7. Ever since that commit, we've been having issues where a hang in one client can propagate to another. In particular, a hang in an app can propagate to the X server which causes the whole desktop to lock up.

Re: [PATCH] drm/i915/gvt: remove local storage of debugfs file

2021-05-19 Thread Jani Nikula
On Wed, 19 May 2021, Zhenyu Wang wrote: > Reviewed-by: Zhenyu Wang > > Thanks! Thanks for the review. Please also let Greg know whether he can pick this up via the debugfs tree; I don't care either way. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center

Re: [PATCH v2 09/15] drm/ttm, drm/amdgpu: Allow the driver some control over swapping

2021-05-19 Thread Thomas Hellström
On 5/18/21 6:30 PM, Christian König wrote: Am 18.05.21 um 18:07 schrieb Thomas Hellström: On 5/18/21 5:42 PM, Christian König wrote: Am 18.05.21 um 17:38 schrieb Thomas Hellström: On 5/18/21 5:28 PM, Christian König wrote: Am 18.05.21 um 17:20 schrieb Thomas Hellström: On 5/18/21 5:18

<    1   2