[PATCH v4 01/15] drm/exynos: Stop using frame_vector helpers

2020-10-26 Thread Daniel Vetter
All we need are a pages array, pin_user_pages_fast can give us that directly. Plus this avoids the entire raw pfn side of get_vaddr_frames. Reviewed-by: John Hubbard Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc

[PATCH v4 02/15] drm/exynos: Use FOLL_LONGTERM for g2d cmdlists

2020-10-26 Thread Daniel Vetter
The exynos g2d interface is very unusual, but it looks like the userptr objects are persistent. Hence they need FOLL_LONGTERM. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc

[PATCH v4 06/15] media: videobuf2: Move frame_vector into media subsystem

2020-10-26 Thread Daniel Vetter
It's the only user. This also garbage collects the CONFIG_FRAME_VECTOR symbol from all over the tree (well just one place, somehow omap media driver still had this in its Kconfig, despite not using it). Reviewed-by: John Hubbard Acked-by: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Cc

[PATCH v4 11/15] PCI: Obey iomem restrictions for procfs mmap

2020-10-26 Thread Daniel Vetter
is loaded and using it. Fix this by adding the same iomem_is_exclusive() check we already have on the sysfs side in pci_mmap_resource(). References: 90a545e98126 ("restrict /dev/mem to idle io memory ranges") Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Wi

[PATCH v4 05/15] mm/frame-vector: Use FOLL_LONGTERM

2020-10-26 Thread Daniel Vetter
section as suggested by Jason. By relying entirely on the vma checks in pin_user_pages and follow_pfn (for vm_flags and vma_is_fsdax) we can also streamline the code a lot. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Tomasz Figa

[PATCH v4 08/15] mm: Add unsafe_follow_pfn

2020-10-26 Thread Daniel Vetter
ype1 iommu). For now annotate these as unsafe and splat appropriately. This patch adds an unsafe_follow_pfn, which later patches will then roll out to all appropriate places. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard

[PATCH v4 03/15] misc/habana: Stop using frame_vector helpers

2020-10-26 Thread Daniel Vetter
All we need are a pages array, pin_user_pages_fast can give us that directly. Plus this avoids the entire raw pfn side of get_vaddr_frames. Reviewed-by: John Hubbard Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan

[PATCH v4 07/15] mm: Close race in generic_access_phys

2020-10-26 Thread Daniel Vetter
-...@vger.kernel.org Cc: linux-me...@vger.kernel.org Cc: Chris Wilson Signed-off-by: Daniel Vetter -- v2: Fix inversion in the retry check (John). v4: While at it, use offset_in_page (Chris Wilson) --- include/linux/mm.h | 3 ++- mm/memory.c| 46 +++-

[PATCH v4 10/15] vfio/type1: Mark follow_pfn as unsafe

2020-10-26 Thread Daniel Vetter
up an mmu_notifier ... somehow. Probably means any invalidate is a fatal fault for this vfio device, but then this shouldn't ever happen if userspace is reasonable. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme

[PATCH v4 13/15] resource: Move devmem revoke code to resource framework

2020-10-26 Thread Daniel Vetter
/resource.c. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung

[PATCH v4 14/15] sysfs: Support zapping of binary attr mmaps

2020-10-26 Thread Daniel Vetter
mmap support allowing to adjust the ->f_mapping makes no sense. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org C

[PATCH v4 09/15] media/videbuf1|2: Mark follow_pfn usage as unsafe

2020-10-26 Thread Daniel Vetter
rt io userptr operations on io memory"). Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: lin

[PATCH v4 15/15] PCI: Revoke mappings like devmem

2020-10-26 Thread Daniel Vetter
map through a special pfn range and not through magic pte attributes. Aliasing is therefore not a problem. The only difference in access checks left is that sysfs PCI mmap does not check for CAP_RAWIO. I'm not really sure whether that should be added or not. Signed-off-by: Daniel Vetter Cc: Jas

[PATCH v4 00/15] follow_pfn and other iomap races

2020-10-26 Thread Daniel Vetter
bits are all kinda connnected probably simplest if it all goes through -mm. Cheers, Daniel Daniel Vetter (15): drm/exynos: Stop using frame_vector helpers drm/exynos: Use FOLL_LONGTERM for g2d cmdlists misc/habana: Stop using frame_vector helpers misc/habana: Use FOLL_LONGTERM for userptr

[PATCH v4 04/15] misc/habana: Use FOLL_LONGTERM for userptr

2020-10-26 Thread Daniel Vetter
These are persistent, not just for the duration of a dma operation. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung

[PATCH v4 12/15] /dev/mem: Only set filp->f_mapping

2020-10-26 Thread Daniel Vetter
ner, since in e.g. drivers/gpu we don't do that. Per Dan this seems to be copypasta from places which do care about pagecache consistency, but not needed. Hence remove it for slightly less confusion. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton

