Re: [PATCH 2/4] drm/ttm: do not set NULL to debugfs dentry

2021-10-12 Thread Christian König
Am 11.10.21 um 21:06 schrieb Nirmoy Das: For debugfs directory, it is recommended to save the result and pass over to next debugfs API for creating debugfs files/directories. Error conditions are handled by debugfs APIs. CC: Christian Koenig CC: Huang Rui CC: David Airlie CC: Daniel Vetter

Re: [PATCH v5 0/8] drm/omap: Add virtual-planes support

2021-10-12 Thread Tomi Valkeinen
On 23/09/2021 10:06, Neil Armstrong wrote: This patchset is the follow-up the v4 patchset from Benoit Parrot at [1]. This patch series adds virtual-plane support to omapdrm driver to allow the use of display wider than 2048 pixels. In order to do so we introduce the concept of hw_overlay which

Re: [PATCH v5 1/8] drm/omap: Add ability to check if requested plane modes can be supported

2021-10-12 Thread Tomi Valkeinen
Hi, On 23/09/2021 10:06, Neil Armstrong wrote: From: Benoit Parrot We currently assume that an overlay has the same maximum width and maximum height as the overlay manager. This assumption is incorrect. On some variants the overlay manager maximum width is twice the maximum width that the over

Re: DSI Bridge switching

2021-10-12 Thread Jagan Teki
On Mon, Oct 11, 2021 at 12:51 AM Jagan Teki wrote: > > Hi Dave, > > On Fri, Oct 8, 2021 at 9:32 PM Dave Stevenson > wrote: > > > > On Fri, 8 Oct 2021 at 14:37, Laurent Pinchart > > wrote: > > > > > > Hello, > > > > > > On Fri, Oct 08, 2021 at 03:27:43PM +0200, Andrzej Hajda wrote: > > > > Hi, >

Re: [PATCH] drm/i915: replacing drm_modeset_lock_all for DRM_MODESET_LOCK_ALL_*

2021-10-12 Thread Jani Nikula
On Sun, 10 Oct 2021, Maíra Canal wrote: > As requested in GPU Driver Developers Guide TODO list, replaces all > drm_lock boilerplates for DRM_MODESET_LOCK_ALL_* helpers. Please see [1]. Also, all i915 patches must be Cc'd to intel-gfx mailing list. Please see MAINTAINERS file. BR, Jani. [1]

Re: [PATCH v3 4/5] drm: mxsfb: Print failed bus format in hex

2021-10-12 Thread Stefan Agner
On 2021-10-11 15:41, Guido Günther wrote: > media-bus-formats.h has them in hexadecimal as well so matching with > that file saves one conversion when debugging. > > Signed-off-by: Guido Günther > Reviewed-by: Lucas Stach > Reviewed-by: Robert Foss Acked-by: Stefan Agner > --- > drivers/gpu

Re: [PATCH v3 5/5] drm: mxsfb: Set fallback bus format when the bridge doesn't provide one

2021-10-12 Thread Stefan Agner
On 2021-10-11 15:41, Guido Günther wrote: > If a bridge doesn't do any bus format handling MEDIA_BUS_FMT_FIXED is > returned. Fallback to a reasonable default (MEDIA_BUS_FMT_RGB888_1X24) in > that case. > > This unbreaks e.g. using mxsfb with the nwl bridge and mipi dsi panels. > > Reported-by: M

Re: [Intel-gfx] [PATCH 24/26] drm/i915: Update I915_GEM_BUSY IOCTL to understand composite fences

2021-10-12 Thread Tvrtko Ursulin
On 04/10/2021 23:06, Matthew Brost wrote: Parallel submission create composite fences (dma_fence_array) for excl / shared slots in objects. The I915_GEM_BUSY IOCTL checks these slots to determine the busyness of the object. Prior to patch it only check if the fence in the slot was a i915_reques

Re: [PATCH v5 3/8] drm/omap: introduce omap_hw_overlay

2021-10-12 Thread Tomi Valkeinen
On 23/09/2021 10:06, Neil Armstrong wrote: From: Benoit Parrot Split out the hardware overlay specifics from omap_plane. To start, the hw overlays are statically assigned to planes. The goal is to eventually assign hw overlays dynamically to planes during plane->atomic_check() based on request

Re: [PATCH v5 4/8] drm/omap: omap_plane: subclass drm_plane_state

2021-10-12 Thread Tomi Valkeinen
On 23/09/2021 10:06, Neil Armstrong wrote: From: Benoit Parrot In preparation to add omap plane state specific extensions we need to subclass drm_plane_state and add the relevant helpers. The addition of specific extension will be done separately. Signed-off-by: Benoit Parrot Signed-off-by:

Re: [PATCH 2/2] drm/i915/pmu: Connect engine busyness stats from GuC to pmu

2021-10-12 Thread Tvrtko Ursulin
On 11/10/2021 21:08, Umesh Nerlige Ramappa wrote: On Mon, Oct 11, 2021 at 12:41:19PM +0100, Tvrtko Ursulin wrote: On 07/10/2021 23:55, Umesh Nerlige Ramappa wrote: With GuC handling scheduling, i915 is not aware of the time that a context is scheduled in and out of the engine. Since i915 pmu

Re: [PATCH 0/5] drm/vmwgfx: Support module unload and hotunplug

2021-10-12 Thread Christian König
Am 11.10.21 um 14:04 schrieb Thomas Hellström: [SNIP] Hmm, this looks very odd, because I remember reminding Christian as late as this spring that both vmwgfx and i915 sets up GPU bindings to system buffers, as part of the review of a patch series pushing a couple of changes to the swapout path

