Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2022-11-16 Thread Dmitry Osipenko
Hi, On 10/14/22 11:46, Christian König wrote: > +/* Remove the entity from the scheduler and kill all pending jobs */ > +static void drm_sched_entity_kill(struct drm_sched_entity *entity) > +{ > + struct drm_sched_job *job; > + struct dma_fence *prev; > + > + if (!entity->rq) > +

Re: [PATCH v3] udmabuf: add vmap and vunmap methods to udmabuf_ops

2022-11-16 Thread Dmitry Osipenko
gt; + > static struct sg_table *get_sg_table(struct device *dev, struct dma_buf *buf, >enum dma_data_direction direction) > { > @@ -162,6 +188,8 @@ static const struct dma_buf_ops udmabuf_ops = { > .unmap_dma_buf = unmap_udmabuf, > .release = release_udmabuf, > .mmap = mmap_udmabuf, > + .vmap = vmap_udmabuf, > + .vunmap= vunmap_udmabuf, > .begin_cpu_access = begin_cpu_udmabuf, > .end_cpu_access= end_cpu_udmabuf, > }; Reviewed-by: Dmitry Osipenko -- Best regards, Dmitry

Re: [PATCH v8 7/7] drm/panfrost: Switch to generic memory shrinker

2022-11-14 Thread Dmitry Osipenko
Hello Steve, On 11/14/22 19:54, Steven Price wrote: > On 05/11/2022 23:27, Dmitry Osipenko wrote: >> Replace Panfrost's custom memory shrinker with a common drm-shmem >> memory shrinker. >> >> Signed-off-by: Dmitry Osipenko > > Sadly this triggers GPU f

Re: [PATCH v1] drm/gem-vram: Fix deadlock in drm_gem_vram_vmap()

2022-11-14 Thread Dmitry Osipenko
On 11/14/22 02:38, Dmitry Osipenko wrote: > Recently DRM framebuffer core and all drivers were moved to unlocked > vmapping functions that take the reservation lock. The drm_gem_vram_vmap() > was missed out by accident and now deadlocks drivers that use drm_gem_vram > helpers when fr

[PATCH v1] drm/gem-vram: Fix deadlock in drm_gem_vram_vmap()

2022-11-13 Thread Dmitry Osipenko
drm_gem_vram_v[un]map() functions to fix the deadlock. Reported-by: Dmitry Vyukov Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_vram_helper.c | 18 +++--- 1 file changed, 3

Re: dealock in drm_fb_helper_damage_work

2022-11-13 Thread Dmitry Osipenko
On 11/13/22 23:48, Dmitry Vyukov wrote: >> Hi, >> >> I am getting the following deadlock on reservation_ww_class_mutex >> while trying to boot next-2022 kernel: > The code is recently added by this commit: > > commit 79e2cf2e7a193473dfb0da3b9b869682b43dc60f

Re: [PATCH v2] udmabuf: add vmap method to udmabuf_ops

2022-11-13 Thread Dmitry Osipenko
On 11/13/22 18:05, Lukasz Wiecaszek wrote: > +static int vmap_udmabuf(struct dma_buf *buf, struct iosys_map *map) > +{ > + struct udmabuf *ubuf = buf->priv; > + > + if (!ubuf->vaddr) { > + ubuf->vaddr = vm_map_ram(ubuf->pages, ubuf->pagecount, -1); > + if (!ubuf->vad

Re: [PATCH v2] udmabuf: add vmap method to udmabuf_ops

2022-11-13 Thread Dmitry Osipenko
On 11/13/22 18:05, Lukasz Wiecaszek wrote: > The reason behind that patch is associated with videobuf2 subsystem > (or more genrally with v4l2 framework) and user created > dma buffers (udmabuf). In some circumstances > when dealing with V4L2_MEMORY_DMABUF buffers videobuf2 subsystem > wants to use

Re: [PATCH v1 0/6] Move dma_buf_mmap_internal() to dynamic locking specification

2022-11-11 Thread Dmitry Osipenko
On 11/10/22 23:13, Dmitry Osipenko wrote: > Hello, > > Recently, dma-buf got a common locking convention for importers and > exporters. All the dma-buf functions were moved to the new locking > convention, apart from the dma_buf_mmap_internal() that was missed out > by accident.

Re: [PATCH] drm/virtio: Fix memory leak in virtio_gpu_object_create()

2022-11-11 Thread Dmitry Osipenko
obj(objs, &bo->base.base); > > ret = virtio_gpu_array_lock_resv(objs); > @@ -239,6 +239,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device > *vgdev, > > err_put_objs: > virtio_gpu_array_put_free(objs); > +err_free_entry: > + kvfree(ent

Re: [PATCH] udmabuf: add vmap method to udmabuf_ops

2022-11-11 Thread Dmitry Osipenko
On 11/11/22 15:05, Christian König wrote: > Adding Dmitry as well. > > Am 11.11.22 um 12:45 schrieb Lukasz Wiecaszek: >> The reason behind that patch is associated with videobuf2 subsystem >> (or more genrally with v4l2 framework) and user created >> dma buffers (udmabuf). In some circumstances >>

[PATCH v1 1/6] dma-buf: Move dma_buf_mmap_internal() to dynamic locking specification

2022-11-10 Thread Dmitry Osipenko
All dma-buf functions has been moved to dynamic locking specification The dma_buf_mmap_internal() was missed out by accident. Take reservation lock around file mapping operation to adhere the common locking convention. Reported-by: Daniel Vetter Signed-off-by: Dmitry Osipenko --- drivers/dma

[PATCH v1 5/6] media: videobuf2: Assert held reservation lock for dma-buf mmapping

2022-11-10 Thread Dmitry Osipenko
When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be held. Add locking sanity checks to the dma-buf mmaping callbacks to ensure that the locking assumptions won't regress in the future. Suggested-by: Daniel Vetter Signed-off-by: Dmitry Osipenko --- drivers/me

[PATCH v1 4/6] dma-buf/heaps: Assert held reservation lock for dma-buf mmapping

2022-11-10 Thread Dmitry Osipenko
When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be held. Add locking sanity checks to the dma-buf mmaping callbacks to ensure that the locking assumptions won't regress in the future. Suggested-by: Daniel Vetter Signed-off-by: Dmitry Osipenko --- drivers/dma

[PATCH v1 6/6] fastrpc: Assert held reservation lock for dma-buf mmapping

2022-11-10 Thread Dmitry Osipenko
When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be held. Add locking sanity check to the dma-buf mmaping callback to ensure that the locking assumption won't regress in the future. Suggested-by: Daniel Vetter Signed-off-by: Dmitry Osipenko --- drivers/misc/fas

[PATCH v1 2/6] drm: Assert held reservation lock for dma-buf mmapping

2022-11-10 Thread Dmitry Osipenko
When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be held. Add locking sanity checks to the dma-buf mmaping callbacks of DRM drivers to ensure that the locking assumptions won't regress in future. Suggested-by: Daniel Vetter Signed-off-by: Dmitry Osipenko --- drive

[PATCH v1 3/6] udmabuf: Assert held reservation lock for dma-buf mmapping

2022-11-10 Thread Dmitry Osipenko
When userspace mmaps dma-buf's fd, the dma-buf reservation lock must be held. Add locking sanity check to the dma-buf mmaping callback to ensure that the locking assumption won't regress in the future. Suggested-by: Daniel Vetter Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/udm

[PATCH v1 0/6] Move dma_buf_mmap_internal() to dynamic locking specification

2022-11-10 Thread Dmitry Osipenko
specification and updates drivers that support mmaping of dma-bufs to use the debug-assert of the lock. Thanks to Daniel Vetter for spotting the missed function! Dmitry Osipenko (6): dma-buf: Move dma_buf_mmap_internal() to dynamic locking specification drm: Assert held reservation lock for dma-buf

Re: [PATCH v8 4/7] drm/shmem-helper: Add memory shrinker

2022-11-09 Thread Dmitry Osipenko
Hello Thomas, On 11/9/22 13:28, Thomas Zimmermann wrote: >> +int drm_gem_shmem_set_evictable(struct drm_gem_shmem_object *shmem) >> +{ >> +    dma_resv_lock(shmem->base.resv, NULL); >> + >> +    if (shmem->madv < 0) { >> +    dma_resv_unlock(shmem->base.resv); >> +    return -ENOMEM; > >

Re: [PATCH] drm/panfrost: Split io-pgtable requests properly

2022-11-08 Thread Dmitry Osipenko
nfrost: Update io-pgtable API") > Reported-by: Dmitry Osipenko > Signed-off-by: Robin Murphy > --- > The previous diff turned out to be not quite right, so I've not > included Dmitry's Tested-by given for that. > --- > drivers/gpu/drm/panfrost/panfrost_

Re: [PATCH] drm/panfrost: Update io-pgtable API

2022-11-08 Thread Dmitry Osipenko
On 11/7/22 19:50, Robin Murphy wrote: > On 2022-11-04 20:48, Dmitry Osipenko wrote: >> On 11/4/22 23:37, Robin Murphy wrote: >>> On 2022-11-04 20:11, Dmitry Osipenko wrote: >>>> On 8/23/22 01:01, Robin Murphy wrote: >>>>> Convert to io-pgtable

Re: [PATCH v7 18/21] dma-buf: Move dma_buf_mmap() to dynamic locking specification

2022-11-07 Thread Dmitry Osipenko
the locking. >> >> Acked-by: Sumit Semwal >> Acked-by: Christian König >> Signed-off-by: Dmitry Osipenko > Just noticed this while reading code ... this patch seems to have > missed dma_buf_mmap_internal()? > > Might be good if at least some drivers gain a dma

[PATCH v8 7/7] drm/panfrost: Switch to generic memory shrinker

2022-11-05 Thread Dmitry Osipenko
Replace Panfrost's custom memory shrinker with a common drm-shmem memory shrinker. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/panfrost/Makefile | 1 - drivers/gpu/drm/panfrost/panfrost_device.h| 4 - drivers/gpu/drm/panfrost/panfrost_drv.c | 19 +-- dr

[PATCH v8 5/7] drm/gem: Add drm_gem_pin_unlocked()

2022-11-05 Thread Dmitry Osipenko
Add unlocked variants of drm_gem_un/pin() functions. These new helpers will take care of GEM dma-reservation locking for DRM drivers. VirtIO-GPU driver will use these helpers to pin shmem framebuffers, preventing them from eviction during scanout. Signed-off-by: Dmitry Osipenko --- drivers/gpu

[PATCH v8 6/7] drm/virtio: Support memory shrinking

2022-11-05 Thread Dmitry Osipenko
memory if guest supports SWAP file or partition. Signed-off-by: Daniel Almeida Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/virtio/virtgpu_drv.h| 18 +++- drivers/gpu/drm/virtio/virtgpu_gem.c| 55 ++ drivers/gpu/drm/virtio/virtgpu_ioctl.c | 37 +++ drivers/gpu/drm/virti

[PATCH v8 3/7] drm/shmem-helper: Switch to reservation lock

2022-11-05 Thread Dmitry Osipenko
: Daniel Vetter Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c| 184 +++--- drivers/gpu/drm/lima/lima_gem.c | 8 +- drivers/gpu/drm/panfrost/panfrost_drv.c | 7 +- .../gpu/drm/panfrost/panfrost_gem_shrinker.c | 6 +- drivers

[PATCH v8 4/7] drm/shmem-helper: Add memory shrinker

2022-11-05 Thread Dmitry Osipenko
drm_gem_shmem_shrinker_register(drm_device) 3. Use drm_gem_shmem_set_purgeable(shmem) and alike API functions to activate shrinking of shmem GEMs Signed-off-by: Daniel Almeida Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c| 493 -- .../gpu/drm

[PATCH v8 2/7] drm/shmem-helper: Don't use vmap_use_count for dma-bufs

2022-11-05 Thread Dmitry Osipenko
DMA-buf core has its own refcounting of vmaps, use it instead of drm-shmem counting. This change prepares drm-shmem for addition of memory shrinker support where drm-shmem will use a single dma-buf reservation lock for all operations performed over dma-bufs. Signed-off-by: Dmitry Osipenko

[PATCH v8 1/7] drm/msm/gem: Prevent blocking within shrinker loop

2022-11-05 Thread Dmitry Osipenko
ntion. If there are no remaining pages left to shrink, then there is no need to free up more pages and shrinker may break out from the loop. This problem was uncovered during shrinker/madvise IOCTL testing of virtio-gpu driver. The MSM driver is affected in the same way. Signed-off-by: Dmitry Osi

[PATCH v8 0/7] Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers

2022-11-05 Thread Dmitry Osipenko
g/dri-devel/20220526235040.678984-1-dmitry.osipe...@collabora.com/ Dmitry Osipenko (7): drm/msm/gem: Prevent blocking within shrinker loop drm/shmem-helper: Don't use vmap_use_count for dma-bufs drm/shmem-helper: Switch to reservation lock drm/shmem-helper: Add memory shrinker dr

Re: [PATCH] drm/panfrost: Update io-pgtable API

2022-11-04 Thread Dmitry Osipenko
On 11/4/22 23:37, Robin Murphy wrote: > On 2022-11-04 20:11, Dmitry Osipenko wrote: >> On 8/23/22 01:01, Robin Murphy wrote: >>> Convert to io-pgtable's bulk {map,unmap}_pages() APIs, to help the old >>> single-page interfaces eventually go away. Unmapping heap

Re: [PATCH] drm/panfrost: Update io-pgtable API

2022-11-04 Thread Dmitry Osipenko
On 8/23/22 01:01, Robin Murphy wrote: > Convert to io-pgtable's bulk {map,unmap}_pages() APIs, to help the old > single-page interfaces eventually go away. Unmapping heap BOs still > wants to be done a page at a time, but everything else can get the full > benefit of the more efficient interface. >

Re: [PATCH v2 2/2] drm/client: Prevent NULL dereference in drm_client_buffer_delete()

2022-11-02 Thread Dmitry Osipenko
On 11/2/22 12:15, Christian König wrote: > Am 30.10.22 um 16:44 schrieb Dmitry Osipenko: >> The drm_gem_vunmap() will crash with a NULL dereference if the passed >> object pointer is NULL. It wasn't a problem before we added the locking >> support to drm_gem_vunmap fu

[PATCH v2 1/2] dma-buf: Make locking consistent in dma_buf_detach()

2022-10-30 Thread Dmitry Osipenko
d-by: Dan Carpenter Reviewed-by: Christian König Link: https://lore.kernel.org/dri-devel/Y1fLfsccW3AS%2Fo+%2F@kili/ Fixes: 809d9c72c2f8 ("dma-buf: Move dma_buf_attach() to dynamic locking specification") Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 4 ++-- 1 file changed,

[PATCH v2 2/2] drm/client: Prevent NULL dereference in drm_client_buffer_delete()

2022-10-30 Thread Dmitry Osipenko
ether GEM is NULL before trying to unmap the GEM, it will happen on framebuffer creation error. Reported-by: Dan Carpenter Link: https://lore.kernel.org/dri-devel/Y1kFEGxT8MVlf32V@kili/ Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") Signed-off-by:

[PATCH v2 0/2] Fixes for dma-buf locking issues found by Smatch

2022-10-30 Thread Dmitry Osipenko
the dma-buf/attachment pointer check. - Dropped v1 patch that added GEM NULL-checking to drm_gem_vunmap_unlocked() and replaced it with the NULL-checking in drm_client_buffer_delete(), like was suggested by Christian König. Dmitry Osipenko (2): dma-buf: Make locking con

Re: [PATCH v1 1/2] dma-buf: Make locking consistent in dma_buf_detach()

2022-10-27 Thread Dmitry Osipenko
On 10/27/22 09:13, Christian König wrote: > Am 27.10.22 um 00:46 schrieb Dmitry Osipenko: >> The dma_buf_detach() locks attach->dmabuf->resv and then unlocks >> dmabuf->resv, which could be a two different locks from a static >> code checker perspective. In part

[PATCH v1 1/2] dma-buf: Make locking consistent in dma_buf_detach()

2022-10-26 Thread Dmitry Osipenko
d-by: Dan Carpenter Link: https://lore.kernel.org/dri-devel/Y1fLfsccW3AS%2Fo+%2F@kili/ Fixes: 809d9c72c2f8 ("dma-buf: Move dma_buf_attach() to dynamic locking specification") Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v1 2/2] drm/gem: Check whether object is NULL in drm_gem_vunmap()

2022-10-26 Thread Dmitry Osipenko
NULL pointers better. Reported-by: Dan Carpenter Link: https://lore.kernel.org/dri-devel/Y1kFEGxT8MVlf32V@kili/ Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem.c | 9 ++--- 1 file change

[PATCH v1 0/2] Fixes for dma-buf locking issues found by Smatch

2022-10-26 Thread Dmitry Osipenko
Hello, Here are the two patches fixing minor problems introduced by my "dma-buf locking convention" series. Thanks to Dan Carpenter who checked linux-next with Smatch and reported the found issues! Please review/ack, I'll apply the patches to misc-next afterwards. Thanks! Dmi

Re: [PATCH] drm/rockchip: dw_hdmi: filter regulator -EPROBE_DEFER error messages

2022-10-26 Thread Dmitry Osipenko
DEV_ERROR(hdmi->dev, "Unable to parse OF data\n"); > + if (ret != -EPROBE_DEFER) > + DRM_DEV_ERROR(hdmi->dev, "Unable to parse OF data\n"); > return ret; > } > Reviewed-by: Dmitry Osipenko Nit: all th

Re: [bug report] drm/gem: Add drm_gem_object_funcs

2022-10-26 Thread Dmitry Osipenko
On 10/26/22 12:59, Dan Carpenter wrote: > Hello Noralf Trønnes, > > The patch b39b5394fabc: "drm/gem: Add drm_gem_object_funcs" from Nov > 10, 2018, leads to the following Smatch static checker warning: > > drivers/gpu/drm/drm_client.c:240 drm_client_buffer_delete() > warn: variable d

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: > >

Re: [PATCH v1] drm: Switch drm_client_buffer_delete() to unlocked drm_gem_vunmap

2022-10-24 Thread Dmitry Osipenko
On 10/21/22 00:33, Dmitry Osipenko wrote: > The drm_client_buffer_delete() wasn't switched to unlocked GEM vunmapping > by accident when rest of drm_client code transitioned to the unlocked > variants of the vmapping functions. Make drm_client_buffer_delete() use > the unlocked va

[PATCH v2] ACPI: video: Fix missing native backlight on Chromebooks

2022-10-24 Thread Dmitry Osipenko
video: Add acpi_video_backlight_use_native() helper") Signed-off-by: Dmitry Osipenko --- Changelog: v2: - Added explanatory comment to the code and added check for the native backlight presence, like was requested by Hans de Goede. drivers/acpi/video_detect.c | 12 1 file changed, 12 insertions(+

Re: [PATCH v1] ACPI: video: Fix missing native backlight on Chromebooks

2022-10-24 Thread Dmitry Osipenko
On 10/24/22 16:46, Hans de Goede wrote: > Hi, > > On 10/24/22 15:32, Dmitry Osipenko wrote: >> Chromebooks don't have backlight in ACPI table, they suppose to use >> native backlight in this case. Check presence of the CrOS embedded >> controller ACPI device and p

[PATCH v1] ACPI: video: Fix missing native backlight on Chromebooks

2022-10-24 Thread Dmitry Osipenko
backlight when another backlight should be used (v2)") Signed-off-by: Dmitry Osipenko --- drivers/acpi/video_detect.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 0d9064a9804c..8ed5021de6fb 100644 --- a/drivers/acpi/

Re: [PATCH v1] drm: Switch drm_client_buffer_delete() to unlocked drm_gem_vunmap

2022-10-23 Thread Dmitry Osipenko
Hello, On 10/21/22 00:33, Dmitry Osipenko wrote: > The drm_client_buffer_delete() wasn't switched to unlocked GEM vunmapping > by accident when rest of drm_client code transitioned to the unlocked > variants of the vmapping functions. Make drm_client_buffer_delete() use > the

[PATCH v1] drm: Switch drm_client_buffer_delete() to unlocked drm_gem_vunmap

2022-10-20 Thread Dmitry Osipenko
ation lock when framebuffer is released. Reported-by: kernel test robot Link: https://lore.kernel.org/dri-devel/890f70db-68b0-8456-ca3c-c5496ef90...@collabora.com/T/ Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") Signed-off-by: Dmitry Osipenko ---

Re: [drm/gem] 79e2cf2e7a: WARNING:at_drivers/gpu/drm/drm_gem.c:#drm_gem_vunmap

2022-10-20 Thread Dmitry Osipenko
On 10/20/22 06:38, Dmitry Osipenko wrote: > On 10/20/22 06:23, kernel test robot wrote: >> Greeting, >> >> FYI, we noticed WARNING:at_drivers/gpu/drm/drm_gem.c:#drm_gem_vunmap due to >> commit (built with clang-14): >> >> commit: 79e2cf2e7a193473d

Re: [drm/gem] 79e2cf2e7a: WARNING:at_drivers/gpu/drm/drm_gem.c:#drm_gem_vunmap

2022-10-19 Thread Dmitry Osipenko
On 10/20/22 06:23, kernel test robot wrote: > Greeting, > > FYI, we noticed WARNING:at_drivers/gpu/drm/drm_gem.c:#drm_gem_vunmap due to > commit (built with clang-14): > > commit: 79e2cf2e7a193473dfb0da3b9b869682b43dc60f ("drm/gem: Take reservation > lock for vmap/vunmap operations") > git://an

Re: [PATCH v7 00/21] Move all drivers to a common dma-buf locking convention

2022-10-18 Thread Dmitry Osipenko
On 10/18/22 14:34, Christian König wrote: > Am 18.10.22 um 01:07 schrieb Dmitry Osipenko: >> On 10/17/22 20:22, Dmitry Osipenko wrote: >>> Hello, >>> >>> This series moves all drivers to a dynamic dma-buf locking >>> specification. >>>  From

Re: [PATCH v7 00/21] Move all drivers to a common dma-buf locking convention

2022-10-17 Thread Dmitry Osipenko
On 10/17/22 20:22, Dmitry Osipenko wrote: > Hello, > > This series moves all drivers to a dynamic dma-buf locking specification. > From now on all dma-buf importers are made responsible for holding > dma-buf's reservation lock around all operations performed over dma-bufs &g

[PATCH v7 18/21] dma-buf: Move dma_buf_mmap() to dynamic locking specification

2022-10-17 Thread Dmitry Osipenko
Move dma_buf_mmap() function to the dynamic locking specification by taking the reservation lock. Neither of the today's drivers take the reservation lock within the mmap() callback, hence it's safe to enforce the locking. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-

[PATCH v7 15/21] dma-buf: Move dma_buf_vmap() to dynamic locking specification

2022-10-17 Thread Dmitry Osipenko
Move dma_buf_vmap/vunmap() functions to the dynamic locking specification by asserting that the reservation lock is held. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH v7 21/21] dma-buf: Remove obsoleted internal lock

2022-10-17 Thread Dmitry Osipenko
ed-by: Christian König Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 14 -- include/linux/dma-buf.h | 9 - 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c

[PATCH v7 17/21] dma-buf: Move dma_buf_map_attachment() to dynamic locking specification

2022-10-17 Thread Dmitry Osipenko
Move dma-buf attachment mapping functions to the dynamic locking specification by asserting that the reservation lock is held. Acked-by: Sumit Semwal Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 10 ++ 1 file changed, 2 insertions(+), 8

[PATCH v7 16/21] dma-buf: Move dma_buf_attach() to dynamic locking specification

2022-10-17 Thread Dmitry Osipenko
-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 2c4381bb9478..d685a5adb122 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c

[PATCH v7 19/21] dma-buf: Document dynamic locking convention

2022-10-17 Thread Dmitry Osipenko
Add documentation for the dynamic locking convention. The documentation tells dma-buf API users when they should take the reservation lock and when not. Acked-by: Sumit Semwal Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- Documentation/driver-api/dma-buf.rst | 6

[PATCH v7 20/21] media: videobuf2: Stop using internal dma-buf lock

2022-10-17 Thread Dmitry Osipenko
. Acked-by: Tomasz Figa Acked-by: Hans Verkuil Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/media/common/videobuf2/videobuf2-dma-contig.c | 11 +-- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 11 +-- drivers/media/common/videobuf2/videobuf2

[PATCH v7 13/21] media: videobuf2: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare V4L2 memory allocators to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Tomasz Figa Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/media/common/videobuf2/videobuf2-dma-contig.c | 11

[PATCH v7 11/21] misc: fastrpc: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare fastrpc to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Acked-by: Srinivas Kandagatla Signed-off-by: Dmitry Osipenko --- drivers/misc/fastrpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH v7 10/21] RDMA/umem: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare InfiniBand drivers to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Jason Gunthorpe Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/infiniband/core/umem_dmabuf.c | 7 --- 1 file

[PATCH v7 14/21] media: tegra-vde: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare Tegra video decoder driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c | 6 +++--- 1 file changed

[PATCH v7 08/21] drm/tegra: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare Tegra DRM driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/gem.c | 17 + 1 file changed, 9 insertions(+), 8

[PATCH v7 09/21] drm/etnaviv: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare Etnaviv driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v7 07/21] drm/omapdrm: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare OMAP DRM driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v7 12/21] xen/gntdev: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare gntdev driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Juergen Gross Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/xen/gntdev-dmabuf.c | 8 1 file changed, 4 insertions

[PATCH v7 06/21] drm/i915: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare i915 driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions and handling cases where importer now holds the reservation lock. Acked-by: Christian König Reviewed-by: Michael J. Ruhl Signed-off-by: Dmitry Osipenko

[PATCH v7 05/21] drm/armada: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare Armada driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/armada/armada_gem.c | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH v7 04/21] drm/prime: Prepare to dynamic dma-buf locking specification

2022-10-17 Thread Dmitry Osipenko
Prepare DRM prime core to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_prime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH v7 03/21] drm/gem: Take reservation lock for vmap/vunmap operations

2022-10-17 Thread Dmitry Osipenko
patch prepares DRM core and drivers to the common dynamic dma-buf locking convention. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_client.c | 4 ++-- drivers/gpu/drm/drm_gem.c| 24 drivers/gpu/drm

[PATCH v7 01/21] dma-buf: Add unlocked variant of vmapping functions

2022-10-17 Thread Dmitry Osipenko
Add unlocked variant of dma_buf_vmap/vunmap() that will be utilized by drivers that don't take the reservation lock explicitly. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 43 +++ in

[PATCH v7 02/21] dma-buf: Add unlocked variant of attachment-mapping functions

2022-10-17 Thread Dmitry Osipenko
Add unlocked variant of dma_buf_map/unmap_attachment() that will be used by drivers that don't take the reservation lock explicitly. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c

[PATCH v7 00/21] Move all drivers to a common dma-buf locking convention

2022-10-17 Thread Dmitry Osipenko
lock. - Added "locking convention" documentation that explains which dma-buf functions and callbacks are locked/unlocked for importers and exporters, which was requested by Christian König. - Added ack from Tomasz Figa to the V4L patches that he gave to v1. Dmitry Osipenko (21

Re: [PATCH v6 00/21] Move all drivers to a common dma-buf locking convention

2022-10-11 Thread Dmitry Osipenko
On 9/28/22 22:15, Dmitry Osipenko wrote: > Hello, > > This series moves all drivers to a dynamic dma-buf locking specification. > From now on all dma-buf importers are made responsible for holding > dma-buf's reservation lock around all operations performed over dma-bufs &g

Re: [PATCH v6 10/21] RDMA/umem: Prepare to dynamic dma-buf locking specification

2022-10-08 Thread Dmitry Osipenko
On 9/28/22 22:15, Dmitry Osipenko wrote: > Prepare InfiniBand drivers to the common dynamic dma-buf locking > convention by starting to use the unlocked versions of dma-buf API > functions. > > Acked-by: Christian König > Signed-off-by: Dmitry Osipenko > --- >

[PATCH v6 11/21] misc: fastrpc: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare fastrpc to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Acked-by: Srinivas Kandagatla Signed-off-by: Dmitry Osipenko --- drivers/misc/fastrpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH v6 10/21] RDMA/umem: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare InfiniBand drivers to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/infiniband/core/umem_dmabuf.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH v6 08/21] drm/tegra: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare Tegra DRM driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/gem.c | 17 + 1 file changed, 9 insertions(+), 8