Re: [PATCH v4 23/23] drm/msm: Don't implicit-sync if only a single ring

2020-10-26 Thread Daniel Vetter
, void > > > *data, > > > if (ret) > > > goto out; > > > > > > - ret = submit_fence_sync(submit, !!(args->flags & > > > MSM_SUBMIT_NO_IMPLICIT)); > > > + ret = submit_fence_sync(submit, (gpu->nr_rings > 1) && > > > + !(args->flags & MSM_SUBMIT_NO_IMPLICIT)); > > > if (ret) > > > goto out; > > > > > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-10-23 Thread Daniel Vetter
ence. >*/ > - if (current->memalloc_noio) > + if (current->memalloc_nowait) > + flags &= ~__GFP_DIRECT_RECLAIM; > + else if (current->memalloc_noio) > flags &= ~(__GFP_IO | __GFP_FS); > else if (current->memalloc_nofs) > flags &= ~__GFP_FS; > -- > 2.27.0 > > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH v3 04/16] misc/habana: Use FOLL_LONGTERM for userptr

2020-10-23 Thread Daniel Vetter
Hi Oded, Did testing on your end turn up anything, or can I put an ack from you on the two habana patches for the next round? Thanks, Daniel On Wed, Oct 21, 2020 at 10:57 AM Daniel Vetter wrote: > > These are persistent, not just for the duration of a dma operation. > > Signed-of

Re: [Outreachy kernel][PATCH 0/5] drm/amdgpu: Replace snprintf() with sysfs_emit

2020-10-22 Thread Daniel Vetter
dgpu_atombios.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 > drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 4 ++-- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++-- > 5 files changed, 10 insertions

Re: [PATCH v3 12/16] PCI: Obey iomem restrictions for procfs mmap

2020-10-22 Thread Daniel Vetter
On Thu, Oct 22, 2020 at 1:43 PM Jason Gunthorpe wrote: > > On Thu, Oct 22, 2020 at 09:00:44AM +0200, Daniel Vetter wrote: > > On Thu, Oct 22, 2020 at 1:20 AM Jason Gunthorpe wrote: > > > > > > On Wed, Oct 21, 2020 at 09:24:08PM +0200, Daniel Vetter wrote: > >

Re: [PATCH v2 08/17] s390/pci: Remove races against pte updates

2020-10-22 Thread Daniel Vetter
ed was waiting for v3. Hence the delay. Cheers, Daniel > > Best regards, > Niklas Schnelle > > On 10/12/20 4:19 PM, Daniel Vetter wrote: > > On Mon, Oct 12, 2020 at 04:03:28PM +0200, Niklas Schnelle wrote: > ... snip > >>> Cc: Jason Gunthorpe > >&g

Re: [PATCH v3 12/16] PCI: Obey iomem restrictions for procfs mmap

2020-10-22 Thread Daniel Vetter
On Thu, Oct 22, 2020 at 1:20 AM Jason Gunthorpe wrote: > > On Wed, Oct 21, 2020 at 09:24:08PM +0200, Daniel Vetter wrote: > > On Wed, Oct 21, 2020 at 6:37 PM Jason Gunthorpe wrote: > > > > > > On Wed, Oct 21, 2020 at 05:54:54PM +0200, Daniel Vetter wr

Re: [PATCH v3 14/16] resource: Move devmem revoke code to resource framework

2020-10-21 Thread Daniel Vetter
On Wed, Oct 21, 2020 at 8:59 PM Dan Williams wrote: > > On Wed, Oct 21, 2020 at 1:57 AM Daniel Vetter wrote: > > > > We want all iomem mmaps to consistently revoke ptes when the kernel > > takes over and CONFIG_IO_STRICT_DEVMEM is enabled. This includes the > > p

Re: [PATCH v3 12/16] PCI: Obey iomem restrictions for procfs mmap

2020-10-21 Thread Daniel Vetter
On Wed, Oct 21, 2020 at 6:37 PM Jason Gunthorpe wrote: > > On Wed, Oct 21, 2020 at 05:54:54PM +0200, Daniel Vetter wrote: > > > The trouble is that io_remap_pfn adjust vma->pgoff, so we'd need to > > split that. So ideally ->mmap would never set up any ptes. > &g

Re: [PATCH v3 12/16] PCI: Obey iomem restrictions for procfs mmap

2020-10-21 Thread Daniel Vetter
On Wed, Oct 21, 2020 at 5:13 PM Jason Gunthorpe wrote: > > On Wed, Oct 21, 2020 at 04:42:11PM +0200, Daniel Vetter wrote: > > > Uh yes. In drivers/gpu this isn't a problem because we only install > > ptes from the vm_ops->fault handler. So no races. And I don

