[PULL] drm-misc-next

2022-07-07 Thread Thomas Zimmermann
Hi Dave and Daniel, here's the PR for drm-misc-next. Best regards Thomas drm-misc-next-2022-07-07: drm-misc-next for v5.20: UAPI Changes: Cross-subsystem Changes: Core Changes: * crtc: Remove unnessary include statements from drm_crtc.h, plus fallout in drivers * edid: More use of stru

[PATCH] drm/radeon: avoid bogus "vram limit (0) must be a power of 2" warning

2022-07-07 Thread Mateusz Jończyk
I was getting the following message on boot on Linux 5.19-rc5: radeon :01:05.0: vram limit (0) must be a power of 2 (I didn't use any radeon.vramlimit commandline parameter). This is caused by commit 8c2d34eb53b9 ("drm/radeon: use kernel is_power_of_2 rather than local version") which

[PATCH] drm/ssd130x: Fix pre-charge period setting

2022-07-07 Thread Ezequiel Garcia
Fix small typo which causes the mask for the 'precharge1' setting to be used with the 'precharge2' value. Signed-off-by: Ezequiel Garcia --- drivers/gpu/drm/solomon/ssd130x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/

[PATCH] drm: panel: Add novatek nt35596s panel driver

2022-07-07 Thread MollySophia
Novatek NT35596s is a generic DSI IC that drives command and video mode panels. Add the driver for it. Currently add support for the LCD panel from JDI connected with this IC, as found on Xiaomi Mi Mix2s phones. Signed-off-by: MollySophia --- drivers/gpu/drm/panel/Kconfig | 9 +

[syzbot] general protection fault in virtio_gpu_object_create (2)

2022-07-07 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:089866061428 Merge tag 'libnvdimm-fixes-5.19-rc5' of git:/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15ce44ec08 kernel config: https://syzkaller.appspot.com/x/.config?x=3a010dbf6a7af480 das

Re: [RFC 01/10] drm/i915/vm_bind: Introduce VM_BIND ioctl

2022-07-07 Thread Hellstrom, Thomas
On Wed, 2022-07-06 at 22:01 -0700, Niranjana Vishwanathapura wrote: > > > +   /** > > > +    * true: allow only vm_bind method of binding. > > > +    * false: allow only legacy execbuff method of binding. > > > +    */ > > > > Use proper kerneldoc. (Same holds for structure documen

Re: [PATCH v1] drm/syncobj: Fix sync syncobj issue

2022-07-07 Thread Christian König
Am 07.07.22 um 05:08 schrieb jie1zhan: enable signaling after flatten dma_fence_chains on transfer Signed-off-by: jie1zhan Reviewed-by: Christian König Reviewed-by: Nirmoy Das Well please drop those Reviewed-by lines immediately! Neither Nirmoy nor me gave you the permission to add an rb

[PATCH] dma-buf: Fix one use-after-free of fence

2022-07-07 Thread xinhui pan
Need get the new fence when we replace the old one. Fixes: 047a1b877ed48 ("dma-buf & drm/amdgpu: remove dma_resv workaround") Signed-off-by: xinhui pan --- drivers/dma-buf/dma-resv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/

Re: [PATCH] dma-buf: Fix one use-after-free of fence

2022-07-07 Thread Christian König
Am 07.07.22 um 10:02 schrieb xinhui pan: Need get the new fence when we replace the old one. Fixes: 047a1b877ed48 ("dma-buf & drm/amdgpu: remove dma_resv workaround") Signed-off-by: xinhui pan Good catch, Reviewed-by: Christian König Going to push that in a minute. Christian. --- drive

[PATCH 0/3] drm/bridge: it6505: Fixes bugs

2022-07-07 Thread allen
From: allen chen This series fixes some it6505 driver bugs and improve computing time. allen chen (3): drm/bridge: it6505: Modified power sequence drm/bridge: it6505: Add i2c api power on check drm/bridge: it6505: Modified video clock calculation and video debug message drivers/gpu/d

[PATCH 2/3] drm/bridge: it6505: Add i2c api power on check

2022-07-07 Thread allen
From: allen chen Use i2c bus to read/write when it6505 power off will occure i2c error. Add this check will prevent i2c error when it6505 power off. Signed-off-by: Pin-Yen Lin Signed-off-by: Allen Chen --- drivers/gpu/drm/bridge/ite-it6505.c | 12 ++-- 1 file changed, 10 insertions(+

[PATCH 1/3] drm/bridge: it6505: Modified power sequence

2022-07-07 Thread allen
From: allen chen Change power sequence to meet it6505 data sheet requirement when boot on. Signed-off-by: Pin-Yen Lin Signed-off-by: Allen Chen --- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/d

[PATCH 3/3] drm/bridge: it6505: Modified video clock calculation and video debug message

2022-07-07 Thread allen
From: allen chen Speed up video clock calculation and remove redundant video debug message. Signed-off-by: Pin-Yen Lin Signed-off-by: Allen Chen --- drivers/gpu/drm/bridge/ite-it6505.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/ite-it6505

Re: [linux-next:master] BUILD REGRESSION 088b9c375534d905a4d337c78db3b3bfbb52c4a0

2022-07-07 Thread Greg KH
On Thu, Jul 07, 2022 at 02:56:34PM +0800, kernel test robot wrote: > tree/branch: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > branch HEAD: 088b9c375534d905a4d337c78db3b3bfbb52c4a0 Add linux-next > specific files for 20220706 > > Error/Warning reports: > > htt

Re: [PATCH 1/3] drm/bridge: fsl-ldb: Fix mode clock rate validation

2022-07-07 Thread Neil Armstrong
Hi, On 06/07/2022 15:34, Robert Foss wrote: On Fri, 1 Jul 2022 at 13:00, Marek Vasut wrote: On 7/1/22 08:56, Liu Ying wrote: With LVDS dual link, up to 160MHz mode clock rate is supported. With LVDS single link, up to 80MHz mode clock rate is supported. Fix mode clock rate validation by swap

Re: [RFC 02/10] drm/i915/vm_bind: Bind and unbind mappings

2022-07-07 Thread Thomas Hellström
On Wed, 2022-07-06 at 22:43 -0700, Niranjana Vishwanathapura wrote: > On Wed, Jul 06, 2022 at 06:21:03PM +0200, Thomas Hellström wrote: > > On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > > > Bind and unbind the mappings upon VM_BIND and VM_UNBIND calls. > > > > > > Signed-of

Re: [PATCH v3 2/4] fbcon: Prevent that screen size is smaller than font size

2022-07-07 Thread Geert Uytterhoeven
On Wed, Jul 6, 2022 at 5:02 PM Helge Deller wrote: > We need to prevent that users configure a screen size which is smaller than > the > currently selected font size. Otherwise rendering chars on the screen will > access memory outside the graphics memory region. > > This patch adds a new functio

Re: [PATCH v3 3/4] fbmem: Check virtual screen sizes in fb_set_var()

2022-07-07 Thread Geert Uytterhoeven
Hi Helge, On Wed, Jul 6, 2022 at 5:02 PM Helge Deller wrote: > Verify that the fbdev or drm driver correctly adjusted the virtual > screen sizes. On failure report the failing driver and reject the screen > size change. > > Signed-off-by: Helge Deller > --- a/drivers/video/fbdev/core/fbmem.c >

Re: [PATCH] drm/ssd130x: Fix pre-charge period setting

2022-07-07 Thread Javier Martinez Canillas
Hello Ezequiel, Thanks a lot for your patch. On 7/6/22 20:41, Ezequiel Garcia wrote: > Fix small typo which causes the mask for the 'precharge1' setting > to be used with the 'precharge2' value. > > Signed-off-by: Ezequiel Garcia > --- > drivers/gpu/drm/solomon/ssd130x.c | 2 +- > 1 file chang

RE: [RFT][PATCH v2 1/9] vfio: Make vfio_unpin_pages() return void

2022-07-07 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Wednesday, July 6, 2022 2:28 PM > > There's only one caller that checks its return value with a WARN_ON_ONCE, > while all other callers do not check return value at all. So simplify the > API to return void by embedding similar WARN_ON_ONCEs. While this change keeps

Re: [linux-next:master] BUILD REGRESSION 088b9c375534d905a4d337c78db3b3bfbb52c4a0

2022-07-07 Thread Chen, Rong A
On 7/7/2022 4:08 PM, Greg KH wrote: On Thu, Jul 07, 2022 at 02:56:34PM +0800, kernel test robot wrote: tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 088b9c375534d905a4d337c78db3b3bfbb52c4a0 Add linux-next specific files for 20220706 E

RE: [RFT][PATCH v2 4/9] vfio: Pass in starting IOVA to vfio_pin/unpin_pages API

2022-07-07 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Wednesday, July 6, 2022 2:28 PM > /* > - * Pin a set of guest PFNs and return their associated host PFNs for local > + * Pin contiguous guest pages and return their associated host pages for > local can we replace 'guest' with 'user'? > * domain only. > * @device

RE: [RFT][PATCH v2 7/9] vfio: Rename user_iova of vfio_dma_rw()

2022-07-07 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Wednesday, July 6, 2022 2:28 PM > > Following the updated vfio_pin/unpin_pages(), use the simpler "iova". > > Signed-off-by: Nicolin Chen Reviewed-by: Kevin Tian

RE: [RFT][PATCH v2 9/9] vfio: Replace phys_pfn with pages for vfio_pin_pages()

2022-07-07 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Wednesday, July 6, 2022 2:28 PM > > Most of the callers of vfio_pin_pages() want "struct page *" and the > low-level mm code to pin pages returns a list of "struct page *" too. > So there's no gain in converting "struct page *" to PFN in between. > > Replace the outp

Re: [PATCH v2 3/4] drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr}

2022-07-07 Thread Danilo Krummrich
Hi Laurent, On 7/6/22 19:28, Laurent Pinchart wrote: Hi Danilo, Thank you for the patch. On Wed, Jul 06, 2022 at 02:43:51PM +0200, Danilo Krummrich wrote: The field paddr of struct drm_gem_dma_object holds a DMA address, which might actually be a physical address. However, depending on the pl

Cleanup of TTM NULL resources

2022-07-07 Thread Christian König
Hi guys, sending this out once more since it was requested that the Intel CI systems can take a run of this as well. The last version had a couple of merge/rebase leftovers which are now fixed as well. Please review and/or comment, Christian.

[PATCH 1/6] drm/ttm: rename and cleanup ttm_bo_init_reserved

2022-07-07 Thread Christian König
Rename ttm_bo_init_reserved to ttm_bo_init_validate since that better matches what the function is actually doing. Remove the unused size parameter, move the function's kerneldoc to the implementation and cleanup the whole error handling. Signed-off-by: Christian König --- drivers/gpu/drm/amd/a

[PATCH 6/6] drm/ttm: stop allocating a dummy resource for pipelined gutting

2022-07-07 Thread Christian König
That should not be necessary any more when drivers should at least be able to handle a move without a resource. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_util.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_uti

[PATCH 2/6] drm/amdgpu: audit bo->resource usage

2022-07-07 Thread Christian König
Make sure we can at least move and release BOs without backing store. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgp

[PATCH 4/6] drm/ttm: audit bo->resource usage v2

2022-07-07 Thread Christian König
Allow BOs to exist without backing store. v2: handle ttm_bo_move_memcpy as well. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 16 drivers/gpu/drm/ttm/ttm_bo_util.c | 7 +-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/g

[PATCH 3/6] drm/nouveau: audit bo->resource usage

2022-07-07 Thread Christian König
Make sure we can at least move and release BOs without backing store. Signed-off-by: Christian König --- drivers/gpu/drm/nouveau/nouveau_bo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 9

[PATCH 5/6] drm/ttm: stop allocating dummy resources during BO creation

2022-07-07 Thread Christian König
That should not be necessary any more when drivers should at least be able to handle the move without a resource. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c

[PATCH v2] drm/syncobj: Fix sync syncobj issue

2022-07-07 Thread jie1zhan
enable signaling after flatten dma_fence_chains on transfer Signed-off-by: jie1zhan --- drivers/gpu/drm/drm_syncobj.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index 7e48dcd1bee4..0d9d3577325f 100644 --- a/drivers/gpu/drm/dr

Re: [RFC 03/10] drm/i915/vm_bind: Support private and shared BOs

2022-07-07 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > Add uapi allowing user to specify a BO as private to a specified VM > during the BO creation. > VM private BOs can only be mapped on the specified VM and can't be > dma_buf exported. VM private BOs share a single common dma_resv

Re: [PATCH 1/6] drm/ttm: rename and cleanup ttm_bo_init_reserved

2022-07-07 Thread Christian König
Am 07.07.22 um 12:24 schrieb Christian König: Rename ttm_bo_init_reserved to ttm_bo_init_validate since that better Ah, crap. Here is a typo, that should read "Rename ttm_bo_init to ttm_bo_init_validate" Please ignore during review, Christian. matches what the function is actually doin

Re: [PATCH v4 12/13] leds: flashlight: mt6370: Add Mediatek MT6370 flashlight support

2022-07-07 Thread szuni chen
Hi Andy, Thank you for the valuable comment. Andy Shevchenko 於 2022年7月5日 週二 清晨5:06寫道: > > On Mon, Jul 4, 2022 at 7:43 AM ChiaEn Wu wrote: > > > Add Mediatek MT6370 flashlight support. > > ... > > > + This driver can also be built as a module. If so the module > > If so, > Thank you, I'l

Re: [PATCH RESEND 1/2] drm: bridge: adv7511: fix CEC power down control register offset

2022-07-07 Thread Robert Foss
On Sun, 12 Jun 2022 at 16:49, Alvin Šipraga wrote: > > From: Alvin Šipraga > > The ADV7511_REG_CEC_CTRL = 0xE2 register is part of the main register > map - not the CEC register map. As such, we shouldn't apply an offset to > the register address. Doing so will cause us to address a bogus registe

Re: [PATCH RESEND 2/2] drm: bridge: adv7511: unregister cec i2c device after cec adapter

2022-07-07 Thread Robert Foss
On Sun, 12 Jun 2022 at 16:49, Alvin Šipraga wrote: > > From: Alvin Šipraga > > cec_unregister_adapter() assumes that the underlying adapter ops are > callable. For example, if the CEC adapter currently has a valid physical > address, then the unregistration procedure will invalidate the physical

Re: [PATCH RESEND 0/2] drm: bridge: adv7511: two fixes for CEC

2022-07-07 Thread Robert Foss
Hey Alvin, On Sun, 12 Jun 2022 at 16:49, Alvin Šipraga wrote: > > From: Alvin Šipraga > > Previously sent back in March, see here: > > https://lore.kernel.org/dri-devel/20220319145939.978087-1-al...@pqrs.dk/ > > No changes besides rebasing on today's drm-misc-fixes. > > Alvin Šipraga (2): > dr

Re: [RFC 05/10] drm/i915/vm_bind: Handle persistent vmas

2022-07-07 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > Treat VM_BIND vmas as persistent and handle them during the > request submission in the execbuff path. > > Support eviction by maintaining a list of evicted persistent vmas > for rebinding during next submission. > > Signed-off

Re: connecting a sn65dsi86 to displayport connector

2022-07-07 Thread Rasmus Villemoes
On 05/07/2022 17.10, Kieran Bingham wrote: > Hi Rasmus, > > Quoting Rasmus Villemoes (2022-07-05 10:08:37) >> Hi >> >> I have an imx8mp board with a sn65dsi86 and a (full-size) DisplayPort >> connector, which I'm trying to get up and running. >> [...] >> Any hints would be highly appreciated. > >

Re: [RFC 08/10] drm/i915/vm_bind: userptr dma-resv changes

2022-07-07 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > For persistent (vm_bind) vmas of userptr BOs, handle the user > page pinning by using the i915_gem_object_userptr_submit_init() > /done() functions > > Signed-off-by: Niranjana Vishwanathapura > > --- >  .../gpu/drm/i915/gem/i9

[PULL] drm-intel-fixes

2022-07-07 Thread Rodrigo Vivi
Hi Dave and Daniel, Here goes our fixes targeting 5.19-rc6. There will probably be a couple more important fixes coming next week for the -rc7 drm-intel-fixes-2022-07-07: - Fix a possible refcount leak in DP MST connector (Hangyu) - Fix on loading guc on ADL-N (Daniele) - Fix vm use-after-free

Re: [RFC 03/10] drm/i915/vm_bind: Support private and shared BOs

2022-07-07 Thread Christian König
Am 02.07.22 um 00:50 schrieb Niranjana Vishwanathapura: Add uapi allowing user to specify a BO as private to a specified VM during the BO creation. VM private BOs can only be mapped on the specified VM and can't be dma_buf exported. VM private BOs share a single common dma_resv object, hence has

Re: [linux-next:master] BUILD REGRESSION 088b9c375534d905a4d337c78db3b3bfbb52c4a0

2022-07-07 Thread Guenter Roeck
On Thu, Jul 07, 2022 at 10:08:33AM +0200, Greg KH wrote: [ ... ] > > > > Unverified Error/Warning (likely false positive, please contact us if > > interested): > > > > arch/x86/events/core.c:2114 init_hw_perf_events() warn: missing error code > > 'err' > > drivers/android/binder.c:1481:19-23:

Re: [RFC 06/10] drm/i915/vm_bind: Add I915_GEM_EXECBUFFER3 ioctl

2022-07-07 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > Add new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which only > works in vm_bind mode. The vm_bind mode only works with > this new execbuf3 ioctl. > > The new execbuf3 ioctl will not have any execlist I understand this that you mean

Re: [PATCH 2/2] arm64: dts: mt8183: Add panel rotation

2022-07-07 Thread Matthias Brugger
On 17/06/2022 16:25, Hsin-Yi Wang wrote: On Fri, Jun 17, 2022 at 10:10 PM Matthias Brugger wrote: Hi Hsin-Yi Wang, On 06/06/2022 17:29, Hsin-Yi Wang wrote: On Mon, May 30, 2022 at 7:30 PM Hsin-Yi Wang wrote: krane, kakadu, and kodama boards have a default panel rotation. Signed-off-by

Re: [RFC 07/10] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-07-07 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > Handle persistent (VM_BIND) mappings during the request submission > in the execbuf3 path. > > Signed-off-by: Niranjana Vishwanathapura > > --- >  .../gpu/drm/i915/gem/i915_gem_execbuffer3.c   | 176 > +- >  1 fi

RE: [PATCH v4 1/7] drm/msm/disp/dpu1: clear dpu_assign_crtc and get crtc from drm_enc instead of dpu_enc

2022-07-07 Thread Vinod Polimera
> NAK. Quoting the documentation: > > only really meaningful for non-atomic drivers. Atomic drivers should > instead check &drm_connector_state.crtc. > > Please adjust according to the documentation. drm_enc gets the crtc info already from new connector state as part of drm_atomic_helper_upda

Re: [PATCH v4 1/7] drm/msm/disp/dpu1: clear dpu_assign_crtc and get crtc from drm_enc instead of dpu_enc

2022-07-07 Thread Dmitry Baryshkov
On Thu, 7 Jul 2022 at 17:39, Vinod Polimera wrote: > > > NAK. Quoting the documentation: > > > > only really meaningful for non-atomic drivers. Atomic drivers should > > instead check &drm_connector_state.crtc. > > > > Please adjust according to the documentation. >drm_enc gets the crtc info a

[PATCH 02/11] fbdev/vga16fb: Create EGA/VGA devices in sysfb code

2022-07-07 Thread Thomas Zimmermann
Move the device-creation from vga16fb to sysfb code. Move the few extra videomode checks into vga16fb's probe function. The vga16fb driver requires a screen_info for type VIDEO_TYPE_VGAC or VIDEO_TYPE_EGAC. Such code is nowhere present in the kernel, except for some MIPS systems. It's not clear if

[PATCH 01/11] fbdev: Remove trailing whitespaces

2022-07-07 Thread Thomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/aty/aty128fb.c| 52 ++--- drivers/video/fbdev/aty/radeon_base.c | 66 +++--- drivers/video/fbdev/chipsfb.c | 6 +- drivers/video/fbdev/i810/i810_main.c | 310 +--

[PATCH 03/11] fbdev/vga16fb: Auto-generate module init/exit code

2022-07-07 Thread Thomas Zimmermann
Move vgag16fb's option parsing into the driver's probe function and generate the rest of the module's init/exit functions from macros. Keep the options code, although there are no options defined. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/vga16fb.c | 35 ++-

[PATCH 08/11] video: Provide constants for VGA I/O range

2022-07-07 Thread Thomas Zimmermann
Provide VGA_FB_ constants for the VGA framebuffer I/O range and convert fbdev code. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/core/fbmem.c | 4 ++-- drivers/video/fbdev/vga16fb.c| 15 ++- include/video/vga.h | 2 ++ 3 files changed, 10 insertions(+),

[PATCH 11/11] fbdev: Remove conflict-handling code

2022-07-07 Thread Thomas Zimmermann
Remove the call to do_remove_conflicting_framebuffers() from the framebuffer registration. Aperture helpers take care of removing conflicting devices. With all ownership information stored in the aperture datastrcutures, remove remove_conflicting_framebuffers() entirely. This change also rectifies

[PATCH 05/11] fbdev: Convert drivers to aperture helpers

2022-07-07 Thread Thomas Zimmermann
Convert fbdev drivers from fbdev's remove_conflicting_framebuffers() to the framework-independent aperture_remove_conflicting_devices(). Calling this function will also remove conflicting DRM drivers. Signed-off-by: Thomas Zimmermann --- drivers/staging/sm750fb/sm750.c | 15 +--

[PATCH 07/11] video/aperture: Disable and unregister sysfb devices via aperture helpers

2022-07-07 Thread Thomas Zimmermann
Call sysfb_disable() before removing conflicting devices in aperture helpers. Fixes sysfb state if fbdev has been disabled. Signed-off-by: Thomas Zimmermann Fixes: fb84efa28a48 ("drm/aperture: Run fbdev removal before internal helpers") Cc: Zack Rusin Cc: Thomas Zimmermann Cc: Javier Martinez C

[PATCH 09/11] video/aperture: Remove conflicting VGA devices, if any

2022-07-07 Thread Thomas Zimmermann
On the primary graphics adapter, a driver might conflict with a VGA driver that controls the VGA framebuffer I/O range. Remove the VGA driver from the aperture helpers. Until now, this case has been hendled by fbdev, but it should work even with fbdev disabled. Signed-off-by: Thomas Zimmermann --

[PATCH 10/11] fbdev: Acquire framebuffer apertures for firmware devices

2022-07-07 Thread Thomas Zimmermann
When registering a generic framebuffer, automatically acquire ownership of the framebuffer's I/O range. The device will now be handled by the aperture helpers. Fbdev-based conflict handling is no longer required. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/core/fbmem.c | 33

[PATCH 00/11] fbdev: Maintain device ownership with aperture helpers

2022-07-07 Thread Thomas Zimmermann
Fbdev firmware drivers acquire ownership of framebuffer I/O ranges and hand them over to native drivers during the boot process. Re-implement this mechanism with aperture helpers and remove the respective fbdev code. This change allows to perform hand-over from DRM firmware drivers. In a later pat

[PATCH 04/11] fbdev/core: Remove remove_conflicting_pci_framebuffers()

2022-07-07 Thread Thomas Zimmermann
Remove remove_conflicting_pci_framebuffers() and implement similar functionality in aperture_remove_conflicting_pci_device(), which was the only caller. Removes an otherwise unused interface and streamlines the aperture helper. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/

[PATCH 06/11] fbdev: Remove conflicting devices on PCI bus

2022-07-07 Thread Thomas Zimmermann
Remove firmware devices on the PCI bus, by calling aperture_remove_conflicting_pci_devices() in the probe function of each related fbdev driver. iSo far, most of these drivers did not remove conflicting VESA or EFI devices, or outride failed for resource conflicts (i.e., matroxfb.) This must have b

[PATCH 0/7] Improve GPU Recovery

2022-07-07 Thread Akhil P Oommen
Recently, I have debugged a few device crashes which occured during a recovery after a hangcheck timeout. It looks like there are a few things we can do to improve our chance at a successful gpu recovery. First one is to ensure that CX GDSC collapses which clears the internal states in gpu's CX

[PATCH 1/7] drm/msm: Remove unnecessary pm_runtime_get/put

2022-07-07 Thread Akhil P Oommen
We already enable gpu power from msm_gpu_submit(), so avoid a duplicate pm_runtime_get/put from msm_job_run(). Signed-off-by: Akhil P Oommen --- drivers/gpu/drm/msm/msm_ringbuffer.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_ringbuffer.c b/drivers/gpu/drm/ms

[PATCH 2/7] drm/msm: Correct pm_runtime votes in recover worker

2022-07-07 Thread Akhil P Oommen
In the scenario where there is one a single submit which is hung, gpu is power collapsed when it is retired. Because of this, by the time we call reover(), gpu state would be already clear. Fix this by correctly managing the pm runtime votes. Signed-off-by: Akhil P Oommen --- drivers/gpu/drm/ms

[PATCH 3/7] drm/msm: Fix cx collapse issue during recovery

2022-07-07 Thread Akhil P Oommen
There are some hardware logic under CX domain. For a successful recovery, we should ensure cx headswitch collapses to ensure all the stale states are cleard out. This is especially true to for a6xx family where we can GMU co-processor. Currently, cx doesn't collapse due to a devlink between gpu an

[PATCH 4/7] drm/msm: Ensure cx gdsc collapse during recovery

2022-07-07 Thread Akhil P Oommen
To improve our chance of a successful recovery, we should ensure that cx headswitch collapses. Cx headswitch might be kept enabled through a vote from another driver like iommu or even another hardware subsystem. So, poll the cx gdscr register to ensure that it collapses during recovery. Signed-of

[PATCH 5/7] arm64: dts: qcom: sc7280: Update gpu register list

2022-07-07 Thread Akhil P Oommen
Update gpu register array with gpucc memory region. Signed-off-by: Akhil P Oommen --- arch/arm64/boot/dts/qcom/sc7280.dtsi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index e66fc67..defdb2

[PATCH 6/7] drm/msm/a6xx: Improve gpu recovery sequence

2022-07-07 Thread Akhil P Oommen
We can do a few more things to improve our chance at a successful gpu recovery, especially during a hangcheck timeout: 1. Halt CP and GMU core 2. Do RBBM GBIF HALT sequence 3. Do a soft reset of GPU core Signed-off-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a6xx.xml.h | 4 ++ drivers/gp

[PATCH 7/7] drm/msm/a6xx: Handle GMU prepare-slumber hfi failure

2022-07-07 Thread Akhil P Oommen
When prepare-slumber hfi fails, we should follow a6xx_gmu_force_off() sequence. Signed-off-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6

[PATCH] drm/msm/mdp5: Fix global state lock backoff

2022-07-07 Thread Rob Clark
From: Rob Clark We need to grab the lock after the early return for !hwpipe case. Otherwise, we could have hit contention yet still returned 0. Fixes an issue that the new CONFIG_DRM_DEBUG_MODESET_LOCK stuff flagged in CI: WARNING: CPU: 0 PID: 282 at drivers/gpu/drm/drm_modeset_lock.c:296 d

[PATCH v9 00/11] drm/i915: ttm for stolen

2022-07-07 Thread Robert Beckett
This series refactors i915's stolen memory region to use ttm. v2: handle disabled stolen similar to legacy version. relying on ttm to fail allocs works fine, but is dmesg noisy and causes testing dmesg warning regressions. v3: rebase to latest drm-tip. fix v2 code

[PATCH v9 02/11] drm/i915: limit ttm to dma32 for i965G[M]

2022-07-07 Thread Robert Beckett
i965G[M] cannot relocate objects above 4GiB. Ensure ttm uses dma32 on these systems. Signed-off-by: Robert Beckett Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/intel_region_ttm.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_regio

[PATCH v9 01/11] drm/i915/ttm: dont trample cache_level overrides during ttm move

2022-07-07 Thread Robert Beckett
Various places within the driver override the default chosen cache_level. Before ttm, these overrides were permanent until explicitly changed again or for the lifetime of the buffer. TTM movement code came along and decided that it could make that decision at that time, which is usually well after

[PATCH v9 04/11] drm/i915/gem: selftest should not attempt mmap of private regions

2022-07-07 Thread Robert Beckett
During testing make can_mmap consider whether the region is private. Signed-off-by: Robert Beckett Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/dr

[PATCH v9 06/11] drm/i915: sanitize mem_flags for stolen buffers

2022-07-07 Thread Robert Beckett
Stolen regions are not page backed or considered iomem. Prevent flags indicating such. This correctly prevents stolen buffers from attempting to directly map them. See i915_gem_object_has_struct_page() and i915_gem_object_has_iomem() usage for where it would break otherwise. Signed-off-by: Robert

[PATCH v9 03/11] drm/i915/ttm: only trust snooping for dgfx when deciding default cache_level

2022-07-07 Thread Robert Beckett
By default i915_ttm_cache_level() decides I915_CACHE_LLC if HAS_SNOOP. This is divergent from existing backends code which only considers HAS_LLC. Testing shows that trusting snooping on gen5- is unreliable and bsw via ggtt mappings, so limit DGFX for now and maintain previous behaviour. Signed-of

[PATCH v9 05/11] drm/i915: instantiate ttm ranger manager for stolen memory

2022-07-07 Thread Robert Beckett
prepare for ttm based stolen region by using ttm range manager as the resource manager for stolen region. Signed-off-by: Robert Beckett Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 6 ++-- drivers/gpu/drm/i915/intel_region_ttm.c | 31 +++

[PATCH v9 08/11] drm/i915/ttm: add buffer pin on alloc flag

2022-07-07 Thread Robert Beckett
For situations where allocations need to fail on alloc instead of delayed get_pages, add a new alloc flag to pin the ttm bo. This makes sure that the resource has been allocated during buffer creation, allowing it to fail with an error if the placement is exhausted. This allows existing fallback op

[PATCH v9 07/11] drm/i915: ttm move/clear logic fix

2022-07-07 Thread Robert Beckett
ttm managed buffers start off with system resource definitions and ttm_tt tracking structures allocated (though unpopulated). currently this prevents clearing of buffers on first move to desired placements. The desired behaviour is to clear user allocated buffers and any kernel buffers that specif

[PATCH v9 10/11] drm/i915/selftest: wait for requests during engine reset selftest

2022-07-07 Thread Robert Beckett
While looping around each engine and testing for corrupted solen memory during engine reset, the old requests from the previous engine can still be yet to retire. To prevent false positive corruption tests, wait for the outstanding requests at the end of the test Signed-off-by: Robert Beckett ---

[PATCH v9 09/11] drm/i915/selftest: don't attempt engine reset of guc submission engines

2022-07-07 Thread Robert Beckett
igt_reset_engines_stolen tries to reset engines without checking if it is possible. Engines using GuC submission are not able to be reset from the host. In this scenario, the reset exits early, then on the next iteration of the each engine loop, the async teardown of the spinner request context's

[PATCH v9 11/11] drm/i915: stolen memory use ttm backend

2022-07-07 Thread Robert Beckett
refactor stolen memory region to use ttm. this necessitates using ttm resources to track reserved stolen regions instead of drm_mm_nodes. Signed-off-by: Robert Beckett --- drivers/gpu/drm/i915/display/intel_fbc.c | 78 ++-- .../gpu/drm/i915/gem/i915_gem_object_types.h | 2 - drivers/gpu

Re: [PATCH] drm/msm/mdp5: Fix global state lock backoff

2022-07-07 Thread Abhinav Kumar
On 7/7/2022 9:20 AM, Rob Clark wrote: From: Rob Clark We need to grab the lock after the early return for !hwpipe case. Otherwise, we could have hit contention yet still returned 0. Fixes an issue that the new CONFIG_DRM_DEBUG_MODESET_LOCK stuff flagged in CI: WARNING: CPU: 0 PID: 282

Re: [RFT][PATCH v2 9/9] vfio: Replace phys_pfn with pages for vfio_pin_pages()

2022-07-07 Thread Nicolin Chen
On Thu, Jul 07, 2022 at 08:49:28AM +, Tian, Kevin wrote: > External email: Use caution opening links or attachments > > > > From: Nicolin Chen > > Sent: Wednesday, July 6, 2022 2:28 PM > > > > Most of the callers of vfio_pin_pages() want "struct page *" and the > > low-level mm code to pin p

Re: [RFT][PATCH v2 4/9] vfio: Pass in starting IOVA to vfio_pin/unpin_pages API

2022-07-07 Thread Nicolin Chen
On Thu, Jul 07, 2022 at 08:46:12AM +, Tian, Kevin wrote: > External email: Use caution opening links or attachments > > > > From: Nicolin Chen > > Sent: Wednesday, July 6, 2022 2:28 PM > > /* > > - * Pin a set of guest PFNs and return their associated host PFNs for local > > + * Pin contiguo

[PATCH] drm/i915/ttm: fix sg_table construction

2022-07-07 Thread Matthew Auld
If we encounter some monster sized local-memory page that exceeds the maximum sg length (UINT32_MAX), ensure that don't end up with some misaligned address in the entry that follows, leading to fireworks later. Also ensure we have some coverage of this in the selftests. Fixes: f701b16d4cc5 ("drm/i

Re: [PATCH 3/7] drm/msm: Fix cx collapse issue during recovery

2022-07-07 Thread Rob Clark
On Thu, Jul 7, 2022 at 9:11 AM Akhil P Oommen wrote: > > There are some hardware logic under CX domain. For a successful > recovery, we should ensure cx headswitch collapses to ensure all the > stale states are cleard out. This is especially true to for a6xx family > where we can GMU co-processor.

Re: [RFT][PATCH v2 1/9] vfio: Make vfio_unpin_pages() return void

2022-07-07 Thread Nicolin Chen
On Thu, Jul 07, 2022 at 08:42:28AM +, Tian, Kevin wrote: > External email: Use caution opening links or attachments > > > > From: Nicolin Chen > > Sent: Wednesday, July 6, 2022 2:28 PM > > > > There's only one caller that checks its return value with a WARN_ON_ONCE, > > while all other calle

Re: [Intel-gfx] [PATCH 1/6] drm/ttm: rename and cleanup ttm_bo_init_reserved

2022-07-07 Thread kernel test robot
Hi "Christian, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-tip/drm-tip] url: https://github.com/intel-lab-lkp/linux/commits/Christian-K-nig/drm-ttm-rename-and-cleanup-ttm_bo_init_reserved/20220707-192538 base: git://anongit.freedesktop.org/drm/dr

[PATCH] gpu: host1x: Register context bus unconditionally

2022-07-07 Thread Robin Murphy
Conditional registration is a problem for other subsystems which may unwittingly try to interact with host1x_context_device_bus_type in an uninitialised state on non-Tegra platforms. A look under /sys/bus on a typical system already reveals plenty of entries from enabled but otherwise irrelevant co

[PATCH v3 0/4] drm: rename CMA helpers to DMA helpers

2022-07-07 Thread Danilo Krummrich
This patch series renames all CMA helpers to DMA helpers - considering the hierarchy of APIs (mm/cma -> dma -> gem/fb dma helpers) calling them DMA helpers seems to be more applicable. Additionally, commit e57924d4ae80 ("drm/doc: Task to rename CMA helpers") requests to rename the CMA helpers and

[PATCH v3 1/4] drm/fb: rename FB CMA helpers to FB DMA helpers

2022-07-07 Thread Danilo Krummrich
Rename "FB CMA" helpers to "FB DMA" helpers - considering the hierarchy of APIs (mm/cma -> dma -> fb dma) calling them "FB DMA" seems to be more applicable. Besides that, commit e57924d4ae80 ("drm/doc: Task to rename CMA helpers") requests to rename the CMA helpers and implies that people seem to

[PATCH v3 4/4] drm/todo: remove task to rename CMA helpers

2022-07-07 Thread Danilo Krummrich
Both, GEM and FB, CMA helpers were renamed to "GEM DMA" and "FB DMA", hence the task can be removed. Acked-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Signed-off-by: Danilo Krummrich --- Documentation/gpu/todo.rst | 13 - 1 file changed, 13 deletions(-) diff --git a/Docume

[PATCH v3 3/4] drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr}

2022-07-07 Thread Danilo Krummrich
The field paddr of struct drm_gem_dma_object holds a DMA address, which might actually be a physical address. However, depending on the platform, it can also be a bus address or a virtual address managed by an IOMMU. Hence, rename the field to dma_addr, which is more applicable. In order to do th

Re: [PATCH -next] drm/amd/display: clean up some inconsistent indenting

2022-07-07 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Jul 6, 2022 at 9:38 PM Yang Li wrote: > > Eliminate the follow smatch warnings: > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser2.c:405 > get_bios_object_from_path_v3() warn: inconsistent indenting > drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_pa

Re: [PATCH] drm/amd/display: Fix unsigned expression compared with zero

2022-07-07 Thread Alex Deucher
On Wed, Jul 6, 2022 at 3:41 AM Zhongjun Tan wrote: > > From: Zhongjun Tan > > Fix unsigned expression compared with zero > > Signed-off-by: Zhongjun Tan > --- > .../gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --g

Re: [PATCH V3 02/20] OPP: Make dev_pm_opp_set_regulators() accept NULL terminated list

2022-07-07 Thread Chanwoo Choi
On 22. 7. 4. 21:07, Viresh Kumar wrote: > Make dev_pm_opp_set_regulators() accept a NULL terminated list of names > instead of making the callers keep the two parameters in sync, which > creates an opportunity for bugs to get in. > > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Viresh Kumar

[PATCH v8 00/15] Add MEMORY_DEVICE_COHERENT for coherent device memory mapping

2022-07-07 Thread Alex Sierra
This is our MEMORY_DEVICE_COHERENT patch series rebased and updated for current 5.19.0-rc5 Changes since the last version: - Fixed problems with migration during long-term pinning in get_user_pages - Open coded vm_normal_lru_pages as suggested in previous code review - Update hmm_gup_test with mor

[PATCH v8 03/15] mm: add zone device coherent type memory support

2022-07-07 Thread Alex Sierra
Device memory that is cache coherent from device and CPU point of view. This is used on platforms that have an advanced system bus (like CAPI or CXL). Any page of a process can be migrated to such memory. However, no one should be allowed to pin such memory so that it can always be evicted. Signed

  1   2   >