[PATCH v6 18/21] dma-buf: Move dma_buf_mmap() to dynamic locking specification

2022-09-28 Thread Dmitry Osipenko
Move dma_buf_mmap() function to the dynamic locking specification by taking the reservation lock. Neither of the today's drivers take the reservation lock within the mmap() callback, hence it's safe to enforce the locking. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-

[PATCH v6 16/21] dma-buf: Move dma_buf_attach() to dynamic locking specification

2022-09-28 Thread Dmitry Osipenko
-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 23656f334735..d60585bbb529 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c

[PATCH v6 19/21] dma-buf: Document dynamic locking convention

2022-09-28 Thread Dmitry Osipenko
Add documentation for the dynamic locking convention. The documentation tells dma-buf API users when they should take the reservation lock and when not. Acked-by: Sumit Semwal Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- Documentation/driver-api/dma-buf.rst | 6

[PATCH v6 14/21] media: tegra-vde: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare Tegra video decoder driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c | 6 +++--- 1 file changed

[PATCH v6 15/21] dma-buf: Move dma_buf_vmap() to dynamic locking specification

2022-09-28 Thread Dmitry Osipenko
Move dma_buf_vmap/vunmap() functions to the dynamic locking specification by asserting that the reservation lock is held. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH v6 20/21] media: videobuf2: Stop using internal dma-buf lock