Re: [PATCH v3 12/16] PCI: Obey iomem restrictions for procfs mmap

2020-10-21 Thread Daniel Vetter
On Wed, Oct 21, 2020 at 2:50 PM Jason Gunthorpe wrote: > > On Wed, Oct 21, 2020 at 10:56:51AM +0200, Daniel Vetter wrote: > > There's three ways to access PCI BARs from userspace: /dev/mem, sysfs > > files, and the old proc interface. Two check against > > iomem_is_e

Re: [PATCH v3 08/16] s390/pci: Remove races against pte updates

2020-10-21 Thread Daniel Vetter
On Wed, Oct 21, 2020 at 11:38 AM Niklas Schnelle wrote: > > > > On 10/21/20 10:56 AM, Daniel Vetter wrote: > > Way back it was a reasonable assumptions that iomem mappings never > > change the pfn range they point at. But this has changed: > > > > - gpu dri

[PATCH v3 03/16] misc/habana: Stop using frame_vector helpers

2020-10-21 Thread Daniel Vetter
All we need are a pages array, pin_user_pages_fast can give us that directly. Plus this avoids the entire raw pfn side of get_vaddr_frames. Reviewed-by: John Hubbard Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan

[PATCH v3 00/16] follow_pfn and other iomap races

2020-10-21 Thread Daniel Vetter
, Daniel Daniel Vetter (16): drm/exynos: Stop using frame_vector helpers drm/exynos: Use FOLL_LONGTERM for g2d cmdlists misc/habana: Stop using frame_vector helpers misc/habana: Use FOLL_LONGTERM for userptr mm/frame-vector: Use FOLL_LONGTERM media: videobuf2: Move frame_vector into media

[PATCH v3 01/16] drm/exynos: Stop using frame_vector helpers

2020-10-21 Thread Daniel Vetter
All we need are a pages array, pin_user_pages_fast can give us that directly. Plus this avoids the entire raw pfn side of get_vaddr_frames. Reviewed-by: John Hubbard Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc

[PATCH v3 08/16] s390/pci: Remove races against pte updates

2020-10-21 Thread Daniel Vetter
it message (Niklas) Reviewed-by: Gerald Schaefer Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Dan Williams Cc: Kees Cook Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung-...@vger.kernel.org

[PATCH v3 02/16] drm/exynos: Use FOLL_LONGTERM for g2d cmdlists

2020-10-21 Thread Daniel Vetter
The exynos g2d interface is very unusual, but it looks like the userptr objects are persistent. Hence they need FOLL_LONGTERM. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc

[PATCH v3 07/16] mm: Close race in generic_access_phys

2020-10-21 Thread Daniel Vetter
-...@vger.kernel.org Cc: linux-me...@vger.kernel.org Signed-off-by: Daniel Vetter -- v2: Fix inversion in the retry check (John). --- include/linux/mm.h | 3 ++- mm/memory.c| 44 ++-- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/inclu

[PATCH v3 13/16] /dev/mem: Only set filp->f_mapping

2020-10-21 Thread Daniel Vetter
ner, since in e.g. drivers/gpu we don't do that. Per Dan this seems to be copypasta from places which do care about pagecache consistency, but not needed. Hence remove it for slightly less confusion. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton

[PATCH v3 16/16] PCI: Revoke mappings like devmem

2020-10-21 Thread Daniel Vetter
map through a special pfn range and not through magic pte attributes. Aliasing is therefore not a problem. The only difference in access checks left is that sysfs PCI mmap does not check for CAP_RAWIO. I'm not really sure whether that should be added or not. Signed-off-by: Daniel Vetter Cc: Jas

[PATCH v3 12/16] PCI: Obey iomem restrictions for procfs mmap

2020-10-21 Thread Daniel Vetter
is loaded and using it. Fix this by adding the same iomem_is_exclusive() check we already have on the sysfs side in pci_mmap_resource(). References: 90a545e98126 ("restrict /dev/mem to idle io memory ranges") Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Wi

[PATCH v3 09/16] mm: Add unsafe_follow_pfn

2020-10-21 Thread Daniel Vetter
ype1 iommu). For now annotate these as unsafe and splat appropriately. This patch adds an unsafe_follow_pfn, which later patches will then roll out to all appropriate places. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard

[PATCH v3 15/16] sysfs: Support zapping of binary attr mmaps

2020-10-21 Thread Daniel Vetter
mmap support allowing to adjust the ->f_mapping makes no sense. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org C

[PATCH v3 14/16] resource: Move devmem revoke code to resource framework

2020-10-21 Thread Daniel Vetter
/resource.c. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung

[PATCH v3 06/16] media: videobuf2: Move frame_vector into media subsystem

