[PATCH v5 12/19] drm/i915/vm_bind: Implement I915_GEM_EXECBUFFER3 ioctl

2022-10-25 Thread Niranjana Vishwanathapura
Implement 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 list of objects to validate bind as all required objects binding would have been requested by the userspace befor

[PATCH v5 10/19] drm/i915/vm_bind: Abstract out common execbuf functions

2022-10-25 Thread Niranjana Vishwanathapura
The new execbuf3 ioctl path and the legacy execbuf ioctl paths have many common functionalities. Abstract out the common execbuf functionalities into a separate file where possible, thus allowing code sharing. Reviewed-by: Andi Shyti Reviewed-by: Matthew Auld Signed-off-by: Niranjana Vishwanatha

[PATCH v5 07/19] drm/i915/vm_bind: Add support to handle object evictions

2022-10-25 Thread Niranjana Vishwanathapura
Support eviction by maintaining a list of evicted persistent vmas for rebinding during next submission. Ensure the list do not include persistent vmas that are being purged. v2: Remove unused I915_VMA_PURGED definition. v3: Properly handle __i915_vma_unbind_async() case. Reviewed-by: Matthew Auld

[PATCH v5 02/19] drm/i915/vm_bind: Add __i915_sw_fence_await_reservation()

2022-10-25 Thread Niranjana Vishwanathapura
Add function __i915_sw_fence_await_reservation() for asynchronous wait on a dma-resv object with specified dma_resv_usage. This is required for async vma unbind with vm_bind. Reviewed-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura --- drivers/gpu/drm/i915/i915_sw_fence.c | 28 +++

[PATCH v5 13/19] drm/i915/vm_bind: Update i915_vma_verify_bind_complete()

2022-10-25 Thread Niranjana Vishwanathapura
Ensure i915_vma_verify_bind_complete() handles case where bind is not initiated. Also make it non static, add documentation and move it out of CONFIG_DRM_I915_DEBUG_GEM. v2: Fix fence leak Reviewed-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- drivers

[PATCH v5 00/19] drm/i915/vm_bind: Add VM_BIND functionality