Re: [PATCH v5 0/8] drm/omap: Add virtual-planes support

2021-10-12 Thread Neil Armstrong
On 12/10/2021 09:15, Tomi Valkeinen wrote: > On 23/09/2021 10:06, Neil Armstrong wrote: >> This patchset is the follow-up the v4 patchset from Benoit Parrot at [1]. >> >> This patch series adds virtual-plane support to omapdrm driver to allow the >> use >> of display wider than 2048 pixels. >> >>

Re: [PATCH] lib/stackdepot: allow optional init and stack_table allocation by kvmalloc()

2021-10-12 Thread Vlastimil Babka
On 10/11/21 19:08, Marco Elver wrote: > On Mon, 11 Oct 2021 at 19:02, Vlastimil Babka wrote: > [...] >> > On the other hand, the lazy initialization mode you're introducing >> > requires an explicit stack_depot_init() call somewhere and isn't as >> > straightforward as before. >> > >> > Not sure w

Re: [PATCH v5 1/8] drm/omap: Add ability to check if requested plane modes can be supported

2021-10-12 Thread Neil Armstrong
On 12/10/2021 09:21, Tomi Valkeinen wrote: > Hi, > > On 23/09/2021 10:06, Neil Armstrong wrote: >> From: Benoit Parrot >> >> We currently assume that an overlay has the same maximum width and >> maximum height as the overlay manager. This assumption is incorrect. On >> some variants the overlay m

Re: [PATCH v2] dma-buf: remove restriction of IOCTL:DMA_BUF_SET_NAME

2021-10-12 Thread guangming.cao
From: Guangming Cao > Am 09.10.21 um 07:55 schrieb guangming@mediatek.com: > From: Guangming Cao > > > > If dma-buf don't want userspace users to touch the dmabuf buffer, > > it seems we should add this restriction into dma_buf_ops.mmap, > > not in this IOCTL:DMA_BUF_SET_NAME. > > > > With t

Re: [PATCH v2 4/4] drm/bridge: ti-sn65dsi83: Add vcc supply regulator support

2021-10-12 Thread Laurent Pinchart
Hi Alexander, Thank you for the patch. On Tue, Oct 12, 2021 at 08:48:43AM +0200, Alexander Stein wrote: > VCC needs to be enabled before releasing the enable GPIO. > > Reviewed-by: Sam Ravnborg > Signed-off-by: Alexander Stein > --- > drivers/gpu/drm/bridge/ti-sn65dsi83.c | 15 ++-

Re: [PATCH v5 3/8] drm/omap: introduce omap_hw_overlay

2021-10-12 Thread Neil Armstrong
On 12/10/2021 09:59, Tomi Valkeinen wrote: > On 23/09/2021 10:06, Neil Armstrong wrote: >> From: Benoit Parrot >> >> Split out the hardware overlay specifics from omap_plane. >> To start, the hw overlays are statically assigned to planes. >> >> The goal is to eventually assign hw overlays dynamica

Re: [PATCH 2/4] drm/ttm: do not set NULL to debugfs dentry

2021-10-12 Thread Das, Nirmoy
On 10/12/2021 9:09 AM, Christian König wrote: Am 11.10.21 um 21:06 schrieb Nirmoy Das: For debugfs directory, it is recommended to save the result and pass over to next debugfs API for creating debugfs files/directories. Error conditions are handled by debugfs APIs. CC: Christian Koenig CC:

Re: [PATCH v5 4/8] drm/omap: omap_plane: subclass drm_plane_state

2021-10-12 Thread Neil Armstrong
On 12/10/2021 10:13, Tomi Valkeinen wrote: > On 23/09/2021 10:06, Neil Armstrong wrote: >> From: Benoit Parrot >> >> In preparation to add omap plane state specific extensions we need to >> subclass drm_plane_state and add the relevant helpers. >> >> The addition of specific extension will be done

Re: [PATCH 4/4] vgaswitcheroo: do not check for NULL debugfs dentry

2021-10-12 Thread Das, Nirmoy
On 10/12/2021 8:48 AM, Lukas Wunner wrote: On Mon, Oct 11, 2021 at 10:24:29PM +0200, Lukas Wunner wrote: On Mon, Oct 11, 2021 at 09:06:07PM +0200, Nirmoy Das wrote: Debugfs APIs returns encoded error on failure so use debugfs_lookup() instead of checking for NULL. [...] --- a/drivers/gpu/vg

Re: [PATCH v2] dma-buf: acquire name lock before read/write dma_buf.name

2021-10-12 Thread guangming.cao
From: Guangming Cao > Am 08.10.21 um 09:54 schrieb guangming@mediatek.com: > > From: Guangming Cao > > > > Because dma-buf.name can be freed in func: "dma_buf_set_name", > > so, we need to acquire lock first before we read/write dma_buf.name > > to prevent Use After Free(UAF) issue. > > > >

[PATCH v2] lib/stackdepot: allow optional init and stack_table allocation by kvmalloc()

2021-10-12 Thread Vlastimil Babka
Currently, enabling CONFIG_STACKDEPOT means its stack_table will be allocated from memblock, even if stack depot ends up not actually used. The default size of stack_table is 4MB on 32-bit, 8MB on 64-bit. This is fine for use-cases such as KASAN which is also a config option and has overhead on it

Re: [PATCH 0/5] drm/vmwgfx: Support module unload and hotunplug