2020-10-21 Thread Daniel Vetter
It's the only user. This also garbage collects the CONFIG_FRAME_VECTOR symbol from all over the tree (well just one place, somehow omap media driver still had this in its Kconfig, despite not using it). Reviewed-by: John Hubbard Acked-by: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Cc

[PATCH v3 11/16] vfio/type1: Mark follow_pfn as unsafe

2020-10-21 Thread Daniel Vetter
up an mmu_notifier ... somehow. Probably means any invalidate is a fatal fault for this vfio device, but then this shouldn't ever happen if userspace is reasonable. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme

[PATCH v3 04/16] misc/habana: Use FOLL_LONGTERM for userptr

2020-10-21 Thread Daniel Vetter
These are persistent, not just for the duration of a dma operation. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung

[PATCH v3 10/16] media/videbuf1|2: Mark follow_pfn usage as unsafe

2020-10-21 Thread Daniel Vetter
rt io userptr operations on io memory"). Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: lin

[PATCH v3 05/16] mm/frame-vector: Use FOLL_LONGTERM

2020-10-21 Thread Daniel Vetter
section as suggested by Jason. By relying entirely on the vma checks in pin_user_pages and follow_pfn (for vm_flags and vma_is_fsdax) we can also streamline the code a lot. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Tomasz Figa

Re: [PATCH 0/3] drm/msm: kthread_worker conversion

2020-10-21 Thread Daniel Vetter
On Tue, Oct 20, 2020 at 01:26:29PM -0700, Rob Clark wrote: > On Tue, Oct 20, 2020 at 11:14 AM Daniel Vetter wrote: > > > > On Tue, Oct 20, 2020 at 7:23 PM Rob Clark wrote: > > > > > > On Tue, Oct 20, 2020 at 10:02 AM Daniel Vetter wrote: > > > > >

Re: [PATCH 0/3] drm/msm: kthread_worker conversion

2020-10-20 Thread Daniel Vetter
On Tue, Oct 20, 2020 at 7:23 PM Rob Clark wrote: > > On Tue, Oct 20, 2020 at 10:02 AM Daniel Vetter wrote: > > > > On Tue, Oct 20, 2020 at 5:08 PM Rob Clark wrote: > > > > > > On Tue, Oct 20, 2020 at 7:29 AM Daniel Vetter wrote: > > > > > >

Re: [PATCH 0/3] drm/msm: kthread_worker conversion

2020-10-20 Thread Daniel Vetter
On Tue, Oct 20, 2020 at 5:08 PM Rob Clark wrote: > > On Tue, Oct 20, 2020 at 7:29 AM Daniel Vetter wrote: > > > > On Tue, Oct 20, 2020 at 4:01 PM Rob Clark wrote: > > > > > > On Tue, Oct 20, 2020 at 1:24 AM Daniel Vetter wrote: > > > > >

Re: [PATCH 0/3] drm/msm: kthread_worker conversion

2020-10-20 Thread Daniel Vetter
On Tue, Oct 20, 2020 at 4:01 PM Rob Clark wrote: > > On Tue, Oct 20, 2020 at 1:24 AM Daniel Vetter wrote: > > > > On Mon, Oct 19, 2020 at 02:10:50PM -0700, Rob Clark wrote: > > > From: Rob Clark > > > > > > In particular, converting the async

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-20 Thread Daniel Vetter
On Tue, Oct 20, 2020 at 1:24 PM Viresh Kumar wrote: > > On 20-10-20, 12:56, Daniel Vetter wrote: > > Yeah that's bad practice. Generally you shouldn't need to hold locks > > in setup/teardown code, since there's no other thread which can > > possible hold a reference t

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-20 Thread Daniel Vetter
On Tue, Oct 20, 2020 at 11:07 AM Viresh Kumar wrote: > > On 12-10-20, 08:43, Rob Clark wrote: > > On Mon, Oct 12, 2020 at 7:35 AM Daniel Vetter wrote: > > > > > > On Sun, Oct 11, 2020 at 07:09:34PM -0700, Rob Clark wrote: > > > > From: Rob

Re: [PATCH 0/3] drm/msm: kthread_worker conversion

2020-10-20 Thread Daniel Vetter
| 13 +++--- > drivers/gpu/drm/msm/msm_kms.h | 23 ++--- > 13 files changed, 104 insertions(+), 43 deletions(-) > > -- > 2.26.2 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org >

Re: [PATCH v2] drm/of: Consider the state in which the ep is disabled

2020-10-20 Thread Daniel Vetter
On Mon, Oct 19, 2020 at 11:43:53AM +0800, Kever Yang wrote: > Hi Daniel, > > On 2020/10/15 下午11:23, Daniel Vetter wrote: > > On Wed, Oct 14, 2020 at 09:48:43AM +0800, Kever Yang wrote: > > > Hi Maintainers, > > > > > >     Does this patch ready to merge