2022-10-25 Thread Niranjana Vishwanathapura
DRM_I915_GEM_VM_BIND/UNBIND ioctls allows UMD to bind/unbind GEM buffer objects (BOs) or sections of a BOs at specified GPU virtual addresses on a specified address space (VM). Multiple mappings can map to the same physical pages of an object (aliasing). These mappings (also referred to as persiste

[PATCH v5 04/19] drm/i915/vm_bind: Add support to create persistent vma

2022-10-25 Thread Niranjana Vishwanathapura
Add i915_vma_instance_persistent() to create persistent vmas. Persistent vmas will use i915_gtt_view to support partial binding. vma_lookup is tied to segment of the object instead of section of VA space. Hence, it do not support aliasing. ie., multiple mappings (at different VA) point to the same

[PATCH v5 03/19] drm/i915/vm_bind: Expose i915_gem_object_max_page_size()

2022-10-25 Thread Niranjana Vishwanathapura
Expose i915_gem_object_max_page_size() function non-static which will be used by the vm_bind feature. Reviewed-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_create.c | 18 +- drivers/gpu/drm/i915/gem/i9

[PATCH v5 17/19] drm/i915/vm_bind: Limit vm_bind mode to non-recoverable contexts

2022-10-25 Thread Niranjana Vishwanathapura
Only support vm_bind mode with non-recoverable contexts. With new vm_bind mode with eb3 submission path, we need not support older recoverable contexts. Signed-off-by: Niranjana Vishwanathapura --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 6 ++ 1 file changed, 6 insertions(+) diff --gi

[PATCH v5 18/19] drm/i915/vm_bind: Add uapi for user to enable vm_bind_mode

2022-10-25 Thread Niranjana Vishwanathapura
Add getparam support for VM_BIND capability version. Add VM creation time flag to enable vm_bind_mode for the VM. v2: update kernel-doc v3: create vm->root_obj only upon I915_VM_CREATE_FLAGS_USE_VM_BIND v4: replace vm->vm_bind_mode check with i915_gem_vm_is_vm_bind_mode() Reviewed-by: Matthew Aul

[PATCH v5 06/19] drm/i915/vm_bind: Support for VM private BOs

2022-10-25 Thread Niranjana Vishwanathapura
Each VM creates a root_obj and shares it with all of its private objects to use it as dma_resv object. This has a performance advantage as it requires a single dma_resv object update for all private BOs vs list of dma_resv objects update for shared BOs, in the execbuf path. VM private BOs can be o

[PATCH v5 09/19] drm/i915/vm_bind: Add out fence support

2022-10-25 Thread Niranjana Vishwanathapura
Add support for handling out fence for vm_bind call. v2: Reset vma->vm_bind_fence.syncobj to NULL at the end of vm_bind call. v3: Remove vm_unbind out fence uapi which is not supported yet. v4: Return error if I915_TIMELINE_FENCE_WAIT fence flag is set. Wait for bind to complete iff I915_T

[PATCH v5 16/19] drm/i915/vm_bind: userptr dma-resv changes

2022-10-25 Thread Niranjana Vishwanathapura
For persistent (vm_bind) vmas of userptr BOs, handle the user page pinning by using the i915_gem_object_userptr_submit_init() /done() functions v2: Do not double add vma to vm->userptr_invalidated_list Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- .../gpu/drm/i915/gem/

[PATCH v5 11/19] drm/i915/vm_bind: Use common execbuf functions in execbuf path

2022-10-25 Thread Niranjana Vishwanathapura
Update the execbuf path to use common execbuf functions to reduce code duplication with the newer execbuf3 path. Reviewed-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 507 ++ 1 file changed, 38 insertions(+), 469 d

Re: [PATCH 00/22] Fallback to native backlight

2022-10-25 Thread Akihiko Odaki
On 2022/10/25 3:11, Jani Nikula wrote: On Tue, 25 Oct 2022, Akihiko Odaki wrote: That aside, the first patch in this series can be applied without the later patches so you may have a look at it. It's fine if you don't merge it though since it does not fix really a pragmatic bug as its message s

[PATCH v5 01/19] drm/i915/vm_bind: Expose vm lookup function

2022-10-25 Thread Niranjana Vishwanathapura
Make i915_gem_vm_lookup() function non-static as it will be used by the vm_bind feature. Reviewed-by: Matthew Auld Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 11 ++- drivers/gpu/drm/i915/gem/i915_gem_context.h |

[PATCH v5 14/19] drm/i915/vm_bind: Expose i915_request_await_bind()

2022-10-25 Thread Niranjana Vishwanathapura
Rename __i915_request_await_bind() as i915_request_await_bind() and make it non-static as it will be used in execbuf3 ioctl path. v2: add documentation Reviewed-by: Matthew Auld Reviewed-by: Andi Shyti Signed-off-by: Niranjana Vishwanathapura --- drivers/gpu/drm/i915/i915_vma.c | 8 +---

[PATCH v5 08/19] drm/i915/vm_bind: Support persistent vma activeness tracking

2022-10-25 Thread Niranjana Vishwanathapura
Do not use i915_vma activeness tracking for persistent vmas. As persistent vmas are part of working set for each execbuf submission on that address space (VM), a persistent vma is active if the VM active. As vm->root_obj->base.resv will be updated for each submission on that VM, it correctly repre

[PATCH v5 15/19] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-10-25 Thread Niranjana Vishwanathapura
Handle persistent (VM_BIND) mappings during the request submission in the execbuf3 path. v2: Ensure requests wait for bindings to complete. v3: Remove short term pinning with PIN_VALIDATE flag. Individualize fences before adding to dma_resv obj. v4: Fix bind completion check, use PIN_NOEVICT,

ast: resolutions that require single-buffering (due to VRAM limitations) are unavailable

2022-10-25 Thread Jeremy Rand
Hi dri-devel, I have two machines with ASPEED GPU's (ast Linux driver). One machine is x86_64, running an ASRock Rack Tommy 90-SC02P1-00UBNZ GPU (AST2510 chipset) with KDE Plasma Wayland; the other is ppc64le, running an integrated AST2500 GPU with KDE Plasma X11. Both the AST2510 and AST25

Re: [PATCH] drm/amdgpu: don't call drm_fb_helper_lastclose in lastclose()

2022-10-25 Thread Thomas Zimmermann
Hi Am 24.10.22 um 18:48 schrieb Alex Deucher: On Mon, Oct 24, 2022 at 3:33 AM Thomas Zimmermann wrote: Hi Am 24.10.22 um 08:20 schrieb Quan, Evan: [AMD Official Use Only - General] Reviewed-by: Evan Quan -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Thursday,

[PATCH -next] drm/amdkfd: Fix NULL pointer dereference in svm_migrate_to_ram()

2022-10-25 Thread Yang Li
./drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:985:58-62: ERROR: p is NULL but dereferenced. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2549 Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-

Re: [PATCH v8] drm: Add initial ci/ subdirectory

2022-10-25 Thread Daniel Vetter
On Fri, 9 Sept 2022 at 19:18, Daniel Stone wrote: > > Hi, > > On Fri, 9 Sept 2022 at 15:15, Tomeu Vizoso wrote: >> >> Also include a configuration file that points to the out-of-tree CI >> scripts. > > > I think this para is outdated given ... > >> v8: >> - Move all files specific to testing t

Re: ast: resolutions that require single-buffering (due to VRAM limitations) are unavailable

2022-10-25 Thread Thomas Zimmermann
Hi Am 25.10.22 um 09:12 schrieb Jeremy Rand: Hi dri-devel, I have two machines with ASPEED GPU's (ast Linux driver).  One machine is x86_64, running an ASRock Rack Tommy 90-SC02P1-00UBNZ GPU (AST2510 chipset) with KDE Plasma Wayland; the other is ppc64le, running an integrated AST2500 GPU wi

[airlied:01.01-gsp-rm 132/180] drivers/gpu/drm/nouveau/nouveau_connector.c:1218:30: warning: unused variable 'aux'

2022-10-25 Thread kernel test robot
tree: git://people.freedesktop.org/~airlied/linux.git 01.01-gsp-rm head: 6be95d5e52818808565790c5ee3fd5569263bd36 commit: beea5ab213b28f7abf7c3405439ac9abcd1b8415 [132/180] drm/nouveau/disp: add output aux xfer method config: i386-allyesconfig (attached as .config) compiler: gcc-11 (Debian 11.

Re: [Regression] CPU stalls and eventually causes a complete system freeze with 6.0.3 due to "video/aperture: Disable and unregister sysfb devices via aperture helpers"

2022-10-25 Thread Thomas Zimmermann
Hi Andreas Am 24.10.22 um 18:19 schrieb Andreas Thalhammer: Am 24.10.22 um 13:31 schrieb Thomas Zimmermann: Hi Am 24.10.22 um 13:27 schrieb Greg KH: On Mon, Oct 24, 2022 at 12:41:43PM +0200, Thorsten Leemhuis wrote: Hi! Thx for the reply. On 24.10.22 12:26, Thomas Zimmermann wrote: Am 23.1

Re: [Regression] CPU stalls and eventually causes a complete system freeze with 6.0.3 due to "video/aperture: Disable and unregister sysfb devices via aperture helpers"

2022-10-25 Thread Andreas Thalhammer
Am 25.10.22 um 10:16 schrieb Thomas Zimmermann: Hi Andreas Am 24.10.22 um 18:19 schrieb Andreas Thalhammer: Am 24.10.22 um 13:31 schrieb Thomas Zimmermann: Hi Am 24.10.22 um 13:27 schrieb Greg KH: On Mon, Oct 24, 2022 at 12:41:43PM +0200, Thorsten Leemhuis wrote: Hi! Thx for the reply. On

Re: [Regression] CPU stalls and eventually causes a complete system freeze with 6.0.3 due to "video/aperture: Disable and unregister sysfb devices via aperture helpers"

2022-10-25 Thread Thomas Zimmermann
Hi Am 25.10.22 um 10:45 schrieb Andreas Thalhammer: [...] Yeah, it's also part of a larger changeset. But I wouldn't want to backport all those changes either. Attached is a simple patch for linux-stable that adds the necessary fix. If this still doesn't work, we should probably revert the prob

[airlied:01.01-gsp-rm 87/180] drivers/gpu/drm/nouveau/nvkm/core/firmware.c:213:68: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type

2022-10-25 Thread kernel test robot
tree: git://people.freedesktop.org/~airlied/linux.git 01.01-gsp-rm head: 6be95d5e52818808565790c5ee3fd5569263bd36 commit: e7be44d4385351aaf43f09786faa38d153722673 [87/180] drm/nouveau/acr: use common falcon HS FW code for ACR FWs config: microblaze-randconfig-r001-20221023 (attached as .config

RE: [PATCH] video: fbdev: sis: use explicitly signed char

2022-10-25 Thread David Laight
From: Jason A. Donenfeld > Sent: 24 October 2022 17:29 > To: linux-ker...@vger.kernel.org > > With char becoming unsigned by default, and with `char` alone being > ambiguous and based on architecture, signed chars need to be marked > explicitly as such. This fixes warnings like: > ... > --- > dr

[PATCH v2 1/2] drm/atomic-helper: Add {begin, end}_fb_access to plane helpers

2022-10-25 Thread Thomas Zimmermann
Add {begin,end}_fb_access helpers to run at the beginning and end of an atomic commit. The begin_fb_access helper aquires resources that are necessary to perform the atomic commit. It it similar to prepare_fb, except that the resources are to be released at the end of the commit. Resources acquired

[PATCH v2 0/2] drm: Add new plane helpers to begin/end FB access

2022-10-25 Thread Thomas Zimmermann
This patchset adds the callbacks begin_fb_access and end_fb_access to struct drm_plane_helper_funcs. They provide hooks to acquire and release resources that are only held during the commit. It adds related simple-KMS helpers and converts shadow-plane helpers. As resource allocation often can fail

[PATCH v2 2/2] drm/gem: Implement shadow-plane {begin, end}_fb_access with vmap

2022-10-25 Thread Thomas Zimmermann
Move the vmap code for shadow-plane helpers from prepare_fb to begin_fb_access helpers. Vunmap is now performed at the end of the current pageflip, instead of the end of the following pageflip. Reduces the duration of the mapping from while the framebuffer is being displayed to just the atomic com

Re: [PATCH v2 0/8] Fix several device private page reference counting issues

2022-10-25 Thread Vlastimil Babka (SUSE)
On 9/28/22 14:01, Alistair Popple wrote: > This series aims to fix a number of page reference counting issues in > drivers dealing with device private ZONE_DEVICE pages. These result in > use-after-free type bugs, either from accessing a struct page which no > longer exists because it has been remo

Re: [Regression] CPU stalls and eventually causes a complete system freeze with 6.0.3 due to "video/aperture: Disable and unregister sysfb devices via aperture helpers"

2022-10-25 Thread Greg KH
On Tue, Oct 25, 2022 at 11:21:57AM +0200, Thomas Zimmermann wrote: > Hi > > Am 25.10.22 um 10:45 schrieb Andreas Thalhammer: > [...] > > > Yeah, it's also part of a larger changeset. But I wouldn't want to > > > backport all those changes either. > > > > > > Attached is a simple patch for linux-s

Re: [PATCH v1] drm/scheduler: Set the FIFO scheduling policy as the default

2022-10-25 Thread Christian König
Pushed to drm-misc-next. Christian. Am 24.10.22 um 23:26 schrieb Luben Tuikov: The currently default Round-Robin GPU scheduling can result in starvation of entities which have a large number of jobs, over entities which have a very small number of jobs (single digit). This can be illustrated i

[PATCH] video/aperture: Call sysfb_disable() before removing PCI devices

2022-10-25 Thread Thomas Zimmermann
Call sysfb_disable() from aperture_remove_conflicting_pci_devices() before removing PCI devices. Without, simpledrm can still bind to simple-framebuffer devices after the hardware driver has taken over the hardware. Both drivers interfere with each other and results are undefined. Reported modeset

Re: [RFC PATCH 0/3] new subsystem for compute accelerator devices

2022-10-25 Thread Jason Gunthorpe
On Tue, Oct 25, 2022 at 12:27:11PM +1000, Dave Airlie wrote: > The userspace for those is normally bespoke like ROCm, which uses > amdkfd, and amdkfd doesn't operate like most device files from what I > know, so I'm not sure we'd want it to operate as an accel device. I intensely dislike this dir

Re: [PATCH] video/aperture: Call sysfb_disable() before removing PCI devices

2022-10-25 Thread Greg KH
On Tue, Oct 25, 2022 at 01:04:53PM +0200, Thomas Zimmermann wrote: > Call sysfb_disable() from aperture_remove_conflicting_pci_devices() > before removing PCI devices. Without, simpledrm can still bind to > simple-framebuffer devices after the hardware driver has taken over > the hardware. Both dri

[bug report] dma-buf: Move dma_buf_attach() to dynamic locking specification

2022-10-25 Thread Dan Carpenter
Hello Dmitry Osipenko, The patch 809d9c72c2f8: "dma-buf: Move dma_buf_attach() to dynamic locking specification" from Oct 17, 2022, leads to the following Smatch static checker warning: drivers/dma-buf/dma-buf.c:957 dma_buf_dynamic_attach() error: double unlocked 'dmabuf->resv' (o

Re: [PATCH v3 1/7] drm/ivpu: Introduce a new DRM driver for Intel VPU

2022-10-25 Thread Jacek Lawrynowicz
Hi, thanks for detailed review. My responses inline. On 10/25/2022 1:00 AM, Jeffrey Hugo wrote: > On 9/24/2022 9:11 AM, Jacek Lawrynowicz wrote: >> VPU stands for Versatile Processing Unit and it's a CPU-integrated >> inference accelerator for Computer Vision and Deep Learning >> applications. >>

[bug report] drm/bridge: it6505: Adapt runtime power management framework

2022-10-25 Thread Dan Carpenter
Hello Pin-yen Lin, The patch 1051d302: "drm/bridge: it6505: Adapt runtime power management framework" from Oct 4, 2022, leads to the following Smatch static checker warning: drivers/gpu/drm/bridge/ite-it6505.c:2712 it6505_extcon_work() warn: pm_runtime_get_sync() also returns

Re: [bug report] dma-buf: Move dma_buf_attach() to dynamic locking specification

2022-10-25 Thread Dmitry Osipenko
On 10/25/22 14:41, Dan Carpenter wrote: > Hello Dmitry Osipenko, > > The patch 809d9c72c2f8: "dma-buf: Move dma_buf_attach() to dynamic > locking specification" from Oct 17, 2022, leads to the following > Smatch static checker warning: > > drivers/dma-buf/dma-buf.c:957 dma_buf_dynamic_attac

Re: [PATCH v3 1/7] drm/ivpu: Introduce a new DRM driver for Intel VPU

2022-10-25 Thread Thomas Zimmermann
Hi Am 25.10.22 um 13:42 schrieb Jacek Lawrynowicz: Hi, thanks for detailed review. My responses inline. On 10/25/2022 1:00 AM, Jeffrey Hugo wrote: On 9/24/2022 9:11 AM, Jacek Lawrynowicz wrote: VPU stands for Versatile Processing Unit and it's a CPU-integrated inference accelerator for Comput

Re: [Intel-gfx] [PATCH v5 05/19] drm/i915/vm_bind: Implement bind and unbind of object

2022-10-25 Thread kernel test robot
Hi Niranjana, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-tip/drm-tip] url: https://github.com/intel-lab-lkp/linux/commits/Niranjana-Vishwanathapura/drm-i915-vm_bind-Add-VM_BIND-functionality/20221025-150246 base: git://anongit.freedesktop.org/drm/drm

[airlied:01.01-gsp-rm 173/180] drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r515.c:640:71: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type

2022-10-25 Thread kernel test robot
tree: git://people.freedesktop.org/~airlied/linux.git 01.01-gsp-rm head: 6be95d5e52818808565790c5ee3fd5569263bd36 commit: 2428d9aef24a6a497b8740afadbb028c17b5e697 [173/180] drm/nouveau/gsp/tu102-: add support for booting GSP-RM config: microblaze-randconfig-r001-20221023 (attached as .config)

Re: [PATCH v3 1/7] drm/ivpu: Introduce a new DRM driver for Intel VPU

2022-10-25 Thread Thomas Zimmermann
Hi, please find some review comments below. Am 24.09.22 um 17:11 schrieb Jacek Lawrynowicz: VPU stands for Versatile Processing Unit and it's a CPU-integrated inference accelerator for Computer Vision and Deep Learning applications. The VPU device consist of following componensts: - Buttres

Re: [PATCH v3 3/7] drm/ivpu: Add GEM buffer object management

2022-10-25 Thread Thomas Zimmermann
Hi Am 24.09.22 um 17:11 schrieb Jacek Lawrynowicz: Adds four types of GEM-based BOs for the VPU: - shmem - userptr - internal - prime All types are implemented as struct ivpu_bo, based on struct drm_gem_object. VPU address is allocated when buffer is created except for imported prim

Re: [PATCH] video: fbdev: sis: use explicitly signed char

2022-10-25 Thread Jason A. Donenfeld
On Mon, Oct 24, 2022 at 8:29 PM Helge Deller wrote: > > On 10/24/22 18:29, Jason A. Donenfeld wrote: > > With char becoming unsigned by default, and with `char` alone being > > ambiguous and based on architecture, signed chars need to be marked > > explicitly as such. This fixes warnings like: > >

Re: [PATCH] video: fbdev: sis: use explicitly signed char

2022-10-25 Thread Helge Deller
On 10/25/22 14:55, Jason A. Donenfeld wrote: On Mon, Oct 24, 2022 at 8:29 PM Helge Deller wrote: On 10/24/22 18:29, Jason A. Donenfeld wrote: With char becoming unsigned by default, and with `char` alone being ambiguous and based on architecture, signed chars need to be marked explicitly as s

Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices

2022-10-25 Thread Michał Winiarski
On Mon, Oct 24, 2022 at 08:43:58PM +0300, Oded Gabbay wrote: > On Mon, Oct 24, 2022 at 6:21 PM Jeffrey Hugo wrote: > > > > On 10/22/2022 3:46 PM, Oded Gabbay wrote: > > > The accelerator devices are exposed to user-space using a dedicated > > > major. In addition, they are represented in /dev with

Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-25 Thread Alex Deucher
+ Luben On Tue, Oct 25, 2022 at 2:55 AM brolerliew wrote: > > When entity move from one rq to another, current_entity will be set to NULL > if it is the moving entity. This make entities close to rq head got > selected more frequently, especially when doing load balance between > multiple drm_gpu

Re: [PATCH printk v2 24/38] xen: fbfront: use srcu console list iterator

2022-10-25 Thread Petr Mladek
On Wed 2022-10-19 17:01:46, John Ogness wrote: > Since the console_lock is not being used for anything other than > safe console list traversal, use srcu console list iteration instead. > > Signed-off-by: John Ogness Reviewed-by: Petr Mladek > --- > drivers/video/fbdev/xen-fbfront.c | 8 +

Re: [PATCH v5 1/3] drm: Use XArray instead of IDR for minors

2022-10-25 Thread Jeffrey Hugo
On 9/11/2022 3:14 PM, Michał Winiarski wrote: IDR is deprecated, and since XArray manages its own state with internal locking, it simplifies the locking on DRM side. Additionally, don't use the IRQ-safe variant, since operating on drm minor is not done in IRQ context. Signed-off-by: Michał Winia

Re: [PATCH 1/2] drm: remove DRM_MINOR_CONTROL

2022-10-25 Thread Michał Winiarski
On Tue, Oct 11, 2022 at 01:55:01PM +0200, Christian König wrote: > Am 11.10.22 um 13:39 schrieb Simon Ser: > > On Tuesday, October 11th, 2022 at 13:04, Christian König > > wrote: > > > > > --- a/include/drm/drm_file.h > > > +++ b/include/drm/drm_file.h > > > @@ -54,7 +54,6 @@ struct file; > > >

Re: [PATCH v3 1/7] drm/ivpu: Introduce a new DRM driver for Intel VPU

2022-10-25 Thread Jeffrey Hugo
On 10/25/2022 5:42 AM, Jacek Lawrynowicz wrote: Hi, thanks for detailed review. My responses inline. On 10/25/2022 1:00 AM, Jeffrey Hugo wrote: On 9/24/2022 9:11 AM, Jacek Lawrynowicz wrote: VPU stands for Versatile Processing Unit and it's a CPU-integrated inference accelerator for Computer V

Re: [PATCH 3/3] Revert "drm/amd/display: Limit max DSC target bpp for specific monitors"

2022-10-25 Thread Harry Wentland
Series is Reviewed-by: Harry Wentland Harry On 2022-10-24 15:22, Hamza Mahfooz wrote: > This reverts commit 55eea8ef98641f6e1e1c202bd3a49a57c1dd4059. > > This quirk is now handled in the DRM core, so we can drop all of > the internal code that was added to handle it. > > Signed-off-by: Hamza

Re: [RFC PATCH 0/3] new subsystem for compute accelerator devices

2022-10-25 Thread Alex Deucher
On Tue, Oct 25, 2022 at 7:15 AM Jason Gunthorpe wrote: > > On Tue, Oct 25, 2022 at 12:27:11PM +1000, Dave Airlie wrote: > > > The userspace for those is normally bespoke like ROCm, which uses > > amdkfd, and amdkfd doesn't operate like most device files from what I > > know, so I'm not sure we'd w

Re: [PATCH 3/3] Revert "drm/amd/display: Limit max DSC target bpp for specific monitors"

2022-10-25 Thread Alex Deucher
@Daniel Vetter , @Dave Airlie Any objections taking this through the AMD tree or would you rather it landed via drm-misc? Thanks, Alex On Tue, Oct 25, 2022 at 10:21 AM Harry Wentland wrote: > > Series is > > Reviewed-by: Harry Wentland > > Harry > > On 2022-10-24 15:22, Hamza Mahfooz wrote: >

Re: [RFC PATCH 0/3] new subsystem for compute accelerator devices

2022-10-25 Thread Jason Gunthorpe
On Tue, Oct 25, 2022 at 10:21:34AM -0400, Alex Deucher wrote: > E.g., the kfd node provides platform level compute > topology information; e.g., the NUMA details for connected GPUs and > CPUs, non-GPU compute node information, cache level topologies, etc. See, this is exactly what I'm talking abo

Re: [RFC PATCH 0/3] new subsystem for compute accelerator devices

2022-10-25 Thread Alex Deucher
On Tue, Oct 25, 2022 at 10:34 AM Jason Gunthorpe wrote: > > On Tue, Oct 25, 2022 at 10:21:34AM -0400, Alex Deucher wrote: > > > E.g., the kfd node provides platform level compute > > topology information; e.g., the NUMA details for connected GPUs and > > CPUs, non-GPU compute node information, cac

Re: [PATCH v8] drm: Add initial ci/ subdirectory

2022-10-25 Thread Daniel Stone
Hi all, On Tue, 25 Oct 2022 at 08:32, Daniel Vetter wrote: > On Fri, 9 Sept 2022 at 19:18, Daniel Stone wrote: > > But equally - and sorry for not jumping on the IRC (?) discussion as I was > > in the middle of other stuff when it came up - I'm don't think this is the > > right plan. > > > > M

Re: [Intel-gfx] [PATCH v4] drm/i915/slpc: Use platform limits for min/max frequency

2022-10-25 Thread Dixit, Ashutosh
On Mon, 24 Oct 2022 15:54:53 -0700, Vinay Belgaumkar wrote: > > GuC will set the min/max frequencies to theoretical max on > ATS-M. This will break kernel ABI, so limit min/max frequency > to RP0(platform max) instead. > > Also modify the SLPC selftest to update the min frequency > when we have a s

[PATCH v2 0/4] Add JDI LPM102A188A display panel support

2022-10-25 Thread Diogo Ivo
Hello, These patches add support for the JDI LPM102A188A display panel, found in the Google Pixel C. Patch 1 adds the DT bindings for the panel. Patch 2 adds a register clear to the Tegra DSI driver, needed for the panel initialization commands to be properly sent. Patch 3 adds the panel driver

[PATCH v2 1/4] dt-bindings: display: Add bindings for JDI LPM102A188A

2022-10-25 Thread Diogo Ivo
The LPM102A188A is a 10.2" 2560x1800 IPS panel found in the Google Pixel C. Signed-off-by: Diogo Ivo --- Changes in v2: - removed the touch screen property .../display/panel/jdi,lpm102a188a.yaml| 94 +++ 1 file changed, 94 insertions(+) create mode 100644 Documentatio

[PATCH v2 2/4] drm/tegra: dsi: Clear enable register if powered by bootloader

2022-10-25 Thread Diogo Ivo
In cases where the DSI module is left on by the bootloader some panels may fail to initialize if the enable register is not cleared before the panel's initialization sequence is sent, so clear it if that is the case. Signed-off-by: Diogo Ivo --- Changes in v2: - detect if the DSI module is on b

[PATCH v2 3/4] drm/panel: Add driver for JDI LPM102A188A

2022-10-25 Thread Diogo Ivo
The JDI LPM102A188A is a 2560x1800 IPS panel found in the Google Pixel C. This driver is based on the downstream GPLv2 driver released by Google written by Sean Paul [1], which was then adapted to the newer kernel APIs. [1]: https://android.googlesource.com/kernel/tegra/+/refs/heads/android-tegra

[PATCH v2 4/4] arm64: dts: smaug: Add display panel node

2022-10-25 Thread Diogo Ivo
The Google Pixel C has a JDI LPM102A188A display panel. Add a DT node for it. Tested on Pixel C. Signed-off-by: Diogo Ivo --- Changes in v2: - renamed backlight node to a generic name - removed underscores arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 70 +++ 1 file changed,

[PATCH] drm/panel: khadas-ts050: update timings to achieve 60Hz refresh rate

2022-10-25 Thread neil . armstrong
change-id: 20221025-ts050-timings-2fb4b034a268 Best regards, -- Neil Armstrong

[PATCH v2] drm/ttm: rework on ttm_resource to use size_t type

2022-10-25 Thread Somalapuram Amaranath
Change ttm_resource structure from num_pages to size_t size in bytes. v1 -> v2: change PFN_UP(dst_mem->size) to ttm->num_pages v1 -> v2: change bo->resource->size to bo->base.size at some places v1 -> v2: remove the local variable v1 -> v2: cleanup cmp_size_smaller_first() Signed-off-by: Somalapur

[Bug 216625] New: [regression] GPU lockup on Radeon R7 Kaveri

2022-10-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216625 Bug ID: 216625 Summary: [regression] GPU lockup on Radeon R7 Kaveri Product: Drivers Version: 2.5 Kernel Version: 5.19.16-100.fc35.x86_64 Hardware: All OS: Linux

[Bug 216625] [regression] GPU lockup on Radeon R7 Kaveri

2022-10-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216625 Pierre Ossman (pierre-bugzi...@ossman.eu) changed: What|Removed |Added Tree|Mainline|Fedora -- Yo

Re: [PATCH 1/2] drm: remove DRM_MINOR_CONTROL

2022-10-25 Thread Christian König
Am 25.10.22 um 15:59 schrieb Michał Winiarski: On Tue, Oct 11, 2022 at 01:55:01PM +0200, Christian König wrote: Am 11.10.22 um 13:39 schrieb Simon Ser: On Tuesday, October 11th, 2022 at 13:04, Christian König wrote: --- a/include/drm/drm_file.h +++ b/include/drm/drm_file.h @@ -54,7 +54,6 @@

Re: IMX6 etnaviv issue

2022-10-25 Thread Tim Harvey
On Sat, Oct 22, 2022 at 7:06 PM Chris Healy wrote: > > I can't speak to why you are experiencing issues when using the GPU, > but in the examples you gave, the example that is working is using a > SW based GL implementation instead of the real GPU. This can be > determined by looking at the GL_RE

[Bug 216625] [regression] GPU lockup on Radeon R7 Kaveri

2022-10-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216625 Alex Deucher (alexdeuc...@gmail.com) changed: What|Removed |Added CC||alexdeuc...@gmail.c

Re: [PATCH v2] drm/ttm: rework on ttm_resource to use size_t type

2022-10-25 Thread Christian König
Am 25.10.22 um 17:50 schrieb Somalapuram Amaranath: Change ttm_resource structure from num_pages to size_t size in bytes. v1 -> v2: change PFN_UP(dst_mem->size) to ttm->num_pages v1 -> v2: change bo->resource->size to bo->base.size at some places v1 -> v2: remove the local variable v1 -> v2: clea

Re: [Intel-gfx] [PATCH v2] drm/ttm: rework on ttm_resource to use size_t type

2022-10-25 Thread Matthew Auld
On Tue, 25 Oct 2022 at 16:51, Somalapuram Amaranath wrote: > > Change ttm_resource structure from num_pages to size_t size in bytes. > v1 -> v2: change PFN_UP(dst_mem->size) to ttm->num_pages > v1 -> v2: change bo->resource->size to bo->base.size at some places > v1 -> v2: remove the local variabl

Re: [PATCH] drm/scheduler: set current_entity to next when remove from rq

2022-10-25 Thread Luben Tuikov
Looking... Regards, Luben On 2022-10-25 09:35, Alex Deucher wrote: > + Luben > > On Tue, Oct 25, 2022 at 2:55 AM brolerliew wrote: >> >> When entity move from one rq to another, current_entity will be set to NULL >> if it is the moving entity. This make entities close to rq head got >> selected

[PATCH 04/10] vfio: Move storage of allow_unsafe_interrupts to vfio_main.c

2022-10-25 Thread Jason Gunthorpe
This legacy module knob has become uAPI, when set on the vfio_iommu_type1 it disables some security protections in the iommu drivers. Move the storage for this knob to vfio_main.c so that iommufd can access it too. Signed-off-by: Jason Gunthorpe --- drivers/vfio/vfio.h | 2 ++ driver

[PATCH 03/10] vfio: Rename vfio_device_assign/unassign_container()

2022-10-25 Thread Jason Gunthorpe
These functions don't really assign anything anymore, they just increment some refcounts and do a sanity check. Call them vfio_group_[un]use_container() Signed-off-by: Jason Gunthorpe --- drivers/vfio/container.c | 14 ++ drivers/vfio/vfio.h | 4 ++-- drivers/vfio/vfio_main.c |

[PATCH 00/10] Connect VFIO to IOMMUFD

2022-10-25 Thread Jason Gunthorpe
This series provides an alternative container layer for VFIO implemented using iommufd. This is optional, if CONFIG_IOMMUFD is not set then it will not be compiled in. At this point iommufd can be injected by passing in a iommfd FD to VFIO_GROUP_SET_CONTAINER which will use the VFIO compat layer i

[PATCH 05/10] vfio: Use IOMMU_CAP_ENFORCE_CACHE_COHERENCY for vfio_file_enforced_coherent()

2022-10-25 Thread Jason Gunthorpe
iommufd doesn't establish the iommu_domains until after the device FD is opened, even if the container has been set. This design is part of moving away from the group centric iommu APIs. This is fine, except that the normal sequence of establishing the kvm wbindv won't work: group = open("/dev

[PATCH 02/10] vfio: Move vfio_device_assign_container() into vfio_device_first_open()

2022-10-25 Thread Jason Gunthorpe
The only thing this function does is assert the group has an assigned container and incrs refcounts. The overall model we have is that once a conatiner_users refcount is incremented it cannot be de-assigned from the group - vfio_group_ioctl_unset_container() will fail and the group FD cannot be cl

[PATCH 01/10] vfio: Move vfio_device driver open/close code to a function

2022-10-25 Thread Jason Gunthorpe
This error unwind is getting complicated. Move all the code into two pair'd function. The functions should be called when the open_count == 1 after incrementing/before decrementing. Signed-off-by: Jason Gunthorpe --- drivers/vfio/vfio_main.c | 95 ++-- 1 file

[PATCH 10/10] iommufd: Allow iommufd to supply /dev/vfio/vfio

2022-10-25 Thread Jason Gunthorpe
If the VFIO container is compiled out, give a kconfig option for iommufd to provide the miscdev node with the same name and permissions as vfio uses. The compatibility node supports the same ioctls as VFIO and automatically enables the VFIO compatible pinned page accounting mode. Signed-off-by: J

[PATCH 08/10] vfio-iommufd: Support iommufd for emulated VFIO devices

2022-10-25 Thread Jason Gunthorpe
Emulated VFIO devices are calling vfio_register_emulated_iommu_dev() and consist of all the mdev drivers. Like the physical drivers, support for iommufd is provided by the driver supplying the correct correct standard ops. Provide ops from the core that duplicate what vfio_register_emulated_iommu_

[PATCH 06/10] vfio-iommufd: Allow iommufd to be used in place of a container fd

2022-10-25 Thread Jason Gunthorpe
This makes VFIO_GROUP_SET_CONTAINER accept both a vfio container FD and an iommufd. In iommufd mode an IOAS will exist after the SET_CONTAINER, but it will not be attached to any groups. >From a VFIO perspective this means that the VFIO_GROUP_GET_STATUS and VFIO_GROUP_FLAGS_VIABLE works subtly di

Re: [PATCH v5 02/31] drm/i915: Don't register backlight when another backlight should be used (v2)

2022-10-25 Thread Hans de Goede
Hi, On 10/24/22 22:30, Matthew Garrett wrote: > On Tue, Sep 27, 2022 at 01:04:52PM +0200, Hans de Goede wrote: > >> So to fix this we need to make acpi_video_get_backlight_type() >> return native on the Acer Chromebook Spin 713. > > Isn't the issue broader than that? Unless the platform is Windo

[PATCH 07/10] vfio-iommufd: Support iommufd for physical VFIO devices

2022-10-25 Thread Jason Gunthorpe
This creates the iommufd_device for the physical VFIO drivers. These are all the drivers that are calling vfio_register_group_dev() and expect the type1 code to setup a real iommu_domain against their parent struct device. The design gives the driver a choice in how it gets connected to iommufd by

[PATCH 09/10] vfio: Make vfio_container optionally compiled

2022-10-25 Thread Jason Gunthorpe
Add a kconfig CONFIG_VFIO_CONTAINER that controls compiling the container code. If 'n' then only iommufd will provide the container service. All the support for vfio iommu drivers, including type1, will not be built. This allows a compilation check that no inappropriate dependencies between the de

Re: [PATCH v5 02/31] drm/i915: Don't register backlight when another backlight should be used (v2)

2022-10-25 Thread Matthew Garrett
On Tue, Oct 25, 2022 at 08:50:54PM +0200, Hans de Goede wrote: > That is a valid point, but keep in mind that this is only used on ACPI > platforms and then only on devices with a builtin LCD panel and then > only by GPU drivers which actually call acpi_video_get_backlight_type(), > so e.g. not by

Re: [PATCH -next] drm/amdkfd: Fix NULL pointer dereference in svm_migrate_to_ram()

2022-10-25 Thread Felix Kuehling
Am 2022-10-25 um 03:28 schrieb Yang Li: ./drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:985:58-62: ERROR: p is NULL but dereferenced. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2549 Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 3 ++- 1

Re: [PATCH -next] drm/amdkfd: clean up some inconsistent indentings

2022-10-25 Thread Felix Kuehling
Am 2022-10-25 um 02:09 schrieb Yang Li: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:331 svm_migrate_copy_to_vram() warn: inconsistent indenting Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2537 Reported-by: Abaci Robot Signed-off-by: Yang Li This patch doesn't apply to our am

Re: [PATCH] [next] amdkfd: remove unused kfd_pm4_headers_diq header file

2022-10-25 Thread Felix Kuehling
Am 2022-10-25 um 05:12 schrieb Paulo Miguel Almeida: kfd_pm4_headers_diq.h header is a leftover from the old H/W debugger module support added on commit . That implementation was removed after a while and the last file that included that header was removed on commit <5bdd3eb253544b1>. This patch

[PATCH v3] drm/i915: Fix CFI violations in gt_sysfs

2022-10-25 Thread Andi Shyti
From: Nathan Chancellor When booting with CONFIG_CFI_CLANG, there are numerous violations when accessing the files under /sys/devices/pci:00/:00:02.0/drm/card0/gt/gt0: $ cd /sys/devices/pci:00/:00:02.0/drm/card0/gt/gt0 $ grep . * id:0 punit_req_freq_mhz:350 rc6_enable:

[PATCH v3 0/2] drm/msm: rework msm_iommu_new() and .create_address_space cb

2022-10-25 Thread Dmitry Baryshkov
Simplify the MSM IOMMU code a bit. This moves iommu_domain_alloc() and iommu_set_pgtable_quirks() calls to msm_iommu_new() to get rid of the disbalance, when the iommu domain is allocated by the caller of msm_iommu_new() and then it is freed by the msm_iommu code itself. Changes since v2: - Reorde

[PATCH v3 1/2] drm/msm: move domain allocation into msm_iommu_new()

2022-10-25 Thread Dmitry Baryshkov
After the msm_iommu instance is created, the IOMMU domain is completely handled inside the msm_iommu code. Move the iommu_domain_alloc() call into the msm_iommu_new() to simplify callers code. Reported-by: kernel test robot Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gmu

[PATCH v3 2/2] drm/msm: remove duplicated code from a6xx_create_address_space

2022-10-25 Thread Dmitry Baryshkov
The function a6xx_create_address_space() is mostly a copy of adreno_iommu_create_address_space() with added quirk setting. Rework these two functions to be a thin wrappers around a common helper. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 2 +- drivers/gpu/drm

Re: [PATCH v5 02/31] drm/i915: Don't register backlight when another backlight should be used (v2)

2022-10-25 Thread Hans de Goede
Hi Matthew, On 10/25/22 21:32, Matthew Garrett wrote: > On Tue, Oct 25, 2022 at 08:50:54PM +0200, Hans de Goede wrote: > >> That is a valid point, but keep in mind that this is only used on ACPI >> platforms and then only on devices with a builtin LCD panel and then >> only by GPU drivers which a

Re: [PATCH v5 02/31] drm/i915: Don't register backlight when another backlight should be used (v2)

2022-10-25 Thread Limonciello, Mario
On 10/25/2022 15:25, Hans de Goede wrote: Hi Matthew, On 10/25/22 21:32, Matthew Garrett wrote: On Tue, Oct 25, 2022 at 08:50:54PM +0200, Hans de Goede wrote: That is a valid point, but keep in mind that this is only used on ACPI platforms and then only on devices with a builtin LCD panel and

  1   2   >