2021-10-12 Thread Thomas Hellström
On Tue, 2021-10-12 at 10:27 +0200, Christian König wrote: > Am 11.10.21 um 14:04 schrieb Thomas Hellström: > > [SNIP] > > > > Hmm, this looks very odd, because I remember reminding > > > > Christian as > > > > late as this spring that both vmwgfx and i915 sets up GPU > > > > bindings > > > > to > >

Re: [PATCH v2] lib/stackdepot: allow optional init and stack_table allocation by kvmalloc()

2021-10-12 Thread Marco Elver
On Tue, 12 Oct 2021 at 11:06, Vlastimil Babka wrote: > Currently, enabling CONFIG_STACKDEPOT means its stack_table will be allocated > from memblock, even if stack depot ends up not actually used. The default size > of stack_table is 4MB on 32-bit, 8MB on 64-bit. > > This is fine for use-cases suc

Re: [PATCH 2/5] drm/i915: check dri root before debugfs init

2021-10-12 Thread Wang, Zhi A
On 10/8/21 9:17 AM, Nirmoy Das wrote: > Return early if dri minor root dentry is NULL. > > CC: Zhenyu Wang > CC: Zhi Wang > CC: Jani Nikula > CC: Joonas Lahtinen > CC: Rodrigo Vivi > CC: David Airlie > CC: Daniel Vetter > Signed-off-by: Nirmoy Das > --- > drivers/gpu/drm/i915/gvt/debugfs

Re: [PATCH] drm/i915/gvt: clean up kernel-doc in gtt.c

2021-10-12 Thread Wang, Zhi A
On 10/3/21 5:23 AM, Randy Dunlap wrote: > Fix kernel-doc warnings in gtt.c: > > gtt.c:1152: warning: This comment starts with '/**', but isn't a kernel-doc > comment. Refer Documentation/doc-guide/kernel-doc.rst > * Check if can do 2M page > gtt.c:1152: warning: missing initial short descriptio

Re: [PATCH 2/5] drm/i915: check dri root before debugfs init

2021-10-12 Thread Das, Nirmoy
Hi Zhi, Please discard this patch,  review https://patchwork.freedesktop.org/patch/458554/?series=95690&rev=1 instead. minor->debugfs_root wont be NULl as we save debugfs_create_dir()'s return value in that. Regards, Nirmoy On 10/12/2021 11:59 AM, Wang, Zhi A wrote: On 10/8/21 9:17 AM, Ni

Re: [PATCH v3 0/5] mxsfb/nwl/panels: media bus format fixes

2021-10-12 Thread Guido Günther
Hi Sam, On Mon, Oct 11, 2021 at 06:56:00PM +0200, Sam Ravnborg wrote: > Hi Guido, > > On Mon, Oct 11, 2021 at 03:41:22PM +0200, Guido Günther wrote: > > commit b776b0f00f24 ("drm: mxsfb: Use bus_format from the nearest bridge if > > present") added bus format probing to mxsfb this exposed several

Re: [RFC v2 01/22] drm: RFC for Plane Color Hardware Pipeline

2021-10-12 Thread Pekka Paalanen
On Tue, 7 Sep 2021 03:08:43 +0530 Uma Shankar wrote: > This is a RFC proposal for plane color hardware blocks. > It exposes the property interface to userspace and calls > out the details or interfaces created and the intended > purpose. > > Credits: Ville Syrjälä > Signed-off-by: Uma Shankar

Re: [RFC v2 01/22] drm: RFC for Plane Color Hardware Pipeline

2021-10-12 Thread Simon Ser
On Tuesday, October 12th, 2021 at 12:30, Pekka Paalanen wrote: > is there a practise of landing proposal documents in the kernel? How > does that work, will a kernel tree carry the patch files? > Or should this document be worded like documentation for an accepted > feature, and then the patches

Re: [PATCH v5 0/8] drm/omap: Add virtual-planes support

2021-10-12 Thread Tomi Valkeinen
On 12/10/2021 11:30, Neil Armstrong wrote: On 12/10/2021 09:15, Tomi Valkeinen wrote: On 23/09/2021 10:06, Neil Armstrong wrote: This patchset is the follow-up the v4 patchset from Benoit Parrot at [1]. This patch series adds virtual-plane support to omapdrm driver to allow the use of display

linux-next: Fixes tag needs some work in the drm-fixes tree

2021-10-12 Thread Stephen Rothwell
Hi all, In commit 654e9c18dfab ("drm/msm: Fix crash on dev file close") Fixes tag Fixes: 86c2a0f000c1 drm/msm: ("Small submitqueue creation cleanup") has these problem(s): - Subject does not match target commit subject Just use git log -1 --format='Fixes: %h ("%s")' -- Che

Re: [PATCH v5 5/8] drm/omap: Add global state as a private atomic object

2021-10-12 Thread Tomi Valkeinen
On 23/09/2021 10:06, Neil Armstrong wrote: From: Benoit Parrot Global shared resources (like hw overlays) for omapdrm are implemented as a part of atomic state using the drm_private_obj infrastructure available in the atomic core. omap_global_state is introduced as a drm atomic private object.

Re: [PATCH] drm/msm/dpu: Add CRC support for DPU

2021-10-12 Thread kernel test robot
e' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Jessica-Zhang/drm-msm-dpu-Add-CRC-support-for-DPU/20211012-074357 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 64570fbc14f8d7cb3fe3995f20e26bc25ce4b2cc c

Re: linux-next: build failure after merge of the drm-misc tree

2021-10-12 Thread Karol Herbst
uhh, that's on me. I will send out a patch today. I just noticed that the config file I used for testing had WERROR disabled. On Tue, Oct 12, 2021 at 4:18 AM Stephen Rothwell wrote: > > Hi all, > > After merging the drm-misc tree, today's linux-next build (x86_64 > allmodconfig) failed like this:

Re: [RFC PATCH 2/2] RDMA/efa: Add support for dmabuf memory regions

2021-10-12 Thread Gal Pressman
On 12/10/2021 2:28, Jason Gunthorpe wrote: > On Sun, Oct 10, 2021 at 09:55:49AM +0300, Gal Pressman wrote: >> On 07/10/2021 14:40, Jason Gunthorpe wrote: >>> On Thu, Oct 07, 2021 at 01:43:00PM +0300, Gal Pressman wrote: >>> @@ -1491,26 +1493,29 @@ static int efa_create_pbl(struct efa_dev *dev,

Re: [RFC v2 03/22] drm: Add Plane Degamma Mode property

2021-10-12 Thread Pekka Paalanen
On Tue, 7 Sep 2021 03:08:45 +0530 Uma Shankar wrote: > Add Plane Degamma Mode as an enum property. Create a helper > function for all plane color management features. > > This is an enum property with values as blob_id's and exposes > the various gamma modes supported and the lut ranges. Gettin

Re: [RFC v2 00/22] Add Support for Plane Color Lut and CSC features

2021-10-12 Thread Pekka Paalanen
On Tue, 7 Sep 2021 03:08:42 +0530 Uma Shankar wrote: > This is how a typical display color hardware pipeline looks like: > +---+ > |RAM| > | +--++-++-+ | > | | FB 1 || FB 2

Re: [RFC v2 01/22] drm: RFC for Plane Color Hardware Pipeline

2021-10-12 Thread Pekka Paalanen
On Tue, 12 Oct 2021 10:35:37 + Simon Ser wrote: > On Tuesday, October 12th, 2021 at 12:30, Pekka Paalanen > wrote: > > > is there a practise of landing proposal documents in the kernel? How > > does that work, will a kernel tree carry the patch files? > > Or should this document be worded

[PATCH for-next 0/3] EFA dmabuf memory regions

2021-10-12 Thread Gal Pressman
Hey all, This is a followup to my previous RFCs [1][2], which now adds a new api to the RDMA subsystem that allows drivers to get a pinned dmabuf memory region without requiring an implementation of the move_notify callback. The new api makes use of the dynamic attachment api implemented in the RD

[PATCH for-next 1/3] dma-buf: Fix pin callback comment

2021-10-12 Thread Gal Pressman
The pin callback does not necessarily have to move the memory to system memory, remove the sentence from the comment. Signed-off-by: Gal Pressman --- include/linux/dma-buf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h

[PATCH for-next 2/3] RDMA/umem: Allow pinned dmabuf umem usage

2021-10-12 Thread Gal Pressman
Introduce ib_umem_dmabuf_get_pinned() which allows the driver to get a dmabuf umem which is pinned and does not require move_notify callback implementation. The returned umem is pinned and DMA mapped like standard cpu umems, and is released through ib_umem_release() (incl. unpinning and unmapping).

[PATCH] drm/panel: olimex-lcd-olinuxino: select CRC32

2021-10-12 Thread Vegard Nossum
Fix the following build/link error by adding a dependency on the CRC32 routines: ld: drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.o: in function `lcd_olinuxino_probe': panel-olimex-lcd-olinuxino.c:(.text+0x303): undefined reference to `crc32_le' Fixes: 17fd7a9d324fd ("drm/panel: Add supp

Re: [PATCH] drm/panel: olimex-lcd-olinuxino: select CRC32

2021-10-12 Thread Vegard Nossum
Hi Thierry, I tried sending the patch below to Stefan Mavrodiev (listed in MAINTAINERS for DRM DRIVER FOR OLIMEX LCD-OLINUXINO PANELS) but it bounced with "No such user at that domain". Will you take the patch and/or update the MAINTAINERS entry? Thanks, Vegard On 10/12/21 1:52 PM, Vegard No

Re: [PATCH v5 5/8] drm/omap: Add global state as a private atomic object

2021-10-12 Thread Neil Armstrong
Hi, On 12/10/2021 12:44, Tomi Valkeinen wrote: > On 23/09/2021 10:06, Neil Armstrong wrote: >> From: Benoit Parrot >> >> Global shared resources (like hw overlays) for omapdrm are implemented >> as a part of atomic state using the drm_private_obj infrastructure >> available in the atomic core. >>

[PATCH][next] drm/i915: Fix dereference of pointer backup before it is null checked

2021-10-12 Thread Colin King
From: Colin Ian King The assignment of pointer backup_bo dereferences pointer backup before backup is null checked, this could lead to a null pointer dereference issue. Fix this by only assigning backup_bo after backup has been null checked. Addresses-Coverity: ("Dereference before null check")

Re: [PATCH v5 0/8] drm/omap: Add virtual-planes support

2021-10-12 Thread Neil Armstrong
Hi, On 12/10/2021 12:36, Tomi Valkeinen wrote: > On 12/10/2021 11:30, Neil Armstrong wrote: >> On 12/10/2021 09:15, Tomi Valkeinen wrote: >>> On 23/09/2021 10:06, Neil Armstrong wrote: This patchset is the follow-up the v4 patchset from Benoit Parrot at [1]. This patch series adds v

[PATCH] drm/nouveau/mmu/gp100: remove unused variable

2021-10-12 Thread Karol Herbst
Fixes a compilation issue introduced because I forgot to test with WERROR enabled. Cc: Stephen Rothwell Cc: DRI Cc: nouv...@lists.freedesktop.org Fixes: 404046cf4805 ("drm/nouveau/mmu/gp100-: drop unneeded assignment in the if condition.") Signed-off-by: Karol Herbst --- drivers/gpu/drm/nouve

Re: [PATCH v5 6/8] drm/omap: dynamically assign hw overlays to planes

2021-10-12 Thread Tomi Valkeinen
On 23/09/2021 10:06, Neil Armstrong wrote: From: Benoit Parrot (re)assign the hw overlays to planes based on required caps, and to handle situations where we could not modify an in-use plane. This means all planes advertise the superset of formats and properties. Userspace must (as always) use

Re: [PATCH v5 5/8] drm/omap: Add global state as a private atomic object

2021-10-12 Thread Tomi Valkeinen
On 12/10/2021 16:23, Neil Armstrong wrote: +    struct drm_private_obj glob_obj; +   struct drm_fb_helper *fbdev;     struct workqueue_struct *wq; @@ -88,5 +105,9 @@ struct omap_drm_private {       void omap_debugfs_init(struct drm_minor *minor); +struct omap_global_state *__must_chec

[PATCH] drm/omap: increase DSS5 max tv pclk to 192MHz

2021-10-12 Thread Neil Armstrong
From: Tomi Valkeinen DSS5's maximum tv pclk rate (i.e. HDMI) is set to 186MHz, which comes from the TRM (DPLL_HDMI_CLK1 frequency must be lower than 186 MHz). To support DRA76's wide screen HDMI feature, we need to increase this maximum rate. Testing shows that the PLL seems to work fine even wi

Re: [PATCH v2 01/10] drm/gma500: Move helpers for struct gtt_range from gtt.c to gem.c

2021-10-12 Thread Patrik Jakobsson
On Tue, Oct 5, 2021 at 10:11 AM Thomas Zimmermann wrote: > > Allocation and pinning helpers for struct gtt_range are GEM functions, > so move them to gem.c. No functional changes. > > v2: > * keep docs for psb_gtt_{attach,detach}_pages() (Patrik) > Bonus point for getting rid of psb_gtt_k

Re: [PATCH v2 06/10] drm/gma500: Inline psb_gtt_attach_pages() and psb_gtt_detach_pages()

2021-10-12 Thread Patrik Jakobsson
On Tue, Oct 5, 2021 at 10:11 AM Thomas Zimmermann wrote: > > psb_gtt_attach_pages() are not GTT functions but deal with the GEM > object's SHMEM pages. The only callers of psb_gtt_attach_pages() and > psb_gtt_detach_pages() are the GEM pin helpers. Inline the calls and > cleanup the resulting code

Should multiple PRIME_FD_TO_HANDLE ioctls on the same fd require multiple GEM_CLOSE?

2021-10-12 Thread John Cox
Hi I've a question about expected behavior. I am using the "vc4" backend. If I convert a dmabuf fd to a bo handle twice using DRM_IOCTL_PRIME_FD_TO_HANDLE then I get the same bo handle both times - fair enough. If I then close it twice with DRM_IOCTL_GEM_CLOSE then the second time fails. Is thi

Re: [PATCH v2 07/10] drm/gma500: Inline psb_gtt_{alloc, free}_range() into rsp callers

2021-10-12 Thread Patrik Jakobsson
On Tue, Oct 5, 2021 at 10:11 AM Thomas Zimmermann wrote: > > psb_gtt_alloc_range() allocates struct gtt_range, create the GTT resource > and performs some half-baked initialization. Inline the function into its > only caller psb_gem_create(). For creating the GTT resource, introduce a > new helper

Re: [PATCH v2 08/10] drm/gma500: Set page-caching flags in GEM pin/unpin

2021-10-12 Thread Patrik Jakobsson
On Tue, Oct 5, 2021 at 10:11 AM Thomas Zimmermann wrote: > > Caching of the GEM object's backing pages are unrelated to GTT > management. Move the respective calls from GTT code to GEM code. > I gave suspend/resume a try and it seems fine so Acked-by: Patrik Jakobsson > Signed-off-by: Thomas Z

Re: [PATCH v2 09/10] drm/gma500: Rewrite GTT page insert/remove without struct gtt_range

2021-10-12 Thread Patrik Jakobsson
On Tue, Oct 5, 2021 at 10:11 AM Thomas Zimmermann wrote: > > struct gtt_range represents a GEM object and should not be used for GTT > setup. Change psb_gtt_insert() and psb_gtt_remove() to receive all > necessary parameters from their caller. This also eliminates possible > failure from psb_gtt_i

Re: [PATCH] drm: Remove redundant 'flush_workqueue()' calls

2021-10-12 Thread Jyri Sarha
On 2021-10-10 16:59, Christophe JAILLET wrote: 'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant 'flush_workqueue()' calls. This was generated with coccinelle: @@ expression E; @@ - flush_workqueue(E);

Re: [PATCH v7, 00/15] Support multi hardware decode using of_platform_populate

2021-10-12 Thread Andrzej Pietrasiewicz
Hi Yunfei Dong, W dniu 11.10.2021 o 09:02, Yunfei Dong pisze: This series adds support for multi hardware decode into mtk-vcodec, by first adding use of_platform_populate to manage each hardware information: interrupt, clock, register bases and power. Secondly add core thread to deal with core h

[PATCH 1/2] drm/dp: add helpers to read link training delays

2021-10-12 Thread Jani Nikula
The link training delays are different and/or available in different DPCD offsets depending on: - Clock recovery vs. channel equalization - DPRX vs. LTTPR - 128b/132b vs. 8b/10b - DPCD 1.4+ vs. earlier Add helpers to get the correct delays in us, reading DPCD if necessary. This is more straightfo

[PATCH 2/2] drm/i915/dp: use new link training delay helpers

2021-10-12 Thread Jani Nikula
Use the new link training delay helpers, fixing the delays for 128b/132b. For existing 8b/10b functionality, this will cause additional 1-byte DPCD reads for LTTPR delays instead of using the cached values. It's just too complicated to combine generic helpers with local caching in a sensible way.

Re: [PATCH v5 6/8] drm/omap: dynamically assign hw overlays to planes

2021-10-12 Thread Neil Armstrong
On 12/10/2021 15:34, Tomi Valkeinen wrote: > On 23/09/2021 10:06, Neil Armstrong wrote: >> From: Benoit Parrot >> >> (re)assign the hw overlays to planes based on required caps, and to >> handle situations where we could not modify an in-use plane. >> >> This means all planes advertise the superse

Re: [PATCH][next] drm/i915: Fix dereference of pointer backup before it is null checked

2021-10-12 Thread Thomas Hellström
Hi, On 10/12/21 15:25, Colin King wrote: From: Colin Ian King The assignment of pointer backup_bo dereferences pointer backup before backup is null checked, this could lead to a null pointer dereference issue. Fix this by only assigning backup_bo after backup has been null checked. Addresses-

Re: [PATCH][next] drm/i915: Fix dereference of pointer backup before it is null checked

2021-10-12 Thread Dan Carpenter
On Tue, Oct 12, 2021 at 04:47:24PM +0200, Thomas Hellström wrote: > Hi, > > On 10/12/21 15:25, Colin King wrote: > > From: Colin Ian King > > > > The assignment of pointer backup_bo dereferences pointer backup before > > backup is null checked, this could lead to a null pointer dereference > > i

Re: [PATCH 4/4] drm/i915/guc: Inject probe errors for CT send

2021-10-12 Thread Michal Wajdeczko
On 11.10.2021 20:00, Matthew Brost wrote: > On Mon, Oct 11, 2021 at 08:51:06PM +0530, Thanneeru Srinivasulu wrote: >> Inject probe errors -ENXIO, -EBUSY for CT send. >> >> Signed-off-by: Thanneeru Srinivasulu >> --- >> drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 8 >> 1 file changed,

[PATCH v2 01/20] drm/panel: s6e63m0: Make s6e63m0_remove() return void

2021-10-12 Thread Uwe Kleine-König
Up to now s6e63m0_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of spi remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König --- drivers/gpu/drm/panel/panel-sam

[PATCH v2 19/20] staging: fbtft: Make fbtft_remove_common() return void

2021-10-12 Thread Uwe Kleine-König
fbtft_remove_common() is only called with a non-NULL fb_info. (All callers are in remove callbacks and the matching probe callbacks set driver data accordingly.) So fbtft_remove_common() always returns zero. Make it return void instead which makes it easier to see in the callers that there is no er

[PATCH v2 00/20] Make some spi device drivers return zero in .remove()

2021-10-12 Thread Uwe Kleine-König
Hello, this is v2 of my quest to make spi remove callbacks return void. Today they return an int, but the only result of returning a non-zero value is a warning message. So it's a bad idea to return an error code in the expectation that not freeing some resources is ok then. The same holds true fo

Re: [PATCH v5 5/8] drm/omap: Add global state as a private atomic object

2021-10-12 Thread Neil Armstrong
On 12/10/2021 15:38, Tomi Valkeinen wrote: > On 12/10/2021 16:23, Neil Armstrong wrote: > +    struct drm_private_obj glob_obj; +    struct drm_fb_helper *fbdev;      struct workqueue_struct *wq; @@ -88,5 +105,9 @@ struct omap_drm_private {        void omap_de

Re: [PATCH v2 19/20] staging: fbtft: Make fbtft_remove_common() return void

2021-10-12 Thread Andy Shevchenko
On Tue, Oct 12, 2021 at 6:40 PM Uwe Kleine-König wrote: > > fbtft_remove_common() is only called with a non-NULL fb_info. (All > callers are in remove callbacks and the matching probe callbacks set > driver data accordingly.) So fbtft_remove_common() always returns zero. > Make it return void inst

Re: [Freedreno] [PATCH] drm: Remove redundant 'flush_workqueue()' calls

2021-10-12 Thread Rob Clark
On Sun, Oct 10, 2021 at 7:07 AM Christophe JAILLET wrote: > > 'destroy_workqueue()' already drains the queue before destroying it, so > there is no need to flush it explicitly. > > Remove the redundant 'flush_workqueue()' calls. > > This was generated with coccinelle: > > @@ > expression E; > @@ >

Re: [Intel-gfx] [PATCH 1/4] drm/i915/huc: Use i915_probe_error to report early CTB failures

2021-10-12 Thread Jani Nikula
On Mon, 11 Oct 2021, Matthew Brost wrote: > On Mon, Oct 11, 2021 at 08:51:03PM +0530, Thanneeru Srinivasulu wrote: >> Replace DRM_ERROR with CT_PROBE_ERROR to report early CTB failures. >> >> Signed-off-by: Thanneeru Srinivasulu > > Reviewed-by: Matthew Brost > >> --- >> drivers/gpu/drm/i915/g

Re: [Intel-gfx] [PATCH 1/4] drm/i915/huc: Use i915_probe_error to report early CTB failures

2021-10-12 Thread Jani Nikula
On Tue, 12 Oct 2021, Jani Nikula wrote: > On Mon, 11 Oct 2021, Matthew Brost wrote: >> On Mon, Oct 11, 2021 at 08:51:03PM +0530, Thanneeru Srinivasulu wrote: >>> Replace DRM_ERROR with CT_PROBE_ERROR to report early CTB failures. >>> >>> Signed-off-by: Thanneeru Srinivasulu >> >> Reviewed-by: M

Re: [Intel-gfx] [PATCH 1/4] drm/i915/huc: Use i915_probe_error to report early CTB failures

2021-10-12 Thread Michal Wajdeczko
On 12.10.2021 18:16, Jani Nikula wrote: > On Mon, 11 Oct 2021, Matthew Brost wrote: >> On Mon, Oct 11, 2021 at 08:51:03PM +0530, Thanneeru Srinivasulu wrote: >>> Replace DRM_ERROR with CT_PROBE_ERROR to report early CTB failures. >>> >>> Signed-off-by: Thanneeru Srinivasulu >> >> Reviewed-by:

[PATCH v1 00/12] MEMORY_DEVICE_COHERENT for CPU-accessible coherent device memory

2021-10-12 Thread Alex Sierra
This patch series introduces MEMORY_DEVICE_COHERENT, a type of memory owned by a device that can be mapped into CPU page tables like MEMORY_DEVICE_GENERIC and can also be migrated like MEMORY_DEVICE_PRIVATE. With MEMORY_DEVICE_COHERENT, we isolate the new memory type from other subsystems as far as

[PATCH v1 01/12] ext4/xfs: add page refcount helper

2021-10-12 Thread Alex Sierra
From: Ralph Campbell There are several places where ZONE_DEVICE struct pages assume a reference count == 1 means the page is idle and free. Instead of open coding this, add a helper function to hide this detail. Signed-off-by: Ralph Campbell Signed-off-by: Alex Sierra Reviewed-by: Christoph He

[PATCH v1 02/12] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-12 Thread Alex Sierra
From: Ralph Campbell ZONE_DEVICE struct pages have an extra reference count that complicates the code for put_page() and several places in the kernel that need to check the reference count to see that a page is not being used (gup, compaction, migration, etc.). Clean up the code so the reference

[PATCH v1 04/12] mm: add device coherent vma selection for memory migration

2021-10-12 Thread Alex Sierra
This case is used to migrate pages from device memory, back to system memory. Device coherent type memory is cache coherent from device and CPU point of view. Signed-off-by: Alex Sierra --- v2: condition added when migrations from device coherent pages. --- include/linux/migrate.h | 1 + mm/migr

[PATCH v1 06/12] drm/amdkfd: add SPM support for SVM

2021-10-12 Thread Alex Sierra
When CPU is connected throug XGMI, it has coherent access to VRAM resource. In this case that resource is taken from a table in the device gmc aperture base. This resource is used along with the device type, which could be DEVICE_PRIVATE or DEVICE_COHERENT to create the device page map region. Sig

[PATCH v1 03/12] mm: add zone device coherent type memory support

2021-10-12 Thread Alex Sierra
Device memory that is cache coherent from device and CPU point of view. This is use on platform that have an advance system bus (like CAPI or CCIX). Any page of a process can be migrated to such memory. However, no one should be allow to pin such memory so that it can always be evicted. Signed-off

[PATCH v1 07/12] drm/amdkfd: coherent type as sys mem on migration to ram

2021-10-12 Thread Alex Sierra
Coherent device type memory on VRAM to RAM migration, has similar access as System RAM from the CPU. This flag sets the source from the sender. Which in Coherent type case, should be set as MIGRATE_VMA_SELECT_DEVICE_COHERENT. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling --- drivers/gp

[PATCH v1 08/12] lib: test_hmm add ioctl to get zone device type

2021-10-12 Thread Alex Sierra
new ioctl cmd added to query zone device type. This will be used once the test_hmm adds zone device coherent type. Signed-off-by: Alex Sierra --- lib/test_hmm.c | 15 ++- lib/test_hmm_uapi.h | 7 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/test_hm

[PATCH v1 09/12] lib: test_hmm add module param for zone device type

2021-10-12 Thread Alex Sierra
In order to configure device coherent in test_hmm, two module parameters should be passed, which correspond to the SP start address of each device (2) spm_addr_dev0 & spm_addr_dev1. If no parameters are passed, private device type is configured. Signed-off-by: Alex Sierra --- lib/test_hmm.c

[PATCH v1 05/12] drm/amdkfd: ref count init for device pages

2021-10-12 Thread Alex Sierra
Ref counter from device pages is init to zero during memmap init zone. The first time a new device page is allocated to migrate data into it, its ref counter needs to be initialized to one. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 3 ++- 1 file changed, 2 inserti

[PATCH v1 10/12] lib: add support for device coherent type in test_hmm

2021-10-12 Thread Alex Sierra
Device Coherent type uses device memory that is coherently accesible by the CPU. This could be shown as SP (special purpose) memory range at the BIOS-e820 memory enumeration. If no SP memory is supported in system, this could be faked by setting CONFIG_EFI_FAKE_MEMMAP. Currently, test_hmm only sup

[PATCH v1 12/12] tools: update test_hmm script to support SP config

2021-10-12 Thread Alex Sierra
Add two more parameters to set spm_addr_dev0 & spm_addr_dev1 addresses. These two parameters configure the start SP addresses for each device in test_hmm driver. Consequently, this configures zone device type as coherent. Signed-off-by: Alex Sierra --- tools/testing/selftests/vm/test_hmm.sh | 20

[PATCH v1 11/12] tools: update hmm-test to support device coherent type

2021-10-12 Thread Alex Sierra
Test cases such as migrate_fault and migrate_multiple, were modified to explicit migrate from device to sys memory without the need of page faults, when using device coherent type. Snapshot test case updated to read memory device type first and based on that, get the proper returned results migrat

Re: [PATCH v2] drm/msm/dsi: Use division result from div_u64_rem in 7nm and 14nm PLL

2021-10-12 Thread Stephen Boyd
Quoting Marijn Suijten (2021-10-11 13:16:40) > div_u64_rem provides the result of the division and additionally the > remainder; don't use this function to solely calculate the remainder > while calculating the division again with div_u64. > > A similar improvement was applied earlier to the 10nm p

Re: Should multiple PRIME_FD_TO_HANDLE ioctls on the same fd require multiple GEM_CLOSE?

2021-10-12 Thread Simon Ser
Yes, this is expected behavior, even if it's not intuitive. For more details, see: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110

Re: [PATCH 0/5] drm/vmwgfx: Support module unload and hotunplug

2021-10-12 Thread Zack Rusin
On Tue, 2021-10-12 at 11:10 +0200, Thomas Hellström wrote: > On Tue, 2021-10-12 at 10:27 +0200, Christian König wrote: > > Am 11.10.21 um 14:04 schrieb Thomas Hellström: > > > > > > > > > > So now if this is going to be changed, I think we need to > > > understand > > > why and think this throug

Re: [PATCH] drm/msm/dp: Use the connector passed to dp_debug_get()

2021-10-12 Thread Stephen Boyd
Quoting Bjorn Andersson (2021-10-09 20:04:35) > The debugfs code is provided an array of a single drm_connector. Then to > access the connector, the list of all connectors of the DRM device is > traversed and all non-DisplayPort connectors are skipped, to find the > one and only DisplayPort connect

[PATCH v1 2/7] nouveau: ACPI: Use the ACPI_COMPANION() macro directly

2021-10-12 Thread Rafael J. Wysocki
From: Rafael J. Wysocki The ACPI_HANDLE() macro is a wrapper arond the ACPI_COMPANION() macro and the ACPI handle produced by the former comes from the ACPI device object produced by the latter, so it is way more straightforward to evaluate the latter directly instead of passing the handle produc

[PATCH 02/26] drm/i915/guc: Take GT PM ref when deregistering context

2021-10-12 Thread Matthew Brost
Taking a PM reference to prevent intel_gt_wait_for_idle from short circuiting while a deregister context H2G is in flight. To do this must issue the deregister H2G from a worker as context can be destroyed from an atomic context and taking GT PM ref blows up. Previously we took a runtime PM from th

Re: [Intel-gfx] [PATCH 24/26] drm/i915: Update I915_GEM_BUSY IOCTL to understand composite fences

2021-10-12 Thread Matthew Brost
On Tue, Oct 12, 2021 at 08:53:25AM +0100, Tvrtko Ursulin wrote: > > On 04/10/2021 23:06, Matthew Brost wrote: > > Parallel submission create composite fences (dma_fence_array) for excl / > > shared slots in objects. The I915_GEM_BUSY IOCTL checks these slots to > > determine the busyness of the ob

Re: Should multiple PRIME_FD_TO_HANDLE ioctls on the same fd require multiple GEM_CLOSE?

2021-10-12 Thread John Cox
On Tue, 12 Oct 2021 17:33:18 +, you wrote: >Yes, this is expected behavior, even if it's not intuitive. For more >details, see: > >https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110 Thanks - as noted in that discussion the behaviour is a bit unhelpful but just knowing that it is exp

Re: [PATCH v1 00/12] MEMORY_DEVICE_COHERENT for CPU-accessible coherent device memory

2021-10-12 Thread Andrew Morton
On Tue, 12 Oct 2021 12:12:35 -0500 Alex Sierra wrote: > This patch series introduces MEMORY_DEVICE_COHERENT, a type of memory > owned by a device that can be mapped into CPU page tables like > MEMORY_DEVICE_GENERIC and can also be migrated like MEMORY_DEVICE_PRIVATE. > With MEMORY_DEVICE_COHERENT

Re: [PATCH v1 00/12] MEMORY_DEVICE_COHERENT for CPU-accessible coherent device memory

2021-10-12 Thread Jason Gunthorpe
On Tue, Oct 12, 2021 at 11:39:57AM -0700, Andrew Morton wrote: > On Tue, 12 Oct 2021 12:12:35 -0500 Alex Sierra wrote: > > > This patch series introduces MEMORY_DEVICE_COHERENT, a type of memory > > owned by a device that can be mapped into CPU page tables like > > MEMORY_DEVICE_GENERIC and can a

Re: [PATCH 4/5] drm/vmwgfx: Introduce a new placement for MOB page tables

2021-10-12 Thread Thomas Hellström
On 10/8/21 19:31, Zack Rusin wrote: For larger (bigger than a page) and noncontiguous mobs we have to create page tables that allow the host to find the memory. Those page tables just used regular system memory. Unfortunately in TTM those BO's are not allowed to be busy thus can't be fenced and

Re: [PATCH v1 00/12] MEMORY_DEVICE_COHERENT for CPU-accessible coherent device memory

2021-10-12 Thread Felix Kuehling
Am 2021-10-12 um 2:39 p.m. schrieb Andrew Morton: > On Tue, 12 Oct 2021 12:12:35 -0500 Alex Sierra wrote: > >> This patch series introduces MEMORY_DEVICE_COHERENT, a type of memory >> owned by a device that can be mapped into CPU page tables like >> MEMORY_DEVICE_GENERIC and can also be migrated l

  1   2   >