Re: [PATCH 2/2 RESEND] docs: fb: Add font_6x8 to available built-in fonts

2020-10-19 Thread Daniel Vetter
se. The value 'name' can be any of the > - compiled-in fonts: 10x18, 6x10, 7x14, Acorn8x8, MINI4x6, > + compiled-in fonts: 10x18, 6x10, 6x8, 7x14, Acorn8x8, MINI4x6, > PEARL8x8, ProFont6x11, SUN12x22, SUN8x16, TER16x32, VGA8x16, VGA8x8. > > Note, not all drivers c

Re: [PATCH v2 0/3] drm/panel: mantix panel reset fixes

2020-10-19 Thread Daniel Vetter
maintainer-tools/committer-drm-misc.html#where-do-i-apply-my-patch Cheers, Daniel > > When you apply to drm-misc-fixes include a Fixes: tag so the tooling > will pick the patches automagically. > > In hindsight the patches should have carried a Fixes: tag from a start > and should have been applied to drm-misc-fixes from a start too. > > I have done something like above once or twice but anyway reach out if > you have questions. Or ask at #dri-devel. > > Sam -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8

2020-10-18 Thread Daniel Vetter
On Sun, Oct 18, 2020 at 10:45 PM Peilin Ye wrote: > > On Sun, Oct 18, 2020 at 10:33:11PM +0200, Daniel Vetter wrote: > > On Sun, Oct 18, 2020 at 10:18 PM Peilin Ye wrote: > > > 2/2 is just updating the fb documentation: > > > > > > [PATCH 2/2] docs: fb: A

Re: [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8

2020-10-18 Thread Daniel Vetter
On Sun, Oct 18, 2020 at 10:18 PM Peilin Ye wrote: > > On Sun, Oct 18, 2020 at 10:09:06PM +0200, Daniel Vetter wrote: > > Adding dri-devel too, not sure anyone is still listening on linux-fbdev. > > I see, thanks! > > > On Sun, Oct 18, 2020 at 8:13 PM Peilin Ye

Re: [PATCH 1/2] Fonts: Support FONT_EXTRA_WORDS macros for font_6x8

2020-10-18 Thread Daniel Vetter
truct font_desc font_6x8 = { > .idx= FONT6x8_IDX, > .name = "6x8", > .width = 6, > .height = 8, > - .data = fontdata_6x8, > + .data = fontdata_6x8.data, > .pref = 0, > }; > -- > 2.25.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH v2 05/17] mm/frame-vector: Use FOLL_LONGTERM

2020-10-16 Thread Daniel Vetter
On Fri, Oct 16, 2020 at 9:54 AM John Hubbard wrote: > > On 10/9/20 12:59 AM, Daniel Vetter wrote: > ... > > @@ -48,40 +47,25 @@ int get_vaddr_frames(unsigned long start, unsigned int > > nr_frames, > > > > start = untagged_addr(start); > > > > -

Re: [PATCH v6 00/80] htmldoc build fixes with Sphinx 2.x and 3.x

2020-10-15 Thread Daniel Vetter
emoved the patches that depend on material > currently found only at linux-next. Was a bit tricky to find the cover letter here and that you plan to send these out this merge window. I think we'll have some confusion now with Alex from amd having picked up a few already. Anyway Acked-by:

Re: [PATCH 2/3] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-10-15 Thread Daniel Vetter
addresses directly or ignore them if it knows they're > > overridden by its own IOMMU mapping. > > I'd be happy to review patches for this. -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH v2 14/17] resource: Move devmem revoke code to resource framework

2020-10-15 Thread Daniel Vetter
On Thu, Oct 15, 2020 at 2:09 AM Jason Gunthorpe wrote: > > On Fri, Oct 09, 2020 at 11:28:54AM -0700, Dan Williams wrote: > > On Fri, Oct 9, 2020 at 7:32 AM Jason Gunthorpe wrote: > > > > > > On Fri, Oct 09, 2020 at 04:24:45PM +0200, Daniel Vetter wrote: > >

Re: [PATCH v2] drm/of: Consider the state in which the ep is disabled