2022-09-28 Thread Dmitry Osipenko
. Acked-by: Tomasz Figa Acked-by: Hans Verkuil Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/media/common/videobuf2/videobuf2-dma-contig.c | 11 +-- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 11 +-- drivers/media/common/videobuf2/videobuf2

[PATCH v6 17/21] dma-buf: Move dma_buf_map_attachment() to dynamic locking specification

2022-09-28 Thread Dmitry Osipenko
Move dma-buf attachment mapping functions to the dynamic locking specification by asserting that the reservation lock is held. Acked-by: Sumit Semwal Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 10 ++ 1 file changed, 2 insertions(+), 8

[PATCH v6 21/21] dma-buf: Remove obsoleted internal lock

2022-09-28 Thread Dmitry Osipenko
ed-by: Christian König Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 14 -- include/linux/dma-buf.h | 9 - 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c

[PATCH v6 13/21] media: videobuf2: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare V4L2 memory allocators to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Tomasz Figa Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/media/common/videobuf2/videobuf2-dma-contig.c | 11

[PATCH v6 05/21] drm/armada: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare Armada driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/armada/armada_gem.c | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH v6 12/21] xen/gntdev: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare gntdev driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Juergen Gross Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/xen/gntdev-dmabuf.c | 8 1 file changed, 4 insertions