2020-10-15 Thread Daniel Vetter
int_of_node(port, ep) { > > + if (!of_device_is_available(ep)) > > + continue; > > + > > remote_port = of_graph_get_remote_port(ep); > > if (!remote_port) { > > of_node_put(ep); > > Looks good to me. > > > Reviewed-by: Kever Yang -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [Freedreno] [PATCH v2 22/22] drm/msm: Don't implicit-sync if only a single ring

2020-10-15 Thread Daniel Vetter
On Tue, Oct 13, 2020 at 6:15 PM Rob Clark wrote: > > On Tue, Oct 13, 2020 at 4:08 AM Daniel Vetter wrote: > > > > On Mon, Oct 12, 2020 at 08:07:38AM -0700, Rob Clark wrote: > > > On Mon, Oct 12, 2020 at 7:40 AM Daniel Vetter wrote: > > > > > > >

Re: [PATCH v2 14/17] resource: Move devmem revoke code to resource framework

2020-10-15 Thread Daniel Vetter
On Thu, Oct 15, 2020 at 9:52 AM Daniel Vetter wrote: > > On Thu, Oct 15, 2020 at 2:09 AM Jason Gunthorpe wrote: > > > > On Fri, Oct 09, 2020 at 11:28:54AM -0700, Dan Williams wrote: > > > On Fri, Oct 9, 2020 at 7:32 AM Jason Gunthorpe wrote: > > > > >

Re: [PATCH v2 14/17] resource: Move devmem revoke code to resource framework

2020-10-15 Thread Daniel Vetter
On Thu, Oct 15, 2020 at 2:09 AM Jason Gunthorpe wrote: > > On Fri, Oct 09, 2020 at 11:28:54AM -0700, Dan Williams wrote: > > On Fri, Oct 9, 2020 at 7:32 AM Jason Gunthorpe wrote: > > > > > > On Fri, Oct 09, 2020 at 04:24:45PM +0200, Daniel Vetter wrote: > >

Re: [PATCH v2 22/22] drm/msm: Don't implicit-sync if only a single ring

2020-10-13 Thread Daniel Vetter
On Mon, Oct 12, 2020 at 08:07:38AM -0700, Rob Clark wrote: > On Mon, Oct 12, 2020 at 7:40 AM Daniel Vetter wrote: > > > > On Sun, Oct 11, 2020 at 07:09:49PM -0700, Rob Clark wrote: > > > From: Rob Clark > > > > > > Any cross-devi

Re: [PATCH v2 22/22] drm/msm: Don't implicit-sync if only a single ring

2020-10-12 Thread Daniel Vetter
t;fctx, > @@ -768,7 +768,8 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void > *data, > if (ret) > goto out; > > - ret = submit_fence_sync(submit, !!(args->flags & > MSM_SUBMIT_NO_IMPLICIT)); > + ret = submit_fence_sync(submit, (gpu-&

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-10-12 Thread Daniel Vetter
ww_class); > @@ -825,6 +834,8 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void > *data, > > > out: > + pm_runtime_put(>pdev->dev); > +out_pre_pm: > submit_cleanup(submit); > if (has_ww_ticket) > ww_acquire_fini(>ticket); > -- > 2.26.2 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH v2 08/17] s390/pci: Remove races against pte updates

2020-10-12 Thread Daniel Vetter
f you confirm there I can do the fixups when applying or you can resend. > > On 10/9/20 9:59 AM, Daniel Vetter wrote: > > Way back it was a reasonable assumptions that iomem mappings never > > change the pfn range they point at. But this has changed: > > > > - gpu dr

Re: [PATCH] drm/ingenic: Fix bad revert

2020-10-12 Thread Daniel Vetter
genic: Add option to mmap GEM buffers > cached"" > Signed-off-by: Paul Cercueil Acked-by: Daniel Vetter And yes if you use git cherry-pick it'll do a 3 way merge, and occasionally it's very tricky to resolve that properly. Especially when you're not used to it. What I tend to d

Re: [PATCH v2 09/17] mm: Add unsafe_follow_pfn

2020-10-12 Thread Daniel Vetter
it might be enough for CMA drivers though (but there's more that's possible here). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH v2 03/17] misc/habana: Stop using frame_vector helpers

2020-10-10 Thread Daniel Vetter
On Sat, Oct 10, 2020 at 10:27 PM Oded Gabbay wrote: > > On Fri, Oct 9, 2020 at 10:59 AM Daniel Vetter wrote: > > > > All we need are a pages array, pin_user_pages_fast can give us that > > directly. Plus this avoids the entire raw pfn side of get_vaddr_frames. > >

Re: [PATCH v2 03/17] misc/habana: Stop using frame_vector helpers

2020-10-10 Thread Daniel Vetter
On Sat, Oct 10, 2020 at 11:32 PM Daniel Vetter wrote: > > On Sat, Oct 10, 2020 at 10:27 PM Oded Gabbay wrote: > > > > On Fri, Oct 9, 2020 at 10:59 AM Daniel Vetter > > wrote: > > > > > > All we need are a pages array, pin_user_pages_fast can giv

Re: [PATCH v2 09/17] mm: Add unsafe_follow_pfn

2020-10-10 Thread Daniel Vetter
On Sat, Oct 10, 2020 at 11:36 PM Laurent Pinchart wrote: > > Hi Tomasz, > > On Sat, Oct 10, 2020 at 07:22:48PM +0200, Tomasz Figa wrote: > > On Fri, Oct 9, 2020 at 7:52 PM Daniel Vetter wrote: > > > On Fri, Oct 9, 2020 at 2:48 PM Jason Gunthorpe wrote: > > >

Re: [PATCH v2 09/17] mm: Add unsafe_follow_pfn

2020-10-10 Thread Daniel Vetter
bout. Imo that patch simply should never have landed, and instead dma-buf support prioritized. Cheers, Daniel On Sat, Oct 10, 2020 at 11:21 AM Mauro Carvalho Chehab wrote: > > Em Fri, 9 Oct 2020 19:52:05 +0200 > Daniel Vetter escreveu: > > > On Fri, Oct 9, 2020 at 2:48 PM Jaso

Re: [PATCH v2 09/17] mm: Add unsafe_follow_pfn

2020-10-10 Thread Daniel Vetter
On Sat, Oct 10, 2020 at 1:39 PM Mauro Carvalho Chehab wrote: > > Em Sat, 10 Oct 2020 12:53:49 +0200 > Daniel Vetter escreveu: > > > Hi Mauro, > > > > You might want to read the patches more carefully, because what you're > > demanding

Re: [PATCH RFC PKS/PMEM 09/58] drivers/gpu: Utilize new kmap_thread()

2020-10-09 Thread Daniel Vetter
On Fri, Oct 09, 2020 at 12:49:44PM -0700, ira.we...@intel.com wrote: > From: Ira Weiny > > These kmap() calls in the gpu stack are localized to a single thread. > To avoid the over head of global PKRS updates use the new kmap_thread() > call. > > Cc: David Airlie >

Re: [PATCH v2 09/17] mm: Add unsafe_follow_pfn

2020-10-09 Thread Daniel Vetter
On Fri, Oct 9, 2020 at 8:01 PM Jason Gunthorpe wrote: > > On Fri, Oct 09, 2020 at 07:52:05PM +0200, Daniel Vetter wrote: > > > > > If this is the case, the proper fix seems to have a GFP_NOT_MOVABLE > > > > flag that it would be denying the core mm code to set __

Re: [PATCH v2 09/17] mm: Add unsafe_follow_pfn

2020-10-09 Thread Daniel Vetter
ened before :( It took 4 years for RDMA to undo the uAPI > breakage caused by a security fix for something that was a 15 years > old bug. Yeah we have a bunch of these on the drm side too. Some of them are really just "you have to upgrade userspace", and there's no real fix for the security nightmare without that. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [PATCH v2 06/17] media: videobuf2: Move frame_vector into media subsystem

2020-10-09 Thread Daniel Vetter
On Fri, Oct 09, 2020 at 12:14:17PM +0200, Mauro Carvalho Chehab wrote: > Em Fri, 9 Oct 2020 09:59:23 +0200 > Daniel Vetter escreveu: > > > It's the only user. This also garbage collects the CONFIG_FRAME_VECTOR > > symbol from all over the tree (well just one place, somehow

Re: [PATCH 6/6] drm/prime: document that use the page array is deprecated v2

2020-10-09 Thread Daniel Vetter
On Fri, Oct 9, 2020 at 6:24 PM Daniel Vetter wrote: > > On Fri, Oct 09, 2020 at 05:03:42PM +0200, Christian König wrote: > > We have reoccurring requests on this so better document that > > this approach doesn't work and dma_buf_mmap() needs to be used instead. > > &

Re: [PATCH 6/6] drm/prime: document that use the page array is deprecated v2

2020-10-09 Thread Daniel Vetter
atches 3-5: Acked-by: Daniel Vetter This one looks good, but you have it on a strange baseline. This doesn't contain the sg walking fixes from Marek, so reintroduces the bugs. Probably need to request a backmerge chain, first of -rc8 into drm-next, and then that into drm-misc-next. Everything

Re: [PATCH v2 14/17] resource: Move devmem revoke code to resource framework

2020-10-09 Thread Daniel Vetter
On Fri, Oct 9, 2020 at 2:31 PM Jason Gunthorpe wrote: > > On Fri, Oct 09, 2020 at 09:59:31AM +0200, Daniel Vetter wrote: > > > +struct address_space *iomem_get_mapping(void) > > +{ > > + return iomem_inode->i_mapping; > > This should pa

Re: [PATCH v2 17/17] drm/i915: Properly request PCI BARs

2020-10-09 Thread Daniel Vetter
On Fri, Oct 9, 2020 at 12:42 PM Ville Syrjälä wrote: > > On Fri, Oct 09, 2020 at 12:01:39PM +0200, Daniel Vetter wrote: > > On Fri, Oct 9, 2020 at 11:47 AM Ville Syrjälä > > wrote: > > > > > > On Fri, Oct 09, 2020 at 09:59:34AM +0200, Daniel Vetter w

Re: [PATCH v2 17/17] drm/i915: Properly request PCI BARs

2020-10-09 Thread Daniel Vetter
On Fri, Oct 9, 2020 at 11:47 AM Ville Syrjälä wrote: > > On Fri, Oct 09, 2020 at 09:59:34AM +0200, Daniel Vetter wrote: > > When trying to test my CONFIG_IO_STRICT_DEVMEM changes I realized they > > do nothing for i915. Because i915 doesn't request any regions, like > >

[PATCH v2 01/17] drm/exynos: Stop using frame_vector helpers

2020-10-09 Thread Daniel Vetter
All we need are a pages array, pin_user_pages_fast can give us that directly. Plus this avoids the entire raw pfn side of get_vaddr_frames. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof

[PATCH v2 04/17] misc/habana: Use FOLL_LONGTERM for userptr

2020-10-09 Thread Daniel Vetter
These are persistent, not just for the duration of a dma operation. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung

[PATCH v2 05/17] mm/frame-vector: Use FOLL_LONGTERM

2020-10-09 Thread Daniel Vetter
section as suggested by Jason. By relying entirely on the vma checks in pin_user_pages and follow_pfn (for vm_flags and vma_is_fsdax) we can also streamline the code a lot. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Tomasz Figa

[PATCH v2 02/17] drm/exynos: Use FOLL_LONGTERM for g2d cmdlists

2020-10-09 Thread Daniel Vetter
The exynos g2d interface is very unusual, but it looks like the userptr objects are persistent. Hence they need FOLL_LONGTERM. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc

[PATCH v2 08/17] s390/pci: Remove races against pte updates

2020-10-09 Thread Daniel Vetter
n and make sure we drop the locks only after we've done. The write function also needs the copy_from_user move, since we can't take userspace faults while holding the mmap sem. Reviewed-by: Gerald Schaefer Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Dan Williams Cc: Kees Cook Cc: And

[PATCH v2 12/17] PCI: Obey iomem restrictions for procfs mmap

2020-10-09 Thread Daniel Vetter
is loaded and using it. Fix this by adding the same iomem_is_exclusive() check we already have on the sysfs side in pci_mmap_resource(). References: 90a545e98126 ("restrict /dev/mem to idle io memory ranges") Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Wi

[PATCH v2 03/17] misc/habana: Stop using frame_vector helpers

2020-10-09 Thread Daniel Vetter
All we need are a pages array, pin_user_pages_fast can give us that directly. Plus this avoids the entire raw pfn side of get_vaddr_frames. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux

[PATCH v2 06/17] media: videobuf2: Move frame_vector into media subsystem

2020-10-09 Thread Daniel Vetter
It's the only user. This also garbage collects the CONFIG_FRAME_VECTOR symbol from all over the tree (well just one place, somehow omap media driver still had this in its Kconfig, despite not using it). Reviewed-by: John Hubbard Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Pawel Osciak

[PATCH v2 09/17] mm: Add unsafe_follow_pfn

2020-10-09 Thread Daniel Vetter
ype1 iommu). For now annotate these as unsafe and splat appropriately. This patch adds an unsafe_follow_pfn, which later patches will then roll out to all appropriate places. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard

[PATCH v2 14/17] resource: Move devmem revoke code to resource framework

2020-10-09 Thread Daniel Vetter
/resource.c. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung-...@vger.kernel.org Cc: linux-me

[PATCH v2 15/17] sysfs: Support zapping of binary attr mmaps

2020-10-09 Thread Daniel Vetter
mmap support allowing to adjust the ->f_mapping makes no sense. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infrade

[PATCH v2 16/17] PCI: Revoke mappings like devmem

2020-10-09 Thread Daniel Vetter
map through a special pfn range and not through magic pte attributes. Aliasing is therefore not a problem. The only difference in access checks left is that sysfs PCI mmap does not check for CAP_RAWIO. I'm not really sure whether that should be added or not. Signed-off-by: Daniel Vetter Cc: Jas

[PATCH v2 07/17] mm: Close race in generic_access_phys

2020-10-09 Thread Daniel Vetter
kernel.org Cc: linux-me...@vger.kernel.org Signed-off-by: Daniel Vetter -- v2: Fix inversion in the retry check (John). --- include/linux/mm.h | 3 ++- mm/memory.c| 44 ++-- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/include/linux/mm

[PATCH v2 17/17] drm/i915: Properly request PCI BARs

2020-10-09 Thread Daniel Vetter
in the fake agp driver. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung-...@vger.kernel.org Cc

<    1   2   3   4   5   6   7   8   9   10   >