[PATCH v6 09/21] drm/etnaviv: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare Etnaviv driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v6 07/21] drm/omapdrm: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare OMAP DRM driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v6 03/21] drm/gem: Take reservation lock for vmap/vunmap operations

2022-09-28 Thread Dmitry Osipenko
patch prepares DRM core and drivers to the common dynamic dma-buf locking convention. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_client.c | 4 ++-- drivers/gpu/drm/drm_gem.c| 24 drivers/gpu/drm

[PATCH v6 06/21] drm/i915: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare i915 driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions and handling cases where importer now holds the reservation lock. Acked-by: Christian König Reviewed-by: Michael J. Ruhl Signed-off-by: Dmitry Osipenko

[PATCH v6 01/21] dma-buf: Add unlocked variant of vmapping functions

2022-09-28 Thread Dmitry Osipenko
Add unlocked variant of dma_buf_vmap/vunmap() that will be utilized by drivers that don't take the reservation lock explicitly. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 41 +++ in

[PATCH v6 04/21] drm/prime: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare DRM prime core to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_prime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH v6 02/21] dma-buf: Add unlocked variant of attachment-mapping functions

2022-09-28 Thread Dmitry Osipenko
Add unlocked variant of dma_buf_map/unmap_attachment() that will be used by drivers that don't take the reservation lock explicitly. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c

[PATCH v6 00/21] Move all drivers to a common dma-buf locking convention

2022-09-28 Thread Dmitry Osipenko
llbacks are invoked without the held lock and exporter should take the lock. - Added "locking convention" documentation that explains which dma-buf functions and callbacks are locked/unlocked for importers and exporters, which was requested by Christian König. - Added a

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

2022-09-25 Thread Dmitry Osipenko
25.08.2022 17:36, Hans de Goede пишет: > Before this commit when we want userspace to use the acpi_video backlight > device we register both the GPU's native backlight device and acpi_video's > firmware acpi_video# backlight device. This relies on userspace preferring > firmware type backlight devi

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